Update OpenCL 2.2 specs for 2.2-10 maintenance release (#60)

* Update OpenCL 2.2 specs with 2.2-10 maintenance release output.  Remove 2.2 specs from specs/, because server redirects into 2.2/ mask them.

* Update spec release dates on index page
diff --git a/index.php b/index.php
index 1873edf..1349bdb 100644
--- a/index.php
+++ b/index.php
@@ -35,27 +35,27 @@
 <li> OpenCL 2.2 API Specification
      (<a href="specs/2.2/html/OpenCL_API.html">HTML</a>)
      (<a href="specs/2.2/pdf/OpenCL_API.pdf">PDF</a>)
-     (October 8, 2018). </li>
+     (February 5, 2019). </li>
 <li> OpenCL 2.2 Extension Specification
      (<a href="specs/2.2/html/OpenCL_Ext.html">HTML</a>)
      (<a href="specs/2.2/pdf/OpenCL_Ext.pdf">PDF</a>)
-     (October 8, 2018). </li>
+     (February 5, 2019). </li>
 <li> OpenCL SPIR-V Environment Specification
      (<a href="specs/2.2/html/OpenCL_Env.html">HTML</a>)
      (<a href="specs/2.2/pdf/OpenCL_Env.pdf">PDF</a>)
-     (October 8, 2018). </li>
+     (February 5, 2019). </li>
 <li> OpenCL C Language Specification
      (<a href="specs/2.2/html/OpenCL_C.html">HTML</a>)
      (<a href="specs/2.2/pdf/OpenCL_C.pdf">PDF</a>)
-     (October 8, 2018). </li>
+     (February 5, 2019). </li>
 <li> OpenCL C++ Language Specification
      (<a href="specs/2.2/html/OpenCL_Cxx.html">HTML</a>)
      (<a href="specs/2.2/pdf/OpenCL_Cxx.pdf">PDF</a>)
-     (October 8, 2018). </li>
+     (February 5, 2019). </li>
 <li> OpenCL ICD Installation Guide Specification
      (<a href="specs/2.2/html/OpenCL_ICD_Installation.html">HTML</a>)
      (<a href="specs/2.2/pdf/OpenCL_ICD_Installation.pdf">PDF</a>)
-     (October 8, 2018). </li>
+     (February 5, 2019). </li>
 <li> The <a href="https://www.khronos.org/registry/spir-v/"> OpenCL Extended
      Instruction Set for SPIR-V</a> is included as part of the SPIR-V
      registry.
diff --git a/specs/2.2/html/OpenCL_API.html b/specs/2.2/html/OpenCL_API.html
index dacbc0f..17a77c5 100644
--- a/specs/2.2/html/OpenCL_API.html
+++ b/specs/2.2/html/OpenCL_API.html
@@ -4,8 +4,8 @@
 <meta charset="UTF-8">
 <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta name="generator" content="Asciidoctor 1.5.5">
-<meta name="author" content="Khronos OpenCL Working Group">
+<meta name="generator" content="Asciidoctor 1.5.7">
+<meta name="author" content="Khronos&#174; OpenCL Working Group">
 <title>The OpenCL&#8482; Specification</title>
 <style>
 /*! normalize.css v2.1.2 | MIT License | git.io/normalize */
@@ -724,7 +724,7 @@
 .literalblock pre, .listingblock pre { background: #eeeeee; }
 
 </style>
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
 <style>
 /* Stylesheet for CodeRay to match GitHub theme | MIT License | http://foundation.zurb.com */
 /*pre.CodeRay {background-color:#f7f7f8;}*/
@@ -840,10 +840,10 @@
 <div id="header">
 <h1>The OpenCL<sup>&#8482;</sup> Specification</h1>
 <div class="details">
-<span id="author" class="author">Khronos OpenCL Working Group</span><br>
-<span id="revnumber">version 2.2-8,</span>
-<span id="revdate">Mon, 08 Oct 2018 16:49:19 +0000</span>
-<br><span id="revremark">from git branch: master commit: b3cab22fcff5d8c17869907c983e259ddd7ce788</span>
+<span id="author" class="author">Khronos<sup>&#174;</sup> OpenCL Working Group</span><br>
+<span id="revnumber">version v2.2-10,</span>
+<span id="revdate">Tue, 05 Feb 2019 21:16:07 +0000</span>
+<br><span id="revremark">from git branch:  commit: 00422daf5dc013f21ab633479577c7cc225150e2</span>
 </div>
 <div id="toc" class="toc2">
 <div id="toctitle">Table of Contents</div>
@@ -936,7 +936,7 @@
 <div class="sectionbody">
 <div style="page-break-after: always;"></div>
 <div class="paragraph">
-<p>Copyright 2008-2018 The Khronos Group.</p>
+<p>Copyright 2008-2019 The Khronos Group.</p>
 </div>
 <div class="paragraph">
 <p>This specification is protected by copyright laws and contains material proprietary
@@ -967,7 +967,7 @@
 otherwise, arising from or in connection with these materials.</p>
 </div>
 <div class="paragraph">
-<p>Vulkan is a registered trademark and Khronos, OpenXR, SPIR, SPIR-V, SYCL, WebGL,
+<p>Vulkan and Khronos are registered trademarks, and OpenXR, SPIR, SPIR-V, SYCL, WebGL,
 WebCL, OpenVX, OpenVG, EGL, COLLADA, glTF, NNEF, OpenKODE, OpenKCAM, StreamInput,
 OpenWF, OpenSL ES, OpenMAX, OpenMAX AL, OpenMAX IL, OpenMAX DL, OpenML and DevU are
 trademarks of the Khronos Group Inc. ASTC is a trademark of ARM Holdings PLC,
@@ -1997,7 +1997,7 @@
 synchronize-with an atomic load to <strong>M</strong> by <strong>B</strong> that used acquire
 semantics, then <strong>A</strong>'s atomic store will occur <em>after</em> any prior
 operations by <strong>A</strong>.
-Note that the memory orders <em>acquire</em>, <em>sequentialy consistent</em>, and
+Note that the memory orders <em>acquire</em>, <em>sequentially consistent</em>, and
 <em>acquire_release</em> all include <em>acquire semantics</em> and effectively pair
 with a store using release semantics.</p>
 </dd>
@@ -2038,7 +2038,7 @@
 <dd>
 <p>The action of incrementing (retain) and decrementing (release) the
 reference count using an OpenCL <em>object</em>.
-This is a book keeping functionality to make sure the system doesnt
+This is a book keeping functionality to make sure the system doesn&#8217;t
 remove an <em>object</em> before all instances that use this <em>object</em> have
 finished.
 Refer to <em>Reference Count</em>.</p>
@@ -2136,12 +2136,13 @@
 <dt class="hdlist1">Specialization constants </dt>
 <dd>
 <p>Specialization is intended for constant objects that will not have known
-constant values until after initial generation of a SPIR-V module.
-Such objects are called specialization constants.
+constant values until after initial generation of a module in an intermediate
+representation format (e.g. SPIR-V). Such objects are called specialization
+constants.
 Application might provide values for the specialization constants that
-will be used when SPIR-V program is built.
+will be used when program is built from the intermediate format.
 Specialization constants that do not receive a value from an application
-shall use default value as defined in SPIR-V specification.</p>
+shall use default values as defined in OpenCL C++ or SPIR-V specification.</p>
 </dd>
 <dt class="hdlist1">SPMD </dt>
 <dd>
@@ -2585,7 +2586,7 @@
 devices.</p>
 </li>
 <li>
-<p>The third source of prerequisities can be the presence of non-trivial C
+<p>The third source of prerequisites can be the presence of non-trivial C
 initializers or C constructors for program scope global variables.
 In this case, OpenCL C/C compiler shall generate program
 initialization kernels that perform C initialization or C++
@@ -3006,7 +3007,7 @@
 work-items in a single work-group</p>
 </li>
 <li>
-<p>Sub-group synchronization: Contraints on the order of execution for
+<p>Sub-group synchronization: Constraints on the order of execution for
 work-items in a single sub-group</p>
 </li>
 <li>
@@ -3282,7 +3283,7 @@
 The global and constant memories, however, are shared between all devices
 within a given context.
 An OpenCL device may include a cache to support efficient access to these
-shared memories</p>
+shared memories.</p>
 </div>
 <div class="paragraph">
 <p>To understand memory in OpenCL, it is important to appreciate the
@@ -3459,15 +3460,15 @@
 <td class="tableblock halign-left valign-top" rowspan="2"><p class="tableblock">Kernel</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Static Allocation for program scope variables</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Static Allocation</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Static Allocation.
-</p><p class="tableblock">            Dynamic allocation for child kernel</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Static Allocation.</p>
+<p class="tableblock">            Dynamic allocation for child kernel</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Static Allocation</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Read/Write access</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Read-only access</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Read/Write access.
-</p><p class="tableblock">        No access to child&#8217;s local memory.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read/Write access.</p>
+<p class="tableblock">        No access to child&#8217;s local memory.</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Read/Write access</p></td>
 </tr>
 </tbody>
@@ -3593,7 +3594,7 @@
 </li>
 </ul>
 </div>
-<table id="svm-summary-table" class="tableblock frame-all grid-all spread">
+<table id="svm-summary-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 2. A summary of shared virtual memory (SVM) options in OpenCL</caption>
 <colgroup>
 <col style="width: 20%;">
@@ -3627,7 +3628,7 @@
 <td class="tableblock halign-center valign-top"><p class="tableblock">yes, through Map and Unmap commands.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-center valign-top"><p class="tableblock">Fine Grained buffer SVM</p></td>
+<td class="tableblock halign-center valign-top"><p class="tableblock">Fine-Grained buffer SVM</p></td>
 <td class="tableblock halign-center valign-top"><p class="tableblock">Bytes within OpenCL Memory objects (buffer)</p></td>
 <td class="tableblock halign-center valign-top"><p class="tableblock"><strong>clSVMAlloc</strong></p></td>
 <td class="tableblock halign-center valign-top"><p class="tableblock">Synchronization points plus atomics (if supported)</p></td>
@@ -3707,7 +3708,7 @@
 <li>
 <p><strong>memory_order_relaxed</strong>: implies no order constraints.
 This memory order can be used safely to increment counters that are
-concurrently incremented, but it doesnt guarantee anything about the
+concurrently incremented, but it doesn&#8217;t guarantee anything about the
 ordering with respect to operations to other memory locations.
 It can also be used, for example, to do ticket allocation and by expert
 programmers implementing lock-free algorithms.</p>
@@ -4498,7 +4499,7 @@
 <p>Earlier, we introduced synchronization primitives called fences.
 Fences can utilize the acquire memory_order, release memory_order, or both.
 A fence with acquire semantics is called an acquire fence; a fence with
-release semantics is called a release fence.  The <a href="#atomic-fence-orders">overview of atomic and fence operations</a> section decribes the memory orders
+release semantics is called a release fence.  The <a href="#atomic-fence-orders">overview of atomic and fence operations</a> section describes the memory orders
 that result in acquire and release fences.</p>
 </div>
 <div class="paragraph">
@@ -5138,7 +5139,7 @@
 queried by <em>param_name</em>.
 If <em>param_value_size_ret</em> is <code>NULL</code>, it is ignored.</p>
 </div>
-<table id="platform-queries-table" class="tableblock frame-all grid-all spread">
+<table id="platform-queries-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 3. OpenCL Platform Queries</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -5158,11 +5159,11 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">char[]<sup>1</sup></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">OpenCL profile string.
         Returns the profile name supported by the implementation.
-        The profile name returned can be one of the following strings:
-</p><p class="tableblock">        FULL_PROFILE - if the implementation supports the OpenCL
+        The profile name returned can be one of the following strings:</p>
+<p class="tableblock">        FULL_PROFILE - if the implementation supports the OpenCL
         specification (functionality defined as part of the core
-        specification and does not require any extensions to be supported).
-</p><p class="tableblock">        EMBEDDED_PROFILE - if the implementation supports the OpenCL
+        specification and does not require any extensions to be supported).</p>
+<p class="tableblock">        EMBEDDED_PROFILE - if the implementation supports the OpenCL
         embedded profile.
         The embedded profile is defined to be a subset for each version of
         OpenCL.
@@ -5174,10 +5175,10 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">char[]</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">OpenCL version string.
         Returns the OpenCL version supported by the implementation.
-        This version string has the following format:
-</p><p class="tableblock">        <em>OpenCL&lt;space&gt;&lt;major_version.minor_version&gt;&lt;space&gt;&lt;platform-specific
-        information&gt;</em>
-</p><p class="tableblock">        The <em>major_version.minor_version</em> value returned will be 2.2.</p></td>
+        This version string has the following format:</p>
+<p class="tableblock">        <em>OpenCL&lt;space&gt;&lt;major_version.minor_version&gt;&lt;space&gt;&lt;platform-specific
+        information&gt;</em></p>
+<p class="tableblock">        The <em>major_version.minor_version</em> value returned will be 2.2.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_PLATFORM_NAME</strong></p></td>
@@ -5279,7 +5280,7 @@
 </dd>
 </dl>
 </div>
-<table id="device-categories-table" class="tableblock frame-all grid-all spread">
+<table id="device-categories-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 4. List of OpenCL Device Categories</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -5428,7 +5429,7 @@
 queried by <em>param_name</em>.
 If <em>param_value_size_ret</em> is <code>NULL</code>, it is ignored.</p>
 </div>
-<table id="device-queries-table" class="tableblock frame-all grid-all spread">
+<table id="device-queries-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 5. OpenCL Device Queries</caption>
 <colgroup>
 <col style="width: 30%;">
@@ -5447,8 +5448,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_TYPE</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_device_type</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">The OpenCL device type.
-        Currently supported values are:
-</p><p class="tableblock">        CL_DEVICE_TYPE_CPU, CL_DEVICE_TYPE_GPU, CL_DEVICE_TYPE_ACCELERATOR,
+        Currently supported values are:</p>
+<p class="tableblock">        CL_DEVICE_TYPE_CPU, CL_DEVICE_TYPE_GPU, CL_DEVICE_TYPE_ACCELERATOR,
         CL_DEVICE_TYPE_DEFAULT, a combination of the above types or
         CL_DEVICE_TYPE_CUSTOM.</p></td>
 </tr>
@@ -5478,10 +5479,10 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_MAX_WORK_ITEM_SIZES</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t []</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum number of work-items that can be specified in each dimension
-        of the work-group to <strong>clEnqueueNDRangeKernel</strong>.
-</p><p class="tableblock">        Returns <em>n</em> size_t entries, where <em>n</em> is the value returned by the
-        query for CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS.
-</p><p class="tableblock">        The minimum value is (1, 1, 1) for devices that are not of type
+        of the work-group to <strong>clEnqueueNDRangeKernel</strong>.</p>
+<p class="tableblock">        Returns <em>n</em> size_t entries, where <em>n</em> is the value returned by the
+        query for CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS.</p>
+<p class="tableblock">        The minimum value is (1, 1, 1) for devices that are not of type
         CL_DEVICE_TYPE_CUSTOM.</p></td>
 </tr>
 <tr>
@@ -5509,10 +5510,10 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Preferred native vector width size for built-in scalar types that
         can be put into vectors.
         The vector width is defined as the number of scalar elements that
-        can be stored in the vector.
-</p><p class="tableblock">        If double precision is not supported,
-        CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE must return 0.
-</p><p class="tableblock">        If the <strong>cl_khr_fp16</strong> extension is not supported,
+        can be stored in the vector.</p>
+<p class="tableblock">        If double precision is not supported,
+        CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE must return 0.</p>
+<p class="tableblock">        If the <strong>cl_khr_fp16</strong> extension is not supported,
         CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF must return 0.</p></td>
 </tr>
 <tr>
@@ -5526,10 +5527,10 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_uint</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the native ISA vector width.
         The vector width is defined as the number of scalar elements that
-        can be stored in the vector.
-</p><p class="tableblock">        If double precision is not supported,
-        CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE must return 0.
-</p><p class="tableblock">        If the <strong>cl_khr_fp16</strong> extension is not supported,
+        can be stored in the vector.</p>
+<p class="tableblock">        If double precision is not supported,
+        CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE must return 0.</p>
+<p class="tableblock">        If the <strong>cl_khr_fp16</strong> extension is not supported,
         CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF must return 0.</p></td>
 </tr>
 <tr>
@@ -5597,68 +5598,68 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_IMAGE2D_MAX_WIDTH</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Max width of 2D image or 1D image not created from a buffer object
-        in pixels.
-</p><p class="tableblock">        The minimum value is 16384 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
+        in pixels.</p>
+<p class="tableblock">        The minimum value is 16384 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_IMAGE2D_MAX_HEIGHT</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Max height of 2D image in pixels.
-</p><p class="tableblock">        The minimum value is 16384 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Max height of 2D image in pixels.</p>
+<p class="tableblock">        The minimum value is 16384 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_IMAGE3D_MAX_WIDTH</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Max width of 3D image in pixels.
-</p><p class="tableblock">        The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Max width of 3D image in pixels.</p>
+<p class="tableblock">        The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_IMAGE3D_MAX_HEIGHT</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Max height of 3D image in pixels.
-</p><p class="tableblock">        The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Max height of 3D image in pixels.</p>
+<p class="tableblock">        The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_IMAGE3D_MAX_DEPTH</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Max depth of 3D image in pixels.
-</p><p class="tableblock">        The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Max depth of 3D image in pixels.</p>
+<p class="tableblock">        The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_IMAGE_MAX_BUFFER_SIZE</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Max number of pixels for a 1D image created from a buffer object.
-</p><p class="tableblock">        The minimum value is 65536 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Max number of pixels for a 1D image created from a buffer object.</p>
+<p class="tableblock">        The minimum value is 65536 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_IMAGE_MAX_ARRAY_SIZE</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Max number of images in a 1D or 2D image array.
-</p><p class="tableblock">        The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Max number of images in a 1D or 2D image array.</p>
+<p class="tableblock">        The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_MAX_SAMPLERS</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_uint</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Maximum number of samplers that can be used in a kernel.
-</p><p class="tableblock">        The minimum value is 16 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Maximum number of samplers that can be used in a kernel.</p>
+<p class="tableblock">        The minimum value is 16 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_IMAGE_PITCH_ALIGNMENT</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_uint</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">The row pitch alignment size in pixels for 2D images created from a
         buffer.
-        The value returned must be a power of 2.
-</p><p class="tableblock">        If the device does not support images, this value must be 0.</p></td>
+        The value returned must be a power of 2.</p>
+<p class="tableblock">        If the device does not support images, this value must be 0.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_uint</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">This query should be used when a 2D image is created from a buffer
         which was created using CL_MEM_USE_HOST_PTR.
-        The value returned must be a power of 2.
-</p><p class="tableblock">        This query specifies the minimum alignment in pixels of the host_ptr
-        specified to <strong>clCreateBuffer</strong>.
-</p><p class="tableblock">        If the device does not support images, this value must be 0.</p></td>
+        The value returned must be a power of 2.</p>
+<p class="tableblock">        This query specifies the minimum alignment in pixels of the host_ptr
+        specified to <strong>clCreateBuffer</strong>.</p>
+<p class="tableblock">        If the device does not support images, this value must be 0.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_MAX_PIPE_ARGS</p></td>
@@ -5685,8 +5686,8 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_MAX_PARAMETER_SIZE</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Max size in bytes of all arguments that can be passed to a kernel.
-</p><p class="tableblock">        The minimum value is 1024 for devices that are not of type
+<td class="tableblock halign-left valign-top"><p class="tableblock">Max size in bytes of all arguments that can be passed to a kernel.</p>
+<p class="tableblock">        The minimum value is 1024 for devices that are not of type
         CL_DEVICE_TYPE_CUSTOM.
         For this minimum value, only a maximum of 128 arguments can be
         passed to a kernel</p></td>
@@ -5705,23 +5706,23 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_device_fp_config</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Describes single precision floating-point capability of the device.
         This is a bit-field that describes one or more of the following
-        values:
-</p><p class="tableblock">        CL_FP_DENORM - denorms are supported
-</p><p class="tableblock">        CL_FP_INF_NAN - INF and quiet NaNs are supported.
-</p><p class="tableblock">        CL_FP_ROUND_TO_NEAREST-- round to nearest even rounding mode
-        supported
-</p><p class="tableblock">        CL_FP_ROUND_TO_ZERO - round to zero rounding mode supported
-</p><p class="tableblock">        CL_FP_ROUND_TO_INF - round to positive and negative infinity
-        rounding modes supported
-</p><p class="tableblock">        CL_FP_FMA - IEEE754-2008 fused multiply-add is supported.
-</p><p class="tableblock">        CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT - divide and sqrt are correctly
-        rounded as defined by the IEEE754 specification.
-</p><p class="tableblock">        CL_FP_SOFT_FLOAT - Basic floating-point operations (such as
-        addition, subtraction, multiplication) are implemented in software.
-</p><p class="tableblock">        For the full profile, the mandated minimum floating-point capability
+        values:</p>
+<p class="tableblock">        CL_FP_DENORM - denorms are supported</p>
+<p class="tableblock">        CL_FP_INF_NAN - INF and quiet NaNs are supported.</p>
+<p class="tableblock">        CL_FP_ROUND_TO_NEAREST-- round to nearest even rounding mode
+        supported</p>
+<p class="tableblock">        CL_FP_ROUND_TO_ZERO - round to zero rounding mode supported</p>
+<p class="tableblock">        CL_FP_ROUND_TO_INF - round to positive and negative infinity
+        rounding modes supported</p>
+<p class="tableblock">        CL_FP_FMA - IEEE754-2008 fused multiply-add is supported.</p>
+<p class="tableblock">        CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT - divide and sqrt are correctly
+        rounded as defined by the IEEE754 specification.</p>
+<p class="tableblock">        CL_FP_SOFT_FLOAT - Basic floating-point operations (such as
+        addition, subtraction, multiplication) are implemented in software.</p>
+<p class="tableblock">        For the full profile, the mandated minimum floating-point capability
         for devices that are not of type CL_DEVICE_TYPE_CUSTOM is:
-        CL_FP_ROUND_TO_NEAREST | CL_FP_INF_NAN.
-</p><p class="tableblock">        For the embedded profile, see section 10.</p></td>
+        CL_FP_ROUND_TO_NEAREST | CL_FP_INF_NAN.</p>
+<p class="tableblock">        For the embedded profile, see section 10.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_DOUBLE_FP_CONFIG<sup>7</sup></p></td>
@@ -5729,20 +5730,20 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Describes double precision floating-point capability of the OpenCL
         device.
         This is a bit-field that describes one or more of the following
-        values:
-</p><p class="tableblock">        CL_FP_DENORM - denorms are supported
-</p><p class="tableblock">        CL_FP_INF_NAN - INF and NaNs are supported.
-</p><p class="tableblock">        CL_FP_ROUND_TO_NEAREST - round to nearest even rounding mode
-        supported.
-</p><p class="tableblock">        CL_FP_ROUND_TO_ZERO - round to zero rounding mode supported.
-</p><p class="tableblock">        CL_FP_ROUND_TO_INF - round to positive and negative infinity
-        rounding modes supported.
-</p><p class="tableblock">        CL_FP_FMA - IEEE754-2008 fused multiply-add is supported.
-</p><p class="tableblock">        CL_FP_SOFT_FLOAT - Basic floating-point operations (such as
-        addition, subtraction, multiplication) are implemented in software.
-</p><p class="tableblock">        Double precision is an optional feature so the mandated minimum
-        double precision floating-point capability is 0.
-</p><p class="tableblock">        If double precision is supported by the device, then the minimum
+        values:</p>
+<p class="tableblock">        CL_FP_DENORM - denorms are supported</p>
+<p class="tableblock">        CL_FP_INF_NAN - INF and NaNs are supported.</p>
+<p class="tableblock">        CL_FP_ROUND_TO_NEAREST - round to nearest even rounding mode
+        supported.</p>
+<p class="tableblock">        CL_FP_ROUND_TO_ZERO - round to zero rounding mode supported.</p>
+<p class="tableblock">        CL_FP_ROUND_TO_INF - round to positive and negative infinity
+        rounding modes supported.</p>
+<p class="tableblock">        CL_FP_FMA - IEEE754-2008 fused multiply-add is supported.</p>
+<p class="tableblock">        CL_FP_SOFT_FLOAT - Basic floating-point operations (such as
+        addition, subtraction, multiplication) are implemented in software.</p>
+<p class="tableblock">        Double precision is an optional feature so the mandated minimum
+        double precision floating-point capability is 0.</p>
+<p class="tableblock">        If double precision is supported by the device, then the minimum
         double precision floating-point capability must be:<br>
         CL_FP_FMA |<br>
         CL_FP_ROUND_TO_NEAREST |<br>
@@ -5791,8 +5792,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">The maximum number of bytes of storage that may be allocated for any
         single variable in program scope or inside a function in an OpenCL
-        kernel language declared in the global address space.
-</p><p class="tableblock">        The minimum value is 64 KB.</p></td>
+        kernel language declared in the global address space.</p>
+<p class="tableblock">        The minimum value is 64 KB.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE</p></td>
@@ -5810,8 +5811,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_device_local_mem_type</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Type of local memory supported.
         This can be set to CL_LOCAL implying dedicated local memory storage
-        such as SRAM , or CL_GLOBAL.
-</p><p class="tableblock">        For custom devices, CL_NONE can also be returned indicating no local
+        such as SRAM , or CL_GLOBAL.</p>
+<p class="tableblock">        For custom devices, CL_NONE can also be returned indicating no local
         memory support.</p></td>
 </tr>
 <tr>
@@ -5852,28 +5853,28 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_COMPILER_AVAILABLE</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_bool</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Is CL_FALSE if the implementation does not have a compiler available
-        to compile the program source.
-</p><p class="tableblock">        Is CL_TRUE if the compiler is available.
+        to compile the program source.</p>
+<p class="tableblock">        Is CL_TRUE if the compiler is available.
         This can be CL_FALSE for the embedded platform profile only.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_LINKER_AVAILABLE</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_bool</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Is CL_FALSE if the implementation does not have a linker available.
-        Is CL_TRUE if the linker is available.
-</p><p class="tableblock">        This can be CL_FALSE for the embedded platform profile only.
-</p><p class="tableblock">        This must be CL_TRUE if CL_DEVICE_COMPILER_AVAILABLE is CL_TRUE.</p></td>
+        Is CL_TRUE if the linker is available.</p>
+<p class="tableblock">        This can be CL_FALSE for the embedded platform profile only.</p>
+<p class="tableblock">        This must be CL_TRUE if CL_DEVICE_COMPILER_AVAILABLE is CL_TRUE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_EXECUTION_CAPABILITIES</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_device_exec_ capabilities</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Describes the execution capabilities of the device.
         This is a bit-field that describes one or more of the following
-        values:
-</p><p class="tableblock">        CL_EXEC_KERNEL - The OpenCL device can execute OpenCL kernels.
-</p><p class="tableblock">        CL_EXEC_NATIVE_KERNEL - The OpenCL device can execute native
-        kernels.
-</p><p class="tableblock">        The mandated minimum capability is: CL_EXEC_KERNEL.</p></td>
+        values:</p>
+<p class="tableblock">        CL_EXEC_KERNEL - The OpenCL device can execute OpenCL kernels.</p>
+<p class="tableblock">        CL_EXEC_NATIVE_KERNEL - The OpenCL device can execute native
+        kernels.</p>
+<p class="tableblock">        The mandated minimum capability is: CL_EXEC_KERNEL.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_QUEUE_ON_HOST_PROPERTIES<sup>8</sup></p></td>
@@ -5881,11 +5882,11 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Describes the on host command-queue properties supported by the
         device.
         This is a bit-field that describes one or more of the following
-        values:
-</p><p class="tableblock">        CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE<br>
-        CL_QUEUE_PROFILING_ENABLE
-</p><p class="tableblock">        These properties are described in the <a href="#queue-properties-table">Queue Properties</a> table.
-</p><p class="tableblock">        The mandated minimum capability is: CL_QUEUE_PROFILING_ENABLE.</p></td>
+        values:</p>
+<p class="tableblock">        CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE<br>
+        CL_QUEUE_PROFILING_ENABLE</p>
+<p class="tableblock">        These properties are described in the <a href="#queue-properties-table">Queue Properties</a> table.</p>
+<p class="tableblock">        The mandated minimum capability is: CL_QUEUE_PROFILING_ENABLE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES</p></td>
@@ -5893,11 +5894,11 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Describes the on device command-queue properties supported by the
         device.
         This is a bit-field that describes one or more of the following
-        values:
-</p><p class="tableblock">        CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE<br>
-        CL_QUEUE_PROFILING_ENABLE
-</p><p class="tableblock">        These properties are described in the <a href="#queue-properties-table">Queue Properties</a> table.
-</p><p class="tableblock">        The mandated minimum capability is:
+        values:</p>
+<p class="tableblock">        CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE<br>
+        CL_QUEUE_PROFILING_ENABLE</p>
+<p class="tableblock">        These properties are described in the <a href="#queue-properties-table">Queue Properties</a> table.</p>
+<p class="tableblock">        The mandated minimum capability is:
         CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_PROFILING_ENABLE.</p></td>
 </tr>
 <tr>
@@ -5906,8 +5907,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">The size of the device queue in bytes preferred by the
         implementation.
         Applications should use this size for the device queue to ensure
-        good performance.
-</p><p class="tableblock">        The minimum value is 16 KB</p></td>
+        good performance.</p>
+<p class="tableblock">        The minimum value is 16 KB</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE</p></td>
@@ -5920,8 +5921,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_MAX_ON_DEVICE_QUEUES</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_uint</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">The maximum number of device queues that can be created for this
-        device in a single context.
-</p><p class="tableblock">        The minimum value is 1.</p></td>
+        device in a single context.</p>
+<p class="tableblock">        The minimum value is 1.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_MAX_ON_DEVICE_EVENTS</p></td>
@@ -5929,8 +5930,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">The maximum number of events in use by a device queue.
         These refer to events returned by the <code>enqueue_</code> built-in functions
         to a device queue or user events returned by the <code>create_user_event</code>
-        built-in function that have not been released.
-</p><p class="tableblock">        The minimum value is 1024.</p></td>
+        built-in function that have not been released.</p>
+<p class="tableblock">        The minimum value is 1024.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_BUILT_IN_KERNELS</p></td>
@@ -5966,11 +5967,11 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">char[]</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">OpenCL profile string.
         Returns the profile name supported by the device.
-        The profile name returned can be one of the following strings:
-</p><p class="tableblock">        FULL_PROFILE - if the device supports the OpenCL specification
+        The profile name returned can be one of the following strings:</p>
+<p class="tableblock">        FULL_PROFILE - if the device supports the OpenCL specification
         (functionality defined as part of the core specification and does
-        not require any extensions to be supported).
-</p><p class="tableblock">        EMBEDDED_PROFILE - if the device supports the OpenCL embedded
+        not require any extensions to be supported).</p>
+<p class="tableblock">        EMBEDDED_PROFILE - if the device supports the OpenCL embedded
         profile.</p></td>
 </tr>
 <tr>
@@ -5978,10 +5979,10 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">char[]</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">OpenCL version string.
         Returns the OpenCL version supported by the device. This version
-        string has the following format:
-</p><p class="tableblock">        <em>OpenCL&lt;space&gt;&lt;major_version.minor_version&gt;&lt;space&gt;&lt;vendor-specific
-        information&gt;</em>
-</p><p class="tableblock">        The major_version.minor_version value returned will be 2.2.</p></td>
+        string has the following format:</p>
+<p class="tableblock">        <em>OpenCL&lt;space&gt;&lt;major_version.minor_version&gt;&lt;space&gt;&lt;vendor-specific
+        information&gt;</em></p>
+<p class="tableblock">        The major_version.minor_version value returned will be 2.2.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_OPENCL_C_VERSION</p></td>
@@ -5989,16 +5990,16 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">OpenCL C version string.
         Returns the highest OpenCL C version supported by the compiler for
         this device that is not of type CL_DEVICE_TYPE_CUSTOM.
-        This version string has the following format:
-</p><p class="tableblock">        <em>OpenCL&lt;space&gt;C&lt;space&gt;&lt;major_version.minor_version&gt;&lt;space&gt;&lt;vendor-specific
-        information&gt;</em>
-</p><p class="tableblock">        The major_version.minor_version value returned must be 2.0 if
-        CL_DEVICE_VERSION is OpenCL 2.0.
-</p><p class="tableblock">        The major_version.minor_version value returned must be 1.2 if
-        CL_DEVICE_VERSION is OpenCL 1.2.
-</p><p class="tableblock">        The major_version.minor_version value returned must be 1.1 if
-        CL_DEVICE_VERSION is OpenCL 1.1.
-</p><p class="tableblock">        The major_version.minor_version value returned can be 1.0 or 1.1 if
+        This version string has the following format:</p>
+<p class="tableblock">        <em>OpenCL&lt;space&gt;C&lt;space&gt;&lt;major_version.minor_version&gt;&lt;space&gt;&lt;vendor-specific
+        information&gt;</em></p>
+<p class="tableblock">        The major_version.minor_version value returned must be 2.0 if
+        CL_DEVICE_VERSION is OpenCL 2.0.</p>
+<p class="tableblock">        The major_version.minor_version value returned must be 1.2 if
+        CL_DEVICE_VERSION is OpenCL 1.2.</p>
+<p class="tableblock">        The major_version.minor_version value returned must be 1.1 if
+        CL_DEVICE_VERSION is OpenCL 1.1.</p>
+<p class="tableblock">        The major_version.minor_version value returned can be 1.0 or 1.1 if
         CL_DEVICE_VERSION is OpenCL 1.0.</p></td>
 </tr>
 <tr>
@@ -6008,8 +6009,8 @@
         names themselves do not contain any spaces) supported by the device.
         The list of extension names returned can be vendor supported
         extension names and one or more of the following Khronos approved
-        extension names:
-</p><p class="tableblock">        <strong>cl_khr_int64_base_atomics</strong><br>
+        extension names:</p>
+<p class="tableblock">        <strong>cl_khr_int64_base_atomics</strong><br>
         <strong>cl_khr_int64_extended_atomics</strong><br>
         <strong>cl_khr_fp16</strong><br>
         <strong>cl_khr_gl_sharing</strong><br>
@@ -6022,16 +6023,16 @@
         <strong>cl_khr_initialize_memory</strong><br>
         <strong>cl_khr_terminate_context</strong><br>
         <strong>cl_khr_spir</strong><br>
-        <strong>cl_khr_srgb_image_writes</strong>
-</p><p class="tableblock">        The following approved Khronos extension names must be returned by
-        all devices that support OpenCL C 2.0:
-</p><p class="tableblock">        <strong>cl_khr_byte_addressable_store</strong><br>
+        <strong>cl_khr_srgb_image_writes</strong></p>
+<p class="tableblock">        The following approved Khronos extension names must be returned by
+        all devices that support OpenCL C 2.0:</p>
+<p class="tableblock">        <strong>cl_khr_byte_addressable_store</strong><br>
         <strong>cl_khr_fp64</strong> (for backward compatibility if double precision is
         supported)<br>
         <strong>cl_khr_3d_image_writes</strong><br>
         <strong>cl_khr_image2d_from_buffer</strong><br>
-        <strong>cl_khr_depth_images</strong>
-</p><p class="tableblock">        Please refer to the OpenCL 2.0 Extension Specification for a
+        <strong>cl_khr_depth_images</strong></p>
+<p class="tableblock">        Please refer to the OpenCL 2.0 Extension Specification for a
         detailed description of these extensions.</p></td>
 </tr>
 <tr>
@@ -6062,19 +6063,19 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_PARTITION_MAX_SUB_DEVICES</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_uint</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the maximum number of sub-devices that can be created when a
-        device is partitioned.
-</p><p class="tableblock">        The value returned cannot exceed CL_DEVICE_MAX_COMPUTE_UNITS.</p></td>
+        device is partitioned.</p>
+<p class="tableblock">        The value returned cannot exceed CL_DEVICE_MAX_COMPUTE_UNITS.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_PARTITION_PROPERTIES</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_device_partition_ property[]</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the list of partition types supported by <em>device</em>.
         This is an array of cl_device_partition_property values drawn from
-        the following list:
-</p><p class="tableblock">        CL_DEVICE_PARTITION_EQUALLY<br>
+        the following list:</p>
+<p class="tableblock">        CL_DEVICE_PARTITION_EQUALLY<br>
         CL_DEVICE_PARTITION_BY_COUNTS<br>
-        CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN
-</p><p class="tableblock">        If the device cannot be partitioned (i.e. there is no partitioning
+        CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN</p>
+<p class="tableblock">        If the device cannot be partitioned (i.e. there is no partitioning
         scheme supported by the device that will return at least two
         subdevices), a value of 0 will be returned.</p></td>
 </tr>
@@ -6084,14 +6085,14 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the list of supported affinity domains for partitioning the
         device using CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN.
         This is a bit-field that describes one or more of the following
-        values:
-</p><p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_NUMA<br>
+        values:</p>
+<p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_NUMA<br>
         CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE<br>
         CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE<br>
         CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE<br>
         CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE<br>
-        CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE
-</p><p class="tableblock">        If the device does not support any affinity domains, a value of 0
+        CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE</p>
+<p class="tableblock">        If the device does not support any affinity domains, a value of 0
         will be returned.</p></td>
 </tr>
 <tr>
@@ -6103,13 +6104,13 @@
         CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN,
         CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE, the affinity domain
         used to perform the partition will be returned.
-        This can be one of the following values:
-</p><p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_NUMA<br>
+        This can be one of the following values:</p>
+<p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_NUMA<br>
         CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE<br>
         CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE<br>
         CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE<br>
-        CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE
-</p><p class="tableblock">        Otherwise the implementation may either return a
+        CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE</p>
+<p class="tableblock">        Otherwise the implementation may either return a
         <em>param_value_size_ret</em> of 0 i.e. there is no partition type
         associated with device or can return a property value of 0 (where 0
         is used to terminate the partition property list) in the memory that
@@ -6130,23 +6131,23 @@
         Coarse-grain SVM allocations are required to be supported by all
         OpenCL 2.0 devices.
         This is a bit-field that describes a combination of the following
-        values:
-</p><p class="tableblock">        CL_DEVICE_SVM_COARSE_GRAIN_BUFFER - Support for coarse-grain buffer
+        values:</p>
+<p class="tableblock">        CL_DEVICE_SVM_COARSE_GRAIN_BUFFER - Support for coarse-grain buffer
         sharing using <strong>clSVMAlloc</strong>.
         Memory consistency is guaranteed at synchronization points and the
         host must use calls to <strong>clEnqueueMapBuffer</strong> and
-        <strong>clEnqueueUnmapMemObject</strong>.
-</p><p class="tableblock">        CL_DEVICE_SVM_FINE_GRAIN_BUFFER - Support for fine-grain buffer
+        <strong>clEnqueueUnmapMemObject</strong>.</p>
+<p class="tableblock">        CL_DEVICE_SVM_FINE_GRAIN_BUFFER - Support for fine-grain buffer
         sharing using <strong>clSVMAlloc</strong>.
         Memory consistency is guaranteed at synchronization points without
-        need for <strong>clEnqueueMapBuffer</strong> and <strong>clEnqueueUnmapMemObject</strong>.
-</p><p class="tableblock">        CL_DEVICE_SVM_FINE_GRAIN_SYSTEM - Support for sharing the host&#8217;s
+        need for <strong>clEnqueueMapBuffer</strong> and <strong>clEnqueueUnmapMemObject</strong>.</p>
+<p class="tableblock">        CL_DEVICE_SVM_FINE_GRAIN_SYSTEM - Support for sharing the host&#8217;s
         entire virtual memory including memory allocated using <strong>malloc</strong>.
-        Memory consistency is guaranteed at synchronization points.
-</p><p class="tableblock">        CL_DEVICE_SVM_ATOMICS - Support for the OpenCL 2.0 atomic
+        Memory consistency is guaranteed at synchronization points.</p>
+<p class="tableblock">        CL_DEVICE_SVM_ATOMICS - Support for the OpenCL 2.0 atomic
         operations that provide memory consistency across the host and all
-        OpenCL devices supporting fine-grain SVM allocations.
-</p><p class="tableblock">        The mandated minimum capability is
+        OpenCL devices supporting fine-grain SVM allocations.</p>
+<p class="tableblock">        The mandated minimum capability is
         CL_DEVICE_SVM_COARSE_GRAIN_BUFFER.</p></td>
 </tr>
 <tr>
@@ -6453,7 +6454,7 @@
 Only one of the listed partitioning schemes can be specified in
 <em>properties</em>.</p>
 </div>
-<table id="subdevice-partition-table" class="tableblock frame-all grid-all spread">
+<table id="subdevice-partition-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 6. <em>List of supported partition schemes by</em> <strong>clCreateSubDevices</strong></caption>
 <colgroup>
 <col style="width: 30%;">
@@ -6486,10 +6487,10 @@
         unit counts.
         For each non-zero count <em>m</em> in the list, a sub-device is created
         with <em>m</em> compute units in it.
-        CL_DEVICE_PARTITION_BY_COUNTS_LIST_END is defined to be 0.
-</p><p class="tableblock">        The number of non-zero count entries in the list may not exceed
-        CL_DEVICE_PARTITION_MAX_SUB_DEVICES.
-</p><p class="tableblock">        The total number of compute units specified may not exceed
+        CL_DEVICE_PARTITION_BY_COUNTS_LIST_END is defined to be 0.</p>
+<p class="tableblock">        The number of non-zero count entries in the list may not exceed
+        CL_DEVICE_PARTITION_MAX_SUB_DEVICES.</p>
+<p class="tableblock">        The total number of compute units specified may not exceed
         CL_DEVICE_PARTITION_MAX_COMPUTE_UNITS.</p></td>
 </tr>
 <tr>
@@ -6498,28 +6499,28 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Split the device into smaller aggregate devices containing one or
         more compute units that all share part of a cache hierarchy.
         The value accompanying this property may be drawn from the following
-        list:
-</p><p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_NUMA - Split the device into sub-devices
-        comprised of compute units that share a NUMA node.
-</p><p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE - Split the device into
+        list:</p>
+<p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_NUMA - Split the device into sub-devices
+        comprised of compute units that share a NUMA node.</p>
+<p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE - Split the device into
         sub-devices comprised of compute units that share a level 4 data
-        cache.
-</p><p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE - Split the device into
+        cache.</p>
+<p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE - Split the device into
         sub-devices comprised of compute units that share a level 3 data
-        cache.
-</p><p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE - Split the device into
+        cache.</p>
+<p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE - Split the device into
         sub-devices comprised of compute units that share a level 2 data
-        cache.
-</p><p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE - Split the device into
+        cache.</p>
+<p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE - Split the device into
         sub-devices comprised of compute units that share a level 1 data
-        cache.
-</p><p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE - Split the device
+        cache.</p>
+<p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE - Split the device
         along the next partitionable affinity domain.
         The implementation shall find the first level along which the device
         or sub-device may be further subdivided in the order NUMA, L4, L3,
         L2, L1, and partition the device into sub-devices comprised of
-        compute units that share memory subsystems at this level.
-</p><p class="tableblock">        The user may determine what happened by calling
+        compute units that share memory subsystems at this level.</p>
+<p class="tableblock">        The user may determine what happened by calling
         <strong>clGetDeviceInfo</strong>(CL_DEVICE_PARTITION_TYPE) on the sub-devices.</p></td>
 </tr>
 </tbody>
@@ -6731,7 +6732,7 @@
 <em>properties</em> can be <code>NULL</code> in which case the platform that is selected is
 implementation-defined.</p>
 </div>
-<table id="context-properties-table" class="tableblock frame-all grid-all spread">
+<table id="context-properties-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 7. <em>List of supported properties by</em> <strong>clCreateContext</strong></caption>
 <colgroup>
 <col style="width: 34%;">
@@ -6758,8 +6759,8 @@
         between OpenCL and other APIs.
         Please refer to the specific sections in the OpenCL 2.0 extension
         specification that describe sharing with other APIs for restrictions
-        on using this flag.
-</p><p class="tableblock">        If CL_CONTEXT_INTEROP_USER_SYNC is not specified, a default of
+        on using this flag.</p>
+<p class="tableblock">        If CL_CONTEXT_INTEROP_USER_SYNC is not specified, a default of
         CL_FALSE is assumed.</p></td>
 </tr>
 </tbody>
@@ -7095,7 +7096,7 @@
 <em>param_value</em> by <strong>clGetContextInfo</strong> is described in the
 <a href="#context-info-table">Context Attributes</a> table.</p>
 </div>
-<table id="context-info-table" class="tableblock frame-all grid-all spread">
+<table id="context-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 8. List of supported param_names by <strong>clGetContextInfo</strong></caption>
 <colgroup>
 <col style="width: 34%;">
@@ -7129,12 +7130,12 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_CONTEXT_PROPERTIES</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_context_properties[]</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Return the properties argument specified in <strong>clCreateContext</strong> or
-        <strong>clCreateContextFromType</strong>.
-</p><p class="tableblock">        If the <em>properties</em> argument specified in <strong>clCreateContext</strong> or
+        <strong>clCreateContextFromType</strong>.</p>
+<p class="tableblock">        If the <em>properties</em> argument specified in <strong>clCreateContext</strong> or
         <strong>clCreateContextFromType</strong> used to create <em>context</em> is not <code>NULL</code>, the
         implementation must return the values specified in the properties
-        argument.
-</p><p class="tableblock">        If the <em>properties</em> argument specified in <strong>clCreateContext</strong> or
+        argument.</p>
+<p class="tableblock">        If the <em>properties</em> argument specified in <strong>clCreateContext</strong> or
         <strong>clCreateContextFromType</strong> used to create <em>context</em> is <code>NULL</code>, the
         implementation may return either a <em>param_value_size_ret</em> of 0
         i.e. there is no context property value to be returned or can return
@@ -7245,7 +7246,7 @@
 <em>properties</em> can be <code>NULL</code> in which case the default values for supported
 command-queue properties will be used.</p>
 </div>
-<table id="queue-properties-table" class="tableblock frame-all grid-all spread">
+<table id="queue-properties-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 9. List of supported cl_queue_properties values and description</caption>
 <colgroup>
 <col style="width: 34%;">
@@ -7264,35 +7265,35 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_QUEUE_PROPERTIES</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_bitfield</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">This is a bitfield and can be set to a combination of the following
-        values:
-</p><p class="tableblock">        CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE - Determines whether the
+        values:</p>
+<p class="tableblock">        CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE - Determines whether the
         commands queued in the command-queue are executed in-order or
         out-of-order.
         If set, the commands in the command-queue are executed out-of-order.
-        Otherwise, commands are executed in-order.
-</p><p class="tableblock">        CL_QUEUE_PROFILING_ENABLE - Enable or disable profiling of commands
+        Otherwise, commands are executed in-order.</p>
+<p class="tableblock">        CL_QUEUE_PROFILING_ENABLE - Enable or disable profiling of commands
         in the command-queue.
         If set, the profiling of commands is enabled.
-        Otherwise profiling of commands is disabled.
-</p><p class="tableblock">        CL_QUEUE_ON_DEVICE - Indicates that this is a device queue.
+        Otherwise profiling of commands is disabled.</p>
+<p class="tableblock">        CL_QUEUE_ON_DEVICE - Indicates that this is a device queue.
         If CL_QUEUE_ON_DEVICE is set,
-        CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE<sup>1</sup> must also be set.
-</p><p class="tableblock">        CL_QUEUE_ON_DEVICE_DEFAULT<sup>2</sup> --indicates that this is the default
+        CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE<sup>1</sup> must also be set.</p>
+<p class="tableblock">        CL_QUEUE_ON_DEVICE_DEFAULT<sup>2</sup> --indicates that this is the default
         device queue.
-        This can only be used with CL_QUEUE_ON_DEVICE.
-</p><p class="tableblock">        If CL_QUEUE_PROPERTIES is not specified an in-order host command
+        This can only be used with CL_QUEUE_ON_DEVICE.</p>
+<p class="tableblock">        If CL_QUEUE_PROPERTIES is not specified an in-order host command
         queue is created for the specified device</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_QUEUE_SIZE</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_uint</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies the size of the device queue in bytes.
-</p><p class="tableblock">        This can only be specified if CL_QUEUE_ON_DEVICE is set in
+<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies the size of the device queue in bytes.</p>
+<p class="tableblock">        This can only be specified if CL_QUEUE_ON_DEVICE is set in
         CL_QUEUE_PROPERTIES.
-        This must be a value ≤ CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE.
-</p><p class="tableblock">        For best performance, this should be ≤
-        CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE.
-</p><p class="tableblock">        If CL_QUEUE_SIZE is not specified, the device queue is created with
+        This must be a value ≤ CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE.</p>
+<p class="tableblock">        For best performance, this should be ≤
+        CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE.</p>
+<p class="tableblock">        If CL_QUEUE_SIZE is not specified, the device queue is created with
         CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE as the size of the queue.</p></td>
 </tr>
 </tbody>
@@ -7523,7 +7524,7 @@
 <em>param_value</em> by <strong>clGetCommandQueueInfo</strong> is described in the
 <a href="#command-queue-param-table">Command Queue Parameter</a> table.</p>
 </div>
-<table id="command-queue-param-table" class="tableblock frame-all grid-all spread">
+<table id="command-queue-param-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 10. List of supported param_names by <strong>clGetCommandQueueInfo</strong></caption>
 <colgroup>
 <col style="width: 34%;">
@@ -7667,7 +7668,7 @@
 If value specified for <em>flags</em> is 0, the default is used which is
 CL_MEM_READ_WRITE.</p>
 </div>
-<table id="memory-flags-table" class="tableblock frame-all grid-all spread">
+<table id="memory-flags-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 11. List of supported cl_mem_flags values</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -7689,18 +7690,18 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_WRITE_ONLY</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">This flag specifies that the memory object will be
-    written but not read by a kernel.
-</p><p class="tableblock">    Reading from a buffer or image object created with CL_MEM_WRITE_ONLY
-    inside a kernel is undefined.
-</p><p class="tableblock">    CL_MEM_READ_WRITE and CL_MEM_WRITE_ONLY are mutually exclusive.</p></td>
+    written but not read by a kernel.</p>
+<p class="tableblock">    Reading from a buffer or image object created with CL_MEM_WRITE_ONLY
+    inside a kernel is undefined.</p>
+<p class="tableblock">    CL_MEM_READ_WRITE and CL_MEM_WRITE_ONLY are mutually exclusive.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_READ_ONLY</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">This flag specifies that the memory object is a
-    readonly memory object when used inside a kernel.
-</p><p class="tableblock">    Writing to a buffer or image object created with CL_MEM_READ_ONLY inside
-    a kernel is undefined.
-</p><p class="tableblock">    CL_MEM_READ_WRITE or CL_MEM_WRITE_ONLY and CL_MEM_READ_ONLY are mutually
+    readonly memory object when used inside a kernel.</p>
+<p class="tableblock">    Writing to a buffer or image object created with CL_MEM_READ_ONLY inside
+    a kernel is undefined.</p>
+<p class="tableblock">    CL_MEM_READ_WRITE or CL_MEM_WRITE_ONLY and CL_MEM_READ_ONLY are mutually
     exclusive.</p></td>
 </tr>
 <tr>
@@ -7708,21 +7709,21 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">This flag is valid only if host_ptr is not <code>NULL</code>.
     If specified, it indicates that the application wants the OpenCL
     implementation to use memory referenced by host_ptr as the storage bits
-    for the memory object.
-</p><p class="tableblock">    The contents of the memory pointed to by host_ptr at the time of the
-    clCreateBuffer call define the initial contents of the buffer object.
-</p><p class="tableblock">    OpenCL implementations are allowed to cache the buffer contents pointed
+    for the memory object.</p>
+<p class="tableblock">    The contents of the memory pointed to by host_ptr at the time of the
+    clCreateBuffer call define the initial contents of the buffer object.</p>
+<p class="tableblock">    OpenCL implementations are allowed to cache the buffer contents pointed
     to by host_ptr in device memory.
-    This cached copy can be used when kernels are executed on a device.
-</p><p class="tableblock">    The result of OpenCL commands that operate on multiple buffer objects
+    This cached copy can be used when kernels are executed on a device.</p>
+<p class="tableblock">    The result of OpenCL commands that operate on multiple buffer objects
     created with the same host_ptr or from overlapping host or SVM regions
     is considered to be undefined.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_ALLOC_HOST_PTR</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">This flag specifies that the application wants the OpenCL implementation
-    to allocate memory from host accessible memory.
-</p><p class="tableblock">    CL_MEM_ALLOC_HOST_PTR and CL_MEM_USE_HOST_PTR are mutually exclusive.</p></td>
+    to allocate memory from host accessible memory.</p>
+<p class="tableblock">    CL_MEM_ALLOC_HOST_PTR and CL_MEM_USE_HOST_PTR are mutually exclusive.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_COPY_HOST_PTR</strong></p></td>
@@ -7732,11 +7733,11 @@
     data from memory referenced by host_ptr.
     The implementation will copy the memory immediately and host_ptr is
     available for reuse by the application when the <strong>clCreateBuffer</strong> or
-    <strong>clCreateImage</strong> operation returns.
-</p><p class="tableblock">    CL_MEM_COPY_HOST_PTR and CL_MEM_USE_HOST_PTR are mutually exclusive.
-</p><p class="tableblock">    CL_MEM_COPY_HOST_PTR can be used with CL_MEM_ALLOC_HOST_PTR to
+    <strong>clCreateImage</strong> operation returns.</p>
+<p class="tableblock">    CL_MEM_COPY_HOST_PTR and CL_MEM_USE_HOST_PTR are mutually exclusive.</p>
+<p class="tableblock">    CL_MEM_COPY_HOST_PTR can be used with CL_MEM_ALLOC_HOST_PTR to
     initialize the contents of the cl_mem object allocated using
-    hostaccessible (e.g. PCIe) memory.</p></td>
+    host-accessible (e.g. PCIe) memory.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_HOST_WRITE_ONLY</strong></p></td>
@@ -7750,14 +7751,14 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_HOST_READ_ONLY</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">This flag specifies that the host will only read
     the memory object (using OpenCL APIs that enqueue a read or a map for
-    read).
-</p><p class="tableblock">    CL_MEM_HOST_WRITE_ONLY and CL_MEM_HOST_READ_ONLY are mutually exclusive.</p></td>
+    read).</p>
+<p class="tableblock">    CL_MEM_HOST_WRITE_ONLY and CL_MEM_HOST_READ_ONLY are mutually exclusive.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_HOST_NO_ACCESS</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">This flag specifies that the host will not read or
-    write the memory object.
-</p><p class="tableblock">    CL_MEM_HOST_WRITE_ONLY or CL_MEM_HOST_READ_ONLY and
+    write the memory object.</p>
+<p class="tableblock">    CL_MEM_HOST_WRITE_ONLY or CL_MEM_HOST_READ_ONLY and
     CL_MEM_HOST_NO_ACCESS are mutually exclusive.</p></td>
 </tr>
 </tbody>
@@ -7873,7 +7874,7 @@
 described in the <a href="#memory-flags-table">Memory Flags</a> table.
 If the CL_MEM_READ_WRITE, CL_MEM_READ_ONLY or CL_MEM_WRITE_ONLY values are
 not specified in <em>flags</em>, they are inherited from the corresponding memory
-access qualifers associated with <em>buffer</em>.
+access qualifiers associated with <em>buffer</em>.
 The CL_MEM_USE_HOST_PTR, CL_MEM_ALLOC_HOST_PTR and CL_MEM_COPY_HOST_PTR
 values cannot be specified in <em>flags</em> but are inherited from the
 corresponding memory access qualifiers associated with <em>buffer</em>.
@@ -7892,7 +7893,7 @@
 descriptor that <em>buffer_create_info</em> points to is described in the
 <a href="#subbuffer-create-info-table">SubBuffer Attributes</a> table.</p>
 </div>
-<table id="subbuffer-create-info-table" class="tableblock frame-all grid-all spread">
+<table id="subbuffer-create-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 12. List of supported names and values in <strong>clCreateSubBuffer</strong></caption>
 <colgroup>
 <col style="width: 50%;">
@@ -7907,7 +7908,7 @@
 <tbody>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_BUFFER_CREATE_TYPE_REGION</strong></p></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p>Create a buffer object that represents a
     specific region in buffer.</p>
 </div>
@@ -9045,7 +9046,7 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c"><span class="directive">void</span> clEnqueueMapBuffer(cl_command_queue command_queue,
+<pre class="CodeRay highlight"><code data-lang="c"><span class="directive">void</span>* clEnqueueMapBuffer(cl_command_queue command_queue,
                         cl_mem buffer,
                         cl_bool blocking_map,
                         cl_map_flags map_flags,
@@ -9228,7 +9229,7 @@
 This is described in <a href="#unmapping-mapped-memory">Unmapping Mapped Memory
 Objects</a>.</p>
 </div>
-<table id="memory-map-flags-table" class="tableblock frame-all grid-all spread">
+<table id="memory-map-flags-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 13. List of supported cl_map_flags values</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -9244,31 +9245,31 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MAP_READ</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">This flag specifies that the region being mapped in the memory object is
-    being mapped for reading.
-</p><p class="tableblock">    The pointer returned by <strong>clEnqueueMapBuffer</strong> (<strong>clEnqueueMapImage</strong>) is
+    being mapped for reading.</p>
+<p class="tableblock">    The pointer returned by <strong>clEnqueueMapBuffer</strong> (<strong>clEnqueueMapImage</strong>) is
     guaranteed to contain the latest bits in the region being mapped when
     the <strong>clEnqueueMapBuffer</strong> (<strong>clEnqueueMapImage</strong>) command has completed.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MAP_WRITE</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">This flag specifies that the region being mapped in the memory object is
-    being mapped for writing.
-</p><p class="tableblock">    The pointer returned by <strong>clEnqueueMapBuffer</strong> (<strong>clEnqueueMapImage</strong>) is
+    being mapped for writing.</p>
+<p class="tableblock">    The pointer returned by <strong>clEnqueueMapBuffer</strong> (<strong>clEnqueueMapImage</strong>) is
     guaranteed to contain the latest bits in the region being mapped when
     the <strong>clEnqueueMapBuffer</strong> (<strong>clEnqueueMapImage</strong>) command has completed</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MAP_WRITE_INVALIDATE_REGION</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">This flag specifies that the region being mapped in the memory object is
-    being mapped for writing.
-</p><p class="tableblock">    The contents of the region being mapped are to be discarded.
+    being mapped for writing.</p>
+<p class="tableblock">    The contents of the region being mapped are to be discarded.
     This is typically the case when the region being mapped is overwritten
     by the host.
     This flag allows the implementation to no longer guarantee that the
     pointer returned by <strong>clEnqueueMapBuffer</strong> (<strong>clEnqueueMapImage</strong>) contains
     the latest bits in the region being mapped which can be a significant
-    performance enhancement.
-</p><p class="tableblock">    CL_MAP_READ or CL_MAP_WRITE and CL_MAP_WRITE_INVALIDATE_REGION are
+    performance enhancement.</p>
+<p class="tableblock">    CL_MAP_READ or CL_MAP_WRITE and CL_MAP_WRITE_INVALIDATE_REGION are
     mutually exclusive.</p></td>
 </tr>
 </tbody>
@@ -9317,7 +9318,7 @@
 <p>For CL_MEM_OBJECT_IMAGE1D_BUFFER image type, or an image created from
 another memory object (image or buffer), if the CL_MEM_READ_WRITE,
 CL_MEM_READ_ONLY or CL_MEM_WRITE_ONLY values are not specified in <em>flags</em>,
-they are inherited from the corresponding memory access qualifers associated
+they are inherited from the corresponding memory access qualifiers associated
 with <em>mem_object</em>.
 The CL_MEM_USE_HOST_PTR, CL_MEM_ALLOC_HOST_PTR and CL_MEM_COPY_HOST_PTR
 values cannot be specified in <em>flags</em> but are inherited from the
@@ -9354,7 +9355,7 @@
 Refer to table below for a description of how large the buffer that
 <em>host_ptr</em> points to must be.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -9531,7 +9532,7 @@
 The number of bits per element determined by the <code>image_channel_data_type</code>
 and <code>image_channel_order</code> must be a power of two.</p>
 </div>
-<table id="image-channel-order-table" class="tableblock frame-all grid-all spread">
+<table id="image-channel-order-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 14. List of supported Image Channel Order Values</caption>
 <colgroup>
 <col style="width: 100%;">
@@ -9571,7 +9572,7 @@
 </tr>
 </tbody>
 </table>
-<table id="image-channel-data-types-table" class="tableblock frame-all grid-all spread">
+<table id="image-channel-data-types-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 15. List of supported Image Channel Data Types</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -9945,7 +9946,7 @@
 The channel order values<sup>8</sup> supported are:</p>
 <div class="openblock">
 <div class="content">
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -10164,7 +10165,7 @@
 is described in the <a href="#min-supported-cross-kernel-table">Supported Formats -
 Kernel Read Or Write</a> table.</p>
 </div>
-<table id="min-supported-cross-kernel-table" class="tableblock frame-all grid-all spread">
+<table id="min-supported-cross-kernel-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 16. Min. list of supported image formats kernel read or write</caption>
 <colgroup>
 <col style="width: 34%;">
@@ -10268,7 +10269,7 @@
 <a href="#min-supported-same-kernel-table">Supported Formats - Kernel Read And
 Write</a> table.</p>
 </div>
-<table id="min-supported-same-kernel-table" class="tableblock frame-all grid-all spread">
+<table id="min-supported-same-kernel-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 17. Min. list of supported image formats kernel read and write</caption>
 <colgroup>
 <col style="width: 34%;">
@@ -10327,7 +10328,7 @@
 image and a <code>write_only</code> image parameter, or to a <code>read_write</code> image
 parameter and any other image parameter.</p>
 </div>
-<table id="image-format-mapping-table" class="tableblock frame-all grid-all spread">
+<table id="image-format-mapping-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 18. Mapping from format flags passed to <strong>clGetSupportedImageFormats</strong> to OpenCL kernel language image access qualifiers</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -11345,7 +11346,7 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c"><span class="directive">void</span> clEnqueueMapImage(cl_command_queue command_queue,
+<pre class="CodeRay highlight"><code data-lang="c"><span class="directive">void</span>* clEnqueueMapImage(cl_command_queue command_queue,
                        cl_mem image,
                        cl_bool blocking_map,
                        cl_map_flags map_flags,
@@ -11658,7 +11659,7 @@
 </li>
 </ul>
 </div>
-<table id="image-info-table" class="tableblock frame-all grid-all spread">
+<table id="image-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 19. List of supported param_names by <strong>clGetImageInfo</strong></caption>
 <colgroup>
 <col style="width: 34%;">
@@ -11928,7 +11929,7 @@
 </li>
 </ul>
 </div>
-<table id="pipe-info-table" class="tableblock frame-all grid-all spread">
+<table id="pipe-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 20. List of supported param_names by <strong>clGetPipeInfo</strong></caption>
 <colgroup>
 <col style="width: 34%;">
@@ -12435,7 +12436,7 @@
 The <a href="#migration-flags-table">Memory Migration Flags</a> describes the possible
 values for flags.</p>
 </div>
-<table id="migration-flags-table" class="tableblock frame-all grid-all spread">
+<table id="migration-flags-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 21. Supported values for cl_mem_migration_flags</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -12605,7 +12606,7 @@
 </li>
 </ul>
 </div>
-<table id="mem-info-table" class="tableblock frame-all grid-all spread">
+<table id="mem-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 22. List of supported param_names by <strong>clGetMemObjectInfo</strong></caption>
 <colgroup>
 <col style="width: 34%;">
@@ -12623,12 +12624,12 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_TYPE</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_mem_object_type</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns one of the following values:
-</p><p class="tableblock">        CL_MEM_OBJECT_BUFFER if <em>memobj</em> is created with <strong>clCreateBuffer</strong> or
-        <strong>clCreateSubBuffer</strong>.
-</p><p class="tableblock">        cl_image_desc.image_type argument value if <em>memobj</em> is created with
-        <strong>clCreateImage</strong>.
-</p><p class="tableblock">        CL_MEM_OBJECT_PIPE if <em>memobj</em> is created with <strong>clCreatePipe</strong>.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns one of the following values:</p>
+<p class="tableblock">        CL_MEM_OBJECT_BUFFER if <em>memobj</em> is created with <strong>clCreateBuffer</strong> or
+        <strong>clCreateSubBuffer</strong>.</p>
+<p class="tableblock">        cl_image_desc.image_type argument value if <em>memobj</em> is created with
+        <strong>clCreateImage</strong>.</p>
+<p class="tableblock">        CL_MEM_OBJECT_PIPE if <em>memobj</em> is created with <strong>clCreatePipe</strong>.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_FLAGS</strong></p></td>
@@ -12637,8 +12638,8 @@
         with <strong>clCreateBuffer</strong>,<br>
         <strong>clCreateSubBuffer</strong>,<br>
         <strong>clCreateImage</strong> or<br>
-        <strong>clCreatePipe</strong>.
-</p><p class="tableblock">        If <em>memobj</em> is a sub-buffer the memory access qualifiers inherited
+        <strong>clCreatePipe</strong>.</p>
+<p class="tableblock">        If <em>memobj</em> is a sub-buffer the memory access qualifiers inherited
         from parent buffer is also returned.</p></td>
 </tr>
 <tr>
@@ -12653,8 +12654,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">If <em>memobj</em> is created with <strong>clCreateBuffer</strong> or <strong>clCreateImage</strong> and
         CL_MEM_USE_HOST_PTR is specified in mem_flags, return the host_ptr
         argument value specified when <em>memobj</em> is created.
-        Otherwise a <code>NULL</code> value is returned.
-</p><p class="tableblock">        If <em>memobj</em> is created with <strong>clCreateSubBuffer</strong>, return the host_ptr
+        Otherwise a <code>NULL</code> value is returned.</p>
+<p class="tableblock">        If <em>memobj</em> is created with <strong>clCreateSubBuffer</strong>, return the host_ptr
         +  origin value specified when <em>memobj</em> is created.
         host_ptr is the argument value specified to <strong>clCreateBuffer</strong> and
         CL_MEM_USE_HOST_PTR is specified in mem_flags for memory object from
@@ -12685,17 +12686,17 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Return memory object from which <em>memobj</em> is created.
         This returns the memory object specified as buffer argument to
         <strong>clCreateSubBuffer</strong> if <em>memobj</em> is a subbuffer object created using
-        <strong>clCreateSubBuffer</strong>.
-</p><p class="tableblock">        This returns the mem_object specified in cl_image_desc if <em>memobj</em>
-        is an image object.
-</p><p class="tableblock">        Otherwise a <code>NULL</code> value is returned.</p></td>
+        <strong>clCreateSubBuffer</strong>.</p>
+<p class="tableblock">        This returns the mem_object specified in cl_image_desc if <em>memobj</em>
+        is an image object.</p>
+<p class="tableblock">        Otherwise a <code>NULL</code> value is returned.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_OFFSET</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Return offset if <em>memobj</em> is a sub-buffer object created using
-        <strong>clCreateSubBuffer</strong>.
-</p><p class="tableblock">        This return 0 if <em>memobj</em> is not a subbuffer object.</p></td>
+        <strong>clCreateSubBuffer</strong>.</p>
+<p class="tableblock">        This return 0 if <em>memobj</em> is not a subbuffer object.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_USES_SVM_POINTER</strong></p></td>
@@ -12876,7 +12877,7 @@
 The <a href="#svm-flags-table">SVM Memory Flags</a> table describes the possible values
 for <em>flags</em>.</p>
 </div>
-<table id="svm-flags-table" class="tableblock frame-all grid-all spread">
+<table id="svm-flags-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 23. List of supported cl_svm_mem_flags_ values</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -12898,18 +12899,18 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_WRITE_ONLY</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">This flag specifies that the SVM buffer will be written but not read by
-    a kernel.
-</p><p class="tableblock">    Reading from a SVM buffer created with CL_MEM_WRITE_ONLY inside a kernel
-    is undefined.
-</p><p class="tableblock">    CL_MEM_READ_WRITE and CL_MEM_WRITE_ONLY are mutually exclusive.</p></td>
+    a kernel.</p>
+<p class="tableblock">    Reading from a SVM buffer created with CL_MEM_WRITE_ONLY inside a kernel
+    is undefined.</p>
+<p class="tableblock">    CL_MEM_READ_WRITE and CL_MEM_WRITE_ONLY are mutually exclusive.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_READ_ONLY</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">This flag specifies that the SVM buffer object is a read-only memory
-    object when used inside a kernel.
-</p><p class="tableblock">    Writing to a SVM buffer created with CL_MEM_READ_ONLY inside a kernel is
-    undefined.
-</p><p class="tableblock">    CL_MEM_READ_WRITE or CL_MEM_WRITE_ONLY and CL_MEM_READ_ONLY are mutually
+    object when used inside a kernel.</p>
+<p class="tableblock">    Writing to a SVM buffer created with CL_MEM_READ_ONLY inside a kernel is
+    undefined.</p>
+<p class="tableblock">    CL_MEM_READ_WRITE or CL_MEM_WRITE_ONLY and CL_MEM_READ_ONLY are mutually
     exclusive.</p></td>
 </tr>
 <tr>
@@ -12990,7 +12991,7 @@
 <div class="paragraph">
 <p>Calling <strong>clSVMAlloc</strong> does not itself provide consistency for the shared
 memory region.
-When the host cant use the SVM atomic operations, it must rely on OpenCLs
+When the host cannot use the SVM atomic operations, it must rely on OpenCLs
 guaranteed memory consistency at synchronization points.</p>
 </div>
 <div class="paragraph">
@@ -13037,7 +13038,7 @@
 This can be done by enqueuing a blocking operation such as <strong>clFinish</strong>,
 <strong>clWaitForEvents</strong>, <strong>clEnqueueReadBuffer</strong> or by registering a callback with
 the events associated with enqueued commands and when the last enqueued
-comamnd has finished freeing <em>svm_pointer</em>.</p>
+command has finished freeing <em>svm_pointer</em>.</p>
 </div>
 <div class="paragraph">
 <p>The behavior of using <em>svm_pointer</em> after it has been freed is undefined.
@@ -13865,7 +13866,7 @@
 <em>sampler_properties</em> can be <code>NULL</code> in which case the default values for
 supported sampler properties will be used.</p>
 </div>
-<table id="sampler-properties-table" class="tableblock frame-all grid-all spread">
+<table id="sampler-properties-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 24. List of supported cl_sampler_properties values and description</caption>
 <colgroup>
 <col style="width: 34%;">
@@ -13884,32 +13885,32 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_SAMPLER_NORMALIZED_COORDS</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_bool</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">A boolean value that specifies whether the image coordinates
-        specified are normalized or not.
-</p><p class="tableblock">        The default value (i.e. the value used if this property is not
+        specified are normalized or not.</p>
+<p class="tableblock">        The default value (i.e. the value used if this property is not
         specified in sampler_properties) is CL_TRUE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_SAMPLER_ADDRESSING_MODE</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_addressing_mode</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Specifies how out-of-range image coordinates are handled when
-        reading from an image.
-</p><p class="tableblock">        Valid values are:
-</p><p class="tableblock">        CL_ADDRESS_MIRRORED_REPEAT<br>
+        reading from an image.</p>
+<p class="tableblock">        Valid values are:</p>
+<p class="tableblock">        CL_ADDRESS_MIRRORED_REPEAT<br>
         CL_ADDRESS_REPEAT<br>
         CL_ADDRESS_CLAMP_TO_EDGE<br>
         CL_ADDRESS_CLAMP<br>
-        CL_ADDRESS_NONE
-</p><p class="tableblock">        The default is CL_ADDRESS_CLAMP.</p></td>
+        CL_ADDRESS_NONE</p>
+<p class="tableblock">        The default is CL_ADDRESS_CLAMP.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_SAMPLER_FILTER_MODE</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_filter_mode</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Specifies the type of filter that must be applied when reading an
         image.
-        Valid values are:
-</p><p class="tableblock">        CL_FILTER_NEAREST<br>
-        CL_FILTER_LINEAR
-</p><p class="tableblock">        The default value is CL_FILTER_NEAREST.</p></td>
+        Valid values are:</p>
+<p class="tableblock">        CL_FILTER_NEAREST<br>
+        CL_FILTER_LINEAR</p>
+<p class="tableblock">        The default value is CL_FILTER_NEAREST.</p></td>
 </tr>
 </tbody>
 </table>
@@ -14059,7 +14060,7 @@
 queried by <em>param_name</em>.
 If <em>param_value_size_ret</em> is <code>NULL</code>, it is ignored.</p>
 </div>
-<table id="sampler-info-table" class="tableblock frame-all grid-all spread">
+<table id="sampler-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 25. <strong>clGetSamplerInfo</strong> parameter queries</caption>
 <colgroup>
 <col style="width: 34%;">
@@ -14665,13 +14666,14 @@
 </div>
 </div>
 <div class="paragraph">
-<p>sets the values of a SPIR-V specialization constants.</p>
+<p>sets the value of a specialization constant.</p>
 </div>
 <div class="paragraph">
-<p><em>program</em> must be a valid OpenCL program created from a SPIR-V module.</p>
+<p><em>program</em> must be a valid OpenCL program created from an intermediate format
+module (e.g. SPIR-V).</p>
 </div>
 <div class="paragraph">
-<p><em>spec</em> id_ identifies the SPIR-V specialization constant whose value will be
+<p><em>spec</em> id_ identifies the specialization constant whose value will be
 set.</p>
 </div>
 <div class="paragraph">
@@ -14679,7 +14681,7 @@
 <em>spec_value</em>.
 This should be 1 for boolean constants.
 For all other constant types this should match the size of the
-specialization constant in the SPIR-V module.</p>
+specialization constant in the module.</p>
 </div>
 <div class="paragraph">
 <p><em>spec_value</em> is a pointer to the memory location that contains the value of
@@ -14702,8 +14704,8 @@
 </div>
 <div class="paragraph">
 <p>Application is not required to provide values for every specialization
-constant contained in SPIR-V module.
-SPIR-V provides default values for all specialization constants.</p>
+constant contained in the module. If the value is not set by this API
+call, default values will be used during the build.</p>
 </div>
 <div class="paragraph">
 <p><strong>clSetProgramSpecializationConstant</strong> returns CL_SUCCESS if the function is
@@ -14716,7 +14718,7 @@
 <ul>
 <li>
 <p>CL_INVALID_PROGRAM if <em>program</em> is not a valid program object created
-from a SPIR-V module.</p>
+from a module in an intermediate format (e.g. SPIR-V).</p>
 </li>
 <li>
 <p>CL_INVALID_SPEC_ID if <em>spec_id</em> is not a valid specialization constant
@@ -14724,7 +14726,7 @@
 </li>
 <li>
 <p>CL_INVALID_VALUE if <em>spec_size</em> does not match the size of the
-specialization constant in the SPIR-V module, or if <em>spec_value</em> is
+specialization constant in the module, or if <em>spec_value</em> is
 <code>NULL</code>.</p>
 </li>
 <li>
@@ -14901,7 +14903,7 @@
 <p>Separate compilation and link stages.
 Program sources can be compiled to generate a compiled binary object and
 linked in a separate stage with other compiled program objects to the
-program exectuable.</p>
+program executable.</p>
 </li>
 <li>
 <p>Embedded headers.
@@ -15795,7 +15797,7 @@
 queried by <em>param_name</em>.
 If <em>param_value_size_ret</em> is <code>NULL</code>, it is ignored.</p>
 </div>
-<table id="program-info-table" class="tableblock frame-all grid-all spread">
+<table id="program-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 26. <strong>clGetProgramInfo</strong> parameter queries</caption>
 <colgroup>
 <col style="width: 34%;">
@@ -15831,7 +15833,7 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Return the list of devices associated with the program object.
         This can be the devices associated with context on which the program
         object has been created or can be a subset of devices that are
-        specified when a progam object is created using
+        specified when a program object is created using
         <strong>clCreateProgramWithBinary</strong>.</p></td>
 </tr>
 <tr>
@@ -15841,13 +15843,13 @@
         <strong>clCreateProgramWithSource</strong>.
         The source string returned is a concatenation of all source strings
         specified to <strong>clCreateProgramWithSource</strong> with a null terminator.
-        The concatenation strips any nulls in the original source strings.
-</p><p class="tableblock">        If <em>program</em> is created using <strong>clCreateProgramWithBinary</strong>,
+        The concatenation strips any nulls in the original source strings.</p>
+<p class="tableblock">        If <em>program</em> is created using <strong>clCreateProgramWithBinary</strong>,
         <strong>clCreateProgramWithIL</strong> or <strong>clCreateProgramWithBuiltinKernels</strong>, a
         null string or the appropriate program source code is returned
         depending on whether or not the program source code is stored in the
-        binary.
-</p><p class="tableblock">        The actual number of characters that represents the program source
+        binary.</p>
+<p class="tableblock">        The actual number of characters that represents the program source
         code including the null terminator is returned in
         <em>param_value_size_ret</em>.</p></td>
 </tr>
@@ -15855,8 +15857,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_PROGRAM_IL</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">char[]</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the program IL for programs created with
-        <strong>clCreateProgramWithIL</strong>.
-</p><p class="tableblock">        If <em>program</em> is created with <strong>clCreateProgramWithSource</strong>,
+        <strong>clCreateProgramWithIL</strong>.</p>
+<p class="tableblock">        If <em>program</em> is created with <strong>clCreateProgramWithSource</strong>,
         <strong>clCreateProgramWithBinary</strong> or <strong>clCreateProgramWithBuiltinKernels</strong>
         the memory pointed to by param_value will be unchanged and
         param_value_size_retwill be set to 0.</p></td>
@@ -15870,8 +15872,8 @@
         The size of the array is the number of devices associated with
         program.
         If a binary is not available for a device(s), a size of zero is
-        returned.
-</p><p class="tableblock">        If <em>program</em> is created using <strong>clCreateProgramWithBuiltinKernels</strong>,
+        returned.</p>
+<p class="tableblock">        If <em>program</em> is created using <strong>clCreateProgramWithBuiltinKernels</strong>,
         the implementation may return zero in any entries of the returned
         array.</p></td>
 </tr>
@@ -15891,13 +15893,13 @@
         representation (a.k.a. IR) or device specific executable bits or
         both.
         The decision on which information is returned in the binary is up to
-        the OpenCL implementation.
-</p><p class="tableblock">        param_value points to an array of <code>n</code> pointers allocated by the
+        the OpenCL implementation.</p>
+<p class="tableblock">        param_value points to an array of <code>n</code> pointers allocated by the
         caller, where <code>n</code> is the number of devices associated with program.
         The buffer sizes needed to allocate the memory that these <code>n</code>
         pointers refer to can be queried using the CL_PROGRAM_BINARY_SIZES
-        query as described in this table.
-</p><p class="tableblock">        Each entry in this array is used by the implementation as the
+        query as described in this table.</p>
+<p class="tableblock">        Each entry in this array is used by the implementation as the
         location in memory where to copy the program binary for a specific
         device, if there is a binary available.
         To find out which device the program binary in the array refers to,
@@ -16027,7 +16029,7 @@
 queried by <em>param_name</em>.
 If <em>param_value_size_ret</em> is <code>NULL</code>, it is ignored.</p>
 </div>
-<table id="program-build-info-table" class="tableblock frame-all grid-all spread">
+<table id="program-build-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 27. <strong>clGetProgramBuildInfo</strong> parameter queries.</caption>
 <colgroup>
 <col style="width: 34%;">
@@ -16046,18 +16048,18 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_PROGRAM_BUILD_STATUS</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_build_status</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the build, compile or link status, whichever was performed
-        last on program for device.
-</p><p class="tableblock">        This can be one of the following:
-</p><p class="tableblock">        CL_BUILD_NONE - The build status returned if no <strong>clBuildProgram</strong>,
+        last on program for device.</p>
+<p class="tableblock">        This can be one of the following:</p>
+<p class="tableblock">        CL_BUILD_NONE - The build status returned if no <strong>clBuildProgram</strong>,
         <strong>clCompileProgram</strong> or <strong>clLinkProgram</strong> has been performed on the
-        specified program object for device.
-</p><p class="tableblock">        CL_BUILD_ERROR - The build status returned if <strong>clBuildProgram</strong>,
+        specified program object for device.</p>
+<p class="tableblock">        CL_BUILD_ERROR - The build status returned if <strong>clBuildProgram</strong>,
         <strong>clCompileProgram</strong> or <strong>clLinkProgram</strong> whichever was performed last
-        on the specified program object for device generated an error.
-</p><p class="tableblock">        CL_BUILD_SUCCESS - The build status returned if <strong>clBuildProgram</strong>,
+        on the specified program object for device generated an error.</p>
+<p class="tableblock">        CL_BUILD_SUCCESS - The build status returned if <strong>clBuildProgram</strong>,
         <strong>clCompileProgram</strong> or <strong>clLinkProgram</strong> whichever was performed last
-        on the specified program object for device was successful.
-</p><p class="tableblock">        CL_BUILD_IN_PROGRESS - The build status returned if
+        on the specified program object for device was successful.</p>
+<p class="tableblock">        CL_BUILD_IN_PROGRESS - The build status returned if
         <strong>clBuildProgram</strong>, <strong>clCompileProgram</strong> or <strong>clLinkProgram</strong> whichever
         was performed last on the specified program object for device has
         not finished.</p></td>
@@ -16067,8 +16069,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">char[]</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Return the build, compile or link options specified by the options
         argument in <strong>clBuildProgram</strong>, <strong>clCompileProgram</strong> or <strong>clLinkProgram</strong>,
-        whichever was performed last on program for device.
-</p><p class="tableblock">        If build status of program for device is CL_BUILD_NONE, an empty
+        whichever was performed last on program for device.</p>
+<p class="tableblock">        If build status of program for device is CL_BUILD_NONE, an empty
         string is returned.</p></td>
 </tr>
 <tr>
@@ -16076,28 +16078,28 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">char[]</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Return the build, compile or link log for <strong>clBuildProgram</strong>,
         <strong>clCompileProgram</strong> or <strong>clLinkProgram</strong>, whichever was performed last
-        on program for device.
-</p><p class="tableblock">        If build status of program for device is CL_BUILD_NONE, an empty
+        on program for device.</p>
+<p class="tableblock">        If build status of program for device is CL_BUILD_NONE, an empty
         string is returned.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">CL_PROGRAM_BINARY_TYPE</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_program_binary_type</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Return the program binary type for device.
-        This can be one of the following values:
-</p><p class="tableblock">        CL_PROGRAM_BINARY_TYPE_NONE - There is no binary associated with
-        device.
-</p><p class="tableblock">        CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT - A compiled binary is
+        This can be one of the following values:</p>
+<p class="tableblock">        CL_PROGRAM_BINARY_TYPE_NONE - There is no binary associated with
+        device.</p>
+<p class="tableblock">        CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT - A compiled binary is
         associated with device.
         This is the case if program was created using
         <strong>clCreateProgramWithSource</strong> and compiled using <strong>clCompileProgram</strong> or
-        a compiled binary is loaded using <strong>clCreateProgramWithBinary</strong>.
-</p><p class="tableblock">        CL_PROGRAM_BINARY_TYPE_LIBRARY - A library binary is associated with
+        a compiled binary is loaded using <strong>clCreateProgramWithBinary</strong>.</p>
+<p class="tableblock">        CL_PROGRAM_BINARY_TYPE_LIBRARY - A library binary is associated with
         device.
         This is the case if program was created by <strong>clLinkProgram</strong> which is
         called with the <code>-create-library</code> link option or if a library binary
-        is loaded using <strong>clCreateProgramWithBinary</strong>.
-</p><p class="tableblock">        CL_PROGRAM_BINARY_TYPE_EXECUTABLE - An executable binary is
+        is loaded using <strong>clCreateProgramWithBinary</strong>.</p>
+<p class="tableblock">        CL_PROGRAM_BINARY_TYPE_EXECUTABLE - An executable binary is
         associated with device.
         This is the case if program was created by <strong>clLinkProgram</strong> without
         the <code>-create-library link</code> option or program was created by
@@ -16435,9 +16437,22 @@
 <code>filter_weights</code>, 3 for <code>src_image</code> and 4 for <code>dst_image</code>.</p>
 </div>
 <div class="paragraph">
+<p><em>arg_size</em> specifies the size of the argument value.
+If the argument is a memory object, the size is the size of the memory
+object.
+For arguments declared with the <code>local</code> qualifier, the size specified will
+be the size in bytes of the buffer that must be allocated for the <code>local</code>
+argument.
+If the argument is of type <em>sampler_t</em>, the <em>arg_size</em> value must be equal
+to <code>sizeof(cl_sampler)</code>.
+If the argument is of type <em>queue_t</em>, the <em>arg_size</em> value must be equal to
+<code>sizeof(cl_command_queue)</code>.
+For all other arguments, the size will be the size of argument type.</p>
+</div>
+<div class="paragraph">
 <p><em>arg_value</em> is a pointer to data that should be used as the argument value
 for argument specified by <em>arg_index</em>.
-The argument data pointed to by_arg_value_ is copied and the <em>arg_value</em>
+The argument data pointed to by <em>arg_value</em> is copied and the <em>arg_value</em>
 pointer can therefore be reused by the application after <strong>clSetKernelArg</strong>
 returns.
 The argument value specified is the value used by all API calls that enqueue
@@ -16499,19 +16514,6 @@
 <p>For all other kernel arguments, the <em>arg_value</em> entry must be a pointer to
 the actual data to be used as argument value.</p>
 </div>
-<div class="paragraph">
-<p><em>arg_size</em> specifies the size of the argument value.
-If the argument is a memory object, the size is the size of the memory
-object.
-For arguments declared with the <code>local</code> qualifier, the size specified will
-be the size in bytes of the buffer that must be allocated for the <code>local</code>
-argument.
-If the argument is of type <em>sampler_t</em>, the <em>arg_size</em> value must be equal
-to <code>sizeof(cl_sampler)</code>.
-If the argument is of type <em>queue_t</em>, the <em>arg_size</em> value must be equal to
-<code>sizeof(cl_command_queue)</code>.
-For all other arguments, the size will be the size of argument type.</p>
-</div>
 <div class="admonitionblock note">
 <table>
 <tr>
@@ -16580,7 +16582,7 @@
 the maximum size restriction that was set with the optional language
 attribute.
 The optional attribute can be <code>cl::max_size</code> defined in OpenCL 2.2 C++
-Kernel Languange specification or <code>SpvDecorationMaxByteOffset</code> defined
+Kernel Language specification or <code>SpvDecorationMaxByteOffset</code> defined
 in SPIR-V 1.2 Specification.</p>
 </li>
 <li>
@@ -16632,10 +16634,10 @@
 The SVM pointer can only be used for arguments that are declared to be a
 pointer to <code>global</code> or <code>constant</code> memory.
 The SVM pointer value must be aligned according to the arguments type.
-For example, if the argument is declared to be <code>global float4 <strong>p</code>, the SVM
+For example, if the argument is declared to be <code>global float4 *p</code>, the SVM
 pointer value passed for <code>p</code> must be at a minimum aligned to a <code>float4</code>.
 The SVM pointer value specified as the argument value can be the pointer
-returned by *clSVMAlloc</strong> or can be a pointer offset into the SVM region.</p>
+returned by <strong>clSVMAlloc</strong> or can be a pointer offset into the SVM region.</p>
 </div>
 <div class="paragraph">
 <p><strong>clSetKernelArgSVMPointer</strong> returns CL_SUCCESS if the function was executed
@@ -16695,7 +16697,7 @@
 <p><em>param_value</em> is a pointer to memory where the appropriate values determined
 by <em>param_name</em> are specified.</p>
 </div>
-<table id="kernel-exec-info-table" class="tableblock frame-all grid-all spread">
+<table id="kernel-exec-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 28. <strong>clSetKernelExecInfo_</strong> parameter values</caption>
 <colgroup>
 <col style="width: 34%;">
@@ -16715,8 +16717,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">void *[]</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">SVM pointers must reference locations contained entirely within
         buffers that are passed to kernel as arguments, or that are passed
-        through the execution information.
-</p><p class="tableblock">        Non-argument SVM buffers must be specified by passing pointers to
+        through the execution information.</p>
+<p class="tableblock">        Non-argument SVM buffers must be specified by passing pointers to
         those buffers via <strong>clSetKernelExecInfo</strong> for coarse-grain and
         fine-grain buffer SVM allocations but not for finegrain system SVM
         allocations.</p></td>
@@ -16955,7 +16957,7 @@
 queried by <em>param_name</em>.
 If <em>param_value_size_ret</em> is <code>NULL</code>, it is ignored.</p>
 </div>
-<table id="kernel-info-table" class="tableblock frame-all grid-all spread">
+<table id="kernel-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 29. <strong>clGetKernelInfo</strong> parameter queries</caption>
 <colgroup>
 <col style="width: 34%;">
@@ -17003,13 +17005,13 @@
         with the kernel function declaration in the program source.
         These attributes include attributes described in the earlier OpenCL
         C kernel language specifications and other attributes supported by
-        an implementation.
-</p><p class="tableblock">        Attributes are returned as they were declared inside
+        an implementation.</p>
+<p class="tableblock">        Attributes are returned as they were declared inside
         <code>__attribute__((...))</code>, with any surrounding whitespace and
         embedded newlines removed.
         When multiple attributes are present, they are returned as a single,
-        space delimited string.
-</p><p class="tableblock">        For kernels not created from OpenCL C source and the
+        space delimited string.</p>
+<p class="tableblock">        For kernels not created from OpenCL C source and the
         <strong>clCreateProgramWithSource</strong> API call the string returned from this
         query will be empty.</p></td>
 </tr>
@@ -17101,7 +17103,7 @@
 queried by <em>param_name</em>.
 If <em>param_value_size_ret</em> is <code>NULL</code>, it is ignored.</p>
 </div>
-<table id="kernel-workgroup-info-table" class="tableblock frame-all grid-all spread">
+<table id="kernel-workgroup-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 30. <strong>clGetKernelWorkGroupInfo</strong> parameter queries</caption>
 <colgroup>
 <col style="width: 34%;">
@@ -17123,8 +17125,8 @@
         global size that can be used to execute a kernel (i.e.
         <em>global_work_size</em> argument to <strong>clEnqueueNDRangeKernel</strong>) on a custom
         device given by device or a built-in kernel on an OpenCL device
-        given by device.
-</p><p class="tableblock">        If device is not a custom device and kernel is not a built-in
+        given by device.</p>
+<p class="tableblock">        If device is not a custom device and kernel is not a built-in
         kernel, <strong>clGetKernelWorkGroupInfo</strong> returns the error
         CL_INVALID_VALUE.</p></td>
 </tr>
@@ -17136,17 +17138,17 @@
         device given by device.
         The OpenCL implementation uses the resource requirements of the
         kernel (register usage etc.) to determine what this work-group size
-        should be.
-</p><p class="tableblock">        As a result and unlike CL_DEVICE_MAX_WORK_GROUP_SIZE this value may
-        vary from one kernel to another as well as one device to another.
-</p><p class="tableblock">        CL_KERNEL_WORK_GROUP_SIZE will be less than or equal to
+        should be.</p>
+<p class="tableblock">        As a result and unlike CL_DEVICE_MAX_WORK_GROUP_SIZE this value may
+        vary from one kernel to another as well as one device to another.</p>
+<p class="tableblock">        CL_KERNEL_WORK_GROUP_SIZE will be less than or equal to
         CL_DEVICE_MAX_WORK_GROUP_SIZE for a given kernel object.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_KERNEL_COMPILE_WORK_GROUP_SIZE</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t[3]</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the work-group size specified in the kernel source or IL.
-</p><p class="tableblock">        If the work-group size is not specified in the kernel source or IL,
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the work-group size specified in the kernel source or IL.</p>
+<p class="tableblock">        If the work-group size is not specified in the kernel source or IL,
         (0, 0, 0) is returned.</p></td>
 </tr>
 <tr>
@@ -17157,8 +17159,8 @@
         to execute the kernel, variables declared inside the kernel with the
         <code>__local</code> address qualifier and local memory to be allocated for
         arguments to the kernel declared as pointers with the <code>__local</code>
-        address qualifier and whose size is specified with <strong>clSetKernelArg</strong>.
-</p><p class="tableblock">        If the local memory size, for any pointer argument to the kernel
+        address qualifier and whose size is specified with <strong>clSetKernelArg</strong>.</p>
+<p class="tableblock">        If the local memory size, for any pointer argument to the kernel
         declared with the <code>__local</code> address qualifier, is not specified,
         its size is assumed to be 0.</p></td>
 </tr>
@@ -17281,7 +17283,7 @@
 queried by <em>param_name</em>.
 If <em>param_value_size_ret</em> is <code>NULL</code>, it is ignored.</p>
 </div>
-<table id="kernel-subgroup-info-table" class="tableblock frame-all grid-all spread">
+<table id="kernel-subgroup-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 31. <strong>clGetKernelSubGroupInfo</strong> parameter queries</caption>
 <colgroup>
 <col style="width: 25%;">
@@ -17305,8 +17307,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the maximum sub-group size for this kernel.
             All sub-groups must be the same size, while the last subgroup in
             any work-group (i.e. the subgroup with the maximum index) could
-            be the same or smaller size.
-</p><p class="tableblock">            The <em>input_value</em> must be an array of size_t values
+            be the same or smaller size.</p>
+<p class="tableblock">            The <em>input_value</em> must be an array of size_t values
             corresponding to the local work size parameter of the intended
             dispatch.
             The number of dimensions in the ND-range will be inferred from
@@ -17320,8 +17322,8 @@
             work-group for a given local work size.
             All workgroups, apart from the last work-group in each dimension
             in the presence of non-uniform work-group sizes, will have the
-            same number of sub-groups.
-</p><p class="tableblock">            The <em>input_value</em> must be an array of size_t values
+            same number of sub-groups.</p>
+<p class="tableblock">            The <em>input_value</em> must be an array of size_t values
             corresponding to the local work size parameter of the intended
             dispatch.
             The number of dimensions in the ND-range will be inferred from
@@ -17458,7 +17460,7 @@
 queried by <em>param_name</em>.
 If <em>param_value_size_ret</em> is <code>NULL</code>, it is ignored.</p>
 </div>
-<table id="kernel-argument-info-table" class="tableblock frame-all grid-all spread">
+<table id="kernel-argument-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 32. <strong>clGetKernelArgInfo</strong> parameter queries</caption>
 <colgroup>
 <col style="width: 34%;">
@@ -17478,12 +17480,12 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_kernel_arg_address_qualifier</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the address qualifier specified for the argument given by
         <em>arg_indx</em>.
-        This can be one of the following values:
-</p><p class="tableblock">        CL_KERNEL_ARG_ADDRESS_GLOBAL<br>
+        This can be one of the following values:</p>
+<p class="tableblock">        CL_KERNEL_ARG_ADDRESS_GLOBAL<br>
         CL_KERNEL_ARG_ADDRESS_LOCAL<br>
         CL_KERNEL_ARG_ADDRESS_CONSTANT<br>
-        CL_KERNEL_ARG_ADDRESS_PRIVATE
-</p><p class="tableblock">        If no address qualifier is specified, the default address qualifier
+        CL_KERNEL_ARG_ADDRESS_PRIVATE</p>
+<p class="tableblock">        If no address qualifier is specified, the default address qualifier
         which is CL_KERNEL_ARG_ADDRESS_PRIVATE is returned.</p></td>
 </tr>
 <tr>
@@ -17491,12 +17493,12 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_kernel_arg_access_qualifier</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the access qualifier specified for the argument given by
         <em>arg_indx</em>.
-        This can be one of the following values:
-</p><p class="tableblock">        CL_KERNEL_ARG_ACCESS_READ_ONLY<br>
+        This can be one of the following values:</p>
+<p class="tableblock">        CL_KERNEL_ARG_ACCESS_READ_ONLY<br>
         CL_KERNEL_ARG_ACCESS_WRITE_ONLY<br>
         CL_KERNEL_ARG_ACCESS_READ_WRITE<br>
-        CL_KERNEL_ARG_ACCESS_NONE
-</p><p class="tableblock">        If argument is not an image type and is not declared with the pipe
+        CL_KERNEL_ARG_ACCESS_NONE</p>
+<p class="tableblock">        If argument is not an image type and is not declared with the pipe
         qualifier, CL_KERNEL_ARG_ACCESS_NONE is returned.
         If argument is an image type, the access qualifier specified or the
         default access qualifier is returned.</p></td>
@@ -17522,8 +17524,8 @@
         The returned value can be: CL_KERNEL_ARG_TYPE_CONST<sup>17</sup>,
         CL_KERNEL_ARG_TYPE_RESTRICT, CL_KERNEL_ARG_TYPE_VOLATILE<sup>18</sup>, a
         combination of the above enums, CL_KERNEL_ARG_TYPE_PIPE or
-        CL_KERNEL_ARG_TYPE_NONE.
-</p><p class="tableblock">        CL_KERNEL_ARG_TYPE_NONE is returned for all parameters passed by
+        CL_KERNEL_ARG_TYPE_NONE.</p>
+<p class="tableblock">        CL_KERNEL_ARG_TYPE_NONE is returned for all parameters passed by
         value.</p></td>
 </tr>
 <tr>
@@ -18362,7 +18364,7 @@
 queried by <em>param_name</em>.
 If <em>param_value_size_ret</em> is <code>NULL</code>, it is ignored.</p>
 </div>
-<table id="event-info-table" class="tableblock frame-all grid-all spread">
+<table id="event-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 33. <strong>clGetEventInfo</strong> parameter queries</caption>
 <colgroup>
 <col style="width: 30%;">
@@ -18392,8 +18394,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_EVENT_COMMAND_TYPE</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_command_type</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Return the command associated with event.
-        Can be one of the following values:
-</p><p class="tableblock">        CL_COMMAND_NDRANGE_KERNEL<br>
+        Can be one of the following values:</p>
+<p class="tableblock">        CL_COMMAND_NDRANGE_KERNEL<br>
         CL_COMMAND_NATIVE_KERNEL<br>
         CL_COMMAND_READ_BUFFER<br>
         CL_COMMAND_WRITE_BUFFER<br>
@@ -18427,13 +18429,13 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_EVENT_COMMAND_EXECUTION_STATUS</strong><sup>19</sup></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_int</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Return the execution status of the command identified by event.
-        Valid values are:
-</p><p class="tableblock">        CL_QUEUED (command has been enqueued n the command-queue),
-</p><p class="tableblock">        CL_SUBMITTED (enqueued command has been submitted by the host to the
-        device associated with the command-queue),
-</p><p class="tableblock">        CL_RUNNING (device is currently executing this command),
-</p><p class="tableblock">        CL_COMPLETE (the command has completed), or
-</p><p class="tableblock">        Error code given by a negative integer value. (command was
+        Valid values are:</p>
+<p class="tableblock">        CL_QUEUED (command has been enqueued n the command-queue),</p>
+<p class="tableblock">        CL_SUBMITTED (enqueued command has been submitted by the host to the
+        device associated with the command-queue),</p>
+<p class="tableblock">        CL_RUNNING (device is currently executing this command),</p>
+<p class="tableblock">        CL_COMPLETE (the command has completed), or</p>
+<p class="tableblock">        Error code given by a negative integer value. (command was
         abnormally terminated - this may be caused by a bad memory access
         etc.).
         These error codes come from the same set of error codes that are
@@ -19048,7 +19050,7 @@
 queried by <em>param_name</em>.
 If <em>param_value_size_ret</em> is <code>NULL</code>, it is ignored.</p>
 </div>
-<table id="event-profiling-info-table" class="tableblock frame-all grid-all spread">
+<table id="event-profiling-info-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 34. <strong>clGetEventProfilingInfo</strong> parameter queries</caption>
 <colgroup>
 <col style="width: 34%;">
@@ -19572,7 +19574,7 @@
 profile are listed in the <a href="#embedded-device-queries-table">OpenCL Embedded
 Device Queries</a> table.</p>
 </div>
-<table id="embedded-device-queries-table" class="tableblock frame-all grid-all spread">
+<table id="embedded-device-queries-table" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 35. OpenCL Embedded Device Queries</caption>
 <colgroup>
 <col style="width: 33.3333%;">
@@ -19641,20 +19643,20 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_IMAGE_MAX_BUFFER_SIZE</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Max number of pixels for a 1D image created from a buffer object.
-</p><p class="tableblock">        The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Max number of pixels for a 1D image created from a buffer object.</p>
+<p class="tableblock">        The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_IMAGE_MAX_ARRAY_SIZE</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Max number of images in a 1D or 2D image array.
-</p><p class="tableblock">        The minimum value is 256 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Max number of images in a 1D or 2D image array.</p>
+<p class="tableblock">        The minimum value is 256 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_MAX_SAMPLERS</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_uint</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Maximum number of samplers that can be used in a kernel.
-</p><p class="tableblock">        The minimum value is 8 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Maximum number of samplers that can be used in a kernel.</p>
+<p class="tableblock">        The minimum value is 8 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_MAX_PARAMETER_SIZE</strong></p></td>
@@ -19666,22 +19668,22 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_SINGLE_FP_CONFIG</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_device_fp_config</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Describes single precision floatingpoint capability of the device.
+<td class="tableblock halign-left valign-top"><p class="tableblock">Describes single precision floating-point capability of the device.
         This is a bit-field that describes one or more of the following
-        values:
-</p><p class="tableblock">        CL_FP_DENORM - denorms are supported
-</p><p class="tableblock">        CL_FP_INF_NAN - INF and quiet NaNs are supported.
-</p><p class="tableblock">        CL_FP_ROUND_TO_NEAREST - round to nearest even rounding mode
-        supported
-</p><p class="tableblock">        CL_FP_ROUND_TO_ZERO - round to zero rounding mode supported
-</p><p class="tableblock">        CL_FP_ROUND_TO_INF - round to positive and negative infinity
-        rounding modes supported
-</p><p class="tableblock">        CL_FP_FMA - IEEE754-2008 fused multiply-add is supported.
-</p><p class="tableblock">        CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT - divide and sqrt are correctly
-        rounded as defined by the IEEE754 specification.
-</p><p class="tableblock">        CL_FP_SOFT_FLOAT - Basic floating-point operations (such as
-        addition, subtraction, multiplication) are implemented in software.
-</p><p class="tableblock">        The mandated minimum floating-point capability is:
+        values:</p>
+<p class="tableblock">        CL_FP_DENORM - denorms are supported</p>
+<p class="tableblock">        CL_FP_INF_NAN - INF and quiet NaNs are supported.</p>
+<p class="tableblock">        CL_FP_ROUND_TO_NEAREST - round to nearest even rounding mode
+        supported</p>
+<p class="tableblock">        CL_FP_ROUND_TO_ZERO - round to zero rounding mode supported</p>
+<p class="tableblock">        CL_FP_ROUND_TO_INF - round to positive and negative infinity
+        rounding modes supported</p>
+<p class="tableblock">        CL_FP_FMA - IEEE754-2008 fused multiply-add is supported.</p>
+<p class="tableblock">        CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT - divide and sqrt are correctly
+        rounded as defined by the IEEE754 specification.</p>
+<p class="tableblock">        CL_FP_SOFT_FLOAT - Basic floating-point operations (such as
+        addition, subtraction, multiplication) are implemented in software.</p>
+<p class="tableblock">        The mandated minimum floating-point capability is:
         CL_FP_ROUND_TO_ZERO or CL_FP_ROUND_TO_NEAREST for devices that are
         not of type CL_DEVICE_TYPE_CUSTOM.</p></td>
 </tr>
@@ -19711,17 +19713,17 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_COMPILER_AVAILABLE</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_bool</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Is CL_FALSE if the implementation does not have a compiler available
-        to compile the program source.
-</p><p class="tableblock">        Is CL_TRUE if the compiler is available.
+        to compile the program source.</p>
+<p class="tableblock">        Is CL_TRUE if the compiler is available.
         This can be CL_FALSE for the embedded platform profile only.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_LINKER_AVAILABLE</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_bool</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Is CL_FALSE if the implementation does not have a linker available.
-        Is CL_TRUE if the linker is available.
-</p><p class="tableblock">        This can be CL_FALSE for the embedded platform profile only.
-</p><p class="tableblock">        This must be CL_TRUE if CL_DEVICE_COMPILER_AVAILABLE is CL_TRUE.</p></td>
+        Is CL_TRUE if the linker is available.</p>
+<p class="tableblock">        This can be CL_FALSE for the embedded platform profile only.</p>
+<p class="tableblock">        This must be CL_TRUE if CL_DEVICE_COMPILER_AVAILABLE is CL_TRUE.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE</strong></p></td>
@@ -19940,7 +19942,7 @@
 <div class="paragraph">
 <p>uint4 a =</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 25%;">
 <col style="width: 25%;">
@@ -19962,7 +19964,7 @@
 <div class="paragraph">
 <p>uint4 a =</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 25%;">
 <col style="width: 25%;">
@@ -19984,7 +19986,7 @@
 <div class="paragraph">
 <p>uint4 a =</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 25%;">
 <col style="width: 25%;">
@@ -20028,7 +20030,7 @@
 <div class="paragraph">
 <p>uint4 a =</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 25%;">
 <col style="width: 25%;">
@@ -20050,7 +20052,7 @@
 <div class="paragraph">
 <p>uint4 a =</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 25%;">
 <col style="width: 25%;">
@@ -20075,7 +20077,7 @@
 <div class="paragraph">
 <p>uint4 a =</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 25%;">
 <col style="width: 25%;">
@@ -20097,7 +20099,7 @@
 <div class="paragraph">
 <p>uint4 a =</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 25%;">
 <col style="width: 25%;">
@@ -20511,7 +20513,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="_high_low_vector_component_notation">High/Low vector component notation</h4>
+<h4 id="_highlow_vector_component_notation">High/Low vector component notation</h4>
 <div class="paragraph">
 <p>Vector data type components may be accessed using the <code>.hi</code> and <code>.lo</code>
 notation similar to that supported within the language types.
@@ -20603,9 +20605,9 @@
 <h3 id="_application_constant_definitions">Application constant definitions</h3>
 <div class="paragraph">
 <p>In addition to the above application type definitions, the following literal
-defintions are also available.</p>
+definitions are also available.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -20775,7 +20777,7 @@
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_INFINITY</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Macro expanding to a value represnting infinity</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Macro expanding to a value representing infinity</p></td>
 </tr>
 </tbody>
 </table>
@@ -21102,7 +21104,7 @@
 program have been added to <strong>clGetProgramInfo</strong>.</p>
 </li>
 <li>
-<p>Additiional queries to get the compile and link status and options have
+<p>Additional queries to get the compile and link status and options have
 been added to <strong>clGetProgramBuildInfo</strong>.</p>
 </li>
 <li>
@@ -21428,11 +21430,11 @@
 </div>
 <div id="footer">
 <div id="footer-text">
-Version 2.2-8<br>
-Last updated 2018-09-24 21:35:08 PDT
+Version v2.2-10<br>
+Last updated 2019-02-05 16:03:11 EST
 </div>
 </div>
 
-
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
 </body>
 </html>
\ No newline at end of file
diff --git a/specs/2.2/html/OpenCL_C.html b/specs/2.2/html/OpenCL_C.html
index 953dac7..55ef0f3 100644
--- a/specs/2.2/html/OpenCL_C.html
+++ b/specs/2.2/html/OpenCL_C.html
@@ -4,8 +4,8 @@
 <meta charset="UTF-8">
 <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta name="generator" content="Asciidoctor 1.5.5">
-<meta name="author" content="Document Revision: 40">
+<meta name="generator" content="Asciidoctor 1.5.7">
+<meta name="author" content="Khronos&#174; OpenCL Working Group">
 <title>The OpenCL&#8482; C 2.0 Specification</title>
 <style>
 /*! normalize.css v2.1.2 | MIT License | git.io/normalize */
@@ -724,7 +724,7 @@
 .literalblock pre, .listingblock pre { background: #eeeeee; }
 
 </style>
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
 <style>
 /* Stylesheet for CodeRay to match GitHub theme | MIT License | http://foundation.zurb.com */
 /*pre.CodeRay {background-color:#f7f7f8;}*/
@@ -840,10 +840,10 @@
 <div id="header">
 <h1>The OpenCL<sup>&#8482;</sup> C 2.0 Specification</h1>
 <div class="details">
-<span id="author" class="author">Document Revision: 40</span><br>
-<span id="revnumber">version 2.2-8,</span>
-<span id="revdate">Mon, 08 Oct 2018 16:51:37 +0000</span>
-<br><span id="revremark">from git branch: master commit: b3cab22fcff5d8c17869907c983e259ddd7ce788</span>
+<span id="author" class="author">Khronos<sup>&#174;</sup> OpenCL Working Group</span><br>
+<span id="revnumber">version v2.2-10,</span>
+<span id="revdate">Tue, 05 Feb 2019 21:19:55 +0000</span>
+<br><span id="revremark">from git branch:  commit: 00422daf5dc013f21ab633479577c7cc225150e2</span>
 </div>
 <div id="toc" class="toc2">
 <div id="toctitle">Table of Contents</div>
@@ -995,7 +995,7 @@
 <div class="sectionbody">
 <div style="page-break-after: always;"></div>
 <div class="paragraph">
-<p>Copyright 2008-2018 The Khronos Group.</p>
+<p>Copyright 2008-2019 The Khronos Group.</p>
 </div>
 <div class="paragraph">
 <p>This specification is protected by copyright laws and contains material proprietary
@@ -1026,7 +1026,7 @@
 otherwise, arising from or in connection with these materials.</p>
 </div>
 <div class="paragraph">
-<p>Vulkan is a registered trademark and Khronos, OpenXR, SPIR, SPIR-V, SYCL, WebGL,
+<p>Vulkan and Khronos are registered trademarks, and OpenXR, SPIR, SPIR-V, SYCL, WebGL,
 WebCL, OpenVX, OpenVG, EGL, COLLADA, glTF, NNEF, OpenKODE, OpenKCAM, StreamInput,
 OpenWF, OpenSL ES, OpenMAX, OpenMAX AL, OpenMAX IL, OpenMAX DL, OpenML and DevU are
 trademarks of the Khronos Group Inc. ASTC is a trademark of ARM Holdings PLC,
@@ -1263,7 +1263,7 @@
 <div class="paragraph">
 <p>The following table describes the list of built-in scalar data types.</p>
 </div>
-<table id="table-builtin-scalar-types" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-scalar-types" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 1. Built-in Scalar Data Types</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -1379,7 +1379,7 @@
 programming language and the corresponding data type available to the
 application:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -1547,7 +1547,7 @@
 <div class="paragraph">
 <p>The following table describes the list of built-in vector data types.</p>
 </div>
-<table id="table-builtin-vector-types" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-vector-types" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 2. Built-in Vector Data Types</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -1612,7 +1612,7 @@
 programming language and the corresponding data type available to the
 application:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -1671,7 +1671,7 @@
 <p>The following table describes the list of additional data types supported by
 OpenCL.</p>
 </div>
-<table id="table-other-builtin-types" class="tableblock frame-all grid-all spread">
+<table id="table-other-builtin-types" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 3. Other Built-in Data Types</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -1748,11 +1748,11 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><code>cl_mem_fence_flags</code></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">This is a bitfield and can be 0 or a combination of the following
-      values ORed together:
-</p><p class="tableblock">      <code>CLK_GLOBAL_MEM_FENCE</code><br>
+      values ORed together:</p>
+<p class="tableblock">      <code>CLK_GLOBAL_MEM_FENCE</code><br>
       <code>CLK_LOCAL_MEM_FENCE</code><br>
-      <code>CLK_IMAGE_MEM_FENCE</code>
-</p><p class="tableblock">      These flags are described in detail in the
+      <code>CLK_IMAGE_MEM_FENCE</code></p>
+<p class="tableblock">      These flags are described in detail in the
       <a href="#synchronization-functions">synchronization functions</a> section.</p></td>
 </tr>
 </tbody>
@@ -1790,7 +1790,7 @@
 described in <a href="#table-other-builtin-types">Other Built-in Data Types</a> and the corresponding data type
 available to the application:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -1819,7 +1819,7 @@
 The vector data type names defined in <a href="#table-builtin-vector-types">Built-in Vector Data Types</a>, but
 where <em>n</em> is any value other than 2, 3, 4, 8 and 16, are also reserved.</p>
 </div>
-<table id="table-reserved-types" class="tableblock frame-all grid-all spread">
+<table id="table-reserved-types" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 4. Reserved Data Types</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -2087,7 +2087,7 @@
 refer to the appropriate element in the vector.
 The numeric indices that can be used are given in the table below:</p>
 </div>
-<table id="table-vector-indices" class="tableblock frame-all grid-all spread">
+<table id="table-vector-indices" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 5. Numeric indices for built-in vector data types</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -2510,7 +2510,7 @@
 Conversions may have an optional rounding mode modifier described in the
 following table.</p>
 </div>
-<table id="table-rounding-mode" class="tableblock frame-all grid-all spread">
+<table id="table-rounding-mode" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 6. Rounding Modes</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -3529,8 +3529,8 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c"><span class="comment">// declares a pointer p in the private address space that</span>
-<span class="comment">// points to an object in address space global</span>
+<pre class="CodeRay highlight"><code data-lang="c"><span class="comment">// declares a pointer p in the global address space that</span>
+<span class="comment">// points to an object in the global address space</span>
 global <span class="predefined-type">int</span> *p;
 
 <span class="directive">void</span> foo (...)
@@ -4635,7 +4635,7 @@
 <code>__local</code> and <code>__constant</code> address space qualifiers.
 <span class="line-through">The <code>image3d_t</code> type cannot be used with the <code>__write_only</code>
 access qualifier unless the <strong>cl_khr_3d_image_writes</strong> extension is enabled.
-An image type cannot be used with the <code>__read_write</code> access qualifer which
+An image type cannot be used with the <code>__read_write</code> access qualifier which
 is reserved for future use.</span></p>
 </div>
 <div class="paragraph">
@@ -5922,7 +5922,7 @@
 size specified to <strong>clEnqueueNDRangeKernel</strong>, and the global and local
 identifier of each work-item when this kernel is being executed on a device.</p>
 </div>
-<table id="table-work-item-functions" class="tableblock frame-all grid-all spread">
+<table id="table-work-item-functions" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 7. Work-Item Functions Table</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -5944,8 +5944,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the number of global work-items specified for dimension
       identified by <em>dimindx</em>.
       This value is given by the <em>global_work_size</em> argument to
-      <strong>clEnqueueNDRangeKernel</strong>.
-</p><p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
+      <strong>clEnqueueNDRangeKernel</strong>.</p>
+<p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
       For other values of <em>dimindx</em>, <strong>get_global_size</strong>() returns 1.</p></td>
 </tr>
 <tr>
@@ -5953,8 +5953,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the unique global work-item ID value for dimension identified
       by <em>dimindx</em>.
       The global work-item ID specifies the work-item ID based on the number
-      of global work-items specified to execute the kernel.
-</p><p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
+      of global work-items specified to execute the kernel.</p>
+<p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
       For other values of <em>dimindx</em>, <strong>get_global_id</strong>() returns 0.</p></td>
 </tr>
 <tr>
@@ -5967,16 +5967,16 @@
       <em>local_work_size</em> value which is returned by this function.
       If the kernel is executed with a non-uniform work-group size<sup>28</sup>, calls
       to this built-in from some work-groups may return different values
-      than calls to this built-in from other work-groups.
-</p><p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
+      than calls to this built-in from other work-groups.</p>
+<p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
       For other values of <em>dimindx</em>, <strong>get_local_size</strong>() returns 1.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t <strong>get_enqueued_local_size</strong>(
       uint <em>dimindx</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the same value as that returned by <strong>get_local_size</strong>(<em>dimindx</em>)
-      if the kernel is executed with a uniform work-group size.
-</p><p class="tableblock">      If the kernel is executed with a non-uniform work-group size, returns
+      if the kernel is executed with a uniform work-group size.</p>
+<p class="tableblock">      If the kernel is executed with a non-uniform work-group size, returns
       the number of local work-items in each of the work-groups that make up
       the uniform region of the global range in the dimension identified by
       <em>dimindx</em>.
@@ -5985,66 +5985,66 @@
       <em>local_work_size</em>[<em>dimindx</em>].
       If <em>local_work_size</em> is <code>NULL</code>, this value will match the local size
       that the implementation determined would be most efficient at
-      implementing the uniform region of the global range.
-</p><p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
+      implementing the uniform region of the global range.</p>
+<p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
       For other values of <em>dimindx</em>, <strong>get_enqueued_local_size</strong>() returns 1.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t <strong>get_local_id</strong>(uint <em>dimindx</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the unique local work-item ID, i.e. a work-item within a
-      specific work-group for dimension identified by <em>dimindx</em>.
-</p><p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
+      specific work-group for dimension identified by <em>dimindx</em>.</p>
+<p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
       For other values of <em>dimindx</em>, <strong>get_local_id</strong>() returns 0.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t <strong>get_num_groups</strong>(uint <em>dimindx</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the number of work-groups that will execute a kernel for
-      dimension identified by <em>dimindx</em>.
-</p><p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
+      dimension identified by <em>dimindx</em>.</p>
+<p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
       For other values of <em>dimindx</em>, <strong>get_num_groups</strong>() returns 1.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t <strong>get_group_id</strong>(uint <em>dimindx</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>get_group_id</strong> returns the work-group ID which is a number from 0 ..
-      <strong>get_num_groups</strong>(<em>dimindx</em>) - 1.
-</p><p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
+      <strong>get_num_groups</strong>(<em>dimindx</em>) - 1.</p>
+<p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
       For other values, <strong>get_group_id</strong>() returns 0.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t <strong>get_global_offset</strong>(uint <em>dimindx</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>get_global_offset</strong> returns the offset values specified in
-      <em>global_work_offset</em> argument to <strong>clEnqueueNDRangeKernel</strong>.
-</p><p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
+      <em>global_work_offset</em> argument to <strong>clEnqueueNDRangeKernel</strong>.</p>
+<p class="tableblock">      Valid values of <em>dimindx</em> are 0 to <strong>get_work_dim</strong>() - 1.
       For other values, <strong>get_global_offset</strong>() returns 0.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t <strong>get_global_linear_id</strong>()</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the work-items 1-dimensional global ID.
-</p><p class="tableblock">      For 1D work-groups, it is computed as <strong>get_global_id</strong>(0) -
-      <strong>get_global_offset</strong>(0).
-</p><p class="tableblock">      For 2D work-groups, it is computed as (<strong>get_global_id</strong>(1) -
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the work-items 1-dimensional global ID.</p>
+<p class="tableblock">      For 1D work-groups, it is computed as <strong>get_global_id</strong>(0) -
+      <strong>get_global_offset</strong>(0).</p>
+<p class="tableblock">      For 2D work-groups, it is computed as (<strong>get_global_id</strong>(1) -
       <strong>get_global_offset</strong>(1)) * <strong>get_global_size</strong>(0) + (<strong>get_global_id</strong>(0) -
-      <strong>get_global_offset</strong>(0)).
-</p><p class="tableblock">      For 3D work-groups, it is computed as <strong>get_global_id</strong>(2) -       <strong>get_global_offset</strong>(2 * <strong>get_global_size</strong>(1) * <strong>get_global_size</strong>(0))
+      <strong>get_global_offset</strong>(0)).</p>
+<p class="tableblock">      For 3D work-groups, it is computed as <strong>get_global_id</strong>(2) -       <strong>get_global_offset</strong>(2 * <strong>get_global_size</strong>(1) * <strong>get_global_size</strong>(0))
       + <strong>get_global_id</strong>(1) - <strong>get_global_offset</strong>(1 * <strong>get_global_size</strong>
       (0)) + (<strong>get_global_id</strong>(0) - <strong>get_global_offset</strong>(0)).</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">size_t <strong>get_local_linear_id</strong>()</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the work-items 1-dimensional local ID.
-</p><p class="tableblock">      For 1D work-groups, it is the same value as
-</p><p class="tableblock">      <strong>get_local_id</strong>(0).
-</p><p class="tableblock">      For 2D work-groups, it is computed as
-</p><p class="tableblock">      <strong>get_local_id</strong>(1) * <strong>get_local_size</strong>(0) + <strong>get_local_id</strong>(0).
-</p><p class="tableblock">      For 3D work-groups, it is computed as
-</p><p class="tableblock">      <strong>(get_local_id</strong>(2) * <strong>get_local_size</strong>(1) * <strong>get_local_size</strong>(0)) + 
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the work-items 1-dimensional local ID.</p>
+<p class="tableblock">      For 1D work-groups, it is the same value as</p>
+<p class="tableblock">      <strong>get_local_id</strong>(0).</p>
+<p class="tableblock">      For 2D work-groups, it is computed as</p>
+<p class="tableblock">      <strong>get_local_id</strong>(1) * <strong>get_local_size</strong>(0) + <strong>get_local_id</strong>(0).</p>
+<p class="tableblock">      For 3D work-groups, it is computed as</p>
+<p class="tableblock">      <strong>(get_local_id</strong>(2) * <strong>get_local_size</strong>(1) * <strong>get_local_size</strong>(0)) + 
       (<strong>get_local_id</strong>(1) * <strong>get_local_size</strong>(0)) + <strong>get_local_id</strong>(0).</p></td>
 </tr>
 </tbody>
 </table>
 <div class="paragraph">
 <p>[28] I.e. the <em>global_work_size</em> values specified to <strong>clEnqueueNDRangeKernel</strong>
-are not evenly divisable by the <em>local_work_size</em> values for each dimension.</p>
+are not evenly divisible by the <em>local_work_size</em> values for each dimension.</p>
 </div>
 </div>
 <div class="sect3">
@@ -6088,7 +6088,7 @@
 For any specific use of a function, the actual type has to be the same for
 all arguments and the return type, unless otherwise specified.</p>
 </div>
-<table id="table-builtin-math" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-math" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 8. Scalar and Vector Argument Built-in Math Function Table</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -6162,7 +6162,7 @@
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>cosh</strong>(gentype <em>x</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Compute hyperbolic consine, where <em>x</em> is an angle in radians.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute hyperbolic cosine, where <em>x</em> is an angle in radians.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>cospi</strong>(gentype <em>x</em>)</p></td>
@@ -6512,7 +6512,7 @@
 following table can take <code>float</code>, <code>float2</code>, <code>float3</code>, <code>float4</code>, <code>float8</code> or
 <code>float16</code> as the type for the arguments.</p>
 </div>
-<table id="table-builtin-half-native-math" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-half-native-math" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 9. Scalar and Vector Argument Built-in <em>half</em> and <em>native</em> Math Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -6681,7 +6681,7 @@
 Their values are of type <code>float</code> and are accurate within the precision of a
 single precision floating-point number.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -6716,7 +6716,7 @@
 <p>If double precision is supported by the device, the following symbolic
 constants will also be available:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -6792,7 +6792,7 @@
 OpenCL C programming language and the corresponding macro names available to
 the application.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -6855,7 +6855,7 @@
 They are of type <code>float</code> and are accurate within the precision of the
 <code>float</code> type.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -6953,7 +6953,7 @@
 OpenCL C programming language and the corresponding macro names available to
 the application.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -7006,7 +7006,7 @@
 They are of type <code>double</code> and are accurate within the precision of the
 double type.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -7104,7 +7104,7 @@
 <p>For any specific use of a function, the actual type has to be the same for
 all arguments and the return type unless otherwise specified.</p>
 </div>
-<table id="table-builtin-functions" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-functions" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 10. Scalar and Vector Integer Argument Built-in Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -7235,7 +7235,7 @@
 take <code>int</code>, <code>int2</code>, <code>int3</code>, <code>int4</code>, <code>int8</code>, <code>int16</code>, <code>uint</code>, <code>uint2</code>,
 <code>uint3</code>, <code>uint4</code>, <code>uint8</code> or <code>uint16</code> as the type for the arguments.</p>
 </div>
-<table id="table-builtin-fast-integer" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-fast-integer" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 11. Fast Integer Built-in Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -7295,7 +7295,7 @@
 OpenCL C programming language and the corresponding macro names available to
 the application.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -7393,7 +7393,7 @@
 <p>The built-in common functions are implemented using the round to nearest
 even rounding mode.</p>
 </div>
-<table id="table-builtin-common" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-common" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 12. Scalar and Vector Argument Built-in Common Function Table</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -7433,9 +7433,9 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>mix</strong>(gentype <em>x</em>, gentype <em>y</em>, gentype <em>a</em>)<br>
   gentypef <strong>mix</strong>(gentypef <em>x</em>, gentypef <em>y</em>, float <em>a</em>)<br>
   gentyped <strong>mix</strong>(gentyped <em>x</em>, gentyped <em>y</em>, double <em>a</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the linear blend of <em>x</em> &amp; <em>y</em> implemented as:
-</p><p class="tableblock">      <em>x</em> + (<em>y</em> - <em>x</em>) * <em>a</em>
-</p><p class="tableblock">      <em>a</em> must be a value in the range [0.0, 1.0].
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the linear blend of <em>x</em> &amp; <em>y</em> implemented as:</p>
+<p class="tableblock">      <em>x</em> + (<em>y</em> - <em>x</em>) * <em>a</em></p>
+<p class="tableblock">      <em>a</em> must be a value in the range [0.0, 1.0].
       If <em>a</em> is not in the range [0.0, 1.0], the return values are
       undefined.</p></td>
 </tr>
@@ -7453,7 +7453,7 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>smoothstep</strong>(gentype <em>edge0</em>, gentype <em>edge1</em>, gentype <em>x</em>)<br>
   gentypef <strong>smoothstep</strong>(float <em>edge0</em>, float <em>edge1</em>, gentypef <em>x</em>)<br>
   gentyped <strong>smoothstep</strong>(double <em>edge0</em>, double <em>edge1</em>, gentyped <em>x</em>)</p></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p>Returns 0.0 if <em>x</em> &lt;= <em>edge0</em> and 1.0 if <em>x</em> &gt;= <em>edge1</em> and performs
       smooth Hermite interpolation between 0 and 1 when <em>edge0</em> &lt; <em>x</em> &lt;
       <em>edge1</em>.
@@ -7503,7 +7503,7 @@
 The built-in geometric functions are implemented using the round to nearest
 even rounding mode.</p>
 </div>
-<table id="table-builtin-geometric" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-geometric" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 13. Scalar and Vector Argument Built-in Geometric Function Table</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -7554,12 +7554,12 @@
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">float <strong>fast_length</strong>(float<em>n</em> <em>p</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the length of vector <em>p</em> computed as:
-</p><p class="tableblock">      <strong>half_sqrt</strong>(<em>p.x</em><sup>2</sup> + <em>p.y</em><sup>2</sup> + &#8230;&#8203;)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the length of vector <em>p</em> computed as:</p>
+<p class="tableblock">      <strong>half_sqrt</strong>(<em>p.x</em><sup>2</sup> + <em>p.y</em><sup>2</sup> + &#8230;&#8203;)</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">float<em>n</em> <strong>fast_normalize</strong>(float<em>n</em> <em>p</em>)</p></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p>Returns a vector in the same direction as <em>p</em> but with a length of 1.
       <strong>fast_normalize</strong> is computed as:</p>
 </div>
@@ -7654,7 +7654,7 @@
 the argument type is a scalar and returns -1 if one or both arguments are
 not a number (NaN) and the argument type is a vector.</p>
 </div>
-<table id="table-builtin-relational" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-relational" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 14. Scalar and Vector Relational Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -7803,10 +7803,10 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>select</strong>(gentype <em>a</em>, gentype <em>b</em>, igentype <em>c</em>)
   gentype <strong>select</strong>(gentype <em>a</em>, gentype <em>b</em>, ugentype <em>c</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">For each component of a vector type,
-</p><p class="tableblock">      <em>result[i]</em> = if MSB of <em>c[i]</em> is set ? <em>b[i]</em> : <em>a[i]</em>.
-</p><p class="tableblock">      For a scalar type, <em>result</em> = <em>c</em> ? <em>b</em> : <em>a</em>.
-</p><p class="tableblock">      <code>igentype</code> and <code>ugentype</code> must have the same number of elements and
+<td class="tableblock halign-left valign-top"><p class="tableblock">For each component of a vector type,</p>
+<p class="tableblock">      <em>result[i]</em> = if MSB of <em>c[i]</em> is set ? <em>b[i]</em> : <em>a[i]</em>.</p>
+<p class="tableblock">      For a scalar type, <em>result</em> = <em>c</em> ? <em>b</em> : <em>a</em>.</p>
+<p class="tableblock">      <code>igentype</code> and <code>ugentype</code> must have the same number of elements and
       bits as <code>gentype</code><sup>36</sup>.</p></td>
 </tr>
 </tbody>
@@ -7837,7 +7837,7 @@
 described in <a href="#opencl-extension-spec">section 9.4 of the OpenCL 2.0 Extension
 Specification</a>.</p>
 </div>
-<table id="table-vector-loadstore" class="tableblock frame-all grid-all spread">
+<table id="table-vector-loadstore" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 15. Vector Data Load and Store Functions<sup>38</sup></caption>
 <colgroup>
 <col style="width: 50%;">
@@ -7850,7 +7850,7 @@
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype<em>n</em> <strong>vload<em>n</em></strong>(size_t <em>offset</em>, const gentype *<em>p</em>)<br>
-  gentype<em>n</em> <strong>vload<em>n</em></strong>(size_t <em>offset</em>, const constant gentype *<em>p</em>)</p></td>
+  gentype<em>n</em> <strong>vload<em>n</em></strong>(size_t <em>offset</em>, const __constant gentype *<em>p</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Return <code>sizeof(gentype<em>n</em>)</code> bytes of data, where the first <code>(<em>n</em> *
       sizeof(gentype))</code> bytes are read from the address
       computed as <code>(<em>p</em> +  (<em>offset</em> * <em>n</em>))</code>.
@@ -7869,12 +7869,8 @@
       if <code>gentype</code> is <code>long</code> or <code>ulong</code>.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">float <strong>vload_half</strong>(size_t <em>offset</em>, const half *<em>p</em>)<br>
-  float <strong>vload_half</strong>(size_t <em>offset</em>, const constant half *<em>p</em>)</p></td>
+  float <strong>vload_half</strong>(size_t <em>offset</em>, const __constant half *<em>p</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Read <code>sizeof(half)</code> bytes of data from the address computed as <code>(<em>p</em>
       +  <em>offset</em>)</code>.
       The data read is interpreted as a <code>half</code> value.
@@ -7884,7 +7880,7 @@
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">float<em>n</em> <strong>vload_half<em>n</em></strong>(size_t <em>offset</em>, const half *<em>p</em>)<br>
-  float<em>n</em> <strong>vload_half<em>n</em></strong>(size_t <em>offset</em>, const constant half *<em>p</em>)</p></td>
+  float<em>n</em> <strong>vload_half<em>n</em></strong>(size_t <em>offset</em>, const __constant half *<em>p</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Read <code>(<em>n</em> * sizeof(half))</code> bytes of data from the address computed as
       <code>(<em>p</em> +  (<em>offset * n</em>))</code>.
       The data read is interpreted as a <code>half<em>n</em></code> value.
@@ -7894,59 +7890,59 @@
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>vstore_half</strong>(float <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em><em>rte</em></strong>(float _data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em><em>rtz</em></strong>(float _data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em><em>rtp</em></strong>(float _data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em><em>rtn</em></strong>(float _data</em>, size_t <em>offset</em>, half *<em>p</em>)</p></td>
+  void <strong>vstore_half_rte</strong>(float <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstore_half_rtz</strong>(float <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstore_half_rtp</strong>(float <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstore_half_rtn</strong>(float <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">The <code>float</code> value given by <em>data</em> is first converted to a <code>half</code> value
       using the appropriate rounding mode.
       The <code>half</code> value is then written to the address computed as <code>(<em>p</em>
       +  <em>offset</em>)</code>.
-      The computed address must be 16-bit aligned.
-</p><p class="tableblock">      <strong>vstore_half</strong> uses the default rounding mode.
+      The computed address must be 16-bit aligned.</p>
+<p class="tableblock">      <strong>vstore_half</strong> uses the default rounding mode.
       The default rounding mode is round to nearest even.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>vstore_half<em>n</em></strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em>n_rte</em></strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em>n_rtz</em></strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em>n_rtp</em></strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em>n_rtn</em></strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)</p></td>
+  void <strong>vstore_half<em>n</em>_rte</strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtz</strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtp</strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtn</strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">The <code>float<em>n</em></code> value given by <em>data</em> is converted to a <code>half<em>n</em></code>
       value using the appropriate rounding mode.
       <code><em>n</em> * sizeof(half)</code> bytes from the <code>half<em>n</em></code> value are then written to
       the address computed as <code>(<em>p</em>
       +  (<em>offset</em> * <em>n</em>))</code>.
-      The computed address must be 16-bit aligned.
-</p><p class="tableblock">      <strong>vstore_half<em>n</em></strong> uses the default rounding mode.
+      The computed address must be 16-bit aligned.</p>
+<p class="tableblock">      <strong>vstore_half<em>n</em></strong> uses the default rounding mode.
       The default rounding mode is round to nearest even.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>vstore_half</strong>(double <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em><em>rte</em></strong>(double _data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em><em>rtz</em></strong>(double _data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em><em>rtp</em></strong>(double _data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em><em>rtn</em></strong>(double _data</em>, size_t <em>offset</em>, half *<em>p</em>)</p></td>
+  void <strong>vstore_half_rte</strong>(double <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstore_half_rtz</strong>(double <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstore_half_rtp</strong>(double <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstore_half_rtn</strong>(double <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">The <code>double</code> value given by <em>data</em> is first converted to a <code>half</code>
       value using the appropriate rounding mode.
       The <code>half</code> value is then written to the address computed as <code>(<em>p</em>
       +  <em>offset</em>)</code>.
-      The computed address must be 16-bit aligned.
-</p><p class="tableblock">      <strong>vstore_half</strong> uses the default rounding mode.
+      The computed address must be 16-bit aligned.</p>
+<p class="tableblock">      <strong>vstore_half</strong> uses the default rounding mode.
       The default rounding mode is round to nearest even.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>vstore_half<em>n</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em>n_rte</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em>n_rtz</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em>n_rtp</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstore_half<em>n_rtn</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)</p></td>
+  void <strong>vstore_half<em>n</em>_rte</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtz</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtp</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtn</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">The <code>double<em>n</em></code> value given by <em>data</em> is converted to a <code>half<em>n</em></code>
       value using the appropriate rounding mode.
       <code><em>n</em> * sizeof(half)</code> bytes from the <code>half<em>n</em></code> value are then written to
       the address computed as <code>(<em>p</em> +  (<em>offset</em> * <em>n</em>))</code>.
-      The computed address must be 16-bit aligned.
-</p><p class="tableblock">      <strong>vstore_half<em>n</em></strong> uses the default rounding mode.
+      The computed address must be 16-bit aligned.</p>
+<p class="tableblock">      <strong>vstore_half<em>n</em></strong> uses the default rounding mode.
       The default rounding mode is round to nearest even.</p></td>
 </tr>
 <tr>
@@ -7955,49 +7951,49 @@
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">float<em>n</em> <strong>vloada_half<em>n</em></strong>(size_t <em>offset</em>, const half *<em>p</em>)<br>
-  float<em>n</em> <strong>vloada_half<em>n</em></strong>(size_t <em>offset</em>, const constant half *<em>p</em>)</p></td>
+  float<em>n</em> <strong>vloada_half<em>n</em></strong>(size_t <em>offset</em>, const __constant half *<em>p</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">For n = 2, 4, 8 and 16, read <code>sizeof(half<em>n</em>)</code> bytes of data from
       the address computed as (<em>p</em> + (<em>offset</em> * <em>n</em>)).
       The data read is interpreted as a <code>half<em>n</em></code> value.
       The <code>half<em>n</em></code> value read is converted to a <code>float<em>n</em></code> value and
       the <code>float<em>n</em></code> value is returned.
-      The computed address must be aligned to <code>sizeof(half<em>n</em>)</code> bytes.
-</p><p class="tableblock">      For n = 3, <strong>vloada_half3</strong> reads a <code>half3</code> from the address computed as
+      The computed address must be aligned to <code>sizeof(half<em>n</em>)</code> bytes.</p>
+<p class="tableblock">      For n = 3, <strong>vloada_half3</strong> reads a <code>half3</code> from the address computed as
       <code>(<em>p</em> +  (<em>offset * 4</em>))</code> and returns a <code>float3</code>.
       The computed address must be aligned to <code>sizeof(half)</code> * 4 bytes.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>vstorea_half<em>n</em></strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstorea_half<em>n_rte</em></strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstorea_half<em>n_rtz</em></strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstorea_half<em>n_rtp</em></strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstorea_half<em>n_rtn</em></strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)</p></td>
+  void <strong>vstorea_half<em>n</em>_rte</strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtz</strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtp</strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtn</strong>(float<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">The <code>float<em>n</em></code> value given by <em>data</em> is converted to a <code>half<em>n</em></code>
-      value using the appropriate rounding mode.
-</p><p class="tableblock">      For n = 2, 4, 8 and 16, the <code>half<em>n</em></code> value is written to the
+      value using the appropriate rounding mode.</p>
+<p class="tableblock">      For n = 2, 4, 8 and 16, the <code>half<em>n</em></code> value is written to the
       address computed as <code>(<em>p</em> +  (<em>offset</em> * <em>n</em>))</code>.
-      The computed address must be aligned to <code>sizeof(half<em>n</em>)</code> bytes.
-</p><p class="tableblock">      For n = 3, the <code>half3</code> value is written
+      The computed address must be aligned to <code>sizeof(half<em>n</em>)</code> bytes.</p>
+<p class="tableblock">      For n = 3, the <code>half3</code> value is written
       to the address computed as <code>(<em>p</em> +  (<em>offset</em> * 4))</code>.
-      The computed address must be aligned to <code>sizeof(half) * 4</code> bytes.
-</p><p class="tableblock">      <strong>vstorea_half<em>n</em></strong> uses the default rounding mode.
+      The computed address must be aligned to <code>sizeof(half) * 4</code> bytes.</p>
+<p class="tableblock">      <strong>vstorea_half<em>n</em></strong> uses the default rounding mode.
       The default rounding mode is round to nearest even.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>vstorea_half<em>n</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstorea_half<em>n_rte</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstorea_half<em>n_rtz</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstorea_half<em>n_rtp</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
-  void <strong>vstorea_half<em>n_rtn</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)</p></td>
+  void <strong>vstorea_half<em>n</em>_rte</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtz</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtp</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtn</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, half *<em>p</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">The <code>double<em>n</em></code> value is converted to a <code>half<em>n</em></code> value using the
-      appropriate rounding mode.
-</p><p class="tableblock">      For n = 2, 4, 8 or 16, the <code>half<em>n</em></code> value is written to the address
+      appropriate rounding mode.</p>
+<p class="tableblock">      For n = 2, 4, 8 or 16, the <code>half<em>n</em></code> value is written to the address
       computed as <code>(<em>p</em> +  (<em>offset</em> * <em>n</em>))</code>.
-      The computed address must be aligned to <code>sizeof(half<em>n</em>)</code> bytes.
-</p><p class="tableblock">      For n = 3, the <code>half3</code> value is written
+      The computed address must be aligned to <code>sizeof(half<em>n</em>)</code> bytes.</p>
+<p class="tableblock">      For n = 3, the <code>half3</code> value is written
       to the address computed as <code>(<em>p</em> +  (<em>offset</em> * 4))</code>.
-      The computed address must be aligned to <code>sizeof(half) * 4</code> bytes.
-</p><p class="tableblock">      <strong>vstorea_half<em>n</em></strong> uses the default rounding mode.
+      The computed address must be aligned to <code>sizeof(half) * 4</code> bytes.</p>
+<p class="tableblock">      <strong>vstorea_half<em>n</em></strong> uses the default rounding mode.
       The default rounding mode is round to nearest even.</p></td>
 </tr>
 </tbody>
@@ -8047,11 +8043,11 @@
 <p>The OpenCL C programming language implements the following synchronization
 functions.</p>
 </div>
-<table id="table-builtin-synchronization" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-synchronization" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 16. Built-in Synchronization Functions</caption>
 <colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
+<col style="width: 30%;">
+<col style="width: 70%;">
 </colgroup>
 <thead>
 <tr>
@@ -8061,8 +8057,11 @@
 </thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>work_group_barrier</strong><sup>39</sup>(cl_mem_fence_flags <em>flags</em>)<br>
-  void <strong>work_group_barrier</strong>(cl_mem_fence_flags <em>flags</em>,
+<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>work_group_barrier</strong><sup>39</sup>(<br>
+  cl_mem_fence_flags <em>flags</em>)<br>
+  
+  void <strong>work_group_barrier</strong>(<br>
+  cl_mem_fence_flags <em>flags</em>,<br>
   memory_scope <em>scope</em><sup>40</sup>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">All work-items in a work-group executing the kernel on a processor
       must execute this function before any are allowed to continue
@@ -8070,22 +8069,22 @@
       This function must be encountered by all work-items in a work-group
       executing the kernel.
       These rules apply to ND-ranges implemented with uniform and
-      non-uniform work-groups.
-</p><p class="tableblock">      If <strong>work_group_barrier</strong> is inside a conditional statement, then all
+      non-uniform work-groups.</p>
+<p class="tableblock">      If <strong>work_group_barrier</strong> is inside a conditional statement, then all
       work-items must enter the conditional if any work-item enters the
-      conditional statement and executes the <strong>work_group_barrier</strong>.
-</p><p class="tableblock">      If <strong>work_group_barrier</strong> is inside a loop, all work-items must execute
+      conditional statement and executes the <strong>work_group_barrier</strong>.</p>
+<p class="tableblock">      If <strong>work_group_barrier</strong> is inside a loop, all work-items must execute
       the <strong>work_group_barrier</strong> for each iteration of the loop before any are
-      allowed to continue execution beyond the <strong>work_group_barrier</strong>.
-</p><p class="tableblock">      The <strong>work_group_barrier</strong> function also supports a variant that
+      allowed to continue execution beyond the <strong>work_group_barrier</strong>.</p>
+<p class="tableblock">      The <strong>work_group_barrier</strong> function also supports a variant that
       specifies the memory scope.
       For the <strong>work_group_barrier</strong> variant that does not take a memory
-      scope, the <em>scope</em> is <code>memory_scope_work_group</code>.
-</p><p class="tableblock">      The <em>scope</em> argument specifies whether the memory accesses of
+      scope, the <em>scope</em> is <code>memory_scope_work_group</code>.</p>
+<p class="tableblock">      The <em>scope</em> argument specifies whether the memory accesses of
       work-items in the work-group to memory address space(s) identified by
       <em>flags</em> become visible to all work-items in the work-group, the device
-      or all SVM devices.
-</p><p class="tableblock">      The <strong>work_group_barrier</strong> function can also be used to specify which
+      or all SVM devices.</p>
+<p class="tableblock">      The <strong>work_group_barrier</strong> function can also be used to specify which
       memory operations, i.e. to <code>global</code> memory, <code>local</code> memory or images
       become visible to the appropriate memory scope identified by <em>scope</em>.
       The <em>flags</em> argument specifies the memory address spaces.
@@ -8094,20 +8093,20 @@
       When these flags are OR&#8217;ed together the <strong>work_group_barrier</strong> acts as a
       combined barrier for all address spaces specified by the flags
       ordering memory accesses both within and across the specified address
-      spaces.
-</p><p class="tableblock">      <code>CLK_LOCAL_MEM_FENCE</code> - The <strong>work_group_barrier</strong> function will ensure
+      spaces.</p>
+<p class="tableblock">      <code>CLK_LOCAL_MEM_FENCE</code> - The <strong>work_group_barrier</strong> function will ensure
       that all local memory accesses become visible to all work-items in the
       work-group.
       Note that the value of <em>scope</em> is ignored as the memory scope is
-      always <code>memory_scope_work_group</code>.
-</p><p class="tableblock">      <code>CLK_GLOBAL_MEM_FENCE</code> - The <strong>work_group_barrier</strong> function ensure that
+      always <code>memory_scope_work_group</code>.</p>
+<p class="tableblock">      <code>CLK_GLOBAL_MEM_FENCE</code> - The <strong>work_group_barrier</strong> function ensure that
       all <code>global</code> memory accesses become visible to the appropriate scope
-      as given by <em>scope</em>.
-</p><p class="tableblock">      <code>CLK_IMAGE_MEM_FENCE</code> - The <strong>work_group_barrier</strong> function will ensure
+      as given by <em>scope</em>.</p>
+<p class="tableblock">      <code>CLK_IMAGE_MEM_FENCE</code> - The <strong>work_group_barrier</strong> function will ensure
       that all image memory accesses become visible to the appropriate scope
       as given by <em>scope</em>.
-      The value of <em>scope</em> must be <code>memory_scope_work_group</code>.
-</p><p class="tableblock">      The values of <em>flags</em> and <em>scope</em> must be the same for all work-items
+      The value of <em>scope</em> must be <code>memory_scope_work_group</code>.</p>
+<p class="tableblock">      The values of <em>flags</em> and <em>scope</em> must be the same for all work-items
       in the work-group.</p></td>
 </tr>
 </tbody>
@@ -8128,7 +8127,7 @@
 We use the generic type name <code>gentype</code> to indicate any of the built-in data
 types supported by OpenCL C or a user defined type.</p>
 </div>
-<table id="table-builtin-address-qualifier" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-address-qualifier" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 17. Built-in Address Space Qualifier Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -8188,7 +8187,7 @@
 3-component vector types behave as <strong>async_work_group_copy</strong> and
 <strong>async_work_group_strided_copy</strong> respectively for 4-component vector types.</p>
 </div>
-<table id="table-builtin-async-copy" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-async-copy" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 18. Built-in Async Copy and Prefetch Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -8211,17 +8210,17 @@
       work-group executing the kernel with the same argument values;
       otherwise the results are undefined.
       This rule applies to ND-ranges implemented with uniform and
-      non-uniform work-groups.
-</p><p class="tableblock">      Returns an event object that can be used by <strong>wait_group_events</strong> to
+      non-uniform work-groups.</p>
+<p class="tableblock">      Returns an event object that can be used by <strong>wait_group_events</strong> to
       wait for the async copy to finish.
       The <em>event</em> argument can also be used to associate the
       <strong>async_work_group_copy</strong> with a previous async copy allowing an event
       to be shared by multiple async copies; otherwise <em>event</em> should be
-      zero.
-</p><p class="tableblock">      0 can be implicitly and explicitly cast to <code>event_t</code> type.
-</p><p class="tableblock">      If <em>event</em> argument is non-zero, the event object supplied in <em>event</em>
-      argument will be returned.
-</p><p class="tableblock">      This function does not perform any implicit synchronization of source
+      zero.</p>
+<p class="tableblock">      0 can be implicitly and explicitly cast to <code>event_t</code> type.</p>
+<p class="tableblock">      If <em>event</em> argument is non-zero, the event object supplied in <em>event</em>
+      argument will be returned.</p>
+<p class="tableblock">      This function does not perform any implicit synchronization of source
       data such as using a <strong>barrier</strong> before performing the copy.</p></td>
 </tr>
 <tr>
@@ -8246,19 +8245,19 @@
       in a work-group executing the kernel with the same argument values;
       otherwise the results are undefined.
       This rule applies to ND-ranges implemented with uniform and
-      non-uniform work-groups
-</p><p class="tableblock">      Returns an event object that can be used by <strong>wait_group_events</strong> to
+      non-uniform work-groups</p>
+<p class="tableblock">      Returns an event object that can be used by <strong>wait_group_events</strong> to
       wait for the async copy to finish.
       The <em>event</em> argument can also be used to associate the
       <strong>async_work_group_strided_copy</strong> with a previous async copy allowing an
       event to be shared by multiple async copies; otherwise <em>event</em> should
-      be zero.
-</p><p class="tableblock">      0 can be implicitly and explicitly cast to event_t type.
-</p><p class="tableblock">      If <em>event</em> argument is non-zero, the event object supplied in <em>event</em>
-      argument will be returned.
-</p><p class="tableblock">      This function does not perform any implicit synchronization of source
-      data such as using a <strong>barrier</strong> before performing the copy.
-</p><p class="tableblock">      The behavior of <strong>async_work_group_strided_copy</strong> is undefined if
+      be zero.</p>
+<p class="tableblock">      0 can be implicitly and explicitly cast to event_t type.</p>
+<p class="tableblock">      If <em>event</em> argument is non-zero, the event object supplied in <em>event</em>
+      argument will be returned.</p>
+<p class="tableblock">      This function does not perform any implicit synchronization of source
+      data such as using a <strong>barrier</strong> before performing the copy.</p>
+<p class="tableblock">      The behavior of <strong>async_work_group_strided_copy</strong> is undefined if
       <em>src_stride</em> or <em>dst_stride</em> is 0, or if the <em>src_stride</em> or
       <em>dst_stride</em> values cause the <em>src</em> or <em>dst</em> pointers to exceed the
       upper bounds of the address space during the copy.</p></td>
@@ -8272,8 +8271,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Wait for events that identify the <strong>async_work_group_copy</strong> operations
       to complete.
       The event objects specified in <em>event_list</em> will be released after the
-      wait is performed.
-</p><p class="tableblock">      This function must be encountered by all work-items in a work-group
+      wait is performed.</p>
+<p class="tableblock">      This function must be encountered by all work-items in a work-group
       executing the kernel with the same <em>num_events</em> and event objects
       specified in <em>event_list</em>; otherwise the results are undefined.
       This rule applies to ND-ranges implemented with uniform and
@@ -8700,7 +8699,7 @@
 This section specifies each general kind.</p>
 </div>
 <div class="sect5">
-<h6 id="__strong_the_atomic_store_functions_strong"><strong>The atomic_store functions</strong></h6>
+<h6 id="_the_atomic_store_functions"><strong>The atomic_store functions</strong></h6>
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="c"><span class="directive">void</span> atomic_store(<span class="directive">volatile</span> A *object, C desired)
@@ -8724,7 +8723,7 @@
 </div>
 </div>
 <div class="sect5">
-<h6 id="__strong_the_atomic_load_functions_strong"><strong>The atomic_load functions</strong></h6>
+<h6 id="_the_atomic_load_functions"><strong>The atomic_load functions</strong></h6>
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="c">C atomic_load(<span class="directive">volatile</span> A *object)
@@ -8745,7 +8744,7 @@
 </div>
 </div>
 <div class="sect5">
-<h6 id="__strong_the_atomic_exchange_functions_strong"><strong>The atomic_exchange functions</strong></h6>
+<h6 id="_the_atomic_exchange_functions"><strong>The atomic_exchange functions</strong></h6>
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="c">C atomic_exchange(<span class="directive">volatile</span> A *object, C desired)
@@ -8770,7 +8769,7 @@
 </div>
 </div>
 <div class="sect5">
-<h6 id="__strong_the_atomic_compare_exchange_functions_strong"><strong>The atomic_compare_exchange functions</strong></h6>
+<h6 id="_the_atomic_compare_exchange_functions"><strong>The atomic_compare_exchange functions</strong></h6>
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="c"><span class="predefined-type">bool</span> atomic_compare_exchange_strong(
@@ -8864,14 +8863,14 @@
 </div>
 </div>
 <div class="sect5">
-<h6 id="__strong_the_code_atomic_fetch_code_and_modify_functions_strong"><strong>The <code>atomic_fetch</code> and modify functions</strong></h6>
+<h6 id="_the_atomic_fetch_and_modify_functions"><strong>The <code>atomic_fetch</code> and modify functions</strong></h6>
 <div class="paragraph">
 <p>The following operations perform arithmetic and bitwise computations.
 All of these operations are applicable to an object of any atomic integer
 type.
 The key, operator, and computation correspondence is given in table below:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 33.3333%;">
 <col style="width: 33.3333%;">
@@ -8969,7 +8968,7 @@
 </div>
 </div>
 <div class="sect5">
-<h6 id="__strong_atomic_flag_type_and_operations_strong"><strong>Atomic flag type and operations</strong></h6>
+<h6 id="_atomic_flag_type_and_operations"><strong>Atomic flag type and operations</strong></h6>
 <div class="paragraph">
 <p>The atomic_flag type provides the classic test-and-set functionality.
 It has two states, <em>set</em> (value is non-zero) and <em>clear</em> (value is 0).
@@ -8995,7 +8994,7 @@
 </div>
 </div>
 <div class="sect5">
-<h6 id="__strong_the_atomic_flag_test_and_set_functions_strong"><strong>The atomic_flag_test_and_set functions</strong></h6>
+<h6 id="_the_atomic_flag_test_and_set_functions"><strong>The atomic_flag_test_and_set functions</strong></h6>
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="c"><span class="predefined-type">bool</span> atomic_flag_test_and_set(
@@ -9020,7 +9019,7 @@
 </div>
 </div>
 <div class="sect5">
-<h6 id="__strong_the_atomic_flag_clear_functions_strong"><strong>The atomic_flag_clear functions</strong></h6>
+<h6 id="_the_atomic_flag_clear_functions"><strong>The atomic_flag_clear functions</strong></h6>
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="c"><span class="directive">void</span> atomic_flag_clear(<span class="directive">volatile</span> atomic_flag *object)
@@ -9095,7 +9094,7 @@
 <div class="paragraph">
 <p>[50] Only if double precision is supported.</p>
 </div>
-<table id="table-misc-vector" class="tableblock frame-all grid-all spread">
+<table id="table-misc-vector" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 19. Built-in Miscellaneous Vector Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -9122,11 +9121,11 @@
   int <strong>vec_step</strong>(<em>type</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">The <strong>vec_step</strong> built-in function takes a built-in scalar or vector
       data type argument and returns an integer value representing the
-      number of elements in the scalar or vector.
-</p><p class="tableblock">      For all scalar types, <strong>vec_step</strong> returns 1.
-</p><p class="tableblock">      The <strong>vec_step</strong> built-in functions that take a 3-component vector
-      return 4.
-</p><p class="tableblock">      <strong>vec_step</strong> may also take a pure type as an argument, e.g.
+      number of elements in the scalar or vector.</p>
+<p class="tableblock">      For all scalar types, <strong>vec_step</strong> returns 1.</p>
+<p class="tableblock">      The <strong>vec_step</strong> built-in functions that take a 3-component vector
+      return 4.</p>
+<p class="tableblock">      <strong>vec_step</strong> may also take a pure type as an argument, e.g.
       <strong>vec_step</strong>(float2)</p></td>
 </tr>
 <tr>
@@ -9135,7 +9134,7 @@
   gentype<em>n</em> <strong>shuffle2</strong>(gentype<em>m</em> <em>x</em>,
                            gentype<em>m</em> <em>y</em>,
                            ugentype<em>n</em> <em>mask</em>)</p></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p>The <strong>shuffle</strong> and <strong>shuffle2</strong> built-in functions construct a
       permutation of elements from one or two input vectors respectively
       that are of the same type, returning a vector with the same element
@@ -9201,7 +9200,7 @@
 <div class="paragraph">
 <p>The OpenCL C programming language implements the <strong>printf</strong> function.</p>
 </div>
-<table id="table-printf" class="tableblock frame-all grid-all spread">
+<table id="table-printf" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 20. Built-in printf Function</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -9223,8 +9222,8 @@
       If the format is exhausted while arguments remain, the excess
       arguments are evaluated (as always) but are otherwise ignored.
       The <strong>printf</strong> function returns when the end of the format string is
-      encountered.
-</p><p class="tableblock">      <strong>printf</strong> returns 0 if it was executed successfully and -1 otherwise.</p></td>
+      encountered.</p>
+<p class="tableblock">      <strong>printf</strong> returns 0 if it was executed successfully and -1 otherwise.</p></td>
 </tr>
 </tbody>
 </table>
@@ -9779,7 +9778,7 @@
 <p>Sampler variables in a program are declared to be of type <code>sampler_t</code>.
 A variable of <code>sampler_t</code> type declared in the program source must be
 initialized with a 32-bit unsigned integer constant, which is interpreted as
-a bit-field specifiying the following properties:</p>
+a bit-field specifying the following properties:</p>
 </div>
 <div class="ulist">
 <ul>
@@ -9832,7 +9831,7 @@
 <div class="paragraph">
 <p>The sampler fields are described in the following table.</p>
 </div>
-<table id="table-sampler-descriptor" class="tableblock frame-all grid-all spread">
+<table id="table-sampler-descriptor" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 21. Sampler Descriptor</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -9848,9 +9847,9 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Specifies whether the <em>x</em>, <em>y</em> and <em>z</em> coordinates are passed in as
       normalized or unnormalized values.
       This must be a literal value and can be one of the following
-      predefined enums:
-</p><p class="tableblock">      <code>CLK_NORMALIZED_COORDS_TRUE</code> or <code>CLK_NORMALIZED_COORDS_FALSE</code>.
-</p><p class="tableblock">      The samplers used with an image in multiple calls to
+      predefined enums:</p>
+<p class="tableblock">      <code>CLK_NORMALIZED_COORDS_TRUE</code> or <code>CLK_NORMALIZED_COORDS_FALSE</code>.</p>
+<p class="tableblock">      The samplers used with an image in multiple calls to
       <strong>read_image{f|i|ui}</strong> declared in a kernel must use the same value
       for &lt;normalized coords&gt;.</p></td>
 </tr>
@@ -9859,26 +9858,26 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Specifies the image addressing mode, i.e. how out-of-range image
       coordinates are handled.
       This must be a literal value and can be one of the following
-      predefined enums:
-</p><p class="tableblock">      <code>CLK_ADDRESS_MIRRORED_REPEAT</code> - Flip the image coordinate at every
+      predefined enums:</p>
+<p class="tableblock">      <code>CLK_ADDRESS_MIRRORED_REPEAT</code> - Flip the image coordinate at every
       integer junction.
       This addressing mode can only be used with normalized coordinates.
       If normalized coordinates are not used, this addressing mode may
-      generate image coordinates that are undefined.
-</p><p class="tableblock">      <code>CLK_ADDRESS_REPEAT</code> - out-of-range image coordinates are wrapped to
+      generate image coordinates that are undefined.</p>
+<p class="tableblock">      <code>CLK_ADDRESS_REPEAT</code> - out-of-range image coordinates are wrapped to
       the valid range.
       This addressing mode can only be used with normalized coordinates.
       If normalized coordinates are not used, this addressing mode may
-      generate image coordinates that are undefined.
-</p><p class="tableblock">      <code>CLK_ADDRESS_CLAMP_TO_EDGE</code> - out-of-range image coordinates are
-      clamped to the extent.
-</p><p class="tableblock">      <code>CLK_ADDRESS_CLAMP</code><sup>57</sup> - out-of-range image coordinates will return a
-      border color.
-</p><p class="tableblock">      <code>CLK_ADDRESS_NONE</code> - for this addressing mode the programmer
+      generate image coordinates that are undefined.</p>
+<p class="tableblock">      <code>CLK_ADDRESS_CLAMP_TO_EDGE</code> - out-of-range image coordinates are
+      clamped to the extent.</p>
+<p class="tableblock">      <code>CLK_ADDRESS_CLAMP</code><sup>57</sup> - out-of-range image coordinates will return a
+      border color.</p>
+<p class="tableblock">      <code>CLK_ADDRESS_NONE</code> - for this addressing mode the programmer
       guarantees that the image coordinates used to sample elements of the
       image refer to a location inside the image; otherwise the results are
-      undefined.
-</p><p class="tableblock">      For 1D and 2D image arrays, the addressing mode applies only to the
+      undefined.</p>
+<p class="tableblock">      For 1D and 2D image arrays, the addressing mode applies only to the
       <em>x</em> and (<em>x, y</em>) coordinates.
       The addressing mode for the coordinate which specifies the array index
       is always <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>.</p></td>
@@ -9887,8 +9886,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;filter mode&gt;</code></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Specifies the filter mode to use.
       This must be a literal value and can be one of the following
-      predefined enums: <code>CLK_FILTER_NEAREST</code> or <code>CLK_FILTER_LINEAR</code>.
-</p><p class="tableblock">      Refer to the <a href="#addressing-and-filter-modes">detailed description of
+      predefined enums: <code>CLK_FILTER_NEAREST</code> or <code>CLK_FILTER_LINEAR</code>.</p>
+<p class="tableblock">      Refer to the <a href="#addressing-and-filter-modes">detailed description of
       these filter modes</a>.</p></td>
 </tr>
 </tbody>
@@ -9972,7 +9971,7 @@
 <p>[58] The built-in function calls to read images with a sampler are not
 supported for <code>image1d_buffer_t</code> image types.</p>
 </div>
-<table id="table-image-read" class="tableblock frame-all grid-all spread">
+<table id="table-image-read" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 22. Built-in Image Read Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -9989,22 +9988,22 @@
   float4 <strong>read_imagef</strong>(read_only image2d_t <em>image</em>, sampler_t <em>sampler</em>,
   float2 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate (<em>coord.x</em>, <em>coord.y</em>) to do an element lookup in
-      the 2D image object specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
+      the 2D image object specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to one of
       the pre-defined packed formats or <code>CL_UNORM_INT8</code>, or
-      <code>CL_UNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
+      <code>CL_UNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to
-      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
-      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
-</p><p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
+      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
+      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
       sampler with filter mode set to <code>CLK_FILTER_NEAREST</code>, normalized
       coordinates set to <code>CLK_NORMALIZED_COORDS_FALSE</code> and addressing mode
       set to <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>, <code>CLK_ADDRESS_CLAMP</code> or
-      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.
-</p><p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
       <em>image_channel_data_type</em> values not specified in the description
       above are undefined.</p></td>
 </tr>
@@ -10022,28 +10021,28 @@
   uint4 <strong>read_imageui</strong>(read_only image2d_t <em>image</em>, sampler_t <em>sampler</em>,
   float2 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate (<em>coord.x</em>, <em>coord.y</em>) to do an element lookup in
-      the 2D image object specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
+      the 2D image object specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
       and unsigned integer values respectively.
-      Each channel will be stored in a 32-bit integer.
-</p><p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      Each channel will be stored in a 32-bit integer.</p>
+<p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imagei</strong> are undefined.
-</p><p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imagei</strong> are undefined.</p>
+<p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imageui</strong> are undefined.
-</p><p class="tableblock">      The <strong>read_image{i|ui}</strong> calls support a nearest filter only.
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imageui</strong> are undefined.</p>
+<p class="tableblock">      The <strong>read_image{i|ui}</strong> calls support a nearest filter only.
       The filter_mode specified in <em>sampler</em> must be set to
-      <code>CLK_FILTER_NEAREST</code>; otherwise the values returned are undefined.
-</p><p class="tableblock">      Furthermore, the <strong>read_image{i|ui}</strong> calls that take integer
+      <code>CLK_FILTER_NEAREST</code>; otherwise the values returned are undefined.</p>
+<p class="tableblock">      Furthermore, the <strong>read_image{i|ui}</strong> calls that take integer
       coordinates must use a sampler with normalized coordinates set to
       <code>CLK_NORMALIZED_COORDS_FALSE</code> and addressing mode set to
       <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>, <code>CLK_ADDRESS_CLAMP</code> or
@@ -10060,22 +10059,22 @@
   float4 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate (<em>coord.x</em>, <em>coord.y</em>, <em>coord.z</em>) to do an element
       lookup in the 3D image object specified by <em>image</em>.
-      <em>coord.w</em> is ignored.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
+      <em>coord.w</em> is ignored.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to one of
       the pre-defined packed formats or <code>CL_UNORM_INT8</code>, or
-      <code>CL_UNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
+      <code>CL_UNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to
-      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
-      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
-</p><p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
+      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
+      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
       sampler with filter mode set to <code>CLK_FILTER_NEAREST</code>, normalized
       coordinates set to <code>CLK_NORMALIZED_COORDS_FALSE</code> and addressing mode
       set to <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>, <code>CLK_ADDRESS_CLAMP</code> or
-      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.
-</p><p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
       <em>image_channel_data_type</em> values not specified in the description are
       undefined.</p></td>
 </tr>
@@ -10094,28 +10093,28 @@
   float4 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate (<em>coord.x</em>, <em>coord.y</em>, <em>coord.z</em>) to do an element
       lookup in the 3D image object specified by <em>image</em>.
-      <em>coord.w</em> is ignored.
-</p><p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
+      <em>coord.w</em> is ignored.</p>
+<p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
       and unsigned integer values respectively.
-      Each channel will be stored in a 32-bit integer.
-</p><p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      Each channel will be stored in a 32-bit integer.</p>
+<p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imagei</strong> are undefined.
-</p><p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imagei</strong> are undefined.</p>
+<p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imageui</strong> are undefined.
-</p><p class="tableblock">      The <strong>read_image{i|ui}</strong> calls support a nearest filter only.
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imageui</strong> are undefined.</p>
+<p class="tableblock">      The <strong>read_image{i|ui}</strong> calls support a nearest filter only.
       The filter_mode specified in <em>sampler</em> must be set to
-      <code>CLK_FILTER_NEAREST</code>; otherwise the values returned are undefined.
-</p><p class="tableblock">      Furthermore, the <strong>read_image{i|ui}</strong> calls that take integer
+      <code>CLK_FILTER_NEAREST</code>; otherwise the values returned are undefined.</p>
+<p class="tableblock">      Furthermore, the <strong>read_image{i|ui}</strong> calls that take integer
       coordinates must use a sampler with normalized coordinates set to
       <code>CLK_NORMALIZED_COORDS_FALSE</code> and addressing mode set to
       <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>, <code>CLK_ADDRESS_CLAMP</code> or
@@ -10131,22 +10130,22 @@
   float4 <strong>read_imagef</strong>(read_only image2d_array_t <em>image</em>,
   sampler_t <em>sampler</em>, float4 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.xy</em> to do an element lookup in the 2D image identified by
-      <em>coord.z</em> in the 2D image array specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
+      <em>coord.z</em> in the 2D image array specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
       for image objects created with image_channel_data_type set to one of
       the pre-defined packed formats or <code>CL_UNORM_INT8</code>, or
-      <code>CL_UNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
+      <code>CL_UNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
       for image objects created with image_channel_data_type set to
-      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
-      with image_channel_data_type set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
-</p><p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
+      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
+      with image_channel_data_type set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
       sampler with filter mode set to <code>CLK_FILTER_NEAREST</code>, normalized
       coordinates set to <code>CLK_NORMALIZED_COORDS_FALSE</code> and addressing mode
       set to <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>, <code>CLK_ADDRESS_CLAMP</code> or
-      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.
-</p><p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
       image_channel_data_type values not specified in the description above
       are undefined.</p></td>
 </tr>
@@ -10160,28 +10159,28 @@
   uint4 <strong>read_imageui</strong>(read_only image2d_array_t <em>image</em>,
   sampler_t <em>sampler</em>, float4 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.xy</em> to do an element lookup in the 2D image identified by
-      <em>coord.z</em> in the 2D image array specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
+      <em>coord.z</em> in the 2D image array specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
       and unsigned integer values respectively.
-      Each channel will be stored in a 32-bit integer.
-</p><p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      Each channel will be stored in a 32-bit integer.</p>
+<p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imagei</strong> are undefined.
-</p><p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imagei</strong> are undefined.</p>
+<p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imageui</strong> are undefined.
-</p><p class="tableblock">      The <strong>read_image{i|ui}</strong> calls support a nearest filter only.
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imageui</strong> are undefined.</p>
+<p class="tableblock">      The <strong>read_image{i|ui}</strong> calls support a nearest filter only.
       The filter_mode specified in <em>sampler</em> must be set to
-      <code>CLK_FILTER_NEAREST</code>; otherwise the values returned are undefined.
-</p><p class="tableblock">      Furthermore, the <strong>read_image{i|ui}</strong> calls that take integer
+      <code>CLK_FILTER_NEAREST</code>; otherwise the values returned are undefined.</p>
+<p class="tableblock">      Furthermore, the <strong>read_image{i|ui}</strong> calls that take integer
       coordinates must use a sampler with normalized coordinates set to
       <code>CLK_NORMALIZED_COORDS_FALSE</code> and addressing mode set to
       <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>, <code>CLK_ADDRESS_CLAMP</code> or
@@ -10197,22 +10196,22 @@
   float4 <strong>read_imagef</strong>(read_only image1d_t <em>image</em>, sampler_t <em>sampler</em>,
   float <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord</em> to do an element lookup in the 1D image object specified
-      by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
+      by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to one of
       the pre-defined packed formats or <code>CL_UNORM_INT8</code>, or
-      <code>CL_UNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
+      <code>CL_UNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to
-      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
-      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
-</p><p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
+      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
+      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
       sampler with filter mode set to <code>CLK_FILTER_NEAREST</code>, normalized
       coordinates set to <code>CLK_NORMALIZED_COORDS_FALSE</code> and addressing mode
       set to <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>, <code>CLK_ADDRESS_CLAMP</code> or
-      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.
-</p><p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
       <em>image_channel_data_type</em> values not specified in the description
       above are undefined.</p></td>
 </tr>
@@ -10230,28 +10229,28 @@
   uint4 <strong>read_imageui</strong>(read_only image1d_t <em>image</em>, sampler_t <em>sampler</em>,
   float <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord</em> to do an element lookup in the 1D image object specified
-      by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
+      by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
       and unsigned integer values respectively.
-      Each channel will be stored in a 32-bit integer.
-</p><p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      Each channel will be stored in a 32-bit integer.</p>
+<p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imagei</strong> are undefined.
-</p><p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imagei</strong> are undefined.</p>
+<p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imageui</strong> are undefined.
-</p><p class="tableblock">      The <strong>read_image{i|ui}</strong> calls support a nearest filter only.
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imageui</strong> are undefined.</p>
+<p class="tableblock">      The <strong>read_image{i|ui}</strong> calls support a nearest filter only.
       The filter_mode specified in <em>sampler</em> must be set to
-      <code>CLK_FILTER_NEAREST</code>; otherwise the values returned are undefined.
-</p><p class="tableblock">      Furthermore, the <strong>read_image{i|ui}</strong> calls that take integer
+      <code>CLK_FILTER_NEAREST</code>; otherwise the values returned are undefined.</p>
+<p class="tableblock">      Furthermore, the <strong>read_image{i|ui}</strong> calls that take integer
       coordinates must use a sampler with normalized coordinates set to
       <code>CLK_NORMALIZED_COORDS_FALSE</code> and addressing mode set to
       <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>, <code>CLK_ADDRESS_CLAMP</code> or
@@ -10267,22 +10266,22 @@
   float4 <strong>read_imagef</strong>(read_only image1d_array_t <em>image</em>,
   sampler_t <em>sampler</em>, float2 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.x</em> to do an element lookup in the 1D image identified by
-      <em>coord.y</em> in the 1D image array specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
+      <em>coord.y</em> in the 1D image array specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
       for image objects created with image_channel_data_type set to one of
       the pre-defined packed formats or <code>CL_UNORM_INT8</code>, or
-      <code>CL_UNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
+      <code>CL_UNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
       for image objects created with image_channel_data_type set to
-      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
-      with image_channel_data_type set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
-</p><p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
+      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
+      with image_channel_data_type set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
       sampler with filter mode set to <code>CLK_FILTER_NEAREST</code>, normalized
       coordinates set to <code>CLK_NORMALIZED_COORDS_FALSE</code> and addressing mode
       set to <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>, <code>CLK_ADDRESS_CLAMP</code> or
-      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.
-</p><p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
       image_channel_data_type values not specified in the description above
       are undefined.</p></td>
 </tr>
@@ -10296,28 +10295,28 @@
   uint4 <strong>read_imageui</strong>(read_only image1d_array_t <em>image</em>,
   sampler_t <em>sampler</em>, float2 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.x</em> to do an element lookup in the 1D image identified by
-      <em>coord.y</em> in the 1D image array specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
+      <em>coord.y</em> in the 1D image array specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
       and unsigned integer values respectively. Each channel will be stored
-      in a 32-bit integer.
-</p><p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      in a 32-bit integer.</p>
+<p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imagei</strong> are undefined.
-</p><p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imagei</strong> are undefined.</p>
+<p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imageui</strong> are undefined.
-</p><p class="tableblock">      The <strong>read_image{i|ui}</strong> calls support a nearest filter only.
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imageui</strong> are undefined.</p>
+<p class="tableblock">      The <strong>read_image{i|ui}</strong> calls support a nearest filter only.
       The filter_mode specified in <em>sampler</em> must be set to
-      <code>CLK_FILTER_NEAREST</code>; otherwise the values returned are undefined.
-</p><p class="tableblock">      Furthermore, the <strong>read_image{i|ui}</strong> calls that take integer
+      <code>CLK_FILTER_NEAREST</code>; otherwise the values returned are undefined.</p>
+<p class="tableblock">      Furthermore, the <strong>read_image{i|ui}</strong> calls that take integer
       coordinates must use a sampler with normalized coordinates set to
       <code>CLK_NORMALIZED_COORDS_FALSE</code> and addressing mode set to
       <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>, <code>CLK_ADDRESS_CLAMP</code> or
@@ -10333,18 +10332,18 @@
   float <strong>read_imagef</strong>(read_only image2d_depth_t <em>image</em>,
   sampler_t <em>sampler</em>, float2 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate (<em>coord.x</em>, <em>coord.y</em>) to do an element lookup in
-      the 2D depth image object specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value in the range [0.0, 1.0]
+      the 2D depth image object specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value in the range [0.0, 1.0]
       for depth image objects created with <em>image_channel_data_type</em> set to
-      <code>CL_UNORM_INT16</code> or <code>CL_UNORM_INT24</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value for depth image objects
-      created with <em>image_channel_data_type</em> set to <code>CL_FLOAT</code>.
-</p><p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
+      <code>CL_UNORM_INT16</code> or <code>CL_UNORM_INT24</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value for depth image objects
+      created with <em>image_channel_data_type</em> set to <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
       sampler with filter mode set to <code>CLK_FILTER_NEAREST</code>, normalized
       coordinates set to <code>CLK_NORMALIZED_COORDS_FALSE</code> and addressing mode
       set to <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>, <code>CLK_ADDRESS_CLAMP</code> or
-      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.
-</p><p class="tableblock">      Values returned by <strong>read_imagef</strong> for depth image objects with
+      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for depth image objects with
       <em>image_channel_data_type</em> values not specified in the description
       above are undefined.</p></td>
 </tr>
@@ -10358,18 +10357,18 @@
   float <strong>read_imagef</strong>(read_only image2d_array_depth_t <em>image</em>,
   sampler_t <em>sampler</em>, float4 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.xy</em> to do an element lookup in the 2D image identified by
-      <em>coord.z</em> in the 2D depth image array specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value in the range [0.0, 1.0]
+      <em>coord.z</em> in the 2D depth image array specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value in the range [0.0, 1.0]
       for depth image objects created with <em>image_channel_data_type</em> set to
-      <code>CL_UNORM_INT16</code> or <code>CL_UNORM_INT24</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value for depth image objects
-      created with <em>image_channel_data_type</em> set to <code>CL_FLOAT</code>.
-</p><p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
+      <code>CL_UNORM_INT16</code> or <code>CL_UNORM_INT24</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value for depth image objects
+      created with <em>image_channel_data_type</em> set to <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
       sampler with filter mode set to <code>CLK_FILTER_NEAREST</code>, normalized
       coordinates set to <code>CLK_NORMALIZED_COORDS_FALSE</code> and addressing mode
       set to <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>, <code>CLK_ADDRESS_CLAMP</code> or
-      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.
-</p><p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
       <em>image_channel_data_type</em> values not specified in the description
       above are undefined.</p></td>
 </tr>
@@ -10399,7 +10398,7 @@
 <p><em>aQual</em> in the following table refers to one of the access qualifiers.
 For samplerless read functions this may be <code>read_only</code> or <code>read_write</code>.</p>
 </div>
-<table id="table-image-samplerless-read" class="tableblock frame-all grid-all spread">
+<table id="table-image-samplerless-read" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 23. Built-in Image Sampler-less Read Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -10413,17 +10412,17 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">float4 <strong>read_imagef</strong>(<em>aQual</em> image2d_t <em>image</em>, int2 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate (<em>coord.x</em>, <em>coord.y</em>) to do an element lookup in
-      the 2D image object specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
+      the 2D image object specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to one of
       the pre-defined packed formats or <code>CL_UNORM_INT8</code>, or
-      <code>CL_UNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
+      <code>CL_UNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to
-      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
-      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
-</p><p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
+      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
       <em>image_channel_data_type</em> values not specified in the description
       above are undefined.</p></td>
 </tr>
@@ -10435,23 +10434,23 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">int4 <strong>read_imagei</strong>(<em>aQual</em> image2d_t <em>image</em>, int2 <em>coord</em>)<br>
   uint4 <strong>read_imageui</strong>(<em>aQual</em> image2d_t <em>image</em>, int2 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate (<em>coord.x</em>, <em>coord.y</em>) to do an element lookup in
-      the 2D image object specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
+      the 2D image object specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
       and unsigned integer values respectively. Each channel will be stored
-      in a 32-bit integer.
-</p><p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      in a 32-bit integer.</p>
+<p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imagei</strong> are undefined.
-</p><p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imagei</strong> are undefined.</p>
+<p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
       values returned by <strong>read_imageui</strong> are undefined.</p></td>
 </tr>
 <tr>
@@ -10462,17 +10461,17 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">float4 <strong>read_imagef</strong>(<em>aQual</em> image3d_t <em>image</em>, int4 <em>coord</em> )</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate (<em>coord.x</em>, <em>coord.y</em>, <em>coord.z</em>) to do an element
       lookup in the 3D image object specified by <em>image</em>.
-      <em>coord.w</em> is ignored.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
+      <em>coord.w</em> is ignored.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to one of
       the pre-defined packed formats or <code>CL_UNORM_INT8</code>, or
-      <code>CL_UNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
+      <code>CL_UNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to
-      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
-      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
-</p><p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
+      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
       <em>image_channel_data_type</em> values not specified in the description are
       undefined.</p></td>
 </tr>
@@ -10485,23 +10484,23 @@
   uint4 <strong>read_imageui</strong>(<em>aQual</em> image3d_t <em>image</em>, int4 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate (<em>coord.x</em>, <em>coord.y</em>, <em>coord.z</em>) to do an element
       lookup in the 3D image object specified by <em>image</em>.
-      <em>coord.w</em> is ignored.
-</p><p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
+      <em>coord.w</em> is ignored.</p>
+<p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
       and unsigned integer values respectively.
-      Each channel will be stored in a 32-bit integer.
-</p><p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      Each channel will be stored in a 32-bit integer.</p>
+<p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imagei</strong> are undefined.
-</p><p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imagei</strong> are undefined.</p>
+<p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
       values returned by <strong>read_imageui</strong> are undefined.</p></td>
 </tr>
 <tr>
@@ -10511,17 +10510,17 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">float4 <strong>read_imagef</strong>(<em>aQual</em> image2d_array_t <em>image</em>, int4 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.xy</em> to do an element lookup in the 2D image identified by
-      <em>coord.z</em> in the 2D image array specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
+      <em>coord.z</em> in the 2D image array specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to one of
       the pre-defined packed formats or <code>CL_UNORM_INT8</code>, or
-      <code>CL_UNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
+      <code>CL_UNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to
-      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
-      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
-</p><p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
+      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
       <em>image_channel_data_type</em> values not specified in the description
       above are undefined.</p></td>
 </tr>
@@ -10533,23 +10532,23 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">int4 <strong>read_imagei</strong>(<em>aQual</em> image2d_array_t <em>image</em>, int4 <em>coord</em>)<br>
   uint4 <strong>read_imageui</strong>(<em>aQual</em> image2d_array_t <em>image</em>, int4 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.xy</em> to do an element lookup in the 2D image identified by
-      <em>coord.z</em> in the 2D image array specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
+      <em>coord.z</em> in the 2D image array specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
       and unsigned integer values respectively. Each channel will be stored
-      in a 32-bit integer.
-</p><p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      in a 32-bit integer.</p>
+<p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imagei</strong> are undefined.
-</p><p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imagei</strong> are undefined.</p>
+<p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
       values returned by <strong>read_imageui</strong> are undefined.</p></td>
 </tr>
 <tr>
@@ -10560,17 +10559,17 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">float4 <strong>read_imagef</strong>(<em>aQual</em> image1d_t <em>image</em>, int <em>coord</em>)<br>
   float4 <strong>read_imagef</strong>(<em>aQual</em> image1d_buffer_t <em>image</em>, int <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord</em> to do an element lookup in the 1D image or 1D image buffer
-      object specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
+      object specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to one of
       the pre-defined packed formats or <code>CL_UNORM_INT8</code>, or
-      <code>CL_UNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
+      <code>CL_UNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to
-      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
-      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
-</p><p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
+      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
       <em>image_channel_data_type</em> values not specified in the description
       above are undefined.</p></td>
 </tr>
@@ -10584,23 +10583,23 @@
   int4 <strong>read_imagei</strong>(<em>aQual</em> image1d_buffer_t <em>image</em>, int <em>coord</em>)<br>
   uint4 <strong>read_imageui</strong>(<em>aQual</em> image1d_buffer_t <em>image</em>, int <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord</em> to do an element lookup in the 1D image or 1D image buffer
-      object specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
+      object specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
       and unsigned integer values respectively. Each channel will be stored
-      in a 32-bit integer.
-</p><p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      in a 32-bit integer.</p>
+<p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imagei</strong> are undefined.
-</p><p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imagei</strong> are undefined.</p>
+<p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
       values returned by <strong>read_imageui</strong> are undefined.</p></td>
 </tr>
 <tr>
@@ -10610,17 +10609,17 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">float4 <strong>read_imagef</strong>(<em>aQual</em> image1d_array_t <em>image</em>, int2 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.x</em> to do an element lookup in the 1D image identified by
-      <em>coord.y</em> in the 1D image array specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
+      <em>coord.y</em> in the 1D image array specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [0.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to one of
       the pre-defined packed formats or <code>CL_UNORM_INT8</code>, or
-      <code>CL_UNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
+      <code>CL_UNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values in the range [-1.0, 1.0]
       for image objects created with <em>image_channel_data_type</em> set to
-      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
-      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
-</p><p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <code>CL_SNORM_INT8</code>, or <code>CL_SNORM_INT16</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns floating-point values for image objects created
+      with <em>image_channel_data_type</em> set to <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
       <em>image_channel_data_type</em> values not specified in the description
       above are undefined.</p></td>
 </tr>
@@ -10632,23 +10631,23 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">int4 <strong>read_imagei</strong>(<em>aQual</em> image1d_array_t <em>image</em>, int2 <em>coord</em>)<br>
   uint4 <strong>read_imageui</strong>(<em>aQual</em> image1d_array_t <em>image</em>, int2 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.x</em> to do an element lookup in the 1D image identified by
-      <em>coord.y</em> in the 1D image array specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
+      <em>coord.y</em> in the 1D image array specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagei</strong> and <strong>read_imageui</strong> return unnormalized signed integer
       and unsigned integer values respectively. Each channel will be stored
-      in a 32-bit integer.
-</p><p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      in a 32-bit integer.</p>
+<p class="tableblock">      <strong>read_imagei</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
-      values returned by <strong>read_imagei</strong> are undefined.
-</p><p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      values returned by <strong>read_imagei</strong> are undefined.</p>
+<p class="tableblock">      <strong>read_imageui</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      If the <em>image_channel_data_type</em> is not one of the above values, the
       values returned by <strong>read_imageui</strong> are undefined.</p></td>
 </tr>
 <tr>
@@ -10658,13 +10657,13 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">float <strong>read_imagef</strong>(<em>aQual</em> image2d_depth_t <em>image</em>, int2 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate (<em>coord.x</em>, <em>coord.y</em>) to do an element lookup in
-      the 2D depth image object specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value in the range [0.0, 1.0]
+      the 2D depth image object specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value in the range [0.0, 1.0]
       for depth image objects created with <em>image_channel_data_type</em> set to
-      <code>CL_UNORM_INT16</code> or <code>CL_UNORM_INT24</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value for depth image objects
-      created with <em>image_channel_data_type</em> set to <code>CL_FLOAT</code>.
-</p><p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <code>CL_UNORM_INT16</code> or <code>CL_UNORM_INT24</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value for depth image objects
+      created with <em>image_channel_data_type</em> set to <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
       <em>image_channel_data_type</em> values not specified in the description
       above are undefined.</p></td>
 </tr>
@@ -10675,13 +10674,13 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">float <strong>read_imagef</strong>(<em>aQual</em> image2d_array_depth_t <em>image</em>, int4 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.xy</em> to do an element lookup in the 2D image identified by
-      <em>coord.z</em> in the 2D depth image array specified by <em>image</em>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value in the range [0.0, 1.0]
+      <em>coord.z</em> in the 2D depth image array specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value in the range [0.0, 1.0]
       for depth image objects created with <em>image_channel_data_type</em> set to
-      <code>CL_UNORM_INT16</code> or <code>CL_UNORM_INT24</code>.
-</p><p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value for depth image objects
-      created with <em>image_channel_data_type</em> set to <code>CL_FLOAT</code>.
-</p><p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <code>CL_UNORM_INT16</code> or <code>CL_UNORM_INT24</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value for depth image objects
+      created with <em>image_channel_data_type</em> set to <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
       <em>image_channel_data_type</em> values not specified in the description
       above are undefined.</p></td>
 </tr>
@@ -10704,7 +10703,7 @@
 <p><em>aQual</em> in the following table refers to one of the access qualifiers.
 For write functions this may be <code>write_only</code> or <code>read_write</code>.</p>
 </div>
-<table id="table-image-write" class="tableblock frame-all grid-all spread">
+<table id="table-image-write" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 24. Built-in Image Write Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -10725,25 +10724,25 @@
       done before writing the color value.
       <em>coord.x</em> and <em>coord.y</em> are considered to be unnormalized coordinates,
       and must be in the range [0, image width-1] and [0, image height-1]
-      respectively.
-</p><p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
+      respectively.</p>
+<p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
       <em>image_channel_data_type</em> set to one of the pre-defined packed formats
       or set to <code>CL_SNORM_INT8</code>, <code>CL_UNORM_INT8</code>, <code>CL_SNORM_INT16</code>,
       <code>CL_UNORM_INT16</code>, <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
       Appropriate data format conversion will be done to convert channel
       data from a floating-point value to actual data format in which the
-      channels are stored.
-</p><p class="tableblock">      <strong>write_imagei</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      channels are stored.</p>
+<p class="tableblock">      <strong>write_imagei</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      <strong>write_imageui</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      <strong>write_imageui</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
       image objects created with <em>image_channel_data_type</em> values not
       specified in the description above or with <em>x</em> and <em>y</em> coordinate
       values that are not in the range [0, image width-1] and [0, image
@@ -10767,25 +10766,25 @@
       done before writing the color value.
       <em>coord.x</em>, <em>coord.y</em> and <em>coord.z</em> are considered to be unnormalized
       coordinates, and must be in the range [0, image width-1] and [0, image
-      height-1], and [0, image number of layers-1], respectively.
-</p><p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
+      height-1], and [0, image number of layers-1], respectively.</p>
+<p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
       <em>image_channel_data_type</em> set to one of the pre-defined packed formats
       or set to <code>CL_SNORM_INT8</code>, <code>CL_UNORM_INT8</code>, <code>CL_SNORM_INT16</code>,
       <code>CL_UNORM_INT16</code>, <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
       Appropriate data format conversion will be done to convert channel
       data from a floating-point value to actual data format in which the
-      channels are stored.
-</p><p class="tableblock">      <strong>write_imagei</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      channels are stored.</p>
+<p class="tableblock">      <strong>write_imagei</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      <strong>write_imageui</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      <strong>write_imageui</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
       image objects created with <em>image_channel_data_type</em> values not
       specified in the description above or with (<em>x</em>, <em>y</em>, <em>z</em>) coordinate
       values that are not in the range [0, image width-1], [0, image
@@ -10814,25 +10813,25 @@
       Appropriate data format conversion to the specified image format is
       done before writing the color value.
       <em>coord</em> is considered to be an unnormalized coordinate, and must be in
-      the range [0, image width-1].
-</p><p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
+      the range [0, image width-1].</p>
+<p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
       <em>image_channel_data_type</em> set to one of the pre-defined packed formats
       or set to <code>CL_SNORM_INT8</code>, <code>CL_UNORM_INT8</code>, <code>CL_SNORM_INT16</code>,
       <code>CL_UNORM_INT16</code>, <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
       Appropriate data format conversion will be done to convert channel
       data from a floating-point value to actual data format in which the
-      channels are stored.
-</p><p class="tableblock">      <strong>write_imagei</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      channels are stored.</p>
+<p class="tableblock">      <strong>write_imagei</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      <strong>write_imageui</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      <strong>write_imageui</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
       image objects created with <em>image_channel_data_type</em> values not
       specified in the description above, or with a coordinate value that is
       not in the range [0, image width-1], is undefined.</p></td>
@@ -10854,25 +10853,25 @@
       done before writing the color value.
       <em>coord.x</em> and <em>coord.y</em> are considered to be unnormalized coordinates
       and must be in the range [0, image width-1] and [0, image number of
-      layers-1], respectively.
-</p><p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
+      layers-1], respectively.</p>
+<p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
       <em>image_channel_data_type</em> set to one of the pre-defined packed formats
       or set to <code>CL_SNORM_INT8</code>, <code>CL_UNORM_INT8</code>, <code>CL_SNORM_INT16</code>,
       <code>CL_UNORM_INT16</code>, <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
       Appropriate data format conversion will be done to convert channel
       data from a floating-point value to actual data format in which the
-      channels are stored.
-</p><p class="tableblock">      <strong>write_imagei</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      channels are stored.</p>
+<p class="tableblock">      <strong>write_imagei</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      <strong>write_imageui</strong> can only be used with image objects created with
-      <em>image_channel_data_type</em> set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      <strong>write_imageui</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
       image objects created with <em>image_channel_data_type</em> values not
       specified in the description above or with (<em>x</em>, <em>y</em>) coordinate
       values that are not in the range [0, image width-1] and [0, image
@@ -10891,14 +10890,14 @@
       done before writing the depth value.
       <em>coord.x</em> and <em>coord.y</em> are considered to be unnormalized coordinates,
       and must be in the range [0, image width-1], and [0, image height-1],
-      respectively.
-</p><p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
+      respectively.</p>
+<p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
       <em>image_channel_data_type</em> set to <code>CL_UNORM_INT16</code>, <code>CL_UNORM_INT24</code> or
       <code>CL_FLOAT</code>.
       Appropriate data format conversion will be done to convert depth valye
       from a floating-point value to actual data format associated with the
-      image.
-</p><p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
+      image.</p>
+<p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
       image objects created with <em>image_channel_data_type</em> values not
       specified in the description above or with (<em>x</em>, <em>y</em>) coordinate
       values that are not in the range [0, image width-1] and [0, image
@@ -10918,14 +10917,14 @@
       done before writing the depth value.
       <em>coord.x</em>, <em>coord.y</em> and <em>coord.z</em> are considered to be unnormalized
       coordinates, and must be in the range [0, image width-1], [0, image
-      height-1], and [0, image number of layers-1], respectively.
-</p><p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
+      height-1], and [0, image number of layers-1], respectively.</p>
+<p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
       <em>image_channel_data_type</em> set to <code>CL_UNORM_INT16</code>, <code>CL_UNORM_INT24</code> or
       <code>CL_FLOAT</code>.
       Appropriate data format conversion will be done to convert depth valye
       from a floating-point value to actual data format associated with the
-      image.
-</p><p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
+      image.</p>
+<p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
       image objects created with <em>image_channel_data_type</em> values not
       specified in the description above or with (<em>x</em>, <em>y</em>, <em>z</em>) coordinate
       values that are not in the range [0, image width-1], [0, image
@@ -10948,25 +10947,25 @@
       done before writing the color value.
       <em>coord.x</em>, <em>coord.y</em> and <em>coord.z</em> are considered to be unnormalized
       coordinates, and must be in the range [0, image width-1], [0, image
-      height-1], and [0, image depth-1], respectively.
-</p><p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
+      height-1], and [0, image depth-1], respectively.</p>
+<p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
       image_channel_data_type set to one of the pre-defined packed formats
       or set to <code>CL_SNORM_INT8</code>, <code>CL_UNORM_INT8</code>, <code>CL_SNORM_INT16</code>,
       <code>CL_UNORM_INT16</code>, <code>CL_HALF_FLOAT</code> or <code>CL_FLOAT</code>.
       Appropriate data format conversion will be done to convert channel
       data from a floating-point value to actual data format in which the
-      channels are stored.
-</p><p class="tableblock">      <strong>write_imagei</strong> can only be used with image objects created with
-      image_channel_data_type set to one of the following values:
-</p><p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
+      channels are stored.</p>
+<p class="tableblock">      <strong>write_imagei</strong> can only be used with image objects created with
+      image_channel_data_type set to one of the following values:</p>
+<p class="tableblock">      <code>CL_SIGNED_INT8</code>,<br>
       <code>CL_SIGNED_INT16</code> and<br>
-      <code>CL_SIGNED_INT32</code>.
-</p><p class="tableblock">      <strong>write_imageui</strong> can only be used with image objects created with
-      image_channel_data_type set to one of the following values:
-</p><p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
+      <code>CL_SIGNED_INT32</code>.</p>
+<p class="tableblock">      <strong>write_imageui</strong> can only be used with image objects created with
+      image_channel_data_type set to one of the following values:</p>
+<p class="tableblock">      <code>CL_UNSIGNED_INT8</code>,<br>
       <code>CL_UNSIGNED_INT16</code> and<br>
-      <code>CL_UNSIGNED_INT32</code>.
-</p><p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
+      <code>CL_UNSIGNED_INT32</code>.</p>
+<p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
       image objects with <em>image_channel_data_type</em> values not specified in
       the description above or with (<em>x</em>, <em>y</em>, <em>z</em>) coordinate values that
       are not in the range [0, image width-1], [0, image height-1], and [0,
@@ -10985,7 +10984,7 @@
 <p><em>aQual</em> in the following table refers to one of the access qualifiers.
 For query functions this may be <code>read_only</code>, <code>write_only</code> or <code>read_write</code>.</p>
 </div>
-<table id="table-image-query" class="tableblock frame-all grid-all spread">
+<table id="table-image-query" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 25. Built-in Image Query Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -11032,8 +11031,8 @@
   int <strong>get_image_channel_data_type</strong>(<em>aQual</em> image2d_array_t <em>image</em>)<br>
   int <strong>get_image_channel_data_type</strong>(<em>aQual</em> image2d_depth_t <em>image</em>)<br>
   int <strong>get_image_channel_data_type</strong>(<em>aQual</em> image2d_array_depth_t <em>image</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Return the channel data type. Valid values are:
-</p><p class="tableblock">      <code>CLK_SNORM_INT8</code><br>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return the channel data type. Valid values are:</p>
+<p class="tableblock">      <code>CLK_SNORM_INT8</code><br>
       <code>CLK_SNORM_INT16</code><br>
       <code>CLK_UNORM_INT8</code><br>
       <code>CLK_UNORM_INT16</code><br>
@@ -11058,8 +11057,8 @@
   int <strong>get_image_channel_order</strong>(<em>aQual</em> image2d_array_t <em>image</em>)<br>
   int <strong>get_image_channel_order</strong>(<em>aQual</em> image2d_depth_t <em>image</em>)<br>
   int <strong>get_image_channel_order</strong>(<em>aQual</em> image2d_array_depth_t <em>image</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Return the image channel order. Valid values are:
-</p><p class="tableblock">      <code>CLK_A</code><br>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return the image channel order. Valid values are:</p>
+<p class="tableblock">      <code>CLK_A</code><br>
       <code>CLK_R</code><br>
       <code>CLK_Rx</code><br>
       <code>CLK_RG</code><br>
@@ -11176,7 +11175,7 @@
 The unmapped components will be set to 0.0 for red, green and blue channels
 and will be set to 1.0 for the alpha channel.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -11268,7 +11267,7 @@
 <div class="paragraph">
 <p>[60] Only if double precision is supported.</p>
 </div>
-<table id="table-builtin-work-group" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-work-group" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 26. Built-in Work-group Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -11293,13 +11292,13 @@
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>work_group_broadcast</strong>(gentype <em>a</em>, size_t <em>local_id</em>)<br>
-  gentype <strong>work_group_broadcast</strong>(gentype <em>a</em>, size_t <em>local_id<em>x,
-  size_t _local_id_y</em>)<br>
-  gentype <strong>work_group_broadcast</strong>(gentype <em>a</em>, size_t <em>local_id</em>x,
-  size_t _local_id__y, size_t _local_id_z</em>)</p></td>
+  gentype <strong>work_group_broadcast</strong>(gentype <em>a</em>, size_t <em>local_id_x</em>,
+  size_t <em>local_id_y</em>)<br>
+  gentype <strong>work_group_broadcast</strong>(gentype <em>a</em>, size_t <em>local_id_x</em>,
+  size_t <em>local_id_y</em>, size_t <em>local_id_z</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Broadcast the value of <em>x</em> for work-item identified by <em>local_id</em> to
-      all work-items in the work-group.
-</p><p class="tableblock">      <em>local_id</em> must be the same value for all work-items in the
+      all work-items in the work-group.</p>
+<p class="tableblock">      <em>local_id</em> must be the same value for all work-items in the
       work-group.</p></td>
 </tr>
 <tr>
@@ -11311,16 +11310,16 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>work_group_scan_exclusive_&lt;op&gt;</strong>(gentype <em>x</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Do an exclusive scan operation specified by <strong>&lt;op&gt;</strong> of all values
       specified by work-items in the work-group. The scan results are
-      returned for each work-item.
-</p><p class="tableblock">      The scan order is defined by increasing 1D linear global ID within the
+      returned for each work-item.</p>
+<p class="tableblock">      The scan order is defined by increasing 1D linear global ID within the
       work-group.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>work_group_scan_inclusive_&lt;op&gt;</strong>(gentype <em>x</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Do an inclusive scan operation specified by <strong>&lt;op&gt;</strong> of all values
       specified by work-items in the work-group. The scan results are
-      returned for each work-item.
-</p><p class="tableblock">      The scan order is defined by increasing 1D linear global ID within the
+      returned for each work-item.</p>
+<p class="tableblock">      The scan order is defined by increasing 1D linear global ID within the
       work-group.</p></td>
 </tr>
 </tbody>
@@ -11478,7 +11477,7 @@
 The <code>double</code> scalar and vector types can only be used if <code>double</code> precision
 is supported.</p>
 </div>
-<table id="table-builtin-pipe" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-pipe" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 27. Built-in Pipe Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -11509,19 +11508,19 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>read_pipe</strong>(read_only pipe gentype <em>p</em>, reserve_id_t <em>reserve_id</em>,
   uint <em>index</em>, gentype *<em>ptr</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Read packet from the reserved area of the pipe referred to by
-      <em>reserve_id</em> and <em>index</em> into <em>ptr</em>.
-</p><p class="tableblock">      The reserved pipe entries are referred to by indices that go from 0
-      &#8230;&#8203; <em>num_packets</em> - 1.
-</p><p class="tableblock">      Returns 0 if <strong>read_pipe</strong> is successful and a negative value otherwise.</p></td>
+      <em>reserve_id</em> and <em>index</em> into <em>ptr</em>.</p>
+<p class="tableblock">      The reserved pipe entries are referred to by indices that go from 0
+      &#8230;&#8203; <em>num_packets</em> - 1.</p>
+<p class="tableblock">      Returns 0 if <strong>read_pipe</strong> is successful and a negative value otherwise.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>write_pipe</strong>(write_only pipe gentype <em>p</em>, reserve_id_t
   <em>reserve_id</em>, uint <em>index</em>, const gentype *<em>ptr</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Write packet specified by <em>ptr</em> to the reserved area of the pipe
-      referred to by <em>reserve_id</em> and <em>index</em>.
-</p><p class="tableblock">      The reserved pipe entries are referred to by indices that go from 0
-      &#8230;&#8203; <em>num_packets</em> - 1.
-</p><p class="tableblock">      Returns 0 if <strong>write_pipe</strong> is successful and a negative value
+      referred to by <em>reserve_id</em> and <em>index</em>.</p>
+<p class="tableblock">      The reserved pipe entries are referred to by indices that go from 0
+      &#8230;&#8203; <em>num_packets</em> - 1.</p>
+<p class="tableblock">      Returns 0 if <strong>write_pipe</strong> is successful and a negative value
       otherwise.</p></td>
 </tr>
 <tr>
@@ -11571,7 +11570,7 @@
 The <code>double</code> scalar and vector types can only be used if <code>double</code> precision
 is supported.</p>
 </div>
-<table id="table-builtin-pipe-work-group" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-pipe-work-group" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 28. Built-in Pipe Work-group Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -11588,8 +11587,8 @@
   reserve_id_t <strong>work_group_reserve_write_pipe</strong>(write_only pipe gentype <em>p</em>,
   uint <em>num_packets</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Reserve <em>num_packets</em> entries for reading from or writing to pipe <em>p</em>.
-      Returns a valid reservation ID if the reservation is successful.
-</p><p class="tableblock">      The reserved pipe entries are referred to by indices that go from 0
+      Returns a valid reservation ID if the reservation is successful.</p>
+<p class="tableblock">      The reserved pipe entries are referred to by indices that go from 0
       &#8230;&#8203; <em>num_packets</em> - 1.</p></td>
 </tr>
 <tr>
@@ -11667,7 +11666,7 @@
 <p><em>aQual</em> in the following table refers to one of the access qualifiers.
 For pipe query functions this may be <code>read_only</code> or <code>write_only</code>.</p>
 </div>
-<table id="table-builtin-pipe-query" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-pipe-query" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 29. Built-in Pipe Query Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -11763,7 +11762,7 @@
 </div>
 <div class="sect4">
 <h5 id="built-in-functions-enqueuing-a-kernel">Built-in Functions - Enqueuing a kernel</h5>
-<table id="table-builtin-kernel-enqueue" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-kernel-enqueue" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 30. Built-in Kernel Enqueue Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -11790,8 +11789,8 @@
   const ndrange_t <em>ndrange</em>, uint <em>num_events_in_wait_list</em>,
   const clk_event_t *<em>event_wait_list</em>, clk_event_t *<em>event_ret</em>,
   void (^<em>block</em>)(local void *, &#8230;&#8203;), uint size0, &#8230;&#8203;)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Enqueue the block for execution to <em>queue</em>.
-</p><p class="tableblock">      If an event is returned, <strong>enqueue_kernel</strong> performs an implicit retain
+<td class="tableblock halign-left valign-top"><p class="tableblock">Enqueue the block for execution to <em>queue</em>.</p>
+<p class="tableblock">      If an event is returned, <strong>enqueue_kernel</strong> performs an implicit retain
       on the returned event.</p></td>
 </tr>
 </tbody>
@@ -12108,7 +12107,7 @@
 Implementations may not schedule kernel launch earlier than the point
 specified by this flag, however.</p>
 </div>
-<table id="table-kernel-enqueue-flags" class="tableblock frame-all grid-all spread">
+<table id="table-kernel-enqueue-flags" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 31. Kernel Enqueue Flags</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -12193,7 +12192,7 @@
 </div>
 <div class="sect4">
 <h5 id="built-in-functions-kernel-query-functions">Built-in Functions - Kernel Query Functions</h5>
-<table id="table-builtin-kernel-query" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-kernel-query" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 32. Built-in Kernel Query Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -12208,8 +12207,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">uint <strong>get_kernel_work_group_size</strong>(void (^block)(void))<br>
   uint <strong>get_kernel_work_group_size</strong>(void (^block)(local void *, &#8230;&#8203;))</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">This provides a mechanism to query the maximum work-group size that
-      can be used to execute a block on a specific device given by <em>device</em>.
-</p><p class="tableblock">      <em>block</em> specifies the block to be enqueued.</p></td>
+      can be used to execute a block on a specific device given by <em>device</em>.</p>
+<p class="tableblock">      <em>block</em> specifies the block to be enqueued.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">uint <strong>get_kernel_preferred_</strong> <strong>work_group_size_multiple</strong>(
@@ -12232,7 +12231,7 @@
 <p>The following table describes the list of built-in functions that can be
 used to enqueue commands such as a marker.</p>
 </div>
-<table id="table-builtin-other-enqueue" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-other-enqueue" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 33. Built-in Other Enqueue Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -12246,11 +12245,11 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>enqueue_marker</strong>(queue_t <em>queue</em>, uint <em>num_events_in_wait_list</em>,
   const clk_event_t *<em>event_wait_list</em>, clk_event_t *<em>event_ret</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Enqueue a marker command to <em>queue</em>.
-</p><p class="tableblock">      The marker command waits for a list of events specified by
-      <em>event_wait_list</em> to complete before the marker completes.
-</p><p class="tableblock">      <em>event_ret</em> must not be <code>NULL</code> as otherwise this is a no-op.
-</p><p class="tableblock">      If an event is returned, <strong>enqueue_marker</strong> performs an implicit retain
+<td class="tableblock halign-left valign-top"><p class="tableblock">Enqueue a marker command to <em>queue</em>.</p>
+<p class="tableblock">      The marker command waits for a list of events specified by
+      <em>event_wait_list</em> to complete before the marker completes.</p>
+<p class="tableblock">      <em>event_ret</em> must not be <code>NULL</code> as otherwise this is a no-op.</p>
+<p class="tableblock">      If an event is returned, <strong>enqueue_marker</strong> performs an implicit retain
       on the returned event.</p></td>
 </tr>
 </tbody>
@@ -12294,7 +12293,7 @@
 <p>The following table describes the list of built-in functions that work on
 events.</p>
 </div>
-<table id="table-builtin-event" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-event" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 34. Built-in Event Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -12318,8 +12317,8 @@
       The event object is deleted once the event reference count is zero,
       the specific command identified by this event has completed (or
       terminated) and there are no commands in any device command queue that
-      require a wait for this event to complete.
-</p><p class="tableblock">      <em>event</em> must be an event returned by enqueue_kernel, enqueue_marker or
+      require a wait for this event to complete.</p>
+<p class="tableblock">      <em>event</em> must be an event returned by enqueue_kernel, enqueue_marker or
       a user event.</p></td>
 </tr>
 <tr>
@@ -12357,17 +12356,17 @@
       The specific function being referred to is: enqueue_kernel.
       These enqueued commands are identified by unique event objects.
       The profiling information will be available in <em>value</em> once the
-      command identified by <em>event</em> has completed.&#8201;&#8212;&#8201;<em>event</em> must be an event returned by enqueue_kernel.
-</p><p class="tableblock"><em>name</em> identifies which profiling information is to be queried and can be:
-</p><p class="tableblock">  <code>CLK_PROFILING_COMMAND_EXEC_TIME</code>
-</p><p class="tableblock"><em>value</em> is a pointer to two 64-bit values.
-</p><p class="tableblock">The first 64-bit value describes the elapsed time <code>CL_PROFILING_COMMAND_END</code>
+      command identified by <em>event</em> has completed.&#8201;&#8212;&#8201;<em>event</em> must be an event returned by enqueue_kernel.</p>
+<p class="tableblock"><em>name</em> identifies which profiling information is to be queried and can be:</p>
+<p class="tableblock">  <code>CLK_PROFILING_COMMAND_EXEC_TIME</code></p>
+<p class="tableblock"><em>value</em> is a pointer to two 64-bit values.</p>
+<p class="tableblock">The first 64-bit value describes the elapsed time <code>CL_PROFILING_COMMAND_END</code>
 - <code>CL_PROFLING_COMMAND_START</code> for the command identified by <em>event</em> in
-nanoseconds.
-</p><p class="tableblock">The second 64-bit value describes the elapsed time
+nanoseconds.</p>
+<p class="tableblock">The second 64-bit value describes the elapsed time
 <code>CL_PROFILING_COMMAND_COMPLETE</code> - <code>CL_PROFILING_COMAMND_START</code> for the
-command identified by <em>event</em> in nanoseconds.
-</p><p class="tableblock">[NOTE]
+command identified by <em>event</em> in nanoseconds.</p>
+<p class="tableblock">[NOTE]
 ====
 The behavior of capture_event_profiling_info when called multiple times for
 the same <em>event</em> is undefined.
@@ -12487,7 +12486,7 @@
 </div>
 <div class="sect4">
 <h5 id="built-in-functions-helper-functions">Built-in Functions - Helper Functions</h5>
-<table id="table-builtin-helper" class="tableblock frame-all grid-all spread">
+<table id="table-builtin-helper" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 35. Built-in Helper Functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -12665,9 +12664,16 @@
 </div>
 <div class="paragraph">
 <p><em>Attribution: This definition was taken with consent from Jean-Michel Muller
-with slight clarification for behavior at zero.
-Refer to
-<a href="ftp://ftp.inria.fr/INRIA/publication/publi-pdf/RR/RR-5504.pdf">_ftp://ftp.inria.fr/INRIA/publication/publi-pdf/RR/RR-5504.pdf</em></a>._</p>
+with slight clarification for behavior at zero.</em></p>
+</div>
+<div class="exampleblock">
+<div class="content">
+<div class="paragraph">
+<p>Jean-Michel Muller. On the definition of ulp(x). RR-5504, INRIA. 2005, pp.16. &lt;inria-00070503&gt;
+Currently hosted at
+<a href="https://hal.inria.fr/inria-00070503/document">https://hal.inria.fr/inria-00070503/document</a>.</p>
+</div>
+</div>
 </div>
 <div class="paragraph">
 <p>The following table<sup>68</sup> describes the minimum accuracy of single precision
@@ -12679,7 +12685,7 @@
 <p>[68] The ULP values for built-in math functions <strong>lgamma</strong> and <strong>lgamma_r</strong> is
 currently undefined.</p>
 </div>
-<table id="table-ulp-float-math" class="tableblock frame-all grid-all spread">
+<table id="table-ulp-float-math" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 36. ULP values for single precision built-in math functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -13108,7 +13114,7 @@
 The reference value used to compute the ULP value of an arithmetic operation
 is the infinitely precise result.</p>
 </div>
-<table id="table-ulp-embedded" class="tableblock frame-all grid-all spread">
+<table id="table-ulp-embedded" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 37. ULP values for the embedded profile</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -13542,7 +13548,7 @@
 The reference value used to compute the ULP value of an arithmetic operation
 is the infinitely precise result.</p>
 </div>
-<table id="table-float-ulp-relaxed" class="tableblock frame-all grid-all spread">
+<table id="table-float-ulp-relaxed" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 38. ULP values for single precision built-in math functions with unsafe math optimizations in the full and embedded profiles</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -13680,9 +13686,9 @@
       Undefined for <em>x</em> &lt; 0 and non-integer y.
       Undefined for <em>x</em> &lt; 0 and <em>y</em> outside the domain [-2^24, 2^24].
       For <em>x</em> &gt; 0 or <em>x</em> &lt; 0 and even <em>y</em>, derived implementations implement
-      this as <strong>exp2</strong>(y * log2(<em>x</em>)).
+      this as <strong>exp2</strong>(<em>y</em> * <strong>log2</strong>(<strong>fabs</strong>(<em>x</em>))).
       For <em>x</em> &lt; 0 and odd <em>y</em>, derived implementations implement this as
-      <strong>-exp2(y * *log2</strong>(fabs(<em>x</em>))<sup>72</sup>.
+      -<strong>exp2</strong>(<em>y</em> * <strong>log2</strong>(<strong>fabs</strong>(<em>x</em>))<sup>72</sup>.
       For <em>x</em> == 0 and nonzero <em>y</em>, derived implementations return zero.
       For non-derived implementations, the error is ≤ 8192 ULP</p></td>
 </tr>
@@ -13691,9 +13697,9 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Defined only for integer values of y.
       Undefined for <em>x</em> = 0 and <em>y</em> = 0.
       For <em>x</em> &gt;= 0 or <em>x</em> &lt; 0 and even <em>y</em>, derived implementations
-      implement this as <strong>exp2</strong>(<em>y</em> * <strong>log2</strong>(<em>x</em>)).
+      implement this as <strong>exp2</strong>(<em>y</em> * <strong>log2</strong>(<strong>fabs</strong>(<em>x</em>))).
       For <em>x</em> &lt; 0 and odd <em>y</em>, derived implementations implement this as
-      <strong>-exp2</strong>(<em>y</em> * <strong>log2</strong>(<strong>fabs</strong>(<em>x</em>)).
+      -<strong>exp2</strong>(<em>y</em> * <strong>log2</strong>(<strong>fabs</strong>(<em>x</em>)).
       For non-derived implementations, the error is ≤ 8192 ulp.</p></td>
 </tr>
 <tr>
@@ -13770,7 +13776,7 @@
 The reference value used to compute the ULP value of an arithmetic operation
 is the infinitely precise result.</p>
 </div>
-<table id="table-ulp-double" class="tableblock frame-all grid-all spread">
+<table id="table-ulp-double" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 39. ULP values for double precision built-in math functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -14619,7 +14625,7 @@
 <div class="paragraph">
 <p>The following table describes the address_mode function.</p>
 </div>
-<table id="table-address-modes-texel-location" class="tableblock frame-all grid-all spread">
+<table id="table-address-modes-texel-location" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 40. Addressing modes to generate texel location</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -15394,7 +15400,7 @@
 <div class="paragraph">
 <p>For images created with a channel data type of <code>CL_HALF_FLOAT</code>, the
 conversions from <code>half</code> to <code>float</code> are lossless (as described in
-<a href="#the-half-data-type">The half data type</a>).
+<a href="#the-half-data-type">"The half data type"</a>).
 Conversions from <code>float</code> to <code>half</code> round the mantissa using the round to
 nearest even or round to zero rounding mode.
 Denormalized numbers for the <code>half</code> data type which may be generated when
@@ -15730,11 +15736,11 @@
 </div>
 <div id="footer">
 <div id="footer-text">
-Version 2.2-8<br>
-Last updated 2018-10-08 09:49:15 PDT
+Version v2.2-10<br>
+Last updated 2019-02-05 16:03:11 EST
 </div>
 </div>
 
-
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
 </body>
 </html>
\ No newline at end of file
diff --git a/specs/2.2/html/OpenCL_Cxx.html b/specs/2.2/html/OpenCL_Cxx.html
index 171fd59..974e5e4 100644
--- a/specs/2.2/html/OpenCL_Cxx.html
+++ b/specs/2.2/html/OpenCL_Cxx.html
@@ -4,8 +4,8 @@
 <meta charset="UTF-8">
 <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta name="generator" content="Asciidoctor 1.5.5">
-<meta name="author" content="Khronos OpenCL Working Group">
+<meta name="generator" content="Asciidoctor 1.5.7">
+<meta name="author" content="Khronos&#174; OpenCL Working Group">
 <title>The OpenCL&#8482; C++ 1.0 Specification</title>
 <style>
 /*! normalize.css v2.1.2 | MIT License | git.io/normalize */
@@ -724,7 +724,7 @@
 .literalblock pre, .listingblock pre { background: #eeeeee; }
 
 </style>
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
 <style>
 /* Stylesheet for CodeRay to match GitHub theme | MIT License | http://foundation.zurb.com */
 /*pre.CodeRay {background-color:#f7f7f8;}*/
@@ -840,10 +840,10 @@
 <div id="header">
 <h1>The OpenCL<sup>&#8482;</sup> C++ 1.0 Specification</h1>
 <div class="details">
-<span id="author" class="author">Khronos OpenCL Working Group</span><br>
-<span id="revnumber">version 2.2-8,</span>
-<span id="revdate">Mon, 08 Oct 2018 16:50:47 +0000</span>
-<br><span id="revremark">from git branch: master commit: b3cab22fcff5d8c17869907c983e259ddd7ce788</span>
+<span id="author" class="author">Khronos<sup>&#174;</sup> OpenCL Working Group</span><br>
+<span id="revnumber">version v2.2-10,</span>
+<span id="revdate">Tue, 05 Feb 2019 21:18:46 +0000</span>
+<br><span id="revremark">from git branch:  commit: 00422daf5dc013f21ab633479577c7cc225150e2</span>
 </div>
 <div id="toc" class="toc2">
 <div id="toctitle">Table of Contents</div>
@@ -929,7 +929,7 @@
 <div id="preamble">
 <div class="sectionbody">
 <div class="paragraph">
-<p>Copyright 2008-2018 The Khronos Group.</p>
+<p>Copyright 2008-2019 The Khronos Group.</p>
 </div>
 <div class="paragraph">
 <p>This specification is protected by copyright laws and contains material proprietary
@@ -960,7 +960,7 @@
 otherwise, arising from or in connection with these materials.</p>
 </div>
 <div class="paragraph">
-<p>Vulkan is a registered trademark and Khronos, OpenXR, SPIR, SPIR-V, SYCL, WebGL,
+<p>Vulkan and Khronos are registered trademarks, and OpenXR, SPIR, SPIR-V, SYCL, WebGL,
 WebCL, OpenVX, OpenVG, EGL, COLLADA, glTF, NNEF, OpenKODE, OpenKCAM, StreamInput,
 OpenWF, OpenSL ES, OpenMAX, OpenMAX AL, OpenMAX IL, OpenMAX DL, OpenML and DevU are
 trademarks of the Khronos Group Inc. ASTC is a trademark of ARM Holdings PLC,
@@ -1123,7 +1123,7 @@
 // etc.</code></pre>
 </div>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 1. generic types</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -1138,7 +1138,7 @@
 <tbody>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><code>typen</code></p></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p>scalar and all vector types of type</p>
 </div>
 <div class="paragraph">
@@ -1197,7 +1197,7 @@
 </div>
 <div class="sect3">
 <h4 id="builtin-scalar-data-types">2.1.1. Built-in Scalar Data Types</h4>
-<table id="device_builtin_scalar_data_types" class="tableblock frame-all grid-all spread">
+<table id="device_builtin_scalar_data_types" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 2. Device Built-in scalar data types</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -1271,7 +1271,7 @@
 <p>Most built-in scalar data types are also declared as appropriate types in the OpenCL API (and header files) that can be used by an application.
 The following table describes the built-in scalar data type in the OpenCL C++ programming language and the corresponding data type available to the application:</p>
 </div>
-<table id="host_scalar_builtin_data_types" class="tableblock frame-all grid-all spread">
+<table id="host_scalar_builtin_data_types" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 3. Host Scalar Built-in Data Types</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -1454,7 +1454,7 @@
 The vector data type is defined with the type name i.e. <code>bool</code>, <code>char</code>, <code>uchar</code>, <code>short</code>, <code>ushort</code>, <code>int</code>, <code>uint</code>, <code>long</code>, <code>ulong</code>, <code>half</code>, <code>float</code> or <code>double</code> followed by a literal value <em>n</em> that defines the number of elements in the vector.
 Supported values of <em>n</em> are 2, 3, 4, 8, and 16 for all vector data types.</p>
 </div>
-<table id="device_builtin_vector_data_types" class="tableblock frame-all grid-all spread">
+<table id="device_builtin_vector_data_types" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 4. Device Built-in Vector Data Types</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -1521,7 +1521,7 @@
 <p>The built-in vector data types are also declared as appropriate types in the OpenCL API (and header files) that can be used by an application.
 The following table describes the built-in vector data type in the OpenCL C++ programming language and the corresponding data type available to the application:</p>
 </div>
-<table id="host_builtin_vector_data_types" class="tableblock frame-all grid-all spread">
+<table id="host_builtin_vector_data_types" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 5. Host Built-in Vector Data Types</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -1976,7 +1976,7 @@
 Each value selects single component.
 Values in a selector can be repeated and specified in any order.
 A number of values in a selector including repeated values is called the swizzle size.</p>
-<table id="selector_values_and_their_corresponding_components_in_swizzle" class="tableblock frame-all grid-all spread">
+<table id="selector_values_and_their_corresponding_components_in_swizzle" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 6. Selector values and their corresponding components in swizzle</caption>
 <colgroup>
 <col style="width: 25%;">
@@ -2187,7 +2187,7 @@
 <div class="paragraph">
 <p>The following <a href="#special_selector_values">Special selector values</a> table describes special selector values and their numerical equivalents.</p>
 </div>
-<table id="special_selector_values" class="tableblock frame-all grid-all spread">
+<table id="special_selector_values" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 7. Special selector values</caption>
 <colgroup>
 <col style="width: 25%;">
@@ -2326,7 +2326,7 @@
 </tr>
 </tbody>
 </table>
-<div class="listingblock">
+<div id="special_selector_values" class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code>float8 v = float8(1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f);
 
@@ -2607,8 +2607,8 @@
 </tr>
 </table>
 </div>
-<div class="ulist">
-<ul>
+<div class="ulist NOTE">
+<ul class="NOTE">
 <li>
 <p><em>[ISO/IEC 14882:2014: expr.ass, ch. 5.18 (1)]</em> Assignment and compound assignment operators: The result in all cases is a bit-field or a <em>vector-swizzle</em> if the left operand is respectively a bit-field or a <em>vector-swizzle</em>.</p>
 </li>
@@ -3074,7 +3074,7 @@
 </div>
 <div class="sect3">
 <h4 id="memory-initialization">2.5.4. Memory initialization</h4>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 8. Supported memory initializers</caption>
 <colgroup>
 <col style="width: 13%;">
@@ -3094,15 +3094,15 @@
 <tr>
 <td class="tableblock halign-left valign-top"></td>
 <td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">uninitialized (no constructor or trivial default constructor)
-</p><p class="tableblock">  <strong>AND</strong>
-</p><p class="tableblock">  trivial destructor</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">initialized by constant expression
-</p><p class="tableblock">  <strong>AND</strong>
-</p><p class="tableblock">  trivial destructor</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">custom initializer
-</p><p class="tableblock">  <strong>OR</strong>
-</p><p class="tableblock">  custom destructor</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">uninitialized (no constructor or trivial default constructor)</p>
+<p class="tableblock">  <strong>AND</strong></p>
+<p class="tableblock">  trivial destructor</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">initialized by constant expression</p>
+<p class="tableblock">  <strong>AND</strong></p>
+<p class="tableblock">  trivial destructor</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">custom initializer</p>
+<p class="tableblock">  <strong>OR</strong></p>
+<p class="tableblock">  custom destructor</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top" rowspan="4"><p class="tableblock">local</p></td>
@@ -3113,17 +3113,17 @@
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">kernel</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">supported
-</p><p class="tableblock">  Variables are not zero-pre-initialized.
-</p><p class="tableblock">  Optional zero-pre-initialization possible using switch: -cl-zero-init-local-mem-vars</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">supported
-</p><p class="tableblock">  Variables are not zero-pre-initialized.
-</p><p class="tableblock">  Materialize temporary expressions are not supported.
-</p><p class="tableblock">  Optional zero-pre-initialization possible using switch: -cl-zero-init-local-mem-vars</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">supported
-</p><p class="tableblock">  Variables are not zero-pre-initialized.
-</p><p class="tableblock">  Materialize temporary expressions are not supported.
-</p><p class="tableblock">  Optional zero-pre-initialization possible using switch: -cl-zero-init-local-mem-vars</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">supported</p>
+<p class="tableblock">  Variables are not zero-pre-initialized.</p>
+<p class="tableblock">  Optional zero-pre-initialization possible using switch: -cl-zero-init-local-mem-vars</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">supported</p>
+<p class="tableblock">  Variables are not zero-pre-initialized.</p>
+<p class="tableblock">  Materialize temporary expressions are not supported.</p>
+<p class="tableblock">  Optional zero-pre-initialization possible using switch: -cl-zero-init-local-mem-vars</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">supported</p>
+<p class="tableblock">  Variables are not zero-pre-initialized.</p>
+<p class="tableblock">  Materialize temporary expressions are not supported.</p>
+<p class="tableblock">  Optional zero-pre-initialization possible using switch: -cl-zero-init-local-mem-vars</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">local (non-kernel)</p></td>
@@ -3133,43 +3133,43 @@
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">class (static data member)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">supported
-</p><p class="tableblock">  Variables are not zero-pre-initialized.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">supported</p>
+<p class="tableblock">  Variables are not zero-pre-initialized.</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">not supported</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">not supported</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top" rowspan="3"><p class="tableblock">global</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">program</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">supported
-</p><p class="tableblock">  Variables are zero-pre-initialized.</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">supported
-</p><p class="tableblock">  Variables are zero or constexpr-pre-initialized.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">supported</p>
+<p class="tableblock">  Variables are zero-pre-initialized.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">supported</p>
+<p class="tableblock">  Variables are zero or constexpr-pre-initialized.</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">supported</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">kernel / local</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">supported
-</p><p class="tableblock">  Variables are zero-pre-initialized.</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">supported
-</p><p class="tableblock">  Variables are zero or constexpr-pre-initialized.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">supported</p>
+<p class="tableblock">  Variables are zero-pre-initialized.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">supported</p>
+<p class="tableblock">  Variables are zero or constexpr-pre-initialized.</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">not supported</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">class (static data member)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">supported
-</p><p class="tableblock">  Variables are zero-pre-initialized.</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">supported
-</p><p class="tableblock">  Variables are zero or constexpr-pre-initialized.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">supported</p>
+<p class="tableblock">  Variables are zero-pre-initialized.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">supported</p>
+<p class="tableblock">  Variables are zero or constexpr-pre-initialized.</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">not supported</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">constant</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">(any)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">supported
-</p><p class="tableblock">  Variables are zero-pre-initialized.</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">supported
-</p><p class="tableblock">  Variables are zero or constexpr-pre-initialized.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">supported</p>
+<p class="tableblock">  Variables are zero-pre-initialized.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">supported</p>
+<p class="tableblock">  Variables are zero or constexpr-pre-initialized.</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">not supported</p></td>
 </tr>
 <tr>
@@ -3638,7 +3638,7 @@
 <div class="sect3">
 <h4 id="optional-loop-attributes">2.8.5. Optional Loop Attributes</h4>
 <div class="sect4">
-<h5 id="_cl_unroll_hint">cl::unroll_hint</h5>
+<h5 id="_clunroll_hint">cl::unroll_hint</h5>
 <div class="paragraph">
 <p>The <code><a id="cl::unroll_hint"></a></code> and <code>[[cl::unroll_hint(n)]]</code> attribute qualifiers can be used to specify that a loop (<code>for</code>, <code>while</code> and <code>do</code> loops) can be unrolled.
 This attribute qualifier can be used to specify full unrolling or partial unrolling by a specified amount.
@@ -4156,7 +4156,7 @@
 <p>Conversions to and from floating-point type shall conform to IEEE-754 rounding rules.
 Conversions may have an optional rounding mode specified as described in the table belows.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 9. Rounding Modes</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -6247,9 +6247,9 @@
 <div class="sect2">
 <h3 id="specialization-constants-library">3.5. Specialization Constants Library</h3>
 <div class="paragraph">
-<p>The specialization constants are objects that will not have known constant values until after initial generation of a SPIR-V module.
-Such objects are called specialization constants.
-Application might provide values for the specialization constants that will be used when SPIR-V program is built.</p>
+<p>The specialization constants are objects that will not have known constant values until after initial generation of a module in
+an intermediate representation format (e.g. SPIR-V). Such objects are called specialization constants.
+Application might provide values for the specialization constants that will be used when program is built from an intermediate format.</p>
 </div>
 <div class="sect3">
 <h4 id="header-opencl_spec_constant-synopsis">3.5.1. Header &lt;opencl_spec_constant&gt; Synopsis</h4>
@@ -6330,7 +6330,7 @@
 <h5 id="id">ID</h5>
 <div class="paragraph">
 <p>Template parameter <code>ID</code> in spec_constant class template denotes an unique ID of the specialization constant that can be used to set a value from the host API.
-The value of <code>ID</code> must be unique within this compilation unit and across any other SPIR-V modules that it is linked with.</p>
+The value of <code>ID</code> must be unique within this compilation unit and across any other modules that it is linked with.</p>
 </div>
 </div>
 </div>
@@ -7695,7 +7695,7 @@
 <div class="paragraph">
 <p>The below table describes the OpenCL image and sampler data types and the corresponding data type available to the application:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 10. Host image and sampler types</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -7984,7 +7984,7 @@
 <div class="paragraph">
 <p>The following table describes the <code>image_dim_num</code> trait that return a number of dimensions based on <code>image_dim</code> parameter.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 11. Image_dim_num trait</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -8779,7 +8779,7 @@
 <div class="paragraph">
 <p>The following tables describe the inline sampler parameters and their behavior.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 12. Addressing modes</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -8817,7 +8817,7 @@
 <div class="paragraph">
 <p>For 1D and 2D image arrays, the addressing mode applies only to the <em>x</em> and (<em>x, y</em>) coordinates.  The addressing mode for the coordinate which specifies the array index is always clamp_to_edge.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 13. Normalized coordinates</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -8843,7 +8843,7 @@
 <div class="paragraph">
 <p>Sampling from an image with samplers that differ in specification of coordinates normalization result in undefined behavior.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 14. Coordinate filtering modes</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -8942,7 +8942,7 @@
 <div class="paragraph">
 <p>The following table describes the mapping of the number of channels of an image element to the appropriate components in the <code>float4</code>, <code>int4</code> or <code>uint4</code> vector data type for the color values returned by <code>image::sample</code>, <code>image::read</code> or supplied to <code>image::write</code>. The unmapped components will be set to 0.0 for red, green and blue channels and will be set to 1.0 for the alpha channel.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 15. Image channel mappings</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -9157,7 +9157,7 @@
 <div class="paragraph">
 <p>The below describes the OpenCL pipe data type and the corresponding data type available to the application:</p>
 </div>
-<table id="host_pipe_type" class="tableblock frame-all grid-all spread">
+<table id="host_pipe_type" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 16. Host pipe type</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -9810,7 +9810,7 @@
 <div class="paragraph">
 <p>The below table describes the OpenCL queue data type and the corresponding data type available to the application:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 17. Host queue type</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -10288,7 +10288,7 @@
 <p>Enqueue policy enumerable is used to specify launch policy of enqueued kernel.
 It is defined as follows:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 18. Enqueue policy</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -10339,7 +10339,7 @@
 If the <em>-g</em> compile option is specified in compiler options passed to <code>clBuildProgram</code>, the other errors may be returned instead of <code>enqueue_status::failure</code> to indicate why <code>enqueue_kernel</code> or <code>enqueue_marker</code> failed.
 Enqueue status is defined as follows:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 19. Enqueue status</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -10407,7 +10407,7 @@
 <p>Event status enumerable is used to set a user event status.
 It is defined as follows:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 20. Event status</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -10464,7 +10464,7 @@
 <p>Event profiling info enumerable is used to determine the outcome of <code>event::profiling_info</code> function.
 It is defined as follows:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 21. Event profiling info</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -10480,9 +10480,9 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><code>exec_time</code></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Identifies profiling information to be queried.
-  If specified, the two 64-bit values are returned
-</p><p class="tableblock">  The first 64-bit value describes the elapsed time: <code>CL_PROFILING_COMMAND_END - CL_PROFILING_COMMAND_START</code> for the command identified by event in nanoseconds.
-</p><p class="tableblock">  The second 64-bit value describes the elapsed time <code>CL_PROFILING_COMMAND_COMPLETE - CL_PROFILING_COMMAND_START</code> for the command identified by event in nanoseconds.</p></td>
+  If specified, the two 64-bit values are returned</p>
+<p class="tableblock">  The first 64-bit value describes the elapsed time: <code>CL_PROFILING_COMMAND_END - CL_PROFILING_COMMAND_START</code> for the command identified by event in nanoseconds.</p>
+<p class="tableblock">  The second 64-bit value describes the elapsed time <code>CL_PROFILING_COMMAND_COMPLETE - CL_PROFILING_COMMAND_START</code> for the command identified by event in nanoseconds.</p></td>
 </tr>
 </tbody>
 </table>
@@ -13084,9 +13084,10 @@
 <div class="paragraph">
 <p><code>mad</code> computes <code>a * b + c</code>.
 The function may compute <code>a * b + c</code> with reduced accuracy
-    in the embedded profile.  See the SPIR-V OpenCL environment specification
-    for details. On some hardware the mad instruction may provide better
-    performance than expanded computation of <code>a * b + c</code>. <a id="ftnref22"></a> <a href="#ftn22">[22]</a></p>
+    in the embedded profile. It is implemented either as a correctly rounded fma,
+    or as a multiply followed by an add, both of which are correctly rounded.
+    On some hardware the mad instruction may provide better performance
+    than expanded computation of <code>a * b + c</code>. <a id="ftnref22"></a> <a href="#ftn22">[22]</a></p>
 </div>
 </div>
 <div class="sect4">
@@ -16058,7 +16059,7 @@
 <div class="paragraph">
 <p>The following table describes the built-in macro names given above in the OpenCL C++ library and the corresponding macro names available to the application.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 22. Float Built-in Macros</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -16140,7 +16141,7 @@
 <div class="paragraph">
 <p>The following table describes the built-in macro names given above in the OpenCL C++ library and the corresponding macro names available to the application.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 23. Double Built-in Macros</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -16215,7 +16216,7 @@
 <div class="paragraph">
 <p>The following table describes the built-in macro names given above in the OpenCL C++ library and the corresponding macro names available to the application.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 24. Half Built-in Macros</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -16274,7 +16275,7 @@
 <p>The following symbolic constants are available.
 Their values are of type float and are accurate within the precision of a single precision floating-point number.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 25. Float Symbolic Constants</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -16309,7 +16310,7 @@
 <div class="paragraph">
 <p>If double precision is supported by the device, the following symbolic constant will also be available:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 26. Double Symbolic Constants</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -16359,7 +16360,7 @@
 <div class="paragraph">
 <p>The following table describes the built-in macro names given above in the OpenCL C++ library and the corresponding macro names available to the application.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 27. Integer built-in macros</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -16583,7 +16584,7 @@
 <p>The following constants are also available.
 They are of type <code>half</code> and are accurate within the precision of the <code>half</code> type.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 28. Half Constants</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -16657,7 +16658,7 @@
 <p>The following constants are also available.
 They are of type <code>float</code> and are accurate within the precision of the <code>float</code> type.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 29. Float Constants</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -16731,7 +16732,7 @@
 <p>The following constants are also available.
 They are of type <code>double</code> and are accurate within the precision of the <code>double</code> type.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 30. Double Constants</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -17147,7 +17148,7 @@
 <h4 id="unary-type-traits">3.29.2. Unary Type Traits</h4>
 <div class="sect4">
 <h5 id="additional-type-property-predicates">Additional type property predicates</h5>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 31. Additional type property predicates</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -17189,7 +17190,7 @@
 </div>
 <div class="sect4">
 <h5 id="additional-type-property-queries">Additional type property queries</h5>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 32. Additional type property queries</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -17214,7 +17215,7 @@
 <h4 id="binary-type-traits">3.29.3. Binary type traits</h4>
 <div class="sect4">
 <h5 id="changed-relationships-traits">Changed relationships traits</h5>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 33. Changed relationship traits</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -17239,7 +17240,7 @@
 <h4 id="transformation-traits">3.29.4. Transformation traits</h4>
 <div class="sect4">
 <h5 id="address-space-and-vector-modifications">Address space and vector modifications</h5>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 34. Address space and vector traits</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -17578,19 +17579,32 @@
 <div class="paragraph">
 <p>The ULP is defined as follows:</p>
 </div>
+<div class="exampleblock">
+<div class="content">
 <div class="paragraph">
 <p>If x is a real number that lies between two finite consecutive floating-point numbers a and b, without being equal to one of them, then ulp(x) = |b - a|, otherwise ulp(x) is the distance between the two non-equal finite floating-point numbers nearest x.
 Moreover, ulp(NaN) is NaN.</p>
 </div>
+</div>
+</div>
 <div class="paragraph">
-<p><em>Attribution: This definition was taken with consent from Jean-Michel Muller with slight clarification for behavior at zero.
-Refer to <a href="ftp://ftp.inria.fr/INRIA/publication/publi-pdf/RR/RR-5504.pdf" class="bare">ftp://ftp.inria.fr/INRIA/publication/publi-pdf/RR/RR-5504.pdf</a></em></p>
+<p><em>Attribution: This definition was taken with consent from Jean-Michel Muller
+with slight clarification for behavior at zero.</em></p>
+</div>
+<div class="exampleblock">
+<div class="content">
+<div class="paragraph">
+<p>Jean-Michel Muller. On the definition of ulp(x). RR-5504, INRIA. 2005, pp.16. &lt;inria-00070503&gt;
+Currently hosted at
+<a href="https://hal.inria.fr/inria-00070503/document">https://hal.inria.fr/inria-00070503/document</a>.</p>
+</div>
+</div>
 </div>
 <div class="paragraph">
 <p><a href="#ulp_values_for_single_precision_builtin_math_functions">ULP values for single precision built-in math functions</a> <a id="ftnref31"></a> <a href="#ftn31">[31]</a> table describes the minimum accuracy of single precision floating-point arithmetic operations given as ULP values.
 The reference value used to compute the ULP value of an arithmetic operation is the infinitely precise result.</p>
 </div>
-<table id="ulp_values_for_single_precision_builtin_math_functions" class="tableblock frame-all grid-all spread">
+<table id="ulp_values_for_single_precision_builtin_math_functions" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 35. ULP values for single precision built-in math functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -17945,7 +17959,7 @@
 <p><a href="#ulp_values_for_single_precision_builtin_math_functions_for_embedded_profile">ULP values for single precision builtin math functions for embedded profile</a> table describes the minimum accuracy of single precision floating-point arithmetic operations given as ULP values for the embedded profile.
 The reference value used to compute the ULP value of an arithmetic operation is the infinitely precise result.</p>
 </div>
-<table id="ulp_values_for_single_precision_builtin_math_functions_for_embedded_profile" class="tableblock frame-all grid-all spread">
+<table id="ulp_values_for_single_precision_builtin_math_functions_for_embedded_profile" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 36. ULP values for single precision built-in math functions for embedded profile</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -18358,7 +18372,7 @@
 The minimum accuracy of math functions not defined in <a href="#ulp_values_for_single_precision_builtin_math_functions_with_fast_relaxed_math">ULP values for single precision built-in math functions with unsafe math optimizations</a> table when the <em>-cl-unsafe-math-optimizations</em> compiler option is specified is as defined in <a href="#ulp_values_for_single_precision_builtin_math_functions">ULP values for single precision built-in math functions</a> table when operating in the full profile, and as defined in <a href="#ulp_values_for_single_precision_builtin_math_functions_for_embedded_profile">ULP values for single precision built-in math functions for embedded profile</a> table when operating in the embedded profile.
 The reference value used to compute the ULP value of an arithmetic operation is the infinitely precise result.</p>
 </div>
-<table id="ulp_values_for_single_precision_builtin_math_functions_with_fast_relaxed_math" class="tableblock frame-all grid-all spread">
+<table id="ulp_values_for_single_precision_builtin_math_functions_with_fast_relaxed_math" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 37. ULP values for single precision built-in math functions with unsafe math optimizations in the full and embedded profiles</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -18487,8 +18501,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Undefined for x = 0 and y = 0.
   Undefined for x &lt; 0 and non-integer y.
   Undefined for x &lt; 0 and y outside the domain [-2<sup>24</sup>, 2<sup>24</sup>].
-  For x &gt; 0 or x &lt; 0 and even y, derived implementations implement this as exp2( y * log2(x) ).
-  For x &lt; 0 and odd y, derived implementations implement this as -exp2( y * log2(fabs(x) ) <a id="ftnref33"></a> <a href="#ftn33">[33]</a>.
+  For x &gt; 0 or x &lt; 0 and even y, derived implementations implement this as exp2( y * log2( fabs(x) ) ).
+  For x &lt; 0 and odd y, derived implementations implement this as -exp2( y * log2( fabs(x) ) <a id="ftnref33"></a> <a href="#ftn33">[33]</a>.
   For x == 0 and nonzero y, derived implementations return zero.
   For non-derived implementations, the error is &lt;= 8192 ULP.</p></td>
 </tr>
@@ -18496,7 +18510,7 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">pown(x, y)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Defined only for integer values of y.
   Undefined for x = 0 and y = 0.
-  For x &gt;= 0 or x &lt; 0 and even y, derived implementations implement this as exp2( y * log2(x) ).
+  For x &gt;= 0 or x &lt; 0 and even y, derived implementations implement this as exp2( y * log2( fabs(x) ) ).
   For x &lt; 0 and odd y, derived implementations implement this as -exp2( y * log2( fabs(x) ) ).
   For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
 </tr>
@@ -18559,7 +18573,7 @@
 <p><a href="#ulp_values_for_double_precision_builtin_math_functions">ULP values for double precision built-in math functions</a> table describes the minimum accuracy of double precision floating-point arithmetic operations given as ULP values.
 The reference value used to compute the ULP value of an arithmetic operation is the infinitely precise result.</p>
 </div>
-<table id="ulp_values_for_double_precision_builtin_math_functions" class="tableblock frame-all grid-all spread">
+<table id="ulp_values_for_double_precision_builtin_math_functions" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 38. ULP values for double precision built-in math functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -18858,7 +18872,7 @@
 <p><a href="#ulp_values_for_half_precision_builtin_math_functions">ULP values for half precision built-in math functions</a> table describes the minimum accuracy of half precision floating-point arithmetic operations given as ULP values.
 The reference value used to compute the ULP value of an arithmetic operation is the infinitely precise result.</p>
 </div>
-<table id="ulp_values_for_half_precision_builtin_math_functions" class="tableblock frame-all grid-all spread">
+<table id="ulp_values_for_half_precision_builtin_math_functions" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 39. ULP values for half precision built-in math functions</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -19550,7 +19564,7 @@
 <div class="paragraph">
 <p>The below table describes the <code>address_mode</code> function.</p>
 </div>
-<table id="addressing_modes_to_generate_texel_location" class="tableblock frame-all grid-all spread">
+<table id="addressing_modes_to_generate_texel_location" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 40. Addressing modes to generate texel location</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -19564,26 +19578,26 @@
 </thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p><code>clamp_to_edge</code></p>
 </div></div></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p>clamp (coord, 0, size - 1)</p>
 </div></div></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p><code>clamp</code></p>
 </div></div></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p>clamp (coord, -1, size)</p>
 </div></div></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p><code>none</code></p>
 </div></div></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p>Coord</p>
 </div></div></td>
 </tr>
@@ -20916,11 +20930,11 @@
 </div>
 <div id="footer">
 <div id="footer-text">
-Version 2.2-8<br>
-Last updated 2018-09-24 21:35:08 PDT
+Version v2.2-10<br>
+Last updated 2019-02-05 16:03:11 EST
 </div>
 </div>
 
-
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
 </body>
 </html>
\ No newline at end of file
diff --git a/specs/2.2/html/OpenCL_Env.html b/specs/2.2/html/OpenCL_Env.html
index e3f3305..abb366c 100644
--- a/specs/2.2/html/OpenCL_Env.html
+++ b/specs/2.2/html/OpenCL_Env.html
@@ -4,8 +4,8 @@
 <meta charset="UTF-8">
 <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta name="generator" content="Asciidoctor 1.5.5">
-<meta name="author" content="Khronos OpenCL Working Group">
+<meta name="generator" content="Asciidoctor 1.5.7">
+<meta name="author" content="Khronos&#174; OpenCL Working Group">
 <title>The OpenCL&#8482; SPIR-V Environment Specification</title>
 <style>
 /*! normalize.css v2.1.2 | MIT License | git.io/normalize */
@@ -724,7 +724,7 @@
 .literalblock pre, .listingblock pre { background: #eeeeee; }
 
 </style>
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
 <style>
 /* Stylesheet for CodeRay to match GitHub theme | MIT License | http://foundation.zurb.com */
 /*pre.CodeRay {background-color:#f7f7f8;}*/
@@ -840,10 +840,10 @@
 <div id="header">
 <h1>The OpenCL<sup>&#8482;</sup> SPIR-V Environment Specification</h1>
 <div class="details">
-<span id="author" class="author">Khronos OpenCL Working Group</span><br>
-<span id="revnumber">version 2.2-8,</span>
-<span id="revdate">Mon, 08 Oct 2018 16:50:05 +0000</span>
-<br><span id="revremark">from git branch: master commit: b3cab22fcff5d8c17869907c983e259ddd7ce788</span>
+<span id="author" class="author">Khronos<sup>&#174;</sup> OpenCL Working Group</span><br>
+<span id="revnumber">version v2.2-10,</span>
+<span id="revdate">Tue, 05 Feb 2019 21:17:11 +0000</span>
+<br><span id="revremark">from git branch:  commit: 00422daf5dc013f21ab633479577c7cc225150e2</span>
 </div>
 <div id="toc" class="toc2">
 <div id="toctitle">Table of Contents</div>
@@ -927,7 +927,7 @@
 <div id="preamble">
 <div class="sectionbody">
 <div class="paragraph">
-<p>Copyright 2008-2018 The Khronos Group.</p>
+<p>Copyright 2008-2019 The Khronos Group.</p>
 </div>
 <div class="paragraph">
 <p>This specification is protected by copyright laws and contains material proprietary
@@ -958,7 +958,7 @@
 otherwise, arising from or in connection with these materials.</p>
 </div>
 <div class="paragraph">
-<p>Vulkan is a registered trademark and Khronos, OpenXR, SPIR, SPIR-V, SYCL, WebGL,
+<p>Vulkan and Khronos are registered trademarks, and OpenXR, SPIR, SPIR-V, SYCL, WebGL,
 WebCL, OpenVX, OpenVG, EGL, COLLADA, glTF, NNEF, OpenKODE, OpenKCAM, StreamInput,
 OpenWF, OpenSL ES, OpenMAX, OpenMAX AL, OpenMAX IL, OpenMAX DL, OpenML and DevU are
 trademarks of the Khronos Group Inc. ASTC is a trademark of ARM Holdings PLC,
@@ -1206,7 +1206,7 @@
 <p>The following table describes the <strong>OpTypeImage</strong> image types supported by
 OpenCL environments:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 1. Image Types</caption>
 <colgroup>
 <col style="width: 16.6666%;">
@@ -1281,7 +1281,7 @@
 <p>The following table describes other data types that may be used in an
 OpenCL environment:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 2. Other Data Types</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -1323,7 +1323,7 @@
 <strong>OpImageQueryOrder</strong> instruction correspond to the OpenCL host API image
 channel orders.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 3. Image Channel Order mapping</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -1422,7 +1422,7 @@
 <strong>OpImageQueryFormat</strong> instruction correspond to the OpenCL host API image
 channel data types.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 4. Image Channel Data Type mapping</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -2594,7 +2594,7 @@
 <div class="sect2">
 <h3 id="_full_and_embedded_profile_extensions">7.2. Full and Embedded Profile Extensions</h3>
 <div class="sect3">
-<h4 id="__code_cl_khr_3d_image_writes_code">7.2.1. <code>cl_khr_3d_image_writes</code></h4>
+<h4 id="_cl_khr_3d_image_writes">7.2.1. <code>cl_khr_3d_image_writes</code></h4>
 <div class="paragraph">
 <p>If the OpenCL environment supports the extension <code>cl_khr_3d_image_writes</code>,
 then the environment must accept <em>Image</em> operands to <strong>OpImageWrite</strong> that
@@ -2602,7 +2602,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="__code_cl_khr_depth_images_code">7.2.2. <code>cl_khr_depth_images</code></h4>
+<h4 id="_cl_khr_depth_images">7.2.2. <code>cl_khr_depth_images</code></h4>
 <div class="paragraph">
 <p>If the OpenCL environment supports the extension <code>cl_khr_depth_images</code>,
 then the environment must accept modules that declare 2D depth image types
@@ -2623,7 +2623,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="__code_cl_khr_device_enqueue_local_arg_types_code">7.2.3. <code>cl_khr_device_enqueue_local_arg_types</code></h4>
+<h4 id="_cl_khr_device_enqueue_local_arg_types">7.2.3. <code>cl_khr_device_enqueue_local_arg_types</code></h4>
 <div class="paragraph">
 <p>If the OpenCL environment supports the extension
 <code>cl_khr_device_enqueue_local_arg_types</code>, then then environment will allow
@@ -2632,7 +2632,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="__code_cl_khr_fp16_code">7.2.4. <code>cl_khr_fp16</code></h4>
+<h4 id="_cl_khr_fp16">7.2.4. <code>cl_khr_fp16</code></h4>
 <div class="paragraph">
 <p>If the OpenCL environment supports the extension <code>cl_khr_fp16</code>, then the
 environment must accept modules that declare the following SPIR-V
@@ -2647,7 +2647,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="__code_cl_khr_fp64_code">7.2.5. <code>cl_khr_fp64</code></h4>
+<h4 id="_cl_khr_fp64">7.2.5. <code>cl_khr_fp64</code></h4>
 <div class="paragraph">
 <p>If the OpenCL environment supports the extension <code>cl_khr_fp64</code>, then the
 environment must accept modules that declare the following SPIR-V
@@ -2662,7 +2662,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="__code_cl_khr_gl_depth_images_code">7.2.6. <code>cl_khr_gl_depth_images</code></h4>
+<h4 id="_cl_khr_gl_depth_images">7.2.6. <code>cl_khr_gl_depth_images</code></h4>
 <div class="paragraph">
 <p>If the OpenCL environment supports the extension <code>cl_khr_gl_depth_images</code>,
 then the following Image Channel Orders may additionally be returned by
@@ -2688,7 +2688,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="__code_cl_khr_gl_msaa_sharing_code">7.2.7. <code>cl_khr_gl_msaa_sharing</code></h4>
+<h4 id="_cl_khr_gl_msaa_sharing">7.2.7. <code>cl_khr_gl_msaa_sharing</code></h4>
 <div class="paragraph">
 <p>If the OpenCL environment supports the extension <code>cl_khr_gl_msaa_sharing</code>,
 then the environment must accept modules that declare 2D multi-sampled
@@ -2720,7 +2720,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="__code_cl_khr_int64_base_atomics_code_and_code_cl_khr_int64_extended_atomics_code">7.2.8. <code>cl_khr_int64_base_atomics</code> and <code>cl_khr_int64_extended_atomics</code></h4>
+<h4 id="_cl_khr_int64_base_atomics_and_cl_khr_int64_extended_atomics">7.2.8. <code>cl_khr_int64_base_atomics</code> and <code>cl_khr_int64_extended_atomics</code></h4>
 <div class="paragraph">
 <p>If the OpenCL environment supports the extension <code>cl_khr_int64_base_atomics</code>
 or <code>cl_khr_int64_extended_atomics</code>, then the environment must support 64-bit
@@ -2737,7 +2737,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="__code_cl_khr_mipmap_image_code">7.2.9. <code>cl_khr_mipmap_image</code></h4>
+<h4 id="_cl_khr_mipmap_image">7.2.9. <code>cl_khr_mipmap_image</code></h4>
 <div class="paragraph">
 <p>If the OpenCL environment supports the extension <code>cl_khr_mipmap_image</code>,
 then the environment must accept non-zero optional <strong>Lod</strong> <em>Image Operands</em>
@@ -2763,7 +2763,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="__code_cl_khr_mipmap_image_writes_code">7.2.10. <code>cl_khr_mipmap_image_writes</code></h4>
+<h4 id="_cl_khr_mipmap_image_writes">7.2.10. <code>cl_khr_mipmap_image_writes</code></h4>
 <div class="paragraph">
 <p>If the OpenCL environment supports the extension <code>cl_khr_mipmap_image_writes</code>,
 then the environment must accept non-zero optional <strong>Lod</strong> <em>Image Operands</em>
@@ -2783,7 +2783,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="__code_cl_khr_subgroups_code">7.2.11. <code>cl_khr_subgroups</code></h4>
+<h4 id="_cl_khr_subgroups">7.2.11. <code>cl_khr_subgroups</code></h4>
 <div class="paragraph">
 <p>If the OpenCL environment supports the extension <code>cl_khr_subgroups</code>, then
 the environment will generally allows the scope for <em>Execution</em> to include:</p>
@@ -2808,7 +2808,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="__code_cl_khr_subgroup_named_barrier_code">7.2.12. <code>cl_khr_subgroup_named_barrier</code></h4>
+<h4 id="_cl_khr_subgroup_named_barrier">7.2.12. <code>cl_khr_subgroup_named_barrier</code></h4>
 <div class="paragraph">
 <p>If the OpenCL environment supports the extension
 <code>cl_khr_subgroup_named_barrier</code>, then the environment must accept modules
@@ -2822,11 +2822,20 @@
 </ul>
 </div>
 </div>
+<div class="sect3">
+<h4 id="_cl_khr_spirv_no_integer_wrap_decoration">7.2.13. <code>cl_khr_spirv_no_integer_wrap_decoration</code></h4>
+<div class="paragraph">
+<p>If the OpenCL environment supports the extension <code>cl_khr_spirv_no_integer_wrap_decoration</code>, then the environment must accept modules that declare use of the extension <code>SPV_KHR_no_integer_wrap_decoration</code> via <strong>OpExtension</strong>.</p>
+</div>
+<div class="paragraph">
+<p>If the OpenCL environment supports the extension <code>cl_khr_spirv_no_integer_wrap_decoration</code> and use of the SPIR-V extension <code>SPV_KHR_no_integer_wrap_decoration</code> is declared in the module via <strong>OpExtension</strong>, then the environment must accept modules that include the <strong>NoSignedWrap</strong> or <strong>NoUnsignedWrap</strong> decorations.</p>
+</div>
+</div>
 </div>
 <div class="sect2">
 <h3 id="_embedded_profile_extensions">7.3. Embedded Profile Extensions</h3>
 <div class="sect3">
-<h4 id="__code_cles_khr_int64_code">7.3.1. <code>cles_khr_int64</code></h4>
+<h4 id="_cles_khr_int64">7.3.1. <code>cles_khr_int64</code></h4>
 <div class="paragraph">
 <p>If the OpenCL environment supports the extension <code>cles_khr_int64</code>, then the
 environment must accept modules that declare the following SPIR-V
@@ -3067,7 +3076,7 @@
 accuracy of floating-point math arithmetic instructions for full profile
 devices given as ULP values.</p>
 </div>
-<table id="ulp_values_for_math_instructions" class="tableblock frame-all grid-all spread">
+<table id="ulp_values_for_math_instructions" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 5. ULP Values for Math Instructions - Full Profile</caption>
 <colgroup>
 <col style="width: 31%;">
@@ -3691,7 +3700,7 @@
 describes the minimum accuracy of floating-point math arithmetic operations
 given as ULP values for the embedded profile.</p>
 </div>
-<table id="ulp_values_for_math_instructions_for_embedded_profile" class="tableblock frame-all grid-all spread">
+<table id="ulp_values_for_math_instructions_for_embedded_profile" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 6. ULP Values for Math Instructions - Embedded Profile</caption>
 <colgroup>
 <col style="width: 31%;">
@@ -3986,9 +3995,9 @@
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>OpExtInst</strong> <strong>mad</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Implemention-defined</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Implemention-defined</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Implemention-defined</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Implementation-defined</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Implementation-defined</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Implementation-defined</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>OpExtInst</strong> <strong>maxmag</strong></p></td>
@@ -4329,7 +4338,7 @@
 instructions for Embedded Profile</a> table when operating in the embedded
 profile.</p>
 </div>
-<table id="ulp_values_for_math_instructions_with_fast_relaxed_math" class="tableblock frame-all grid-all spread">
+<table id="ulp_values_for_math_instructions_with_fast_relaxed_math" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 7. ULP Values for Single Precision Math Instructions with <em>-cl-unsafe-math-optimizations</em></caption>
 <colgroup>
 <col style="width: 30%;">
@@ -4476,12 +4485,12 @@
   Undefined for x &lt; 0 and non-integer y.
   Undefined for x &lt; 0 and y outside the domain [-2<sup>24</sup>, 2<sup>24</sup>].
   For x &gt; 0 or x &lt; 0 and even y, derived implementations implement this as
-  exp2( y * log2(x) ).
+  exp2( y * log2( fabs(x) ) ).
   For x &lt; 0 and odd y, derived implementations implement this as -exp2( y *
-  log2(fabs(x) ).
+  log2( fabs(x) ).
   For x == 0 and nonzero y, derived implementations return zero.
-  For non-derived implementations, the error is &lt;= 8192 ULP.
-</p><p class="tableblock">  On some implementations, powr() or pown() may perform faster
+  For non-derived implementations, the error is &lt;= 8192 ULP.</p>
+<p class="tableblock">  On some implementations, powr() or pown() may perform faster
   than pow().
   If x is known to be &gt;= 0, consider using powr() in place of pow(),
   or if y is known to be an integer, consider using pown() in place of
@@ -4492,7 +4501,7 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Defined only for integer values of y.
   Undefined for x = 0 and y = 0.
   For x &gt;= 0 or x &lt; 0 and even y, derived implementations implement this as
-  exp2( y * log2(x) ).
+  exp2( y * log2( fabs(x) ) ).
   For x &lt; 0 and odd y, derived implementations implement this as -exp2( y *
   log2( fabs(x) ) ).
   For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
@@ -5126,7 +5135,7 @@
 They do not include ±0.
 A non-zero number is said to be sub-normal before rounding if, after
 normalization, its radix-2 exponent is less than (TYPE_MIN_EXP - 1).
-<sup class="footnote">[<a id="_footnoteref_1" class="footnote" href="#_footnote_1" title="View footnote.">1</a>]</sup></p>
+<sup class="footnote">[<a id="_footnoteref_1" class="footnote" href="#_footnotedef_1" title="View footnote.">1</a>]</sup></p>
 </div>
 </div>
 </div>
@@ -5190,7 +5199,7 @@
 <div class="paragraph">
 <p>The below table describes the <code>address_mode</code> function.</p>
 </div>
-<table id="addressing_modes_to_generate_texel_location" class="tableblock frame-all grid-all spread">
+<table id="addressing_modes_to_generate_texel_location" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 8. Addressing Modes to Generate Texel Location</caption>
 <colgroup>
 <col style="width: 50%;">
@@ -5204,26 +5213,26 @@
 </thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p><code>CL_ADDRESS_CLAMP</code></p>
 </div></div></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p><em>clamp (coord, -1, size)</em></p>
 </div></div></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p><code>CL_ADDRESS_CLAMP_TO_EDGE</code></p>
 </div></div></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p><em>clamp (coord, 0, size - 1)</em></p>
 </div></div></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p><code>CL_ADDRESS_NONE</code></p>
 </div></div></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
 <p><em>coord</em></p>
 </div></div></td>
 </tr>
@@ -6369,7 +6378,7 @@
 <p>For the following image channel orders, the data is a four
 component vector type:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 9. <em>Mapping Image Data to Vector Components</em></caption>
 <colgroup>
 <col style="width: 50%;">
@@ -6415,7 +6424,7 @@
 <div class="paragraph">
 <p>For the following image channel orders, the data is a scalar type:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 10. <em>Scalar Image Data</em></caption>
 <colgroup>
 <col style="width: 50%;">
@@ -6442,7 +6451,7 @@
 <p>The following table describes the mapping from image channel data type
 to the data vector component type or scalar type:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 11. <em>Image Data Types</em></caption>
 <colgroup>
 <col style="width: 50%;">
@@ -6534,7 +6543,9 @@
 </li>
 <li>
 <p><a id="ulp-definition"></a> Jean-Michel Muller. <em>On the definition of ulp(x)</em>.
-RR-5504, INRIA. 2005, pp.16. &lt;inria-00070503&gt;</p>
+RR-5504, INRIA. 2005, pp.16. &lt;inria-00070503&gt;
+Currently hosted at
+<a href="https://hal.inria.fr/inria-00070503/document">https://hal.inria.fr/inria-00070503/document</a>.</p>
 </li>
 <li>
 <p><a id="sRGB-spec"></a> &#8220;IEC 61966-2-1:1999 Multimedia systems and equipment -
@@ -6549,17 +6560,17 @@
 </div>
 <div id="footnotes">
 <hr>
-<div class="footnote" id="_footnote_1">
+<div class="footnote" id="_footnotedef_1">
 <a href="#_footnoteref_1">1</a>. Here <code>TYPE_MIN</code> and <code>TYPE_MIN_EXP</code> should be substituted by constants appropriate to the floating-point type under consideration, such as <code>FLT_MIN</code> and <code>FLT_MIN_EXP</code> for float.
 </div>
 </div>
 <div id="footer">
 <div id="footer-text">
-Version 2.2-8<br>
-Last updated 2018-09-24 21:35:08 PDT
+Version v2.2-10<br>
+Last updated 2019-02-05 16:03:11 EST
 </div>
 </div>
 
-
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
 </body>
 </html>
\ No newline at end of file
diff --git a/specs/2.2/html/OpenCL_Ext.html b/specs/2.2/html/OpenCL_Ext.html
index 7ab81e4..f1354ab 100644
--- a/specs/2.2/html/OpenCL_Ext.html
+++ b/specs/2.2/html/OpenCL_Ext.html
@@ -4,9 +4,9 @@
 <meta charset="UTF-8">
 <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta name="generator" content="Asciidoctor 1.5.5">
-<meta name="author" content="Khronos OpenCL Working Group">
-<title>The OpenCL Extension Specification</title>
+<meta name="generator" content="Asciidoctor 1.5.7">
+<meta name="author" content="Khronos&#174; OpenCL Working Group">
+<title>The OpenCL&#8482; Extension Specification</title>
 <style>
 /*! normalize.css v2.1.2 | MIT License | git.io/normalize */
 /* ========================================================================== HTML5 display definitions ========================================================================== */
@@ -724,7 +724,7 @@
 .literalblock pre, .listingblock pre { background: #eeeeee; }
 
 </style>
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
 <style>
 /* Stylesheet for CodeRay to match GitHub theme | MIT License | http://foundation.zurb.com */
 /*pre.CodeRay {background-color:#f7f7f8;}*/
@@ -838,38 +838,53 @@
 </script></head>
 <body class="book toc2 toc-left" style="max-width: 100;">
 <div id="header">
-<h1>The OpenCL Extension Specification</h1>
+<h1>The OpenCL<sup>&#8482;</sup> Extension Specification</h1>
 <div class="details">
-<span id="author" class="author">Khronos OpenCL Working Group</span><br>
-<span id="revnumber">version 2.2-8,</span>
-<span id="revdate">Mon, 08 Oct 2018 16:50:25 +0000</span>
-<br><span id="revremark">from git branch: master commit: b3cab22fcff5d8c17869907c983e259ddd7ce788</span>
+<span id="author" class="author">Khronos<sup>&#174;</sup> OpenCL Working Group</span><br>
+<span id="revnumber">version v2.2-10,</span>
+<span id="revdate">Tue, 05 Feb 2019 21:17:59 +0000</span>
+<br><span id="revremark">from git branch:  commit: 00422daf5dc013f21ab633479577c7cc225150e2</span>
 </div>
 <div id="toc" class="toc2">
 <div id="toctitle">Table of Contents</div>
 <ul class="sectlevel1">
-<li><a href="#optional-extensions">1. Optional Extensions</a></li>
-<li><a href="#cl_khr_fp16">2. Half Precision Floating-Point</a></li>
-<li><a href="#cl_khr_gl_sharing">3. Creating an OpenCL Context from an OpenGL Context or Share Group</a></li>
-<li><a href="#cl_khr_gl_sharing__memobjs">4. Creating OpenCL Memory Objects from OpenGL Objects</a></li>
-<li><a href="#cl_khr_gl_event-creating">5. Creating OpenCL Event Objects from OpenGL Sync Objects</a></li>
-<li><a href="#cl_khr_dx9_media_sharing">6. Creating OpenCL Memory Objects from DirectX 9 Media Surfaces</a></li>
-<li><a href="#cl_khr_d3d10_sharing">7. Creating OpenCL Memory Objects from Direct3D 10 Buffers and Textures</a></li>
-<li><a href="#cl_khr_d3d11_sharing">8. Creating OpenCL Memory Objects from Direct3D 11 Buffers and Textures</a></li>
-<li><a href="#cl_khr_gl_depth_images">9. Sharing OpenGL and OpenGL ES Depth and Depth-Stencil Images</a></li>
-<li><a href="#cl_khr_gl_msaa_sharing">10. Creating OpenCL Memory Obejcts from OpenGL MSAA Textures</a></li>
-<li><a href="#cl_khr_initialize_memory">11. Local and Private Memory Initialization</a></li>
-<li><a href="#cl_khr_terminate_context">12. Terminating OpenCL contexts</a></li>
-<li><a href="#cl_khr_spir">13. SPIR 1.2 Binaries</a></li>
-<li><a href="#cl_khr_icd-opencl">14. OpenCL Installable Client Driver (ICD)</a></li>
-<li><a href="#cl_khr_subgroups">15. Subgroups</a></li>
-<li><a href="#cl_khr_mipmap_image">16. Mipmaps</a></li>
-<li><a href="#cl_khr_egl_image">17. Creating OpenCL Memory Objects from EGL Images</a></li>
-<li><a href="#cl_khr_egl_event">18. Creating OpenCL Event Objects from EGL Sync Objects</a></li>
-<li><a href="#cl_khr_priority_hints">19. Priority Hints</a></li>
-<li><a href="#cl_khr_throttle_hints">20. Throttle Hints</a></li>
-<li><a href="#cl_khr_subgroup_named_barrier">21. Named Barriers for Subgroups</a></li>
-<li><a href="#_summary_of_changes_from_opencl_2_1">Appendix A: Summary of Changes from OpenCL 2.1</a></li>
+<li><a href="#extensions-overview">1. Extensions Overview</a></li>
+<li><a href="#cl_khr_icd-opencl">2. Installable Client Drivers</a></li>
+<li><a href="#cl_khr_byte_addressable_store">3. Byte Addressable Stores</a></li>
+<li><a href="#cl_khr_3d_image_writes">4. Writing to 3D Image Objects</a></li>
+<li><a href="#cl_khr_fp16">5. Half Precision Floating-Point</a></li>
+<li><a href="#cl_khr_fp64">6. Double Precision Floating-Point</a></li>
+<li><a href="#cl_khr_int32_atomics">7. 32-bit Atomics</a></li>
+<li><a href="#cl_khr_int64_atomics">8. 64-bit Atomics</a></li>
+<li><a href="#cl_khr_select_fprounding_mode">9. Selecting the Rounding Mode <strong>(DEPRECATED)</strong></a></li>
+<li><a href="#cl_khr_gl_sharing">10. Creating an OpenCL Context from an OpenGL Context or Share Group</a></li>
+<li><a href="#cl_khr_gl_sharing__memobjs">11. Creating OpenCL Memory Objects from OpenGL Objects</a></li>
+<li><a href="#cl_khr_gl_event">12. Creating OpenCL Event Objects from OpenGL Sync Objects</a></li>
+<li><a href="#cl_khr_d3d10_sharing">13. Creating OpenCL Memory Objects from Direct3D 10 Buffers and Textures</a></li>
+<li><a href="#cl_khr_d3d11_sharing">14. Creating OpenCL Memory Objects from Direct3D 11 Buffers and Textures</a></li>
+<li><a href="#cl_khr_dx9_media_sharing">15. Creating OpenCL Memory Objects from DirectX 9 Media Surfaces</a></li>
+<li><a href="#cl_khr_depth_images">16. Depth Images</a></li>
+<li><a href="#cl_khr_gl_depth_images">17. Sharing OpenGL and OpenGL ES Depth and Depth-Stencil Images</a></li>
+<li><a href="#cl_khr_gl_msaa_sharing">18. Creating OpenCL Memory Objects from OpenGL MSAA Textures</a></li>
+<li><a href="#cl_khr_egl_event">19. Creating OpenCL Event Objects from EGL Sync Objects</a></li>
+<li><a href="#cl_khr_egl_image">20. Creating OpenCL Memory Objects from EGL Images</a></li>
+<li><a href="#cl_khr_image2d_from_buffer">21. Creating a 2D Image From A Buffer</a></li>
+<li><a href="#cl_khr_initialize_memory">22. Local and Private Memory Initialization</a></li>
+<li><a href="#cl_khr_terminate_context">23. Terminating OpenCL contexts</a></li>
+<li><a href="#cl_khr_spir">24. Standard Portable Intermediate Representation Binaries</a></li>
+<li><a href="#cl_khr_il_program">25. Intermediate Language Programs</a></li>
+<li><a href="#cl_khr_create_command_queue">26. Creating Command Queues with Properties</a></li>
+<li><a href="#cl_khr_device_enqueue_local_arg_types">27. Device Enqueue Local Argument Types</a></li>
+<li><a href="#cl_khr_subgroups">28. Subgroups</a></li>
+<li><a href="#cl_khr_mipmap_image">29. Mipmaps</a></li>
+<li><a href="#cl_khr_srgb_image_writes">30. sRGB Image Writes</a></li>
+<li><a href="#cl_khr_priority_hints">31. Priority Hints</a></li>
+<li><a href="#cl_khr_throttle_hints">32. Throttle Hints</a></li>
+<li><a href="#cl_khr_subgroup_named_barrier">33. Named Barriers for Subgroups</a></li>
+<li><a href="#spirv_extensions">34. Extensions to the OpenCL SPIR-V Environment</a></li>
+<li><a href="#_extensions_promoted_to_core_features">Appendix A: Extensions Promoted to Core Features</a></li>
+<li><a href="#_deprecated_extensions">Appendix B: Deprecated Extensions</a></li>
+<li><a href="#_quick_reference">Appendix C: Quick Reference</a></li>
 </ul>
 </div>
 </div>
@@ -877,7 +892,7 @@
 <div id="preamble">
 <div class="sectionbody">
 <div class="paragraph">
-<p>Copyright 2008-2018 The Khronos Group.</p>
+<p>Copyright 2008-2019 The Khronos Group.</p>
 </div>
 <div class="paragraph">
 <p>This specification is protected by copyright laws and contains material proprietary
@@ -908,7 +923,7 @@
 otherwise, arising from or in connection with these materials.</p>
 </div>
 <div class="paragraph">
-<p>Vulkan is a registered trademark and Khronos, OpenXR, SPIR, SPIR-V, SYCL, WebGL,
+<p>Vulkan and Khronos are registered trademarks, and OpenXR, SPIR, SPIR-V, SYCL, WebGL,
 WebCL, OpenVX, OpenVG, EGL, COLLADA, glTF, NNEF, OpenKODE, OpenKCAM, StreamInput,
 OpenWF, OpenSL ES, OpenMAX, OpenMAX AL, OpenMAX IL, OpenMAX DL, OpenML and DevU are
 trademarks of the Khronos Group Inc. ASTC is a trademark of ARM Holdings PLC,
@@ -918,25 +933,38 @@
 and/or company names are used solely for identification and belong to their
 respective owners.</p>
 </div>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="optional-extensions">1. Optional Extensions</h2>
+<h2 id="extensions-overview">1. Extensions Overview</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>This document describes the list of optional features supported by OpenCL
-2.2.
-Optional extensions may be supported by some OpenCL devices.
+<p>This document describes the list of optional features supported by OpenCL.
 Optional extensions are not required to be supported by a conformant OpenCL
-implementation, but are expected to be widely available; they define
-functionality that is likely to move into the required feature set in a
-future revision of the OpenCL specification.
-A brief description of how OpenCL extensions are defined is provided below.</p>
+implementation, but are expected to be widely available, and in some cases may define
+functionality that is likely to be required in a future revision of the
+OpenCL specification.</p>
 </div>
 <div class="paragraph">
-<p>For OpenCL extensions approved by the OpenCL working group, the following
-naming conventions are used:</p>
+<p>This document describes all extensions that have been approved by the OpenCL
+working group.
+It is a <em>unified</em> specification, meaning that the extensions described in this
+document are not specific to a specific core OpenCL specification version.</p>
+</div>
+<div class="paragraph">
+<p>OpenCL extensions approved by the OpenCL working group may be <em>promoted</em> to
+core features in later revisions of OpenCL.
+When this occurs, the feature described by the extension specification
+is merged into the core OpenCL specification.
+The extension will continue to be documented in this specification, both for
+backwards compatibility and for devices that wish to support the feature
+but that are unable to support the newer core OpenCL version.</p>
+</div>
+<div class="sect2">
+<h3 id="naming-convention-for-optional-extensions">1.1. Naming Convention for Optional Extensions</h3>
+<div class="paragraph">
+<p>OpenCL extensions approved by the OpenCL working group use the following
+naming convention:</p>
 </div>
 <div class="ulist">
 <ul>
@@ -944,8 +972,8 @@
 <p>A unique <em>name string</em> of the form <code>"<strong>cl_khr_&lt;<em>name</em>&gt;</strong>"</code> is associated
 with each extension.
 If the extension is supported by an implementation, this string will be
-present in the implementation&#8217;s CL_PLATFORM_EXTENSIONS string or
-CL_DEVICE_EXTENSIONS string.</p>
+present in the implementation&#8217;s <code>CL_PLATFORM_EXTENSIONS</code> string or
+<code>CL_DEVICE_EXTENSIONS</code> string.</p>
 </li>
 <li>
 <p>All API functions defined by the extension will have names of the form
@@ -958,19 +986,16 @@
 </ul>
 </div>
 <div class="paragraph">
-<p>OpenCL extensions approved by the OpenCL working group can be <em>promoted</em> to
-required core features in later revisions of OpenCL.
-When this occurs, the extension specifications are merged into the core
-specification.
-Functions and enumerants that are part of such promoted extensions will have
-the <strong>KHR</strong> affix removed.
+<p>Functions and enumerants defined by extensions that are promoted to
+core features will have their <strong>KHR</strong> affix removed.
 OpenCL implementations of such later revisions must also export the name
-strings of promoted extensions in the CL_PLATFORM_EXTENSIONS or
-CL_DEVICE_EXTENSIONS string, and support the <strong>KHR</strong>-affixed versions of
+strings of promoted extensions in the <code>CL_PLATFORM_EXTENSIONS</code> or
+<code>CL_DEVICE_EXTENSIONS</code> string, and support the <strong>KHR</strong>-affixed versions of
 functions and enumerants as a transition aid.</p>
 </div>
 <div class="paragraph">
-<p>For vendor extensions, the following naming conventions are used:</p>
+<p>Vendor extensions are strongly encouraged to follow a similar naming
+convention:</p>
 </div>
 <div class="ulist">
 <ul>
@@ -978,8 +1003,8 @@
 <p>A unique <em>name string</em> of the form <code>"<strong>cl_&lt;<em>vendor_name</em>&gt;_&lt;<em>name&gt;</em></strong>"</code>
 is associated with each extension.
 If the extension is supported by an implementation, this string will be
-present in the implementation&#8217;s CL_PLATFORM_EXTENSIONS string or
-CL_DEVICE_EXTENSIONS string.</p>
+present in the implementation&#8217;s <code>CL_PLATFORM_EXTENSIONS</code> string or
+<code>CL_DEVICE_EXTENSIONS</code> string.</p>
 </li>
 <li>
 <p>All API functions defined by the vendor extension will have names of the
@@ -991,8 +1016,9 @@
 </li>
 </ul>
 </div>
+</div>
 <div class="sect2">
-<h3 id="compiler-directives-for-optional-extensions">1.1. Compiler Directives for Optional Extensions</h3>
+<h3 id="compiler-directives-for-optional-extensions">1.2. Compiler Directives for Optional Extensions</h3>
 <div class="paragraph">
 <p>The <strong>#pragma OPENCL EXTENSION</strong> directive controls the behavior of the OpenCL
 compiler with respect to extensions.
@@ -1000,8 +1026,8 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>#pragma OPENCL EXTENSION &lt;extension_name&gt; : &lt;behavior&gt;
-#pragma OPENCL EXTENSION all : &lt;behavior&gt;</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c"><span class="preprocessor">#pragma</span> OPENCL EXTENSION &lt;extension_name&gt; : &lt;behavior&gt;
+<span class="preprocessor">#pragma</span> OPENCL EXTENSION all : &lt;behavior&gt;</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -1014,7 +1040,7 @@
 The <em>behavior</em> can be set to one of the following values given by the table
 below.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 25%;">
 <col style="width: 75%;">
@@ -1028,17 +1054,17 @@
 <tbody>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>enable</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Behave as specified by the extension <em>extension_name</em>.
-</p><p class="tableblock">  Report an error on the <strong><code>#pragma OPENCL EXTENSION</code></strong> if the
+<td class="tableblock halign-left valign-top"><p class="tableblock">Behave as specified by the extension <em>extension_name</em>.</p>
+<p class="tableblock">  Report an error on the <strong><code>#pragma OPENCL EXTENSION</code></strong> if the
   <em>extension_name</em> is not supported, or if <strong>all</strong> is specified.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>disable</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Behave (including issuing errors and warnings) as if the extension
-  <em>extension_name</em> is not part of the language definition.
-</p><p class="tableblock">  If <strong>all</strong> is specified, then behavior must revert back to that of the
-  non-extended core version of the language being compiled to.
-</p><p class="tableblock">  Warn on the <strong><code>#pragma OPENCL EXTENSION</code></strong> if the extension <em>extension_name</em>
+  <em>extension_name</em> is not part of the language definition.</p>
+<p class="tableblock">  If <strong>all</strong> is specified, then behavior must revert back to that of the
+  non-extended core version of the language being compiled to.</p>
+<p class="tableblock">  Warn on the <strong><code>#pragma OPENCL EXTENSION</code></strong> if the extension <em>extension_name</em>
   is not supported.</p></td>
 </tr>
 </tbody>
@@ -1059,7 +1085,7 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>#pragma OPENCL EXTENSION all : disable</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c"><span class="preprocessor">#pragma</span> OPENCL EXTENSION all : disable</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -1083,24 +1109,24 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>#ifdef cl_khr_3d_image_writes
-    // do something using the extension
-#else
-    // do something else or #error!
-#endif</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c"><span class="preprocessor">#ifdef</span> cl_khr_3d_image_writes
+    <span class="comment">// do something using the extension</span>
+<span class="preprocessor">#else</span>
+    <span class="comment">// do something else or #error!</span>
+<span class="preprocessor">#endif</span></code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
-<h3 id="getting-opencl-api-extension-function-pointers">1.2. Getting OpenCL API Extension Function Pointers</h3>
+<h3 id="getting-opencl-api-extension-function-pointers">1.3. Getting OpenCL API Extension Function Pointers</h3>
 <div class="paragraph">
 <p>The function
 </p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>void* clGetExtensionFunctionAddressForPlatform(cl_platform_id platform,
-                                               const char *funcname)</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c"><span class="directive">void</span>* clGetExtensionFunctionAddressForPlatform(cl_platform_id platform,
+                                               <span class="directive">const</span> <span class="predefined-type">char</span> *funcname)</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -1148,19 +1174,19 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>#ifndef extension_name
-#define extension_name 1
+<pre class="CodeRay highlight"><code data-lang="c"><span class="preprocessor">#ifndef</span> extension_name
+<span class="preprocessor">#define</span> extension_name <span class="integer">1</span>
 
-// all data typedefs, token #defines, prototypes, and
-// function pointer typedefs for this extension
+<span class="comment">// all data typedefs, token #defines, prototypes, and</span>
+<span class="comment">// function pointer typedefs for this extension</span>
 
-// function pointer typedefs must use the
-// following naming convention
+<span class="comment">// function pointer typedefs must use the</span>
+<span class="comment">// following naming convention</span>
 
-typedef CL_API_ENTRY return_type
+<span class="keyword">typedef</span> CL_API_ENTRY return_type
             (CL_API_CALL *clExtensionFunctionNameTAG_fn)(...);
 
-#endif // _extension_name_</code></pre>
+<span class="preprocessor">#endif</span> <span class="comment">// _extension_name_</span></code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -1172,39 +1198,563 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>#ifndef cl_khr_gl_sharing
-#define cl_khr_gl_sharing 1
+<pre class="CodeRay highlight"><code data-lang="c"><span class="preprocessor">#ifndef</span> cl_khr_gl_sharing
+<span class="preprocessor">#define</span> cl_khr_gl_sharing <span class="integer">1</span>
 
-// all data typedefs, token #defines, prototypes, and
-// function pointer typedefs for this extension
-#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000
-#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006
-#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007
-#define CL_GL_CONTEXT_KHR 0x2008
-#define CL_EGL_DISPLAY_KHR 0x2009
-#define CL_GLX_DISPLAY_KHR 0x200A
-#define CL_WGL_HDC_KHR 0x200B
-#define CL_CGL_SHAREGROUP_KHR 0x200C
+<span class="comment">// all data typedefs, token #defines, prototypes, and</span>
+<span class="comment">// function pointer typedefs for this extension</span>
+<span class="preprocessor">#define</span> CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR  -<span class="integer">1000</span>
+<span class="preprocessor">#define</span> CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR    <span class="hex">0x2006</span>
+<span class="preprocessor">#define</span> CL_DEVICES_FOR_GL_CONTEXT_KHR           <span class="hex">0x2007</span>
+<span class="preprocessor">#define</span> CL_GL_CONTEXT_KHR                       <span class="hex">0x2008</span>
+<span class="preprocessor">#define</span> CL_EGL_DISPLAY_KHR                      <span class="hex">0x2009</span>
+<span class="preprocessor">#define</span> CL_GLX_DISPLAY_KHR                      <span class="hex">0x200A</span>
+<span class="preprocessor">#define</span> CL_WGL_HDC_KHR                          <span class="hex">0x200B</span>
+<span class="preprocessor">#define</span> CL_CGL_SHAREGROUP_KHR                   <span class="hex">0x200C</span>
 
-// function pointer typedefs must use the
-// following naming convention
-typedef CL_API_ENTRY cl_int
+<span class="comment">// function pointer typedefs must use the</span>
+<span class="comment">// following naming convention</span>
+<span class="keyword">typedef</span> CL_API_ENTRY cl_int
         (CL_API_CALL *clGetGLContextInfoKHR_fn)(
-            const cl_context_properties * /* properties */,
-            cl_gl_context_info /* param_name */,
-            size_t /* param_value_size */,
-            void * /* param_value */,
-            size_t * /*param_value_size_ret*/);
+            <span class="directive">const</span> cl_context_properties * <span class="comment">/* properties */</span>,
+            cl_gl_context_info <span class="comment">/* param_name */</span>,
+            size_t <span class="comment">/* param_value_size */</span>,
+            <span class="directive">void</span> * <span class="comment">/* param_value */</span>,
+            size_t * <span class="comment">/*param_value_size_ret*/</span>);
 
-#endif // cl_khr_gl_sharing</code></pre>
+<span class="preprocessor">#endif</span> <span class="comment">// cl_khr_gl_sharing</span></code></pre>
 </div>
 </div>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="cl_khr_fp16">2. Half Precision Floating-Point</h2>
+<h2 id="cl_khr_icd-opencl">2. Installable Client Drivers</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="cl_khr_icd-overview">2.1. Overview</h3>
+<div class="paragraph">
+<p>This section describes a platform extension which defines a simple mechanism
+through which the Khronos OpenCL installable client driver loader (ICD
+Loader) may expose multiple separate vendor installable client drivers
+(Vendor ICDs) for OpenCL.
+An application written against the ICD Loader will be able to access all
+cl_platform_ids exposed by all vendor implementations with the ICD Loader
+acting as a demultiplexor.</p>
+</div>
+<div class="paragraph">
+<p>This is a platform extension, so if this extension is supported by an
+implementation, the string <strong>cl_khr_icd</strong> will be present in the
+<code>CL_PLATFORM_EXTENSIONS</code> string.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_icd-inferring-vendors-from-function-call-arguments">2.2. Inferring Vendors from Function Call Arguments</h3>
+<div class="paragraph">
+<p>At every OpenCL function call, the ICD Loader infers the vendor ICD function
+to call from the arguments to the function.
+An object is said to be ICD compatible if it is of the following structure:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c"><span class="keyword">struct</span> _cl_&lt;object&gt;
+{
+    <span class="keyword">struct</span> _cl_icd_dispatch *dispatch;
+    <span class="comment">// ... remainder of internal data</span>
+};</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>&lt;object&gt; is one of platform_id, device_id, context, command_queue, mem,
+program, kernel, event, or sampler.</p>
+</div>
+<div class="paragraph">
+<p>The structure <code>_cl_icd_dispatch</code> is a function pointer dispatch table which
+is used to direct calls to a particular vendor implementation.
+All objects created from ICD compatible objects must be ICD compatible.</p>
+</div>
+<div class="paragraph">
+<p>The order of the functions in <code>_cl_icd_dispatch</code> is determined by the ICD
+Loader&#8217;s source.
+The ICD Loader&#8217;s source&#8217;s <code>_cl_icd_dispatch</code> table is to be appended to
+only.</p>
+</div>
+<div class="paragraph">
+<p>Functions which do not have an argument from which the vendor implementation
+may be inferred have been deprecated and may be ignored.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_icd-icd-data">2.3. ICD Data</h3>
+<div class="paragraph">
+<p>A Vendor ICD is defined by two pieces of data:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The Vendor ICD library specifies a library which contains the OpenCL
+entry points for the vendor&#8217;s OpenCL implementation.
+The vendor ICD&#8217;s library file name should include the vendor name, or a
+vendor-specific implementation identifier.</p>
+</li>
+<li>
+<p>The Vendor ICD extension suffix is a short string which specifies the
+default suffix for extensions implemented only by that vendor.
+The vendor suffix string is optional.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_icd-icd-loader-vendor-enumeration-on-windows">2.4. ICD Loader Vendor Enumeration on Windows</h3>
+<div class="paragraph">
+<p>To enumerate Vendor ICDs on Windows, the ICD Loader will first
+scan for REG_SZ string values in the "Display Adapter" and
+"Software Components" HKR registry keys.  The exact registry
+keys to scan should be obtained via PnP Configuration Manager
+APIs, but will look like:</p>
+</div>
+<div class="paragraph">
+<p>For 64-bit ICDs:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>HKLM\SYSTEM\CurrentControlSet\Control\Class\
+{Display Adapter GUID}\{Instance ID}\OpenCLDriverName, or
+
+HKLM\SYSTEM\CurrentControlSet\Control\Class\
+{Software Component GUID}\{Instance ID}\OpenCLDriverName</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For 32-bit ICDs:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>HKLM\SYSTEM\CurrentControlSet\Control\Class\
+{Display Adapter GUID}\{Instance ID}\OpenCLDriverNameWoW, or
+
+HKLM\SYSTEM\CurrentControlSet\Control\Class\
+{Software Component GUID}\{Instance ID}\OpenCLDriverNameWoW</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>These registry values contain the path to the Vendor ICD library.
+For example, if the registry contains the value:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>[HKLM\SYSTEM\CurrentControlSet\Control\Class\{GUID}\{Instance}]
+"OpenCLDriverName"="c:\\vendor a\\vndra_ocl.dll"</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Then the ICD Loader will open the Vendor ICD library:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>c:\vendor a\vndra_ocl.dll</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The ICD Loader will also scan for REG_DWORD values in the registry
+key:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>HKLM\SOFTWARE\Khronos\OpenCL\Vendors</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For each registry value in this key which has data set to 0, the
+ICD Loader will open the Vendor ICD library specified by the name
+of the registry value.</p>
+</div>
+<div class="paragraph">
+<p>For example, if the registry contains the value:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>[HKLM\SOFTWARE\Khronos\OpenCL\Vendors]
+"c:\\vendor a\\vndra_ocl.dll"=dword:00000000</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Then the ICD will open the Vendor ICD library:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>c:\vendor a\vndra_ocl.dll</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_icd-icd-loader-vendor-enumeration-on-linux">2.5. ICD Loader Vendor Enumeration on Linux</h3>
+<div class="paragraph">
+<p>To enumerate vendor ICDs on Linux, the ICD Loader scans the files in the
+path <code>/etc/OpenCL/vendors</code>.
+For each file in this path, the ICD Loader opens the file as a text file.
+The expected format for the file is a single line of text which specifies
+the Vendor ICD&#8217;s library.
+The ICD Loader will attempt to open that file as a shared object using
+dlopen().
+Note that the library specified may be an absolute path or just a file name.</p>
+</div>
+<div class="paragraph">
+<p>For example, if the following file exists</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>/etc/OpenCL/vendors/VendorA.icd</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>and contains the text</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>libVendorAOpenCL.so</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>then the ICD Loader will load the library <code>libVendorAOpenCL.so</code>.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_icd-icd-loader-vendor-enumeration-on-android">2.6. ICD Loader Vendor Enumeration on Android</h3>
+<div class="paragraph">
+<p>To enumerate vendor ICDs on Android, the ICD Loader scans the files in the
+path <code>/system/vendor/Khronos/OpenCL/vendors</code>.
+For each file in this path, the ICD Loader opens the file as a text file.
+The expected format for the file is a single line of text which specifies
+the Vendor ICD&#8217;s library.
+The ICD Loader will attempt to open that file as a shared object using
+dlopen().
+Note that the library specified may be an absolute path or just a file name.</p>
+</div>
+<div class="paragraph">
+<p>For example, if the following file exists</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>/system/vendor/Khronos/OpenCL/vendors/VendorA.icd</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>and contains the text</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>libVendorAOpenCL.so</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>then the ICD Loader will load the library <code>libVendorAOpenCL.so</code>.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_icd-adding-a-vendor-library">2.7. Adding a Vendor Library</h3>
+<div class="paragraph">
+<p>Upon successfully loading a Vendor ICD&#8217;s library, the ICD Loader queries the
+following functions from the library: <strong>clIcdGetPlatformIDsKHR</strong>,
+<strong>clGetPlatformInfo</strong>, and <strong>clGetExtensionFunctionAddress</strong> (note:
+<strong>clGetExtensionFunctionAddress</strong> has been deprecated, but is still required
+for the ICD loader).
+If any of these functions are not present then the ICD Loader will close and
+ignore the library.</p>
+</div>
+<div class="paragraph">
+<p>Next the ICD Loader queries available ICD-enabled platforms in the library
+using <strong>clIcdGetPlatformIDsKHR</strong>.
+For each of these platforms, the ICD Loader queries the platform&#8217;s extension
+string to verify that <strong>cl_khr_icd</strong> is supported, then queries the platform&#8217;s
+Vendor ICD extension suffix using <strong>clGetPlatformInfo</strong> with the value
+CL_PLATFORM_ICD_SUFFIX_KHR.</p>
+</div>
+<div class="paragraph">
+<p>If any of these steps fail, the ICD Loader will ignore the Vendor ICD and
+continue on to the next.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_icd-new-procedures-and-functions">2.8. New Procedures and Functions</h3>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clIcdGetPlatformIDsKHR(cl_uint num_entries,
+                              cl_platform_id *platforms,
+                              cl_uint *num_platforms);</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_icd-new-tokens">2.9. New Tokens</h3>
+<div class="paragraph">
+<p>Accepted as <em>param_name</em> to the function <strong>clGetPlatformInfo</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_PLATFORM_ICD_SUFFIX_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returned by <strong>clGetPlatformIDs</strong> when no platforms are found:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_PLATFORM_NOT_FOUND_KHR</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_icd-additions-to-chapter-4">2.10. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
+<div class="paragraph">
+<p>In <em>section 4.1</em>, replace the description of the return values of
+<strong>clGetPlatformIDs</strong> with:</p>
+</div>
+<div class="paragraph">
+<p>"clGetPlatformIDs* returns CL_SUCCESS if the function is executed
+successfully and there are a non zero number of platforms available.
+It returns CL_PLATFORM_NOT_FOUND_KHR if zero platforms are available.
+It returns CL_INVALID_VALUE if <em>num_entries</em> is equal to zero and
+<em>platforms</em> is not <code>NULL</code> or if both <em>num_platforms</em> and <em>platforms</em> are
+<code>NULL</code>."</p>
+</div>
+<div class="paragraph">
+<p>In <em>section 4.1</em>, add the following after the description of
+<strong>clGetPlatformIDs</strong>:</p>
+</div>
+<div class="paragraph">
+<p>"The list of platforms accessible through the Khronos ICD Loader can be
+obtained using the following function:
+</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clIcdGetPlatformIDsKHR(cl_uint num_entries,
+                              cl_platform_id *platforms,
+                              cl_uint *num_platforms);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><em>num_entries</em> is the number of cl_platform_id entries that can be added to
+<em>platforms</em>.
+If <em>platforms</em> is not <code>NULL</code>, then <em>num_entries</em> must be greater than zero.</p>
+</div>
+<div class="paragraph">
+<p><em>platforms</em> returns a list of OpenCL platforms available for access through
+the Khronos ICD Loader.
+The cl_platform_id values returned in <em>platforms</em> are ICD compatible and can
+be used to identify a specific OpenCL platform.
+If the <em>platforms</em> argument is <code>NULL</code>, then this argument is ignored.
+The number of OpenCL platforms returned is the minimum of the value
+specified by <em>num_entries</em> or the number of OpenCL platforms available.</p>
+</div>
+<div class="paragraph">
+<p><em>num_platforms</em> returns the number of OpenCL platforms available.
+If <em>num_platforms</em> is <code>NULL</code>, then this argument is ignored.</p>
+</div>
+<div class="paragraph">
+<p><strong>clIcdGetPlatformIDsKHR</strong> returns CL_SUCCESS if the function is executed
+successfully and there are a non zero number of platforms available.
+It returns CL_PLATFORM_NOT_FOUND_KHR if zero platforms are available.
+It returns CL_INVALID_VALUE if <em>num_entries</em> is equal to zero and
+<em>platforms</em> is not <code>NULL</code> or if both <em>num_platforms</em> and <em>platforms</em> are
+<code>NULL</code>."</p>
+</div>
+<div class="paragraph">
+<p>Add the following to <em>table 4.1</em>:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 40%;">
+<col style="width: 20%;">
+<col style="width: 40%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_platform_info enum</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_PLATFORM_ICD_SUFFIX_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">char[]</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The function name suffix used to identify extension functions to be
+  directed to this platform by the ICD Loader.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_icd-source-code">2.11. Source Code</h3>
+<div class="paragraph">
+<p>The official source for the ICD loader is available on github, at:</p>
+</div>
+<div class="paragraph">
+<p><a href="https://github.com/KhronosGroup/OpenCL-ICD-Loader" class="bare">https://github.com/KhronosGroup/OpenCL-ICD-Loader</a></p>
+</div>
+<div class="paragraph">
+<p>The complete <code>_cl_icd_dispatch</code> structure is defined in the header
+<strong>icd_dispatch.h</strong>, which is available as a part of the source code.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_icd-issues">2.12. Issues</h3>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>Some OpenCL functions do not take an object argument from which their
+vendor library may be identified (e.g, clUnloadCompiler), how will they
+be handled?</p>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>RESOLVED: Such functions will be a noop for all calls through the ICD.</p>
+</div>
+</div>
+</div>
+</li>
+<li>
+<p>How are OpenCL extension to be handled?</p>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>RESOLVED: OpenCL extension functions may be added to the ICD as soon as they
+are implemented by any vendor.
+The suffix mechanism provides access for vendor extensions which are not yet
+added to the ICD.</p>
+</div>
+</div>
+</div>
+</li>
+<li>
+<p>How will the ICD handle a <code>NULL</code> cl_platform_id?</p>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>RESOLVED: The ICD will by default choose the first enumerated platform as
+the <code>NULL</code> platform.
+The user can override this default by setting an environment variable
+OPENCL_ICD_DEFAULT_PLATFORM to the desired platform index.
+The API calls that deal with platforms will return CL_INVALID_PLATFORM if
+the index is not between zero and (number of platforms - 1), both inclusive.</p>
+</div>
+</div>
+</div>
+</li>
+<li>
+<p>There exists no mechanism to unload the ICD, should there be one?</p>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>RESOLVED: As there is no standard mechanism for unloading a vendor
+implementation, do not add one for the ICD.</p>
+</div>
+</div>
+</div>
+</li>
+<li>
+<p>How will the ICD loader handle <code>NULL</code> objects passed to the OpenCL
+functions?</p>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>RESOLVED: The ICD loader will check for <code>NULL</code> objects passed to the OpenCL
+functions without trying to dereference the <code>NULL</code> objects for obtaining the
+ICD dispatch table.
+On detecting a <code>NULL</code> object it will return one of the CL_INVALID_* error
+values corresponding to the object in question.</p>
+</div>
+</div>
+</div>
+</li>
+</ol>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_byte_addressable_store">3. Byte Addressable Stores</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This section describes the <strong>cl_khr_byte_addressable_store</strong> extension.
+This extension relaxes restrictions on pointers to <code>char</code>, <code>uchar</code>, <code>char2</code>, <code>uchar2</code>, <code>short</code>, <code>ushort</code> and <code>half</code> that were present in <em>Section 6.8m: Restrictions</em> of the OpenCL 1.0 specification.
+With this extension, applications are able to read from and write to pointers to these types.</p>
+</div>
+<div class="paragraph">
+<p>This extension became a core feature in OpenCL 1.1.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_3d_image_writes">4. Writing to 3D Image Objects</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This section describes the <strong>cl_khr_3d_image_writes</strong> extension.</p>
+</div>
+<div class="paragraph">
+<p>This extension adds built-in functions that allow a kernel to write to 3D image objects in addition to 2D image objects.</p>
+</div>
+<div class="paragraph">
+<p>This extension became a core feature in OpenCL 2.0.</p>
+</div>
+<div class="paragraph">
+<p>The new built-in functions are described in the table below:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 1. <em>3D Image Built-in Image Write Functions</em></caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>write_imagef</strong> (<br>
+image3d_t <em>image</em>,<br>
+int4 <em>coord</em>,<br>
+float4 <em>color</em>)<br>
+<br>
+void <strong>write_imagei</strong> (<br>
+image3d_t <em>image</em>,<br>
+int4 <em>coord</em>,<br>
+int4 <em>color</em>)<br>
+<br>
+void <strong>write_imageui</strong> (<br>
+image3d_t <em>image</em>,<br>
+int4 <em>coord</em>,<br>
+uint4 <em>color</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Write <em>color</em> value to the location specified by coordinate (<em>x</em>, <em>y</em>, <em>z</em>) in the 3D image specified by <em>image</em>.
+The appropriate data format conversion to the specified image format is done before writing the color value.
+<em>coord.x</em>, <em>coord.y</em>, and <em>coord.z</em> are considered to be unnormalized coordinates and must be in the range 0 &#8230;&#8203; image width - 1, 0 &#8230;&#8203; image height - 1, and 0 &#8230;&#8203; image depth - 1.<br>
+<br>
+<strong>write_imagef</strong> can only be used with image objects created with <em>image_channel_data_type</em> set to one of the pre-defined packed formats or set to CL_SNORM_INT8, CL_UNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT16, CL_HALF_FLOAT, or CL_FLOAT.  Appropriate data format conversion will be done to convert the channel data from a floating-point value to the actual data format in which the channels are stored.<br>
+<br>
+<strong>write_imagei</strong> can only be used with image objects created with <em>image_channel_data_type</em> set to one of the following values:<br>
+CL_SIGNED_INT8,<br>
+CL_SIGNED_INT16, or<br>
+CL_SIGNED_INT32.<br>
+<br>
+<strong>write_imageui</strong> can only be used with image objects created with <em>image_channel_data_type</em> set to one of the following values:<br>
+CL_UNSIGNED_INT8,<br>
+CL_UNSIGNED_INT16, or<br>
+CL_UNSIGNED_INT32.<br>
+<br>
+The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong>, and <strong>write_imageui</strong> for image objects created with <em>image_channel_data_type</em> values not specified in the description above, or with (<em>x</em>, <em>y</em>, <em>z</em>) coordinate values that are not in the range (0 &#8230;&#8203; image width - 1, 0 &#8230;&#8203; image height - 1, 0 &#8230;&#8203; image depth - 1) respectively, is undefined.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_fp16">5. Half Precision Floating-Point</h2>
 <div class="sectionbody">
 <div class="paragraph">
 <p>This section describes the <strong>cl_khr_fp16</strong> extension.
@@ -1212,12 +1762,12 @@
 types that can be used for arithmetic operations, conversions etc.</p>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_fp16-additions-to-chapter-6-of-the-opencl-2.0-specification">2.1. Additions to Chapter 6 of the OpenCL 2.0 C Specification</h3>
+<h3 id="cl_khr_fp16-additions-to-chapter-6-of-the-opencl-2.0-specification">5.1. Additions to Chapter 6 of the OpenCL 2.0 C Specification</h3>
 <div class="paragraph">
 <p>The list of built-in scalar, and vector data types defined in <em>tables 6.1</em>,
 and <em>6.2</em> are extended to include the following:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 25%;">
 <col style="width: 75%;">
@@ -1259,7 +1809,7 @@
 defined in the OpenCL C programming language and the corresponding data type
 available to the application:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -1303,7 +1853,7 @@
 indicating the literal is typed as a half.</p>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_fp16-conversions">2.1.1. Conversions</h4>
+<h4 id="cl_khr_fp16-conversions">5.1.1. Conversions</h4>
 <div class="paragraph">
 <p>The implicit conversion rules specified in <em>section 6.2.1</em> now include the
 <code>half</code> scalar and <code>halfn</code> vector data types.</p>
@@ -1323,10 +1873,10 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_fp16-math-functions">2.1.2. Math Functions</h4>
+<h4 id="cl_khr_fp16-math-functions">5.1.2. Math Functions</h4>
 <div class="paragraph">
 <p>The built-in math functions defined in <em>table 6.8</em> (also listed below) are
-extended to include appropriate versions of functions that take <code>half</code>, and
+extended to include appropriate versions of functions that take <code>half</code> and
 <code>half{2|3|4|8|16}</code> as arguments and return values.
 <code>gentype</code> now also includes <code>half</code>, <code>half2</code>, <code>half3</code>, <code>half4</code>, <code>half8</code>, and
 <code>half16</code>.</p>
@@ -1335,8 +1885,8 @@
 <p>For any specific use of a function, the actual type has to be the same for
 all arguments and the return type.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 1. <em>Half Precision Built-in Math Functions</em></caption>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 2. <em>Half Precision Built-in Math Functions</em></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -1411,7 +1961,7 @@
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>cosh</strong> (gentype <em>x</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Compute hyperbolic consine.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute hyperbolic cosine.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>cospi</strong> (gentype <em>x</em>)</p></td>
@@ -1459,10 +2009,10 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns the correctly rounded floating-point representation of the sum of
   <em>c</em> with the infinitely precise product of <em>a</em> and <em>b</em>.
   Rounding of intermediate products shall not occur.
-  Edge case behavior is per the IEEE 754-2008.</p></td>
+  Edge case behavior is per the IEEE 754-2008 standard.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>fmax</strong> (gentype x, gentype y)<br>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>fmax</strong> (gentype <em>x</em>, gentype <em>y</em>)<br>
   gentype <strong>fmax</strong> (gentype <em>x</em>, half <em>y</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns <em>y</em> if <em>x</em> &lt; <em>y</em>, otherwise it returns <em>x</em>.
   If one argument is a NaN, <strong>fmax()</strong> returns the other argument.
@@ -1481,12 +2031,27 @@
   Returns <em>x</em> - <em>y</em> * <strong>trunc</strong> (<em>x</em>/<em>y</em>) .</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>fract</strong> (gentype <em>x</em>, gentype *<em>iptr</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <strong>fmin</strong>( <em>x</em> - <strong>floor</strong> (<em>x</em>), 0x1.ffcp-1f ).
-</p><p class="tableblock">  <strong>floor</strong>(x) is returned in <em>iptr</em>.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>fract</strong> (gentype <em>x</em>, __global gentype *<em>iptr</em>)<br>
+  gentype <strong>fract</strong> (gentype <em>x</em>, __local gentype *<em>iptr</em>)<br>
+  gentype <strong>fract</strong> (gentype <em>x</em>, __private gentype *<em>iptr</em>)<br>
+  <br>
+  If OpenCL 2.0 or newer:<br>
+  <br>
+  gentype <strong>fract</strong> (gentype <em>x</em>, gentype *<em>iptr</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <strong>fmin</strong>( <em>x</em> - <strong>floor</strong> (<em>x</em>), 0x1.ffcp-1f ).</p>
+<p class="tableblock">  <strong>floor</strong>(x) is returned in <em>iptr</em>.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">half<em>n</em> <strong>frexp</strong> (half<em>n</em> <em>x</em>, int<em>n</em> *exp)<br>
+<td class="tableblock halign-left valign-top"><p class="tableblock">half<em>n</em> <strong>frexp</strong> (half<em>n x</em>, __global int<em>n</em> *exp)<br>
+  half<em>n</em> <strong>frexp</strong> (half<em>n x</em>, __local int<em>n</em> *exp)<br>
+  half<em>n</em> <strong>frexp</strong> (half<em>n x</em>, __private int<em>n</em> *exp)<br>
+  half <strong>frexp</strong> (half <em>x</em>, __global int *exp)<br>
+  half <strong>frexp</strong> (half <em>x</em>, __local int *exp)<br>
+  half <strong>frexp</strong> (half <em>x</em>, __private int *exp)<br>
+  <br>
+  If OpenCL 2.0 or newer:<br>
+  <br>
+  half<em>n</em> <strong>frexp</strong> (half<em>n</em> <em>x</em>, int<em>n</em> *exp)<br>
   half <strong>frexp</strong> (half <em>x</em>, int *exp)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Extract mantissa and exponent from <em>x</em>.
   For each component the mantissa returned is a float with magnitude in the
@@ -1511,6 +2076,15 @@
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>lgamma</strong> (gentype <em>x</em>)<br>
+  half<em>n</em> <strong>lgamma_r</strong> (half<em>n</em> <em>x</em>, __global int<em>n</em> *<em>signp</em>)<br>
+  half<em>n</em> <strong>lgamma_r</strong> (half<em>n</em> <em>x</em>, __local int<em>n</em> *<em>signp</em>)<br>
+  half<em>n</em> <strong>lgamma_r</strong> (half<em>n</em> <em>x</em>, __private int<em>n</em> *<em>signp</em>)<br>
+  half <strong>lgamma_r</strong> (half <em>x</em>, __global int *<em>signp</em>)<br>
+  half <strong>lgamma_r</strong> (half <em>x</em>, __local int *<em>signp</em>)<br>
+  half <strong>lgamma_r</strong> (half <em>x</em>, __private int *<em>signp</em>)<br>
+  <br>
+  If OpenCL 2.0 or newer:<br>
+  <br>
   half<em>n</em> <strong>lgamma_r</strong> (half<em>n</em> <em>x</em>, int<em>n</em> *<em>signp</em>)<br>
   half <strong>lgamma_r</strong> (half <em>x</em>, int *<em>signp</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Log gamma function.
@@ -1545,8 +2119,8 @@
   The function may compute <em>a</em> * <em>b</em> + <em>c</em> with reduced accuracy
   in the embedded profile.  See the SPIR-V OpenCL environment specification
   for details. On some hardware the mad instruction may provide better
-  performance than expanded computation of <em>a</em> * <em>b</em> + <em>c</em>.
-</p><p class="tableblock">  Note: For some usages, e.g. <strong>mad</strong>(a, b, -a*b), the half precision
+  performance than expanded computation of <em>a</em> * <em>b</em> + <em>c</em>.</p>
+<p class="tableblock">  Note: For some usages, e.g. <strong>mad</strong>(a, b, -a*b), the half precision
   definition of <strong>mad</strong>() is loose enough that almost any result is allowed
   from <strong>mad</strong>() for some values of a and b.</p></td>
 </tr>
@@ -1561,7 +2135,13 @@
   <strong>fmin</strong>(<em>x</em>, <em>y</em>).</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>modf</strong> (gentype <em>x</em>, gentype *<em>iptr</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>modf</strong> (gentype <em>x</em>, __global gentype *<em>iptr</em>)<br>
+  gentype <strong>modf</strong> (gentype <em>x</em>, __local gentype *<em>iptr</em>)<br>
+  gentype <strong>modf</strong> (gentype <em>x</em>, __private gentype *<em>iptr</em>)<br>
+  <br>
+  If OpenCL 2.0 or newer:<br>
+  <br>
+  gentype <strong>modf</strong> (gentype <em>x</em>, gentype *<em>iptr</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Decompose a floating-point number.
   The <strong>modf</strong> function breaks the argument <em>x</em> into integral and fractional
   parts, each of which has the same sign as the argument.
@@ -1601,7 +2181,16 @@
   If <em>r</em> is zero, it is given the same sign as <em>x</em>.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">half<em>n</em> <strong>remquo</strong> (half<em>n</em> <em>x</em>, half<em>n</em> <em>y</em>, int<em>n</em> *<em>quo</em>)<br>
+<td class="tableblock halign-left valign-top"><p class="tableblock">half<em>n</em> <strong>remquo</strong> (half<em>n</em> <em>x</em>, half<em>n</em> <em>y</em>, __global int<em>n</em> *<em>quo</em>)<br>
+  half<em>n</em> <strong>remquo</strong> (half<em>n</em> <em>x</em>, half<em>n</em> <em>y</em>, __local int<em>n</em> *<em>quo</em>)<br>
+  half<em>n</em> <strong>remquo</strong> (half<em>n</em> <em>x</em>, half<em>n</em> <em>y</em>, __private int<em>n</em> *<em>quo</em>)<br>
+  half <strong>remquo</strong> (half <em>x</em>, half <em>y</em>, __global int *<em>quo</em>)<br>
+  half <strong>remquo</strong> (half <em>x</em>, half <em>y</em>, __local int *<em>quo</em>)<br>
+  half <strong>remquo</strong> (half <em>x</em>, half <em>y</em>, __private int *<em>quo</em>)<br>
+  <br>
+  If OpenCL 2.0 or newer:<br>
+  <br>
+  half<em>n</em> <strong>remquo</strong> (half<em>n</em> <em>x</em>, half<em>n</em> <em>y</em>, int<em>n</em> *<em>quo</em>)<br>
   half <strong>remquo</strong> (half <em>x</em>, half <em>y</em>, int *<em>quo</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">The <strong>remquo</strong> function computes the value r such that <em>r</em> = <em>x</em> - <em>k</em>*<em>y</em>,
   where <em>k</em> is the integer nearest the exact value of <em>x</em>/<em>y</em>.
@@ -1637,7 +2226,13 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Compute sine.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sincos</strong> (gentype <em>x</em>, gentype *<em>cosval</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sincos</strong> (gentype <em>x</em>, __global gentype *<em>cosval</em>)<br>
+  gentype <strong>sincos</strong> (gentype <em>x</em>, __local gentype *<em>cosval</em>)<br>
+  gentype <strong>sincos</strong> (gentype <em>x</em>, __private gentype *<em>cosval</em>)<br>
+  <br>
+  If OpenCL 2.0 or newer:<br>
+  <br>
+  gentype <strong>sincos</strong> (gentype <em>x</em>, gentype *<em>cosval</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Compute sine and cosine of x.
   The computed sine is the return value and computed cosine is returned in
   <em>cosval</em>.</p></td>
@@ -1682,7 +2277,7 @@
 floating-point.
 If defined, the <strong>FP_FAST_FMA_HALF</strong> macro shall indicate that the <strong>fma()</strong>
 function generally executes about as fast as, or faster than, a multiply and
-an add of <strong>half</strong> operands</p>
+an add of <strong>half</strong> operands.</p>
 </div>
 <div class="paragraph">
 <p>The macro names given in the following list must use the values specified.
@@ -1691,16 +2286,16 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>#define HALF_DIG            3
-#define HALF_MANT_DIG       11
-#define HALF_MAX_10_EXP     +4
-#define HALF_MAX_EXP        +16
-#define HALF_MIN_10_EXP     -4
-#define HALF_MIN_EXP        -13
-#define HALF_RADIX          2
-#define HALF_MAX            0x1.ffcp15h
-#define HALF_MIN            0x1.0p-14h
-#define HALF_EPSILON        0x1.0p-10h</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c"><span class="preprocessor">#define</span> HALF_DIG            <span class="integer">3</span>
+<span class="preprocessor">#define</span> HALF_MANT_DIG       <span class="integer">11</span>
+<span class="preprocessor">#define</span> HALF_MAX_10_EXP     +<span class="integer">4</span>
+<span class="preprocessor">#define</span> HALF_MAX_EXP        +<span class="integer">16</span>
+<span class="preprocessor">#define</span> HALF_MIN_10_EXP     -<span class="integer">4</span>
+<span class="preprocessor">#define</span> HALF_MIN_EXP        -<span class="integer">13</span>
+<span class="preprocessor">#define</span> HALF_RADIX          <span class="integer">2</span>
+<span class="preprocessor">#define</span> HALF_MAX            <span class="hex">0x1</span>.ffcp15h
+<span class="preprocessor">#define</span> HALF_MIN            <span class="hex">0x1</span><span class="float">.0</span>p-<span class="integer">14</span>h
+<span class="preprocessor">#define</span> HALF_EPSILON        <span class="hex">0x1</span><span class="float">.0</span>p-<span class="integer">10</span>h</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -1708,7 +2303,7 @@
 OpenCL C programming language and the corresponding macro names available to
 the application.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -1767,7 +2362,7 @@
 They are of type <code>half</code> and are accurate within the precision of the <code>half</code>
 type.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -1835,17 +2430,17 @@
 </table>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_fp16-common-functions">2.1.3. Common Functions</h4>
+<h4 id="cl_khr_fp16-common-functions">5.1.3. Common Functions</h4>
 <div class="paragraph">
 <p>The built-in common functions defined in <em>table 6.12</em> (also listed below)
-are extended to include appropriate versions of functions that take <code>half</code>,
+are extended to include appropriate versions of functions that take <code>half</code>
 and <code>half{2|3|4|8|16}</code> as arguments and return values.
 gentype now also includes <code>half</code>, <code>half2</code>, <code>half3</code>, <code>half4</code>, <code>half8</code> and
 <code>half16</code>.
 These are described below.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 2. <em>Half Precision Built-in Common Functions</em></caption>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 3. <em>Half Precision Built-in Common Functions</em></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -1859,11 +2454,11 @@
 <tbody>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>clamp</strong> (<br>
-  gentype <em>x</em>, gentype <em>minval</em>, gentype <em>maxval</em>)
-</p><p class="tableblock">  gentype <strong>clamp</strong> (<br>
+  gentype <em>x</em>, gentype <em>minval</em>, gentype <em>maxval</em>)</p>
+<p class="tableblock">  gentype <strong>clamp</strong> (<br>
   gentype <em>x</em>, half <em>minval</em>, half <em>maxval</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <strong>min</strong>(<strong>max</strong>(<em>x</em>, <em>minval</em>), <em>maxval</em>).
-</p><p class="tableblock">  Results are undefined if <em>minval</em> &gt; <em>maxval</em>.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <strong>min</strong>(<strong>max</strong>(<em>x</em>, <em>minval</em>), <em>maxval</em>).</p>
+<p class="tableblock">  Results are undefined if <em>minval</em> &gt; <em>maxval</em>.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>degrees</strong> (gentype <em>radians</em>)</p></td>
@@ -1885,11 +2480,11 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>mix</strong> (gentype <em>x</em>, gentype <em>y</em>, gentype <em>a</em>)<br>
   gentype <strong>mix</strong> (gentype <em>x</em>, gentype <em>y</em>, half <em>a</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the linear blend of <em>x</em> and <em>y</em> implemented as:
-</p><p class="tableblock">  <em>x</em> + (<em>y</em> - <em>x)</em> * <em>a</em>
-</p><p class="tableblock">  <em>a</em> must be a value in the range 0.0 &#8230;&#8203; 1.0.
-  If <em>a</em> is not in the range 0.0 &#8230;&#8203; 1.0, the return values are undefined.
-</p><p class="tableblock">  Note: The half precision <strong>mix</strong> function can be implemented using contractions such as <strong>mad</strong> or <strong>fma</strong>.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the linear blend of <em>x</em> and <em>y</em> implemented as:</p>
+<p class="tableblock">  <em>x</em> + (<em>y</em> - <em>x)</em> * <em>a</em></p>
+<p class="tableblock">  <em>a</em> must be a value in the range 0.0 &#8230;&#8203; 1.0.
+  If <em>a</em> is not in the range 0.0 &#8230;&#8203; 1.0, the return values are undefined.</p>
+<p class="tableblock">  Note: The half precision <strong>mix</strong> function can be implemented using contractions such as <strong>mad</strong> or <strong>fma</strong>.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>radians</strong> (gentype <em>degrees</em>)</p></td>
@@ -1902,19 +2497,19 @@
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>smoothstep</strong> (<br>
-  gentype <em>edge0</em>, gentype <em>edge1</em>, gentype <em>x</em>)
-</p><p class="tableblock">  gentype <strong>smoothstep</strong> (<br>
+  gentype <em>edge0</em>, gentype <em>edge1</em>, gentype <em>x</em>)</p>
+<p class="tableblock">  gentype <strong>smoothstep</strong> (<br>
   half <em>edge0</em>, half <em>edge1</em>, gentype <em>x</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Returns 0.0 if <em>x</em> &lt;= <em>edge0</em> and 1.0 if <em>x</em> &gt;= <em>edge1</em> and performs
   smooth Hermite interpolation between 0 and 1 when <em>edge0</em> &lt; <em>x</em> &lt; <em>edge1</em>.
   This is useful in cases where you would want a threshold function with a
-  smooth transition.
-</p><p class="tableblock">  This is equivalent to:
-</p><p class="tableblock">  gentype <em>t</em>;<br>
+  smooth transition.</p>
+<p class="tableblock">  This is equivalent to:</p>
+<p class="tableblock">  gentype <em>t</em>;<br>
   <em>t</em> = clamp ((<em>x</em> - <em>edge0</em>) / (<em>edge1</em> - <em>edge0</em>), 0, 1);<br>
-  return <em>t</em> * <em>t</em> * (3 - 2 * <em>t</em>);<br>
-</p><p class="tableblock">  Results are undefined if <em>edge0</em> &gt;= <em>edge1</em>.
-</p><p class="tableblock">  Note: The half precision <strong>smoothstep</strong> function can be implemented using contractions such as <strong>mad</strong> or <strong>fma</strong>.</p></td>
+  return <em>t</em> * <em>t</em> * (3 - 2 * <em>t</em>);<br></p>
+<p class="tableblock">  Results are undefined if <em>edge0</em> &gt;= <em>edge1</em>.</p>
+<p class="tableblock">  Note: The half precision <strong>smoothstep</strong> function can be implemented using contractions such as <strong>mad</strong> or <strong>fma</strong>.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sign</strong> (gentype <em>x</em>)</p></td>
@@ -1926,10 +2521,10 @@
 </table>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_fp16-geometric-functions">2.1.4. Geometric Functions</h4>
+<h4 id="cl_khr_fp16-geometric-functions">5.1.4. Geometric Functions</h4>
 <div class="paragraph">
 <p>The built-in geometric functions defined in <em>table 6.13</em> (also listed below)
-are extended to include appropriate versions of functions that take <code>half</code>,
+are extended to include appropriate versions of functions that take <code>half</code>
 and <code>half{2|3|4}</code> as arguments and return values.
 gentype now also includes <code>half</code>, <code>half2</code>, <code>half3</code> and <code>half4</code>.
 These are described below.</p>
@@ -1938,8 +2533,8 @@
 <p>Note: The half precision geometric functions can be implemented using
 contractions such as <strong>mad</strong> or <strong>fma</strong>.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 3. <em>Half Precision Built-in Geometric Functions</em></caption>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 4. <em>Half Precision Built-in Geometric Functions</em></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -1979,7 +2574,7 @@
 </table>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_fp16-relational-functions">2.1.5. Relational Functions</h4>
+<h4 id="cl_khr_fp16-relational-functions">5.1.5. Relational Functions</h4>
 <div class="paragraph">
 <p>The scalar and vector relational functions described in <em>table 6.14</em> are
 extended to include versions that take <code>half</code>, <code>half2</code>, <code>half3</code>, <code>half4</code>,
@@ -2012,8 +2607,8 @@
 <p>The functions described in <em>table 6.14</em> are extended to include the <code>halfn</code>
 vector types.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 4. <em>Half Precision Relational Functions</em></caption>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 5. <em>Half Precision Relational Functions</em></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -2128,13 +2723,13 @@
 </table>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_fp16-vector-data-load-and-store-functions">2.1.6. Vector Data Load and Store Functions</h4>
+<h4 id="cl_khr_fp16-vector-data-load-and-store-functions">5.1.6. Vector Data Load and Store Functions</h4>
 <div class="paragraph">
 <p>The vector data load (<strong>vload<em>n</em></strong>) and store (<strong>vstore<em>n</em></strong>) functions
-described in <em>table 6.14</em> (also listed below) are extended to include
+described in <em>table 6.13</em> (also listed below) are extended to include
 versions that read from or write to half scalar or vector values.
 The generic type <code>gentype</code> is extended to include <code>half</code>.
-The generic type <code>gentypen</code> is extended to include <code>half</code>, <code>half2</code>, <code>half3</code>,
+The generic type <code>gentypen</code> is extended to include <code>half2</code>, <code>half3</code>,
 <code>half4</code>, <code>half8</code>, and <code>half16</code>.</p>
 </div>
 <div class="paragraph">
@@ -2142,8 +2737,8 @@
 (<em>p</em> + (<em>offset</em> * 3)) into a 3-component vector and <strong>vstore3</strong> writes <em>x</em>, <em>y</em>, <em>z</em>
 components from a 3-component vector to address (<em>p</em> + (<em>offset</em> * 3)).</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 5. <em>Half Precision Vector Data Load and Store Functions</em></caption>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 6. <em>Half Precision Vector Data Load and Store Functions</em></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -2156,18 +2751,23 @@
 </thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">gentype<em>n</em> <strong>vload<em>n</em></strong><br>
-  (size_t <em>offset</em>, const gentype *<em>p</em>)
-</p><p class="tableblock">  gentype<em>n</em> <strong>vload<em>n</em></strong><br>
-  (size_t <em>offset</em>, const __constant gentype *<em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype<em>n</em> <strong>vload<em>n</em></strong>(size_t <em>offset</em>, const __global gentype *<em>p</em>)</p>
+<p class="tableblock">  gentype<em>n</em> <strong>vload<em>n</em></strong>(size_t <em>offset</em>, const __local gentype *<em>p</em>)</p>
+<p class="tableblock">  gentype<em>n</em> <strong>vload<em>n</em></strong>(size_t <em>offset</em>, const __constant gentype *<em>p</em>)</p>
+<p class="tableblock">  gentype<em>n</em> <strong>vload<em>n</em></strong>(size_t <em>offset</em>, const __private gentype *<em>p</em>)</p>
+<p class="tableblock">  If OpenCL 2.0 or newer:</p>
+<p class="tableblock">  gentype<em>n</em> <strong>vload<em>n</em></strong>(size_t <em>offset</em>, const gentype *<em>p</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Return sizeof (gentype<em>n</em>) bytes of data read from address
   (<em>p</em> + (<em>offset * n</em>)).
   The read address computed as (<em>p</em> + (<em>offset * n</em>)) must be 16-bit
   aligned.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>vstore<em>n</em></strong> (<br>
-  gentype<em>n</em> <em>data</em>, size_t <em>offset</em>, gentype *<em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>vstore<em>n</em></strong>(gentype<em>n</em> <em>data</em>, size_t <em>offset</em>, __global gentype *<em>p</em>)</p>
+<p class="tableblock">  void <strong>vstore<em>n</em></strong>(gentype<em>n</em> <em>data</em>, size_t <em>offset</em>, __local gentype *<em>p</em>)</p>
+<p class="tableblock">  void <strong>vstore<em>n</em></strong>(gentype<em>n</em> <em>data</em>, size_t <em>offset</em>, __private gentype *<em>p</em>)</p>
+<p class="tableblock">  If OpenCL 2.0 or newer:</p>
+<p class="tableblock">  void <strong>vstore<em>n</em></strong>(gentype<em>n</em> <em>data</em>, size_t <em>offset</em>, gentype *<em>p</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Write sizeof (gentype<em>n</em>) bytes given by <em>data</em> to address
   (<em>p</em> + (<em>offset * n</em>)).
   The write address computed as (<em>p</em> + (<em>offset * n</em>)) must be 16-bit
@@ -2177,7 +2777,7 @@
 </table>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_fp16-async-copies-from-global-to-local-memory-local-to-global-memory-and-prefetch">2.1.7. Async Copies from Global to Local Memory, Local to Global Memory, and Prefetch</h4>
+<h4 id="cl_khr_fp16-async-copies-from-global-to-local-memory-local-to-global-memory-and-prefetch">5.1.7. Async Copies from Global to Local Memory, Local to Global Memory, and Prefetch</h4>
 <div class="paragraph">
 <p>The OpenCL C programming language implements the following functions that
 provide asynchronous copies between global and local memory and a prefetch
@@ -2187,8 +2787,8 @@
 <p>The generic type <code>gentype</code> is extended to include <code>half</code>, <code>half2</code>, <code>half3</code>,
 <code>half4</code>, <code>half8</code>, and <code>half16</code>.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 6. <em>Half Precision Built-in Async Copy and Prefetch Functions</em></caption>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 7. <em>Half Precision Built-in Async Copy and Prefetch Functions</em></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -2204,8 +2804,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">event_t <strong>async_work_group_copy</strong> (<br>
   __local gentype *<em>dst</em>,<br>
   const __global gentype *<em>src</em>,<br>
-  size_t <em>num_gentypes</em>, event_t <em>event</em>)
-</p><p class="tableblock">  event_t <strong>async_work_group_copy</strong> (<br>
+  size_t <em>num_gentypes</em>, event_t <em>event</em>)</p>
+<p class="tableblock">  event_t <strong>async_work_group_copy</strong> (<br>
   __global gentype <em>*dst</em>,<br>
   const __local gentype *<em>src</em>,<br>
   size_t <em>num_gentypes</em>, event_t <em>event</em>)</p></td>
@@ -2214,15 +2814,15 @@
   The async copy is performed by all work-items in a work-group and this
   built-in function must therefore be encountered by all work-items in a
   work-group executing the kernel with the same argument values; otherwise
-  the results are undefined.
-</p><p class="tableblock">  Returns an event object that can be used by <strong>wait_group_events</strong> to wait
+  the results are undefined.</p>
+<p class="tableblock">  Returns an event object that can be used by <strong>wait_group_events</strong> to wait
   for the async copy to finish.
   The <em>event</em> argument can also be used to associate the
   <strong>async_work_group_copy</strong> with a previous async copy allowing an event to be
-  shared by multiple async copies; otherwise <em>event</em> should be zero.
-</p><p class="tableblock">  If <em>event</em> argument is not zero, the event object supplied in <em>event</em>
-  argument will be returned.
-</p><p class="tableblock">  This function does not perform any implicit synchronization of source data
+  shared by multiple async copies; otherwise <em>event</em> should be zero.</p>
+<p class="tableblock">  If <em>event</em> argument is not zero, the event object supplied in <em>event</em>
+  argument will be returned.</p>
+<p class="tableblock">  This function does not perform any implicit synchronization of source data
   such as using a <strong>barrier</strong> before performing the copy.</p></td>
 </tr>
 <tr>
@@ -2234,8 +2834,8 @@
   __local gentype <em>*dst</em>,<br>
   const __global gentype *<em>src</em>,<br>
   size_t <em>num_gentypes</em>,<br>
-  size_t <em>src_stride</em>, event_t <em>event</em>)
-</p><p class="tableblock">  event_t <strong>async_work_group_strided_copy</strong> (<br>
+  size_t <em>src_stride</em>, event_t <em>event</em>)</p>
+<p class="tableblock">  event_t <strong>async_work_group_strided_copy</strong> (<br>
   __global gentype <em>*dst</em>,<br>
   const __local gentype *<em>src</em>,<br>
   size_t <em>num_gentypes</em>,<br>
@@ -2247,18 +2847,18 @@
   The async gather is performed by all work-items in a work-group and this
   built-in function must therefore be encountered by all work-items in a
   work-group executing the kernel with the same argument values; otherwise
-  the results are undefined.
-</p><p class="tableblock">  Returns an event object that can be used by <strong>wait_group_events</strong> to wait
+  the results are undefined.</p>
+<p class="tableblock">  Returns an event object that can be used by <strong>wait_group_events</strong> to wait
   for the async copy to finish.
   The <em>event</em> argument can also be used to associate the
   <strong>async_work_group_strided_copy</strong> with a previous async copy allowing an
   event to be shared by multiple async copies; otherwise <em>event</em> should be
-  zero.
-</p><p class="tableblock">  If <em>event</em> argument is not zero, the event object supplied in <em>event</em>
-  argument will be returned.
-</p><p class="tableblock">  This function does not perform any implicit synchronization of source data
-  such as using a <strong>barrier</strong> before performing the copy.
-</p><p class="tableblock">  The behavior of <strong>async_work_group_strided_copy</strong> is undefined if
+  zero.</p>
+<p class="tableblock">  If <em>event</em> argument is not zero, the event object supplied in <em>event</em>
+  argument will be returned.</p>
+<p class="tableblock">  This function does not perform any implicit synchronization of source data
+  such as using a <strong>barrier</strong> before performing the copy.</p>
+<p class="tableblock">  The behavior of <strong>async_work_group_strided_copy</strong> is undefined if
   <em>src_stride</em> or <em>dst_stride</em> is 0, or if the <em>src_stride</em> or <em>dst_stride</em>
   values cause the <em>src</em> or <em>dst</em> pointers to exceed the upper bounds of the
   address space during the copy.</p></td>
@@ -2273,8 +2873,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">Wait for events that identify the <strong>async_work_group_copy</strong> operations to
   complete.
   The event objects specified in <em>event_list</em> will be released after the
-  wait is performed.
-</p><p class="tableblock">  This function must be encountered by all work-items in a work-group
+  wait is performed.</p>
+<p class="tableblock">  This function must be encountered by all work-items in a work-group
   executing the kernel with the same <em>num_events</em> and event objects
   specified in <em>event_list</em>; otherwise the results are undefined.</p></td>
 </tr>
@@ -2289,16 +2889,16 @@
 </table>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_fp16-image-read-and-write-functions">2.1.8. Image Read and Write Functions</h4>
+<h4 id="cl_khr_fp16-image-read-and-write-functions">5.1.8. Image Read and Write Functions</h4>
 <div class="paragraph">
 <p>The image read and write functions defined in <em>tables 6.23</em>, <em>6.24</em> and
 <em>6.25</em> are extended to support image color values that are a <code>half</code> type.</p>
 </div>
 </div>
 <div class="sect3">
-<h4 id="_built_in_image_read_functions">2.1.9. Built-in Image Read Functions</h4>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 7. <em>Half Precision Built-in Image Read Functions</em></caption>
+<h4 id="_built_in_image_read_functions">5.1.9. Built-in Image Read Functions</h4>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 8. <em>Half Precision Built-in Image Read Functions</em></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -2314,28 +2914,28 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">half4 <strong>read_imageh</strong> (<br>
   read_only image2d_t <em>image</em>,<br>
   sampler_t <em>sampler</em>,<br>
-  int2 <em>coord</em>)
-</p><p class="tableblock">  half4 <strong>read_imageh</strong> (<br>
+  int2 <em>coord</em>)</p>
+<p class="tableblock">  half4 <strong>read_imageh</strong> (<br>
   read_only image2d_t <em>image</em>,<br>
   sampler_t <em>sampler</em>,<br>
   float2 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate <em>(coord.x, coord.y)</em> to do an element lookup in the 2D
-  image object specified by <em>image</em>.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  image object specified by <em>image</em>.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [0.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em> set
   to one of the pre-defined packed formats, CL_UNORM_INT8, or
-  CL_UNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  CL_UNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [-1.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em>
-  set to CL_SNORM_INT8, or CL_SNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
-  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.
-</p><p class="tableblock">  The <strong>read_imageh</strong> calls that take integer coordinates must use a sampler
+  set to CL_SNORM_INT8, or CL_SNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
+  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.</p>
+<p class="tableblock">  The <strong>read_imageh</strong> calls that take integer coordinates must use a sampler
   with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to
   CLK_NORMALIZED_COORDS_FALSE and addressing mode set to
   CLK_ADDRESS_CLAMP_TO_EDGE, CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE;
-  otherwise the values returned are undefined.
-</p><p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
+  otherwise the values returned are undefined.</p>
+<p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
   <em>image_channel_data_type</em> values not specified in the description above
   are undefined.</p></td>
 </tr>
@@ -2347,29 +2947,29 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">half4 <strong>read_imageh</strong> (<br>
   read_only image3d_t <em>image</em>,<br>
   sampler_t <em>sampler</em>,<br>
-  int4 <em>coord</em> )
-</p><p class="tableblock">  half4 <strong>read_imageh</strong> (<br>
+  int4 <em>coord</em> )</p>
+<p class="tableblock">  half4 <strong>read_imageh</strong> (<br>
   read_only image3d_t <em>image</em>,<br>
   sampler_t <em>sampler</em>,<br>
   float4 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate <em>(coord.x</em>, <em>coord.y</em>, <em>coord.z)</em> to do an
   elementlookup in the 3D image object specified by <em>image</em>. <em>coord.w</em> is
-  ignored.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  ignored.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [0.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em> set
   to one of the pre-defined packed formats or CL_UNORM_INT8, or
-  CL_UNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  CL_UNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [-1.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em>
-  set to CL_SNORM_INT8, or CL_SNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong>returns half precision floating-point values for image
-  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.
-</p><p class="tableblock">  The <strong>read_imageh</strong> calls that take integer coordinates must use a sampler
+  set to CL_SNORM_INT8, or CL_SNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong>returns half precision floating-point values for image
+  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.</p>
+<p class="tableblock">  The <strong>read_imageh</strong> calls that take integer coordinates must use a sampler
   with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to
   CLK_NORMALIZED_COORDS_FALSE and addressing mode set to
   CLK_ADDRESS_CLAMP_TO_EDGE, CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE;
-  otherwise the values returned are undefined.
-</p><p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
+  otherwise the values returned are undefined.</p>
+<p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
   <em>image_channel_data_type</em> values not specified in the description are
   undefined.</p></td>
 </tr>
@@ -2381,28 +2981,28 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">half4 <strong>read_imageh</strong> (<br>
   read_only image2d_array_t <em>image</em>,<br>
   sampler_t <em>sampler</em>,<br>
-  int4 <em>coord</em>)
-</p><p class="tableblock">  half4 <strong>read_imageh</strong> (<br>
+  int4 <em>coord</em>)</p>
+<p class="tableblock">  half4 <strong>read_imageh</strong> (<br>
   read_only image2d_array_t <em>image</em>,<br>
   sampler_t <em>sampler</em>,<br>
   float4 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.xy</em> to do an element lookup in the 2D image identified by
-  <em>coord.z</em> in the 2D image array specified by <em>image</em>.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  <em>coord.z</em> in the 2D image array specified by <em>image</em>.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [0.0 &#8230;&#8203; 1.0] for image objects created with image_channel_data_type set
   to one of the pre-defined packed formats or CL_UNORM_INT8, or
-  CL_UNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  CL_UNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [-1.0 &#8230;&#8203; 1.0] for image objects created with image_channel_data_type set
-  to CL_SNORM_INT8, or CL_SNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
-  objects created with image_channel_data_type set to CL_HALF_FLOAT.
-</p><p class="tableblock">  The <strong>read_imageh</strong> calls that take integer coordinates must use a sampler
+  to CL_SNORM_INT8, or CL_SNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
+  objects created with image_channel_data_type set to CL_HALF_FLOAT.</p>
+<p class="tableblock">  The <strong>read_imageh</strong> calls that take integer coordinates must use a sampler
   with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to
   CLK_NORMALIZED_COORDS_FALSE and addressing mode set to
   CLK_ADDRESS_CLAMP_TO_EDGE, CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE;
-  otherwise the values returned are undefined.
-</p><p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
+  otherwise the values returned are undefined.</p>
+<p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
   image_channel_data_type values not specified in the description above are
   undefined.</p></td>
 </tr>
@@ -2414,28 +3014,28 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">half4 <strong>read_imageh</strong> (<br>
   read_only image1d_t <em>image</em>,<br>
   sampler_t <em>sampler</em>,<br>
-  int <em>coord</em>)
-</p><p class="tableblock">  half4 <strong>read_imageh</strong> (<br>
+  int <em>coord</em>)</p>
+<p class="tableblock">  half4 <strong>read_imageh</strong> (<br>
   read_only image1d_t <em>image</em>,<br>
   sampler_t <em>sampler</em>,<br>
   float <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord</em> to do an element lookup in the 1D image object specified by
-  <em>image</em>.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  <em>image</em>.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [0.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em> set
   to one of the pre-defined packed formats or CL_UNORM_INT8, or
-  CL_UNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  CL_UNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [-1.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em>
-  set to CL_SNORM_INT8, or CL_SNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
-  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.
-</p><p class="tableblock">  The <strong>read_imageh</strong> calls that take integer coordinates must use a sampler
+  set to CL_SNORM_INT8, or CL_SNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
+  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.</p>
+<p class="tableblock">  The <strong>read_imageh</strong> calls that take integer coordinates must use a sampler
   with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to
   CLK_NORMALIZED_COORDS_FALSE and addressing mode set to
   CLK_ADDRESS_CLAMP_TO_EDGE, CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE;
-  otherwise the values returned are undefined.
-</p><p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
+  otherwise the values returned are undefined.</p>
+<p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
   <em>image_channel_data_type</em> values not specified in the description above
   are undefined.</p></td>
 </tr>
@@ -2447,28 +3047,28 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">half4 <strong>read_imageh</strong> (<br>
   read_only image1d_array_t <em>image</em>,<br>
   sampler_t <em>sampler</em>,<br>
-  int2 <em>coord</em>)
-</p><p class="tableblock">  half4 <strong>read_imageh</strong> (<br>
+  int2 <em>coord</em>)</p>
+<p class="tableblock">  half4 <strong>read_imageh</strong> (<br>
   read_only image1d_array_t <em>image</em>,<br>
   sampler_t <em>sampler</em>,<br>
   float2 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.x</em> to do an element lookup in the 1D image identified by
-  <em>coord.y</em> in the 1D image array specified by <em>image</em>.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  <em>coord.y</em> in the 1D image array specified by <em>image</em>.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [0.0 &#8230;&#8203; 1.0] for image objects created with image_channel_data_type set
   to one of the pre-defined packed formats or CL_UNORM_INT8, or
-  CL_UNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  CL_UNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [-1.0 &#8230;&#8203; 1.0] for image objects created with image_channel_data_type set
-  to CL_SNORM_INT8, or CL_SNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
-  objects created with image_channel_data_type set to CL_HALF_FLOAT.
-</p><p class="tableblock">  The <strong>read_imageh</strong> calls that take integer coordinates must use a sampler
+  to CL_SNORM_INT8, or CL_SNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
+  objects created with image_channel_data_type set to CL_HALF_FLOAT.</p>
+<p class="tableblock">  The <strong>read_imageh</strong> calls that take integer coordinates must use a sampler
   with filter mode set to CLK_FILTER_NEAREST, normalized coordinates set to
   CLK_NORMALIZED_COORDS_FALSE and addressing mode set to
   CLK_ADDRESS_CLAMP_TO_EDGE, CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE;
-  otherwise the values returned are undefined.
-</p><p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
+  otherwise the values returned are undefined.</p>
+<p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
   image_channel_data_type values not specified in the description above are
   undefined.</p></td>
 </tr>
@@ -2476,13 +3076,13 @@
 </table>
 </div>
 <div class="sect3">
-<h4 id="_built_in_image_sampler_less_read_functions">2.1.10. Built-in Image Sampler-less Read Functions</h4>
+<h4 id="_built_in_image_sampler_less_read_functions">5.1.10. Built-in Image Sampler-less Read Functions</h4>
 <div class="paragraph">
 <p><em>aQual</em> in Table 6.24 refers to one of the access qualifiers.
 For sampler-less read functions this may be <em>read_only</em> or <em>read_write</em>.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 8. <em>Half Precision Built-in Image Sampler-less Read Functions</em></caption>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 9. <em>Half Precision Built-in Image Sampler-less Read Functions</em></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -2499,17 +3099,17 @@
   <em>aQual</em> image2d_t <em>image</em>,<br>
   int2 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate <em>(coord.x, coord.y)</em> to do an element lookup in the 2D
-  image object specified by <em>image</em>.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  image object specified by <em>image</em>.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [0.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em> set
   to one of the pre-defined packed formats or CL_UNORM_INT8, or
-  CL_UNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  CL_UNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [-1.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em>
-  set to CL_SNORM_INT8, or CL_SNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
-  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.
-</p><p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
+  set to CL_SNORM_INT8, or CL_SNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
+  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.</p>
+<p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
   <em>image_channel_data_type</em> values not specified in the description above
   are undefined.</p></td>
 </tr>
@@ -2518,17 +3118,17 @@
   <em>aQual</em> image3d_t <em>image</em>,<br>
   int4 <em>coord</em> )</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate <em>(coord.x</em>, <em>coord.y</em>, <em>coord.z)</em> to do an element
-  lookup in the 3D image object specified by <em>image</em>. <em>coord.w</em> is ignored.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  lookup in the 3D image object specified by <em>image</em>. <em>coord.w</em> is ignored.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [0.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em> set
   to one of the pre-defined packed formats or CL_UNORM_INT8, or
-  CL_UNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  CL_UNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [-1.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em>
-  set to CL_SNORM_INT8, or CL_SNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
-  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.
-</p><p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
+  set to CL_SNORM_INT8, or CL_SNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
+  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.</p>
+<p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
   <em>image_channel_data_type</em> values not specified in the description are
   undefined.</p></td>
 </tr>
@@ -2537,39 +3137,39 @@
   <em>aQual</em> image2d_array_t <em>image</em>,<br>
   int4 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.xy</em> to do an element lookup in the 2D image identified by
-  <em>coord.z</em> in the 2D image array specified by <em>image</em>.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  <em>coord.z</em> in the 2D image array specified by <em>image</em>.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [0.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em> set
   to one of the pre-defined packed formats or CL_UNORM_INT8, or
-  CL_UNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  CL_UNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [-1.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em>
-  set to CL_SNORM_INT8, or CL_SNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
-  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.
-</p><p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
+  set to CL_SNORM_INT8, or CL_SNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
+  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.</p>
+<p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
   <em>image_channel_data_type</em> values not specified in the description above
   are undefined.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">half4 <strong>read_imageh</strong> (<br>
   <em>aQual</em> image1d_t <em>image</em>,<br>
-  int <em>coord</em>)
-</p><p class="tableblock">  half4 <strong>read_imageh</strong> (<br>
+  int <em>coord</em>)</p>
+<p class="tableblock">  half4 <strong>read_imageh</strong> (<br>
   <em>aQual</em> image1d_buffer_t <em>image</em>,<br>
   int <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord</em> to do an element lookup in the 1D image or 1D image buffer
-  object specified by <em>image</em>.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  object specified by <em>image</em>.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [0.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em> set
   to one of the pre-defined packed formats or CL_UNORM_INT8, or
-  CL_UNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  CL_UNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [-1.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em>
-  set to CL_SNORM_INT8, or CL_SNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
-  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.
-</p><p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
+  set to CL_SNORM_INT8, or CL_SNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
+  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.</p>
+<p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
   <em>image_channel_data_type</em> values not specified in the description above
   are undefined.</p></td>
 </tr>
@@ -2578,17 +3178,17 @@
   <em>aQual</em> image1d_array_t <em>image</em>,<br>
   int2 <em>coord</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.x</em> to do an element lookup in the 2D image identified by
-  <em>coord.y</em> in the 2D image array specified by <em>image</em>.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  <em>coord.y</em> in the 2D image array specified by <em>image</em>.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [0.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em> set
   to one of the pre-defined packed formats or CL_UNORM_INT8, or
-  CL_UNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
+  CL_UNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values in the range
   [-1.0 &#8230;&#8203; 1.0] for image objects created with <em>image_channel_data_type</em>
-  set to CL_SNORM_INT8, or CL_SNORM_INT16.
-</p><p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
-  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.
-</p><p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
+  set to CL_SNORM_INT8, or CL_SNORM_INT16.</p>
+<p class="tableblock">  <strong>read_imageh</strong> returns half precision floating-point values for image
+  objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT.</p>
+<p class="tableblock">  Values returned by <strong>read_imageh</strong> for image objects with
   <em>image_channel_data_type</em> values not specified in the description above
   are undefined.</p></td>
 </tr>
@@ -2596,13 +3196,13 @@
 </table>
 </div>
 <div class="sect3">
-<h4 id="_built_in_image_write_functions">2.1.11. Built-in Image Write Functions</h4>
+<h4 id="_built_in_image_write_functions">5.1.11. Built-in Image Write Functions</h4>
 <div class="paragraph">
 <p><em>aQual</em> in Table 6.25 refers to one of the access qualifiers.
 For write functions this may be <em>write_only</em> or <em>read_write</em>.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 9. <em>Half Precision Built-in Image Write Functions</em></caption>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 10. <em>Half Precision Built-in Image Write Functions</em></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -2620,16 +3220,16 @@
   int2 <em>coord</em>,<br>
   half4 <em>color</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Write <em>color</em> value to location specified by <em>coord.xy</em> in the 2D image
-  specified by <em>image</em>.
-</p><p class="tableblock">  Appropriate data format conversion to the specified image format is done
+  specified by <em>image</em>.</p>
+<p class="tableblock">  Appropriate data format conversion to the specified image format is done
   before writing the color value. <em>x</em> &amp; <em>y</em> are considered to be
   unnormalized coordinates and must be in the range 0 &#8230;&#8203; width - 1, and 0
-  &#8230;&#8203; height - 1.
-</p><p class="tableblock">  <strong>write_imageh</strong> can only be used with image objects created with
+  &#8230;&#8203; height - 1.</p>
+<p class="tableblock">  <strong>write_imageh</strong> can only be used with image objects created with
   <em>image_channel_data_type</em> set to one of the pre-defined packed formats or
   set to CL_SNORM_INT8, CL_UNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT16 or
-  CL_HALF_FLOAT.
-</p><p class="tableblock">  The behavior of <strong>write_imageh</strong> for image objects created with
+  CL_HALF_FLOAT.</p>
+<p class="tableblock">  The behavior of <strong>write_imageh</strong> for image objects created with
   <em>image_channel_data_type</em> values not specified in the description above or
   with (<em>x</em>, <em>y</em>) coordinate values that are not in the range (0 &#8230;&#8203; width -
   1, 0 &#8230;&#8203; height - 1) respectively, is undefined.</p></td>
@@ -2640,17 +3240,17 @@
   int4 <em>coord</em>,<br>
   half4 <em>color</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Write <em>color</em> value to location specified by <em>coord.xy</em> in the 2D image
-  identified by <em>coord.z</em> in the 2D image array specified by <em>image</em>.
-</p><p class="tableblock">  Appropriate data format conversion to the specified image format is done
+  identified by <em>coord.z</em> in the 2D image array specified by <em>image</em>.</p>
+<p class="tableblock">  Appropriate data format conversion to the specified image format is done
   before writing the color value. <em>coord.x</em>, <em>coord.y</em> and <em>coord.z</em> are
   considered to be unnormalized coordinates and must be in the range 0 &#8230;&#8203;
   image width - 1, 0 &#8230;&#8203; image height - 1 and 0 &#8230;&#8203; image number of layers -
-  1.
-</p><p class="tableblock">  <strong>write_imageh</strong> can only be used with image objects created with
+  1.</p>
+<p class="tableblock">  <strong>write_imageh</strong> can only be used with image objects created with
   <em>image_channel_data_type</em> set to one of the pre-defined packed formats or
   set to CL_SNORM_INT8, CL_UNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT16 or
-  CL_HALF_FLOAT.
-</p><p class="tableblock">  The behavior of <strong>write_imageh</strong> for image objects created with
+  CL_HALF_FLOAT.</p>
+<p class="tableblock">  The behavior of <strong>write_imageh</strong> for image objects created with
   <em>image_channel_data_type</em> values not specified in the description above or
   with (<em>x</em>, <em>y, z</em>) coordinate values that are not in the range (0 &#8230;&#8203;
   image width - 1, 0 &#8230;&#8203; image height - 1, 0 &#8230;&#8203; image number of layers -
@@ -2660,8 +3260,8 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>write_imageh</strong> (<br>
   <em>aQual</em> image1d_t <em>image</em>,<br>
   int <em>coord</em>,<br>
-  half4 <em>color</em>)
-</p><p class="tableblock">  void <strong>write_imageh</strong> (<br>
+  half4 <em>color</em>)</p>
+<p class="tableblock">  void <strong>write_imageh</strong> (<br>
   <em>aQual</em> image1d_buffer_t <em>image</em>,<br>
   int <em>coord</em>,<br>
   half4 <em>color</em>)</p></td>
@@ -2670,15 +3270,15 @@
   Appropriate data format conversion to the specified image format is done
   before writing the color value.
   <em>coord</em> is considered to be unnormalized coordinates and must be in the
-  range 0 &#8230;&#8203; image width - 1.
-</p><p class="tableblock">  <strong>write_imageh</strong> can only be used with image objects created with
+  range 0 &#8230;&#8203; image width - 1.</p>
+<p class="tableblock">  <strong>write_imageh</strong> can only be used with image objects created with
   <em>image_channel_data_type</em> set to one of the pre-defined packed formats or
   set to CL_SNORM_INT8, CL_UNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT16 or
   CL_HALF_FLOAT.
   Appropriate data format conversion will be done to convert channel data
   from a floating-point value to actual data format in which the channels
-  are stored.
-</p><p class="tableblock">  The behavior of <strong>write_imageh</strong> for image objects created with
+  are stored.</p>
+<p class="tableblock">  The behavior of <strong>write_imageh</strong> for image objects created with
   <em>image_channel_data_type</em> values not specified in the description above or
   with coordinate values that is not in the range (0 &#8230;&#8203; image width - 1),
   is undefined.</p></td>
@@ -2693,15 +3293,15 @@
   Appropriate data format conversion to the specified image format is done
   before writing the color value. <em>coord.x</em> and <em>coord.y</em> are considered to
   be unnormalized coordinates and must be in the range 0 &#8230;&#8203; image width - 1
-  and 0 &#8230;&#8203; image number of layers - 1.
-</p><p class="tableblock">  <strong>write_imageh</strong> can only be used with image objects created with
+  and 0 &#8230;&#8203; image number of layers - 1.</p>
+<p class="tableblock">  <strong>write_imageh</strong> can only be used with image objects created with
   <em>image_channel_data_type</em> set to one of the pre-defined packed formats or
   set to CL_SNORM_INT8, CL_UNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT16 or
   CL_HALF_FLOAT.
   Appropriate data format conversion will be done to convert channel data
   from a floating-point value to actual data format in which the channels
-  are stored.
-</p><p class="tableblock">  The behavior of <strong>write_imageh</strong> for image objects created with
+  are stored.</p>
+<p class="tableblock">  The behavior of <strong>write_imageh</strong> for image objects created with
   <em>image_channel_data_type</em> values not specified in the description above or
   with (<em>x</em>, <em>y</em>) coordinate values that are not in the range (0 &#8230;&#8203; image
   width - 1, 0 &#8230;&#8203; image number of layers - 1), respectively, is undefined.</p></td>
@@ -2712,36 +3312,36 @@
   int4 <em>coord</em>,<br>
   half4 <em>color</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Write color value to location specified by coord.xyz in the 3D image
-  object specified by <em>image</em>.
-</p><p class="tableblock">  Appropriate data format conversion to the specified image format is done
+  object specified by <em>image</em>.</p>
+<p class="tableblock">  Appropriate data format conversion to the specified image format is done
   before writing the color value.
   coord.x, coord.y and coord.z are considered to be unnormalized coordinates
   and must be in the range 0 &#8230;&#8203; image width - 1, 0 &#8230;&#8203; image height - 1 and
-  0 &#8230;&#8203; image depth - 1.
-</p><p class="tableblock">  <strong>write_imageh</strong> can only be used with image objects created with
+  0 &#8230;&#8203; image depth - 1.</p>
+<p class="tableblock">  <strong>write_imageh</strong> can only be used with image objects created with
   image_channel_data_type set to one of the pre-defined packed formats or
   set to CL_SNORM_INT8, CL_UNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT16 or
-  CL_HALF_FLOAT.
-</p><p class="tableblock">  The behavior of <strong>write_imageh</strong> for image objects created with
+  CL_HALF_FLOAT.</p>
+<p class="tableblock">  The behavior of <strong>write_imageh</strong> for image objects created with
   image_channel_data_type values not specified in the description above or
   with (x, y, z) coordinate values that are not in the range (0 &#8230;&#8203; image
   width - 1, 0 &#8230;&#8203; image height - 1, 0 &#8230;&#8203; image depth - 1), respectively,
-  is undefined.
-</p><p class="tableblock">  Note: This built-in function is only available if the
+  is undefined.</p>
+<p class="tableblock">  Note: This built-in function is only available if the
   cl_khr_3d_image_writes extension is also supported by the device.</p></td>
 </tr>
 </tbody>
 </table>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_fp16-ieee754-compliance">2.1.12. IEEE754 Compliance</h4>
+<h4 id="cl_khr_fp16-ieee754-compliance">5.1.12. IEEE754 Compliance</h4>
 <div class="paragraph">
 <p>The following table entry describes the additions to <em>table 4.3,</em> which
 allows applications to query the configuration information using
 <strong>clGetDeviceInfo</strong> for an OpenCL device that supports half precision
 floating-point.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 25%;">
 <col style="width: 25%;">
@@ -2759,25 +3359,25 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_HALF_FP_CONFIG</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_device_fp_config</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Describes half precision floating-point capability of the OpenCL device.
-  This is a bit-field that describes one or more of the following values:
-</p><p class="tableblock">  CL_FP_DENORM&#8201;&#8212;&#8201;denorms are supported
-</p><p class="tableblock">  CL_FP_INF_NAN&#8201;&#8212;&#8201;INF and NaNs are supported
-</p><p class="tableblock">  CL_FP_ROUND_TO_NEAREST&#8201;&#8212;&#8201;round to nearest even rounding mode supported
-</p><p class="tableblock">  CL_FP_ROUND_TO_ZERO&#8201;&#8212;&#8201;round to zero rounding mode supported
-</p><p class="tableblock">  CL_FP_ROUND_TO_INF&#8201;&#8212;&#8201;round to positive and negative infinity rounding
-  modes supported
-</p><p class="tableblock">  CL_FP_FMA&#8201;&#8212;&#8201;IEEE754-2008 fused multiply-add is supported
-</p><p class="tableblock">  CL_FP_SOFT_FLOAT&#8201;&#8212;&#8201;Basic floating-point operations (such as addition,
-  subtraction, multiplication) are implemented in software.
-</p><p class="tableblock">  The required minimum half precision floating-point capability as
-  implemented by this extension is:
-</p><p class="tableblock">  CL_FP_ROUND_TO_ZERO, or CL_FP_ROUND_TO_NEAREST | CL_FP_INF_NAN.</p></td>
+  This is a bit-field that describes one or more of the following values:</p>
+<p class="tableblock">  CL_FP_DENORM&#8201;&#8212;&#8201;denorms are supported</p>
+<p class="tableblock">  CL_FP_INF_NAN&#8201;&#8212;&#8201;INF and NaNs are supported</p>
+<p class="tableblock">  CL_FP_ROUND_TO_NEAREST&#8201;&#8212;&#8201;round to nearest even rounding mode supported</p>
+<p class="tableblock">  CL_FP_ROUND_TO_ZERO&#8201;&#8212;&#8201;round to zero rounding mode supported</p>
+<p class="tableblock">  CL_FP_ROUND_TO_INF&#8201;&#8212;&#8201;round to positive and negative infinity rounding
+  modes supported</p>
+<p class="tableblock">  CL_FP_FMA&#8201;&#8212;&#8201;IEEE754-2008 fused multiply-add is supported</p>
+<p class="tableblock">  CL_FP_SOFT_FLOAT&#8201;&#8212;&#8201;Basic floating-point operations (such as addition,
+  subtraction, multiplication) are implemented in software.</p>
+<p class="tableblock">  The required minimum half precision floating-point capability as
+  implemented by this extension is:</p>
+<p class="tableblock">  CL_FP_ROUND_TO_ZERO, or CL_FP_ROUND_TO_NEAREST | CL_FP_INF_NAN.</p></td>
 </tr>
 </tbody>
 </table>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_fp16-rounding-modes">2.1.13. Rounding Modes</h4>
+<h4 id="cl_khr_fp16-rounding-modes">5.1.13. Rounding Modes</h4>
 <div class="paragraph">
 <p>If CL_FP_ROUND_TO_NEAREST is supported, the default rounding mode for
 half-precision floating-point operations will be round to nearest even;
@@ -2797,7 +3397,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_fp16-relative-error-as-ulps">2.1.14. Relative Error as ULPs</h4>
+<h4 id="cl_khr_fp16-relative-error-as-ulps">5.1.14. Relative Error as ULPs</h4>
 <div class="paragraph">
 <p>In this section we discuss the maximum relative error defined as <em>ulp</em>
 (units in the last place).</p>
@@ -2814,8 +3414,8 @@
 The reference value used to compute the ULP value of an arithmetic operation
 is the infinitely precise result.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 10. <em>ULP Values for Half Precision Floating-Point Arithmetic Operations</em></caption>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 11. <em>ULP Values for Half Precision Floating-Point Arithmetic Operations</em></caption>
 <colgroup>
 <col style="width: 33.3333%;">
 <col style="width: 33.3333%;">
@@ -3194,16 +3794,2068 @@
 In this case, the implementation will use the</em> <code>half</code> <em>scalar or vector data
 type as a storage only format</em>.</p>
 </div>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="cl_khr_gl_sharing">3. Creating an OpenCL Context from an OpenGL Context or Share Group</h2>
+<h2 id="cl_khr_fp64">6. Double Precision Floating-Point</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This section describes the <strong>cl_khr_fp64</strong> extension.
+This extension became an optional core feature in OpenCL 1.2.</p>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_fp64-additions-to-chapter-6">6.1. Additions to Chapter 6</h3>
+<div class="paragraph">
+<p>The list of built-in scalar, and vector data types defined in <em>tables 6.1</em>
+and <em>6.2</em> are extended to include the following:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 25%;">
+<col style="width: 75%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>double</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A double precision float.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>double2</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A 2-component double-precision floating-point vector.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>double3</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A 3-component double-precision floating-point vector.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>double4</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A 4-component double-precision floating-point vector.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>double8</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A 8-component double-precision floating-point vector.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>double16</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A 16-component double-precision floating-point vector.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The built-in scalar and vector data types for <code>doublen</code> are also declared as appropriate
+types in the OpenCL API (and header files) that can be used by an
+application.
+The following table describes the built-in scalar and vector data types for <code>doublen</code> as
+defined in the OpenCL C programming language and the corresponding data type
+available to the application:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Type in OpenCL Language</strong></th>
+<th class="tableblock halign-left valign-top"><strong>API type for application</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>double</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_double</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>double2</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_double2</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>double3</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_double3</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>double4</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_double4</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>double8</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_double8</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>double16</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_double16</strong></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The double data type must conform to the IEEE-754 double precision storage format.</p>
+</div>
+<div class="paragraph">
+<p>The following text is added to <em>Section 6.1.1.1 The half data type</em>:</p>
+</div>
+<div class="paragraph">
+<p>Conversions from double to half are correctly rounded.
+Conversions from half to double are lossless.</p>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_fp64-conversions">6.1.1. Conversions</h4>
+<div class="paragraph">
+<p>The implicit conversion rules specified in <em>section 6.2.1</em> now include the
+<code>double</code> scalar and <code>doublen</code> vector data types.</p>
+</div>
+<div class="paragraph">
+<p>The explicit casts described in <em>section 6.2.2</em> are extended to take a
+<code>double</code> scalar data type and a <code>doublen</code> vector data type.</p>
+</div>
+<div class="paragraph">
+<p>The explicit conversion functions described in <em>section 6.2.3</em> are extended
+to take a <code>double</code> scalar data type and a <code>doublen</code> vector data type.</p>
+</div>
+<div class="paragraph">
+<p>The <code>as_typen()</code> function for re-interpreting types as described in <em>section
+6.2.4.2</em> is extended to allow conversion-free casts between <code>longn</code>,
+<code>ulongn</code> and <code>doublen</code> scalar and vector data types.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_fp64-math-functions">6.1.2. Math Functions</h4>
+<div class="paragraph">
+<p>The built-in math functions defined in <em>table 6.8</em> (also listed below) are
+extended to include appropriate versions of functions that take <code>double</code> and
+<code>double{2|3|4|8|16}</code> as arguments and return values.
+<code>gentype</code> now also includes <code>double</code>, <code>double2</code>, <code>double3</code>, <code>double4</code>, <code>double8</code> and
+<code>double16</code>.</p>
+</div>
+<div class="paragraph">
+<p>For any specific use of a function, the actual type has to be the same for
+all arguments and the return type.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 12. <em>Double Precision Built-in Math Functions</em></caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>acos</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Arc cosine function.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>acosh</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Inverse hyperbolic cosine.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>acospi</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute <strong>acos</strong> (<em>x</em>) / π.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>asin</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Arc sine function.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>asinh</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Inverse hyperbolic sine.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>asinpi</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute <strong>asin</strong> (<em>x</em>) / π.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>atan</strong> (gentype <em>y_over_x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Arc tangent function.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>atan2</strong> (gentype <em>y</em>, gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Arc tangent of <em>y</em> / <em>x</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>atanh</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Hyperbolic arc tangent.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>atanpi</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute <strong>atan</strong> (<em>x</em>) / π.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>atan2pi</strong> (gentype <em>y</em>, gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute <strong>atan2</strong> (<em>y</em>, <em>x</em>) / π.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>cbrt</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute cube-root.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>ceil</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Round to integral value using the round to positive infinity rounding
+  mode.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>copysign</strong> (gentype <em>x</em>, gentype <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <em>x</em> with its sign changed to match the sign of <em>y</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>cos</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute cosine.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>cosh</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute hyperbolic cosine.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>cospi</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute <strong>cos</strong> (π <em>x</em>).</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>erfc</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Complementary error function.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>erf</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Error function encountered in integrating the normal distribution.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>exp</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute the base- e exponential of <em>x</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>exp2</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Exponential base 2 function.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>exp10</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Exponential base 10 function.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>expm1</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute <em>e<sup>x</sup></em>- 1.0.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>fabs</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute absolute value of a floating-point number.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>fdim</strong> (gentype <em>x</em>, gentype <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><em>x</em> - <em>y</em> if <em>x</em> &gt; <em>y</em>, +0 if x is less than or equal to y.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>floor</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Round to integral value using the round to negative infinity rounding
+  mode.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>fma</strong> (gentype <em>a</em>, gentype <em>b</em>, gentype <em>c</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the correctly rounded floating-point representation of the sum of
+  <em>c</em> with the infinitely precise product of <em>a</em> and <em>b</em>.
+  Rounding of intermediate products shall not occur.
+  Edge case behavior is per the IEEE 754-2008 standard.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>fmax</strong> (gentype <em>x</em>, gentype <em>y</em>)<br>
+  gentype <strong>fmax</strong> (gentype <em>x</em>, double <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <em>y</em> if <em>x</em> &lt; <em>y</em>, otherwise it returns <em>x</em>.
+  If one argument is a NaN, <strong>fmax()</strong> returns the other argument.
+  If both arguments are NaNs, <strong>fmax()</strong> returns a NaN.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>fmin</strong> (gentype <em>x</em>, gentype <em>y</em>)<br>
+  gentype <strong>fmin</strong> (gentype <em>x</em>, double <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <em>y</em> if <em>y</em> &lt; <em>x</em>, otherwise it returns <em>x</em>.
+  If one argument is a NaN, <strong>fmin()</strong> returns the other argument.
+  If both arguments are NaNs, <strong>fmin()</strong> returns a NaN.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>fmod</strong> (gentype <em>x</em>, gentype <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Modulus.
+  Returns <em>x</em> - <em>y</em> * <strong>trunc</strong> (<em>x</em>/<em>y</em>) .</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>fract</strong> (gentype <em>x</em>, __global gentype <strong><em>iptr</em>)<br>
+  gentype *fract</strong> (gentype <em>x</em>, __local gentype <strong><em>iptr</em>)<br>
+  gentype *fract</strong> (gentype <em>x</em>, __private gentype *<em>iptr</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <strong>fmin</strong>( <em>x</em> - <strong>floor</strong> (<em>x</em>), 0x1. fffffffffffffp-1 ).</p>
+<p class="tableblock">  <strong>floor</strong>(x) is returned in <em>iptr</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">double<em>n</em> <strong>frexp</strong> (double<em>n x</em>, __global int<em>n</em> <strong>exp)<br>
+  double<em>n</em> *frexp</strong> (double<em>n x</em>, __local int<em>n</em> <strong>exp)<br>
+  double<em>n</em> *frexp</strong> (double<em>n x</em>, __private int<em>n</em> <strong>exp)<br>
+  double *frexp</strong> (double <em>x</em>, __global int <strong>exp)<br>
+  double *frexp</strong> (double <em>x</em>, __local int <strong>exp)<br>
+  double *frexp</strong> (double <em>x</em>, __private int *exp)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extract mantissa and exponent from <em>x</em>.
+  For each component the mantissa returned is a float with magnitude in the
+  interval [1/2, 1) or 0.
+  Each component of <em>x</em> equals mantissa returned * 2<em><sup>exp</sup></em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>hypot</strong> (gentype <em>x</em>, gentype <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute the value of the square root of <em>x</em>2+ <em>y</em>2  without undue
+  overflow or underflow.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int<em>n</em> <strong>ilogb</strong> (double<em>n</em> <em>x</em>)<br>
+  int <strong>ilogb</strong> (double <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return the exponent as an integer value.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">double<em>n</em> <strong>ldexp</strong> (double<em>n</em> <em>x</em>, int<em>n</em> <em>k</em>)<br>
+  double<em>n</em> <strong>ldexp</strong> (double<em>n</em> <em>x</em>, int <em>k</em>)<br>
+  double <strong>ldexp</strong> (double <em>x</em>, int <em>k</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Multiply <em>x</em> by 2 to the power <em>k</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>lgamma</strong> (gentype <em>x</em>)<br>
+  double<em>n</em> <strong>lgamma_r</strong> (double<em>n</em> <em>x</em>, __global int<em>n</em> *<em>signp</em>)<br>
+  double<em>n</em> <strong>lgamma_r</strong> (double<em>n</em> <em>x</em>, __local int<em>n</em> *<em>signp</em>)<br>
+  double<em>n</em> <strong>lgamma_r</strong> (double<em>n</em> <em>x</em>, __private int<em>n</em> *<em>signp</em>)<br>
+  double <strong>lgamma_r</strong> (double <em>x</em>, __global int *<em>signp</em>)<br>
+  double <strong>lgamma_r</strong> (double <em>x</em>, __local int *<em>signp</em>)<br>
+  double <strong>lgamma_r</strong> (double <em>x</em>, __private int *<em>signp</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Log gamma function.
+  Returns the natural logarithm of the absolute value of the gamma function.
+  The sign of the gamma function is returned in the <em>signp</em> argument of
+  <strong>lgamma_r</strong>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>log</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute natural logarithm.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>log2</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute a base 2 logarithm.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>log10</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute a base 10 logarithm.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>log1p</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute log<sub>e</sub>(1.0 + <em>x</em>) .</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>logb</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute the exponent of <em>x</em>, which is the integral part of
+  log<em><sub>r</sub></em>|<em>x</em>|.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>mad</strong> (gentype <em>a</em>, gentype <em>b</em>, gentype <em>c</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>mad</strong> computes <em>a</em> * <em>b</em> + <em>c</em>.
+  The function may compute <em>a</em> * <em>b</em> + <em>c</em> with reduced accuracy
+  in the embedded profile.  See the SPIR-V OpenCL environment specification
+  for details. On some hardware the mad instruction may provide better
+  performance than expanded computation of <em>a</em> * <em>b</em> + <em>c</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>maxmag</strong> (gentype <em>x</em>, gentype <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <em>x</em> if |<em>x</em>| &gt; |<em>y</em>|, <em>y</em> if |<em>y</em>| &gt; |<em>x</em>|, otherwise
+  <strong>fmax</strong>(<em>x</em>, <em>y</em>).</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>minmag</strong> (gentype <em>x</em>, gentype <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <em>x</em> if |<em>x</em>| &lt; |<em>y</em>|, <em>y</em> if |<em>y</em>| &lt; |<em>x</em>|, otherwise
+  <strong>fmin</strong>(<em>x</em>, <em>y</em>).</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>modf</strong> (gentype <em>x</em>, __global gentype <strong><em>iptr</em>)<br>
+  gentype *modf</strong> (gentype <em>x</em>, __local gentype <strong><em>iptr</em>)<br>
+  gentype *modf</strong> (gentype <em>x</em>, __private gentype *<em>iptr</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Decompose a floating-point number.
+  The <strong>modf</strong> function breaks the argument <em>x</em> into integral and fractional
+  parts, each of which has the same sign as the argument.
+  It stores the integral part in the object pointed to by <em>iptr</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">double<em>n</em> <strong>nan</strong> (ulong<em>n nancode</em>)<br>
+  double <strong>nan</strong> (ulong <em>nancode</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns a quiet NaN.
+  The <em>nancode</em> may be placed in the significand of the resulting NaN.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>nextafter</strong> (gentype <em>x</em>, gentype <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Computes the next representable double-precision floating-point value
+  following <em>x</em> in the direction of <em>y</em>.
+  Thus, if <em>y</em> is less than <em>x</em>, <strong>nextafter</strong>() returns the largest
+  representable floating-point number less than <em>x</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>pow</strong> (gentype <em>x</em>, gentype <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute <em>x</em> to the power <em>y</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">double<em>n</em> <strong>pown</strong> (double<em>n</em> <em>x</em>, int<em>n</em> <em>y</em>)<br>
+  double <strong>pown</strong> (double <em>x</em>, int <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute <em>x</em> to the power <em>y</em>, where <em>y</em> is an integer.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>powr</strong> (gentype <em>x</em>, gentype <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute <em>x</em> to the power <em>y</em>, where <em>x</em> is &gt;= 0.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>remainder</strong> (gentype <em>x</em>, gentype <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute the value <em>r</em> such that <em>r</em> = <em>x</em> - <em>n</em>*<em>y</em>, where <em>n</em> is the
+  integer nearest the exact value of <em>x</em>/<em>y</em>.
+  If there are two integers closest to <em>x</em>/<em>y</em>, <em>n</em> shall be the even one.
+  If <em>r</em> is zero, it is given the same sign as <em>x</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">double<em>n</em> <strong>remquo</strong> (double<em>n</em> <em>x</em>, double<em>n</em> <em>y</em>, __global int<em>n</em> *<em>quo</em>)<br>
+  double<em>n</em> <strong>remquo</strong> (double<em>n</em> <em>x</em>, double<em>n</em> <em>y</em>, __local int<em>n</em> *<em>quo</em>)<br>
+  double<em>n</em> <strong>remquo</strong> (double<em>n</em> <em>x</em>, double<em>n</em> <em>y</em>, __private int<em>n</em> *<em>quo</em>)<br>
+  double <strong>remquo</strong> (double <em>x</em>, double <em>y</em>, __global int *<em>quo</em>)<br>
+  double <strong>remquo</strong> (double <em>x</em>, double <em>y</em>, __local int *<em>quo</em>)<br>
+  double <strong>remquo</strong> (double <em>x</em>, double <em>y</em>, __private int *<em>quo</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The <strong>remquo</strong> function computes the value r such that <em>r</em> = <em>x</em> - <em>k</em>*<em>y</em>,
+  where <em>k</em> is the integer nearest the exact value of <em>x</em>/<em>y</em>.
+  If there are two integers closest to <em>x</em>/<em>y</em>, <em>k</em> shall be the even one.
+  If <em>r</em> is zero, it is given the same sign as <em>x</em>.
+  This is the same value that is returned by the <strong>remainder</strong> function.
+  <strong>remquo</strong> also calculates the lower seven bits of the integral quotient
+  <em>x</em>/<em>y</em>, and gives that value the same sign as <em>x</em>/<em>y</em>.
+  It stores this signed value in the object pointed to by <em>quo</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>rint</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Round to integral value (using round to nearest even rounding mode) in
+  floating-point format.
+  Refer to section 7.1 for description of rounding modes.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">double<em>n</em> <strong>rootn</strong> (double<em>n</em> <em>x</em>, int<em>n</em> <em>y</em>)<br>
+  double<em>n</em> <strong>rootn</strong> (double <em>x</em>, int <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute <em>x</em> to the power 1/<em>y</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>round</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return the integral value nearest to <em>x</em> rounding halfway cases away from
+  zero, regardless of the current rounding direction.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>rsqrt</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute inverse square root.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sin</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute sine.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sincos</strong> (gentype <em>x</em>, __global gentype <strong><em>cosval</em>)<br>
+  gentype *sincos</strong> (gentype <em>x</em>, __local gentype <strong><em>cosval</em>)<br>
+  gentype *sincos</strong> (gentype <em>x</em>, __private gentype *<em>cosval</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute sine and cosine of x.
+  The computed sine is the return value and computed cosine is returned in
+  <em>cosval</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sinh</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute hyperbolic sine.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sinpi</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute <strong>sin</strong> (π <em>x</em>).</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sqrt</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute square root.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>tan</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute tangent.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>tanh</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute hyperbolic tangent.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>tanpi</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute <strong>tan</strong> (π <em>x</em>).</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>tgamma</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute the gamma function.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>trunc</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Round to integral value using the round to zero rounding mode.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>In addition, the following symbolic constant will also be available:</p>
+</div>
+<div class="paragraph">
+<p><strong>HUGE_VAL</strong> - A positive double expression that evaluates to infinity.
+Used as an error value returned by the built-in math functions.</p>
+</div>
+<div class="paragraph">
+<p>The <strong>FP_FAST_FMA</strong> macro indicates whether the <strong>fma()</strong> family of
+functions are fast compared with direct code for double precision
+floating-point.
+If defined, the <strong>FP_FAST_FMA</strong> macro shall indicate that the <strong>fma()</strong>
+function generally executes about as fast as, or faster than, a multiply and
+an add of <strong>double</strong> operands.</p>
+</div>
+<div class="paragraph">
+<p>The macro names given in the following list must use the values specified.
+These constant expressions are suitable for use in #if preprocessing
+directives.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c"><span class="preprocessor">#define</span> DBL_DIG             <span class="integer">15</span>
+<span class="preprocessor">#define</span> DBL_MANT_DIG        <span class="integer">53</span>
+<span class="preprocessor">#define</span> DBL_MAX_10_EXP      +<span class="integer">308</span>
+<span class="preprocessor">#define</span> DBL_MAX_EXP         +<span class="integer">1024</span>
+<span class="preprocessor">#define</span> DBL_MIN_10_EXP      -<span class="integer">307</span>
+<span class="preprocessor">#define</span> DBL_MIN_EXP         -<span class="integer">1021</span>
+<span class="preprocessor">#define</span> DBL_RADIX           <span class="integer">2</span>
+<span class="preprocessor">#define</span> DBL_MAX             <span class="hex">0x1</span>.fffffffffffffp1023
+<span class="preprocessor">#define</span> DBL_MIN             <span class="hex">0x1</span><span class="float">.0</span>p-<span class="integer">1022</span>
+<span class="preprocessor">#define</span> DBL_EPSILON         <span class="hex">0x1</span><span class="float">.0</span>p-<span class="integer">52</span></code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The following table describes the built-in macro names given above in the
+OpenCL C programming language and the corresponding macro names available to
+the application.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Macro in OpenCL Language</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Macro for application</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>DBL_DIG</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DBL_DIG</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>DBL_MANT_DIG</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DBL_MANT_DIG</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>DBL_MAX_10_EXP</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DBL_MAX_10_EXP</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>DBL_MAX_EXP</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DBL_MAX_EXP</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>DBL_MIN_10_EXP</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DBL_MIN_10_EXP</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>DBL_MIN_EXP</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DBL_MIN_EXP</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>DBL_RADIX</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DBL_RADIX</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>DBL_MAX</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DBL_MAX</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>DBL_MIN</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DBL_MIN</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>DBL_EPSILSON</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DBL_EPSILON</strong></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The following constants are also available.
+They are of type <code>double</code> and are accurate within the precision of the <code>double</code>
+type.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Constant</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>M_E</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Value of e</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>M_LOG2E</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Value of log<sub>2</sub>e</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>M_LOG10E</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Value of log<sub>10</sub>e</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>M_LN2</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Value of log<sub>e</sub>2</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>M_LN10</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Value of log<sub>e</sub>10</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>M_PI</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Value of π</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>M_PI_2</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Value of π / 2</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>M_PI_4</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Value of π / 4</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>M_1_PI</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Value of 1 / π</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>M_2_PI</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Value of 2 / π</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>M_2_SQRTPI</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Value of 2 / √π</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>M_SQRT2</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Value of √2</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>M_SQRT1_2</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Value of 1 / √2</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_fp64-common-functions">6.1.3. Common Functions</h4>
+<div class="paragraph">
+<p>The built-in common functions defined in <em>table 6.12</em> (also listed below)
+are extended to include appropriate versions of functions that take <code>double</code>
+and <code>double{2|3|4|8|16}</code> as arguments and return values.
+gentype now also includes <code>double</code>, <code>double2</code>, <code>double3</code>, <code>double4</code>, <code>double8</code> and
+<code>double16</code>.
+These are described below.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 13. Double Precision Built-in Common Functions</caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>clamp</strong> (<br>
+  gentype <em>x</em>, gentype <em>minval</em>, gentype <em>maxval</em>)</p>
+<p class="tableblock">  gentype <strong>clamp</strong> (<br>
+  gentype <em>x</em>, double <em>minval</em>, double <em>maxval</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <strong>min</strong>(<strong>max</strong>(<em>x</em>, <em>minval</em>), <em>maxval</em>).</p>
+<p class="tableblock">  Results are undefined if <em>minval</em> &gt; <em>maxval</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>degrees</strong> (gentype <em>radians</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Converts <em>radians</em> to degrees,<br>
+  i.e. (180 / π) * <em>radians</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>max</strong> (gentype <em>x</em>, gentype <em>y</em>)<br>
+  gentype <strong>max</strong> (gentype <em>x</em>, double <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <em>y</em> if <em>x</em> &lt; <em>y</em>, otherwise it returns <em>x</em>.
+  If <em>x</em> and <em>y</em> are infinite or NaN, the return values are undefined.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>min</strong> (gentype <em>x</em>, gentype <em>y</em>)<br>
+  gentype <strong>min</strong> (gentype <em>x</em>, double <em>y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <em>y</em> if <em>y</em> &lt; <em>x</em>, otherwise it returns <em>x</em>.
+  If <em>x</em> and <em>y</em> are infinite or NaN, the return values are undefined.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>mix</strong> (gentype <em>x</em>, gentype <em>y</em>, gentype <em>a</em>)<br>
+  gentype <strong>mix</strong> (gentype <em>x</em>, gentype <em>y</em>, double <em>a</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the linear blend of <em>x</em> and <em>y</em> implemented as:</p>
+<p class="tableblock">  <em>x</em> + (<em>y</em> - <em>x)</em> * <em>a</em></p>
+<p class="tableblock">  <em>a</em> must be a value in the range 0.0 &#8230;&#8203; 1.0.
+  If <em>a</em> is not in the range 0.0 &#8230;&#8203; 1.0, the return values are undefined.</p>
+<p class="tableblock">  Note: The double precision <strong>mix</strong> function can be implemented using contractions such as <strong>mad</strong> or <strong>fma</strong>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>radians</strong> (gentype <em>degrees</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Converts <em>degrees</em> to radians, i.e. (π / 180) * <em>degrees</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>step</strong> (gentype <em>edge</em>, gentype <em>x</em>)<br>
+  gentype <strong>step</strong> (double <em>edge</em>, gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns 0.0 if <em>x</em> &lt; <em>edge</em>, otherwise it returns 1.0.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>smoothstep</strong> (<br>
+  gentype <em>edge0</em>, gentype <em>edge1</em>, gentype <em>x</em>)<br></p>
+<p class="tableblock">  gentype <strong>smoothstep</strong> (<br>
+  double <em>edge0</em>, double <em>edge1</em>, gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns 0.0 if <em>x</em> &lt;= <em>edge0</em> and 1.0 if <em>x</em> &gt;= <em>edge1</em> and performs
+  smooth Hermite interpolation between 0 and 1 when <em>edge0</em> &lt; <em>x</em> &lt; <em>edge1</em>.
+  This is useful in cases where you would want a threshold function with a
+  smooth transition.</p>
+<p class="tableblock">  This is equivalent to:</p>
+<p class="tableblock">  gentype <em>t</em>;<br>
+  <em>t</em> = clamp ((<em>x</em> - <em>edge0</em>) / (<em>edge1</em> - <em>edge0</em>), 0, 1);<br>
+  return <em>t</em> * <em>t</em> * (3 - 2 * <em>t</em>);<br></p>
+<p class="tableblock">  Results are undefined if <em>edge0</em> &gt;= <em>edge1</em>.</p>
+<p class="tableblock">  Note: The double precision <strong>smoothstep</strong> function can be implemented using contractions such as <strong>mad</strong> or <strong>fma</strong>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sign</strong> (gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns 1.0 if <em>x</em> &gt; 0, -0.0 if <em>x</em> = -0.0, +0.0 if <em>x</em> = +0.0, or -1.0 if
+  <em>x</em> &lt; 0.
+  Returns 0.0 if <em>x</em> is a NaN.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_fp64-geometric-functions">6.1.4. Geometric Functions</h4>
+<div class="paragraph">
+<p>The built-in geometric functions defined in <em>table 6.13</em> (also listed below)
+are extended to include appropriate versions of functions that take <code>double</code>
+and <code>double{2|3|4}</code> as arguments and return values.
+gentype now also includes <code>double</code>, <code>double2</code>, <code>double3</code> and <code>double4</code>.
+These are described below.</p>
+</div>
+<div class="paragraph">
+<p>Note: The double precision geometric functions can be implemented using
+contractions such as <strong>mad</strong> or <strong>fma</strong>.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 14. <em>Double Precision Built-in Geometric Functions</em></caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">double4 <strong>cross</strong> (double4 <em>p0</em>, double4 <em>p1</em>)<br>
+  double3 <strong>cross</strong> (double3 <em>p0</em>, double3 <em>p1</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the cross product of <em>p0.xyz</em> and <em>p1.xyz</em>.
+  The <em>w</em> component of the result will be 0.0.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">double <strong>dot</strong> (gentype <em>p0</em>, gentype <em>p1</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compute the dot product of <em>p0</em> and <em>p1</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">double <strong>distance</strong> (gentype <em>p0</em>, gentype <em>p1</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the distance between <em>p0</em> and <em>p1</em>.
+  This is calculated as <strong>length</strong>(<em>p0</em> - <em>p1</em>).</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">double <strong>length</strong> (gentype <em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return the length of vector x, i.e.,<br>
+  sqrt( <em>p.x</em><sup>2</sup> + <em>p.y</em><sup>2</sup> + &#8230;&#8203; )</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>normalize</strong> (gentype <em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns a vector in the same direction as <em>p</em> but with a length of 1.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_fp64-relational-functions">6.1.5. Relational Functions</h4>
+<div class="paragraph">
+<p>The scalar and vector relational functions described in <em>table 6.14</em> are
+extended to include versions that take <code>double</code>, <code>double2</code>, <code>double3</code>, <code>double4</code>,
+<code>double8</code> and <code>double16</code> as arguments.</p>
+</div>
+<div class="paragraph">
+<p>The relational and equality operators (&lt;, &lt;=, &gt;, &gt;=, !=, ==) can be used
+with <code>doublen</code> vector types and shall produce a vector <code>longn</code> result as
+described in <em>section 6.3</em>.</p>
+</div>
+<div class="paragraph">
+<p>The functions <strong>isequal</strong>, <strong>isnotequal</strong>, <strong>isgreater</strong>, <strong>isgreaterequal</strong>,
+<strong>isless</strong>, <strong>islessequal</strong>, <strong>islessgreater</strong>, <strong>isfinite</strong>, <strong>isinf</strong>, <strong>isnan</strong>,
+<strong>isnormal</strong>, <strong>isordered</strong>, <strong>isunordered</strong> and <strong>signbit</strong> shall return a 0 if the
+specified relation is <em>false</em> and a 1 if the specified relation is true for
+scalar argument types.
+These functions shall return a 0 if the specified relation is <em>false</em> and a
+-1 (i.e. all bits set) if the specified relation is <em>true</em> for vector
+argument types.</p>
+</div>
+<div class="paragraph">
+<p>The relational functions <strong>isequal</strong>, <strong>isgreater</strong>, <strong>isgreaterequal</strong>, <strong>isless</strong>,
+<strong>islessequal</strong>, and <strong>islessgreater</strong> always return 0 if either argument is not
+a number (NaN).
+<strong>isnotequal</strong> returns 1 if one or both arguments are not a number (NaN) and
+the argument type is a scalar and returns -1 if one or both arguments are
+not a number (NaN) and the argument type is a vector.</p>
+</div>
+<div class="paragraph">
+<p>The functions described in <em>table 6.14</em> are extended to include the <code>doublen`</code>
+vector types.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 15. <em>Double Precision Relational Functions</em></caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>isequal</strong> (double <em>x</em>, double <em>y</em>)<br>
+  long<em>n</em> <strong>isequal</strong> (double<em>n x</em>, double<em>n y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the component-wise compare of <em>x</em> == <em>y</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>isnotequal</strong> (double <em>x</em>, double <em>y</em>)<br>
+  long<em>n</em> <strong>isnotequal</strong> (double<em>n x</em>, double<em>n y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the component-wise compare of <em>x</em> != <em>y</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>isgreater</strong> (double <em>x</em>, double <em>y</em>)
+  long<em>n</em> <strong>isgreater</strong> (double<em>n x</em>, double<em>n y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the component-wise compare of <em>x</em> &gt; <em>y</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>isgreaterequal</strong> (double <em>x</em>, double <em>y</em>)<br>
+  long<em>n</em> <strong>isgreaterequal</strong> (double<em>n x</em>, double<em>n y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the component-wise compare of <em>x</em> &gt;= <em>y</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>isless</strong> (double <em>x</em>, double <em>y</em>)<br>
+  long<em>n</em> <strong>isless</strong> (double<em>n x</em>, double<em>n y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the component-wise compare of <em>x</em> &lt; <em>y</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>islessequal</strong> (double <em>x</em>, double <em>y</em>)<br>
+  long<em>n</em> <strong>islessequal</strong> (double<em>n x</em>, double<em>n y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the component-wise compare of <em>x</em> &lt;= <em>y</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>islessgreater</strong> (double <em>x</em>, double <em>y</em>)<br>
+  long<em>n</em> <strong>islessgreater</strong> (double<em>n x</em>, double<em>n y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the component-wise compare of (<em>x</em> &lt; <em>y</em>) || (<em>x</em> &gt; <em>y</em>) .</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>isfinite</strong> (double)<br>
+  long<em>n</em> <strong>isfinite</strong> (double<em>n</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for finite value.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>isinf</strong> (double)<br>
+  long<em>n</em> <strong>isinf</strong> (double<em>n</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for infinity value (positive or negative) .</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>isnan</strong> (double)<br>
+  long<em>n</em> <strong>isnan</strong> (double<em>n</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for a NaN.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>isnormal</strong> (double)<br>
+  long<em>n</em> <strong>isnormal</strong> (double<em>n</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for a normal value.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>isordered</strong> (double <em>x</em>, double <em>y</em>)<br>
+  long<em>n</em> <strong>isordered</strong> (double<em>n x</em>, double<em>n y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test if arguments are ordered.
+  <strong>isordered</strong>() takes arguments <em>x</em> and <em>y</em>, and returns the result
+  <strong>isequal</strong>(<em>x</em>, <em>x</em>) &amp;&amp; <strong>isequal</strong>(<em>y</em>, <em>y</em>).</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>isunordered</strong> (double <em>x</em>, double <em>y</em>)<br>
+  long<em>n</em> <strong>isunordered</strong> (double<em>n x</em>, double<em>n y</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test if arguments are unordered.
+  <strong>isunordered</strong>() takes arguments <em>x</em> and <em>y</em>, returning non-zero if <em>x</em> or
+  <em>y</em> is a NaN, and zero otherwise.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>signbit</strong> (double)<br>
+  long<em>n</em> <strong>signbit</strong> (double<em>n</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for sign bit.
+  The scalar version of the function returns a 1 if the sign bit in the double
+  is set else returns 0.
+  The vector version of the function returns the following for each
+  component in double<em>n</em>: -1 (i.e all bits set) if the sign bit in the double
+  is set else returns 0.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">double<em>n</em> <strong>bitselect</strong> (double<em>n a</em>, double<em>n b</em>, double<em>n c</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Each bit of the result is the corresponding bit of <em>a</em> if the
+  corresponding bit of <em>c</em> is 0.
+  Otherwise it is the corresponding bit of <em>b</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">double<em>n</em> <strong>select</strong> (double<em>n a</em>, double<em>n b</em>, long<em>n c</em>)<br>
+  double<em>n</em> <strong>select</strong> (double<em>n a</em>, double<em>n b</em>, ulong<em>n c</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">For each component,<br>
+  <em>result[i]</em> = if MSB of <em>c[i]</em> is set ? <em>b[i]</em> : <em>a[i]</em>.<br></p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_fp64-vector-data-load-and-store-functions">6.1.6. Vector Data Load and Store Functions</h4>
+<div class="paragraph">
+<p>The vector data load (<strong>vload<em>n</em></strong>) and store (<strong>vstore<em>n</em></strong>) functions
+described in <em>table 6.13</em> (also listed below) are extended to include
+versions that read from or write to double scalar or vector values.
+The generic type <code>gentype</code> is extended to include <code>double</code>.
+The generic type <code>gentypen</code> is extended to include <code>double2</code>, <code>double3</code>,
+<code>double4</code>, <code>double8</code> and <code>double16</code>.
+The <strong>vstore_half</strong>, <strong>vstore_half<em>n </em></strong>and <strong>vstorea_half<em>n </em></strong>
+functions are extended to allow a double precision scalar or vector
+value to be written to memory as half values.</p>
+</div>
+<div class="paragraph">
+<p>Note: <strong>vload3</strong> reads (<em>x</em>,<em>y</em>,<em>z</em>) components from address
+<code>(<em>p</em> + (<em>offset</em> * 3))</code> into a 3-component vector.
+<strong>vstore3</strong>, and <strong>vstore_half3</strong> write (<em>x</em>,<em>y</em>,<em>z</em>) components from a
+3-component vector to address <code>(<em>p</em> + (<em>offset</em> * 3))</code>.
+In addition, <strong>vloada_half3</strong> reads (<em>x</em>,<em>y</em>,<em>z</em>) components from address
+<code>(<em>p</em> + (<em>offset</em> * 4))</code> into a 3-component vector and <strong>vstorea_half3</strong>
+writes (<em>x</em>,<em>y</em>,<em>z</em>) components from a 3-component vector to address
+<code>(<em>p</em> + (<em>offset</em> * 4))</code>.
+Whether <strong>vloada_half3</strong> and <strong>vstorea_half3</strong> read/write padding data
+between the third vector element and the next alignment boundary is
+implementation defined.
+<strong>vloada_</strong> and <strong>vstoreaa_</strong> variants are provided to access data that is
+aligned to the size of the vector, and are intended to enable performance
+on hardware that can take advantage of the increased alignment.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 16. <em>Double Precision Vector Data Load and Store Functions</em></caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype<em>n</em> <strong>vload<em>n</em></strong>(size_t <em>offset</em>, const __global gentype *<em>p</em>)</p>
+<p class="tableblock">  gentype<em>n</em> <strong>vload<em>n</em></strong>(size_t <em>offset</em>, const __local gentype *<em>p</em>)</p>
+<p class="tableblock">  gentype<em>n</em> <strong>vload<em>n</em></strong>(size_t <em>offset</em>, const __constant gentype *<em>p</em>)</p>
+<p class="tableblock">  gentype<em>n</em> <strong>vload<em>n</em></strong>(size_t <em>offset</em>, const __private gentype *<em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return sizeof (gentype<em>n</em>) bytes of data read from address
+  (<em>p</em> + (<em>offset * n</em>)).
+  The read address computed as (<em>p</em> + (<em>offset * n</em>)) must be 8-bit aligned
+  if gentype is char, uchar; 16-bit aligned if gentype is short, ushort;
+  32-bit aligned if gentype is int, uint, float; 64-bit aligned if
+  gentype is long, ulong or double.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>vstore<em>n</em></strong>(gentype<em>n</em> <em>data</em>, size_t <em>offset</em>, __global gentype *<em>p</em>)</p>
+<p class="tableblock">  void <strong>vstore<em>n</em></strong>(gentype<em>n</em> <em>data</em>, size_t <em>offset</em>, __local gentype *<em>p</em>)</p>
+<p class="tableblock">  void <strong>vstore<em>n</em></strong>(gentype<em>n</em> <em>data</em>, size_t <em>offset</em>, __private gentype *<em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Write sizeof (gentype<em>n</em>) bytes given by <em>data</em> to address
+  (<em>p</em> + (<em>offset * n</em>)).
+  The address computed as (<em>p</em> + (<em>offset * n</em>)) must be 8-bit aligned
+  if gentype is char, uchar; 16-bit aligned if gentype is short, ushort;
+  32-bit aligned if gentype is int, uint, float; 64-bit aligned
+  if gentype is long, ulong or double.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>vstore_half</strong>(double <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br>
+  void <strong>vstore_half_rte</strong>(double <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br>
+  void <strong>vstore_half_rtz</strong>(double <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br>
+  void <strong>vstore_half_rtp</strong>(double <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br>
+  void <strong>vstore_half_rtn</strong>(double <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br></p>
+<p class="tableblock">  void <strong>vstore_half</strong>(double <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br>
+  void <strong>vstore_half_rte</strong>(double <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br>
+  void <strong>vstore_half_rtz</strong>(double <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br>
+  void <strong>vstore_half_rtp</strong>(double <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br>
+  void <strong>vstore_half_rtn</strong>(double <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br></p>
+<p class="tableblock">  void <strong>vstore_half</strong>(double <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)<br>
+  void <strong>vstore_half_rte</strong>(double <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)<br>
+  void <strong>vstore_half_rtz</strong>(double <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)<br>
+  void <strong>vstore_half_rtp</strong>(double <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)<br>
+  void <strong>vstore_half_rtn</strong>(double <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The double value given by <em>data</em> is first converted to a half value
+  using the appropriate rounding mode.
+  The half value is then written to the address computed as
+  (<em>p</em> + <em>offset</em>).
+  The address computed as (<em>p</em> + <em>offset</em>) must be 16-bit aligned.</p>
+<p class="tableblock">  <strong>vstore_half</strong> uses the current rounding mode.
+  The default current rounding mode is round to nearest even.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>vstore_half<em>n</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rte</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtz</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtp</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtn</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br></p>
+<p class="tableblock">  void <strong>vstore_half<em>n</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rte</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtz</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtp</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtn</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br></p>
+<p class="tableblock">  void <strong>vstore_half<em>n</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rte</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtz</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtp</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)<br>
+  void <strong>vstore_half<em>n</em>_rtn</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The double<em>n</em> value given by <em>data</em> is converted to a half<em>n</em> value
+  using the appropriate rounding mode.
+  The half<em>n </em>value is then written to the address computed as
+  (<em>p</em> + (<em>offset * n</em>)).
+  The address computed as (<em>p</em> + (<em>offset * n</em>)) must be 16-bit
+  aligned.</p>
+<p class="tableblock">  <strong>vstore_half<em>n </em></strong>uses the current rounding mode.
+  The default current rounding mode is round to nearest even.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>vstorea_half<em>n</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rte</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtz</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtp</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtn</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __global half *<em>p</em>)<br></p>
+<p class="tableblock">  void <strong>vstorea_half<em>n</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rte</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtz</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtp</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtn</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __local half *<em>p</em>)<br></p>
+<p class="tableblock">  void <strong>vstorea_half<em>n</em></strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rte</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtz</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtp</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)<br>
+  void <strong>vstorea_half<em>n</em>_rtn</strong>(double<em>n</em> <em>data</em>, size_t <em>offset</em>, __private half *<em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The double<em>n</em> value is converted to a half<em>n</em> value
+  using the appropriate rounding mode.</p>
+<p class="tableblock">  For n = 1, 2, 4, 8 or 16, the half<em>n</em> value is written to the
+  address computed as
+  (<em>p</em> + (<em>offset * n</em>)).
+  The address computed as (<em>p</em> + (<em>offset * n</em>)) must be aligned to
+  sizeof (half<em>n</em>) bytes.</p>
+<p class="tableblock">  For n = 3, the half<em>3</em> value is written to the address computed as
+  (<em>p</em> + (<em>offset * 4</em>)).
+  The address computed as (<em>p</em> + (<em>offset * 4</em>)) must be aligned to
+  sizeof (half) * 4 bytes.</p>
+<p class="tableblock">  <strong>vstorea_half<em>n</em></strong> uses the current rounding mode.
+  The default current rounding mode is round to nearest even.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_fp64-async-copies-from-global-to-local-memory-local-to-global-memory-and-prefetch">6.1.7. Async Copies from Global to Local Memory, Local to Global Memory, and Prefetch</h4>
+<div class="paragraph">
+<p>The OpenCL C programming language implements the following functions that
+provide asynchronous copies between global and local memory and a prefetch
+from global memory.</p>
+</div>
+<div class="paragraph">
+<p>The generic type gentype is extended to include <code>double</code>, <code>double2</code>, <code>double3</code>,
+<code>double4</code>, <code>double8</code> and <code>double16</code>.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 17. <em>Double Precision Built-in Async Copy and Prefetch Functions</em></caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">event_t <strong>async_work_group_copy</strong> (<br>
+  __local gentype *<em>dst</em>,<br>
+  const __global gentype *<em>src</em>,<br>
+  size_t <em>num_gentypes</em>, event_t <em>event</em>)</p>
+<p class="tableblock">  event_t <strong>async_work_group_copy</strong> (<br>
+  __global gentype <em>*dst</em>,<br>
+  const __local gentype *<em>src</em>,<br>
+  size_t <em>num_gentypes</em>, event_t <em>event</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Perform an async copy of <em>num_gentypes</em> gentype elements from <em>src</em> to
+  <em>dst</em>.
+  The async copy is performed by all work-items in a work-group and this
+  built-in function must therefore be encountered by all work-items in a
+  work-group executing the kernel with the same argument values; otherwise
+  the results are undefined.</p>
+<p class="tableblock">  Returns an event object that can be used by <strong>wait_group_events</strong> to wait
+  for the async copy to finish.
+  The <em>event</em> argument can also be used to associate the
+  <strong>async_work_group_copy</strong> with a previous async copy allowing an event to be
+  shared by multiple async copies; otherwise <em>event</em> should be zero.</p>
+<p class="tableblock">  If <em>event</em> argument is not zero, the event object supplied in <em>event</em>
+  argument will be returned.</p>
+<p class="tableblock">  This function does not perform any implicit synchronization of source data
+  such as using a <strong>barrier</strong> before performing the copy.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">event_t <strong>async_work_group_strided_copy</strong> (<br>
+  __local gentype <em>*dst</em>,<br>
+  const __global gentype *<em>src</em>,<br>
+  size_t <em>num_gentypes</em>,<br>
+  size_t <em>src_stride</em>, event_t <em>event</em>)</p>
+<p class="tableblock">  event_t <strong>async_work_group_strided_copy</strong> (<br>
+  __global gentype <em>*dst</em>,<br>
+  const __local gentype *<em>src</em>,<br>
+  size_t <em>num_gentypes</em>,<br>
+  size_t <em>dst_stride</em>, event_t <em>event</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Perform an async gather of <em>num_gentypes</em> gentype elements from <em>src</em> to
+  <em>dst</em>.
+  The <em>src_stride</em> is the stride in elements for each gentype element read
+  from <em>src</em>.
+  The async gather is performed by all work-items in a work-group and this
+  built-in function must therefore be encountered by all work-items in a
+  work-group executing the kernel with the same argument values; otherwise
+  the results are undefined.</p>
+<p class="tableblock">  Returns an event object that can be used by <strong>wait_group_events</strong> to wait
+  for the async copy to finish.
+  The <em>event</em> argument can also be used to associate the
+  <strong>async_work_group_strided_copy</strong> with a previous async copy allowing an
+  event to be shared by multiple async copies; otherwise <em>event</em> should be
+  zero.</p>
+<p class="tableblock">  If <em>event</em> argument is not zero, the event object supplied in <em>event</em>
+  argument will be returned.</p>
+<p class="tableblock">  This function does not perform any implicit synchronization of source data
+  such as using a <strong>barrier</strong> before performing the copy.</p>
+<p class="tableblock">  The behavior of <strong>async_work_group_strided_copy</strong> is undefined if
+  <em>src_stride</em> or <em>dst_stride</em> is 0, or if the <em>src_stride</em> or <em>dst_stride</em>
+  values cause the <em>src</em> or <em>dst</em> pointers to exceed the upper bounds of the
+  address space during the copy.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>wait_group_events</strong> (<br>
+  int <em>num_events</em>, event_t *<em>event_list</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Wait for events that identify the <strong>async_work_group_copy</strong> operations to
+  complete.
+  The event objects specified in <em>event_list</em> will be released after the
+  wait is performed.</p>
+<p class="tableblock">  This function must be encountered by all work-items in a work-group
+  executing the kernel with the same <em>num_events</em> and event objects
+  specified in <em>event_list</em>; otherwise the results are undefined.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>prefetch</strong> (<br>
+  const __global gentype *<em>p</em>, size_t <em>num_gentypes</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Prefetch <em>num_gentypes</em> * sizeof(gentype) bytes into the global cache.
+  The prefetch instruction is applied to a work-item in a work-group and
+  does not affect the functional behavior of the kernel.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_fp64-ieee754-compliance">6.1.8. IEEE754 Compliance</h4>
+<div class="paragraph">
+<p>The following table entry describes the additions to <em>table 4.3,</em> which
+allows applications to query the configuration information using
+<strong>clGetDeviceInfo</strong> for an OpenCL device that supports double precision
+floating-point.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Op-code</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_DOUBLE_FP_CONFIG</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">cl_device_fp_config</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Describes double precision floating-point capability of the OpenCL device.
+  This is a bit-field that describes one or more of the following values:</p>
+<p class="tableblock">  CL_FP_DENORM&#8201;&#8212;&#8201;denorms are supported</p>
+<p class="tableblock">  CL_FP_INF_NAN&#8201;&#8212;&#8201;INF and NaNs are supported</p>
+<p class="tableblock">  CL_FP_ROUND_TO_NEAREST&#8201;&#8212;&#8201;round to nearest even rounding mode supported</p>
+<p class="tableblock">  CL_FP_ROUND_TO_ZERO&#8201;&#8212;&#8201;round to zero rounding mode supported</p>
+<p class="tableblock">  CL_FP_ROUND_TO_INF&#8201;&#8212;&#8201;round to positive and negative infinity rounding
+  modes supported</p>
+<p class="tableblock">  CL_FP_FMA&#8201;&#8212;&#8201;IEEE754-2008 fused multiply-add is supported</p>
+<p class="tableblock">  CL_FP_SOFT_FLOAT&#8201;&#8212;&#8201;Basic floating-point operations (such as addition,
+  subtraction, multiplication) are implemented in software.</p>
+<p class="tableblock">  The required minimum double precision floating-point capability as
+  implemented by this extension is:</p>
+<p class="tableblock">  CL_FP_FMA |<br>
+  CL_FP_ROUND_TO_NEAREST |<br>
+  CL_FP_ROUND_TO_ZERO |<br>
+  CL_FP_ROUND_TO_INF |<br>
+  CL_FP_INF_NAN |<br>
+  CL_FP_DENORM.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>IEEE754 fused multiply-add, denorms, INF and NaNs are required to be
+supported for double precision floating-point numbers and operations
+on double precision floating-point numbers.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_fp64-relative-error-as-ulps">6.1.9. Relative Error as ULPs</h4>
+<div class="paragraph">
+<p>In this section we discuss the maximum relative error defined as <em>ulp</em>
+(units in the last place).</p>
+</div>
+<div class="paragraph">
+<p>Addition, subtraction, multiplication, fused multiply-add and conversion
+between integer and a floating-point format are IEEE 754 compliant and
+are therefore correctly rounded using round-to-nearest even rounding mode.</p>
+</div>
+<div class="paragraph">
+<p>The following table describes the minimum accuracy of double precision
+floating-point arithmetic operations given as ULP values.
+0 ULP is used for math functions that do not require rounding.
+The reference value used to compute the ULP value of an arithmetic operation
+is the infinitely precise result.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 18. <em>ULP Values for Double Precision Floating-Point Arithmetic Operations</em></caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Min Accuracy</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>x</em> + <em>y</em></strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>x</em> - <em>y</em></strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>x</em> * <em>y</em></strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>1.0 / <em>x</em></strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong><em>x</em> / <em>y</em></strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>acos</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 4 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>acosh</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 4 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>acospi</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 5 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>asin</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 4 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>asinh</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 4 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>asinpi</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 5 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>atan</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 5 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>atanh</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 5 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>atanpi</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 5 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>atan2</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 6 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>atan2pi</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 6 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cbrt</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 2 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>ceil</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>copysign</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cos</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 4 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cosh</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 4 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cospi</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 4 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>erfc</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 16 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>erf</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 16 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>exp</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 3 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>exp2</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 3 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>exp10</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 3 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>expm1</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 3 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>fabs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>fdim</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>floor</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>fma</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>fmax</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>fmin</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>fmod</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>fract</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>frexp</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>hypot</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 4 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>ilogb</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>ldexp</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>log</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 3 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>log2</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 3 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>log10</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 3 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>log1p</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 2 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>logb</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>mad</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Implementation-defined</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>maxmag</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>minmag</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>modf</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>nan</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>nextafter</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>pow(x, y)</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 16 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>pown(x, y)</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 16 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>powr(x, y)</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 16 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>remainder</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>remquo</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp for the remainder, at least the lower 7 bits of the integral quotient</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>rint</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>rootn</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 16 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>round</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>rsqrt</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 2 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sin</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 4 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sincos</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 4 ulp for sine and cosine values</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sinh</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 4 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sinpi</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 4 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sqrt</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>tan</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 5 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>tanh</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 5 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>tanpi</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 6 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>tgamma</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 16 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>trunc</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_int32_atomics">7. 32-bit Atomics</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This section describes the extensions <strong>cl_khr_global_int32_base_atomics</strong>, <strong>cl_khr_global_int32_extended_atomics</strong>, <strong>cl_khr_local_int32_base_atomics</strong>, and <strong>cl_khr_local_int32_extended_atomics</strong>.
+These extensions allow atomic operations to be performed on 32-bit signed and unsigned integers in global and local memory.</p>
+</div>
+<div class="paragraph">
+<p>These extensions became core features in OpenCL 1.1, except the built-in atomic function names are changed to use the <strong>atomic_</strong> prefix instead of <strong>atom_</strong> and the volatile qualifier was added to the pointer parameter <em>p</em>.</p>
+</div>
+<div class="sect2">
+<h3 id="_global_atomics_for_32_bit_integers">7.1. Global Atomics for 32-bit Integers</h3>
+<div class="sect3">
+<h4 id="_base_atomics">7.1.1. Base Atomics</h4>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 19. <em>Built-in Atomic Functions for</em> <strong>cl_khr_global_int32_base_atomics</strong></caption>
+<colgroup>
+<col style="width: 64.2857%;">
+<col style="width: 35.7143%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_add</strong> (__global int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_add</strong> (__global uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> + <em>val</em>) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_sub</strong> (__global int *<em>p</em>, int <em>val</em>)+
+uint <strong>atom_sub</strong> (__global uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> - <em>val</em>) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_xchg</strong> (__global int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_xchg</strong> (__global uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Swaps the <em>old</em> value stored at location <em>p</em> with new value given by
+<em>val</em>. Returns <em>old</em> value.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_inc</strong> (__global int *<em>p</em>)<br>
+uint <strong>atom_inc</strong> (__global uint *<em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> + <em>1</em>) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_dec</strong> (__global int *<em>p</em>)<br>
+uint <strong>atom_dec</strong> (__global uint *<em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> - <em>1</em>) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_cmpxchg</strong> (__global int *<em>p</em>, int <em>cmp</em>, int <em>val</em>)<br>
+uint <strong>atom_cmpxchg</strong> (__global uint *<em>p</em>, uint <em>cmp</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> == <em>cmp</em>) ? <em>val</em> : <em>old</em> and store
+result at location pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="_extended_atomics">7.1.2. Extended Atomics</h4>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 20. <em>Built-in Atomic Functions for</em> <strong>cl_khr_global_int32_extended_atomics</strong></caption>
+<colgroup>
+<col style="width: 64.2857%;">
+<col style="width: 35.7143%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_min</strong> (__global int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_min</strong> (__global uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute <strong>min</strong>(<em>old</em>, <em>val</em>) and store minimum value at
+location pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_max</strong> (__global int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_max</strong> (__global uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute <strong>max</strong>(<em>old</em>, <em>val</em>) and store maximum value at
+location pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_and</strong> (__global int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_and</strong> (__global uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> &amp; val) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_or</strong> (__global int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_or</strong> (__global uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> | val) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_xor</strong> (__global int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_xor</strong> (__global uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> ^ val) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_local_atomics_for_32_bit_integers">7.2. Local Atomics for 32-bit Integers</h3>
+<div class="sect3">
+<h4 id="_base_atomics_2">7.2.1. Base Atomics</h4>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 21. <em>Built-in Atomic Functions for</em> <strong>cl_khr_local_int32_base_atomics</strong></caption>
+<colgroup>
+<col style="width: 64.2857%;">
+<col style="width: 35.7143%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_add</strong> (__local int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_add</strong> (__local uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> + <em>val</em>) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_sub</strong> (__local int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_sub</strong> (__local uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> - <em>val</em>) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_xchg</strong> (__local int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_xchg</strong> (__local uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Swaps the <em>old</em> value stored at location <em>p</em> with new value given by
+<em>val</em>. Returns <em>old</em> value.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_inc</strong> (__local int *<em>p</em>)<br>
+uint <strong>atom_inc</strong> (__local uint *<em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> + <em>1</em>) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_dec</strong> (__local int *<em>p</em>)<br>
+uint <strong>atom_dec</strong> (__local uint *<em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> - <em>1</em>) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_cmpxchg</strong> (__local int *<em>p</em>, int <em>cmp</em>, int <em>val</em>)<br>
+uint <strong>atom_cmpxchg</strong> (__local uint *<em>p</em>, uint <em>cmp</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> == <em>cmp</em>) ? <em>val</em> : <em>old</em> and store
+result at location pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="_extended_atomics_2">7.2.2. Extended Atomics</h4>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 22. <em>Built-in Atomic Functions for</em> <strong>cl_khr_local_int32_extended_atomics</strong></caption>
+<colgroup>
+<col style="width: 64.2857%;">
+<col style="width: 35.7143%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_min</strong> (__local int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_min</strong> (__local uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute <strong>min</strong>(<em>old</em>, <em>val</em>) and store minimum value at
+location pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_max</strong> (__local int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_max</strong> (__local uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute <strong>max</strong>(<em>old</em>, <em>val</em>) and store maximum value at
+location pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_and</strong> (__local int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_and</strong> (__local uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> &amp; val) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_or</strong> (__local int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_or</strong> (__local uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> | val) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>atom_xor</strong> (__local int *<em>p</em>, int <em>val</em>)<br>
+uint <strong>atom_xor</strong> (__local uint *<em>p</em>, uint <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 32-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> ^ val) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_int64_atomics">8. 64-bit Atomics</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This section describes the <strong>cl_khr_int64_base_atomics</strong> and <strong>cl_khr_int64_extended_atomics</strong> extensions. These extensions allow atomic operations to be performed on 64-bit signed and unsigned integers in global and local memory.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 23. <em>Built-in Atomic Functions for</em> <strong>cl_khr_int64_base_atomics</strong></caption>
+<colgroup>
+<col style="width: 64.2857%;">
+<col style="width: 35.7143%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">long <strong>atom_add</strong> (volatile __global long *<em>p</em>, long <em>val</em>)<br>
+long <strong>atom_add</strong> (volatile __local long *<em>p</em>, long <em>val</em>)<br>
+<br>
+ulong <strong>atom_add</strong> (volatile __global ulong *<em>p</em>, ulong <em>val</em>)<br>
+ulong <strong>atom_add</strong> (volatile __local ulong *<em>p</em>, ulong <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 64-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> + <em>val</em>) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">long <strong>atom_sub</strong> (volatile __global long *<em>p</em>, long <em>val</em>)<br>
+long <strong>atom_sub</strong> (volatile __local long *<em>p</em>, long <em>val</em>)<br>
+<br>
+ulong <strong>atom_sub</strong> (volatile __global ulong *<em>p</em>, ulong <em>val</em>)<br>
+ulong <strong>atom_sub</strong> (volatile __local ulong *<em>p</em>, ulong <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 64-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> - <em>val</em>) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">long <strong>atom_xchg</strong> (volatile __global long *<em>p</em>, long <em>val</em>)<br>
+long <strong>atom_xchg</strong> (volatile __local long *<em>p</em>, long <em>val</em>)<br>
+<br>
+ulong <strong>atom_xchg</strong> (volatile __global ulong *<em>p</em>, ulong <em>val</em>)<br>
+ulong <strong>atom_xchg</strong> (volatile __local ulong *<em>p</em>, ulong <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Swaps the <em>old</em> value stored at location <em>p</em> with new value given by
+<em>val</em>. Returns <em>old</em> value.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">long <strong>atom_inc</strong> (volatile __global long *<em>p</em>)<br>
+long <strong>atom_inc</strong> (volatile __local long *<em>p</em>)<br>
+<br>
+ulong <strong>atom_inc</strong> (volatile __global ulong *<em>p</em>)<br>
+ulong <strong>atom_inc</strong> (volatile __local ulong *<em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 64-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> + <em>1</em>) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">long <strong>atom_dec</strong> (volatile __global long *<em>p</em>)<br>
+long <strong>atom_dec</strong> (volatile __local long *<em>p</em>)<br>
+<br>
+ulong <strong>atom_dec</strong> (volatile __global ulong *<em>p</em>)<br>
+ulong <strong>atom_dec</strong> (volatile __local ulong *<em>p</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 64-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> - <em>1</em>) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">long <strong>atom_cmpxchg</strong> (volatile __global long *<em>p</em>, long <em>cmp</em>, long <em>val</em>)<br>
+long <strong>atom_cmpxchg</strong> (volatile __local long *<em>p</em>, long <em>cmp</em>, long <em>val</em>)<br>
+<br>
+ulong <strong>atom_cmpxchg</strong> (volatile __global ulong *<em>p</em>, ulong <em>cmp</em>, ulong <em>val</em>)<br>
+ulong <strong>atom_cmpxchg</strong> (volatile __local ulong *<em>p</em>, ulong <em>cmp</em>, ulong <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 64-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> == <em>cmp</em>) ? <em>val</em> : <em>old</em> and store
+result at location pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+</tbody>
+</table>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 24. <em>Built-in Atomic Functions for</em> <strong>cl_khr_int64_extended_atomics</strong></caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">long <strong>atom_min</strong> (volatile __global long *<em>p</em>, long <em>val</em>)<br>
+long <strong>atom_min</strong> (volatile __local long *<em>p</em>, long <em>val</em>)<br>
+<br>
+ulong <strong>atom_min</strong> (volatile __global ulong *<em>p</em>, ulong <em>val</em>)<br>
+ulong <strong>atom_min</strong> (volatile __local ulong *<em>p</em>, ulong <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 64-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute <strong>min</strong>(<em>old</em>, <em>val</em>) and store minimum value at
+location pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">long <strong>atom_max</strong> (volatile __global long *<em>p</em>, long <em>val</em>)<br>
+long <strong>atom_max</strong> (volatile __local long *<em>p</em>, long <em>val</em>)<br>
+<br>
+ulong <strong>atom_max</strong> (volatile __global ulong *<em>p</em>, ulong <em>val</em>)<br>
+ulong <strong>atom_max</strong> (volatile __local ulong *<em>p</em>, ulong <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 64-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute <strong>max</strong>(<em>old</em>, <em>val</em>) and store maximum value at
+location pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">long <strong>atom_and</strong> (volatile __global long *<em>p</em>, long <em>val</em>)<br>
+long <strong>atom_and</strong> (volatile __local long *<em>p</em>, long <em>val</em>)<br>
+<br>
+ulong <strong>atom_and</strong> (volatile __global ulong *<em>p</em>, ulong <em>val</em>)<br>
+ulong <strong>atom_and</strong> (volatile __local ulong *<em>p</em>, ulong <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 64-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> &amp; val) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">long <strong>atom_or</strong> (volatile __global long *<em>p</em>, long <em>val</em>)<br>
+long <strong>atom_or</strong> (volatile __local long *<em>p</em>, long <em>val</em>)<br>
+<br>
+ulong <strong>atom_or</strong> (volatile __global ulong *<em>p</em>, ulong <em>val</em>)<br>
+ulong <strong>atom_or</strong> (volatile __local ulong *<em>p</em>, ulong <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 64-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> | val) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">long <strong>atom_xor</strong> (volatile __global long *<em>p</em>, long <em>val</em>)<br>
+long <strong>atom_xor</strong> (volatile __local long *<em>p</em>, long <em>val</em>)<br>
+<br>
+ulong <strong>atom_xor</strong> (volatile __global ulong *<em>p</em>, ulong <em>val</em>)<br>
+ulong <strong>atom_xor</strong> (volatile __local ulong *<em>p</em>, ulong <em>val</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read the 64-bit value (referred to as <em>old</em>) stored at location
+pointed by <em>p</em>. Compute (<em>old</em> ^ val) and store result at location
+pointed by <em>p</em>. The function returns <em>old</em>.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Note: Atomic operations on 64-bit integers and 32-bit integers (and
+float) are also atomic w.r.t. each other.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_select_fprounding_mode">9. Selecting the Rounding Mode <strong>(DEPRECATED)</strong></h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This section describes the <strong>cl_khr_select_fprounding_mode</strong> extension.
+It allows an application to specify the rounding mode for an instruction or group of instructions in the program source.</p>
+</div>
+<div class="paragraph">
+<p><strong>This extension was deprecated in OpenCL 1.1 and its use is not recommended.</strong></p>
+</div>
+<div class="paragraph">
+<p>With this extension, the rounding mode may be specified using the following <strong>#pragma</strong> in the OpenCL program source:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c"><span class="preprocessor">#pragma</span> OPENCL SELECT_ROUNDING_MODE &lt;rounding-mode&gt;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <em>&lt;rounding-mode&gt;</em> may be one of the following values:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><strong>rte</strong> - round to nearest even</p>
+</li>
+<li>
+<p><strong>rtz</strong> - round to zero</p>
+</li>
+<li>
+<p><strong>rtp</strong> - round to positive infinity</p>
+</li>
+<li>
+<p><strong>rtn</strong> - round to negative infinity</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>If this extensions is supported then the OpenCL implementation must support all four rounding modes for single precision floating-point.</p>
+</div>
+<div class="paragraph">
+<p>The <strong>#pragma</strong> sets the rounding mode for all instructions that operate on floating-point types (scalar or vector types) or produce floating-point values that follow this pragma in the program source until the next <strong>#pragma</strong>.
+Note that the rounding mode specified for a block of code is known at compile time.
+When inside a compound statement, the pragma takes effect from its occurrence until another <strong>#pragma</strong> is encountered (including within a nested compound statement), or until the end of the compound statement; at the end of a compound statement the state for the pragma is restored to its condition just before the compound statement.
+Except where otherwise documented, the callee functions do not inherit the rounding mode of the caller function.</p>
+</div>
+<div class="paragraph">
+<p>If this extension is enabled, the <code>__ROUNDING_MODE__</code> preprocessor symbol shall be defined to be one of the following according to the current rounding mode:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c"><span class="preprocessor">#define</span> __ROUNDING_MODE__ rte
+<span class="preprocessor">#define</span> __ROUNDING_MODE__ rtz
+<span class="preprocessor">#define</span> __ROUNDING_MODE__ rtp
+<span class="preprocessor">#define</span> __ROUNDING_MODE__ rtz</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This is intended to enable remapping <code>foo()</code> to <code>foo_rte()</code> by the preprocessor by using:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c"><span class="preprocessor">#define</span> foo foo <span class="preprocessor">#</span><span class="preprocessor"># __ROUNDING_MODE__</span></code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The default rounding mode is round to nearest even.
+The built-in math functions described in <em>section 6.11.2</em>, the common functions described in <em>section 6.11.4</em> and the geometric functions described in <em>section 6.11.5</em> are implemented with the round to nearest even rounding mode.
+Various built-in conversions and the <strong>vstore_half</strong> and <strong>vstorea_half</strong> built-in functions that do not specify a rounding mode inherit the current rounding mode.
+Conversions from floating-point to integer type always use <code>rtz</code> mode, except where the user specifically asks for another rounding mode.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_gl_sharing">10. Creating an OpenCL Context from an OpenGL Context or Share Group</h2>
 <div class="sectionbody">
 <div class="sect2">
-<h3 id="cl_khr_gl_sharing-overview">3.1. Overview</h3>
+<h3 id="cl_khr_gl_sharing-overview">10.1. Overview</h3>
 <div class="paragraph">
 <p>This section describes the <strong>cl_khr_gl_sharing</strong> extension.
 The section <a href="#cl_khr_gl_sharing__memobjs">Creating OpenCL Memory Objects from
@@ -3221,19 +5873,19 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_sharing-new-procedures-and-functions">3.2. New Procedures and Functions</h3>
+<h3 id="cl_khr_gl_sharing-new-procedures-and-functions">10.2. New Procedures and Functions</h3>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_int clGetGLContextInfoKHR(const cl_context_properties *properties,
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetGLContextInfoKHR(<span class="directive">const</span> cl_context_properties *properties,
                              cl_gl_context_info param_name,
                              size_t param_value_size,
-                             void *param_value,
+                             <span class="directive">void</span> *param_value,
                              size_t *param_value_size_ret);</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_sharing-new-tokens">3.3. New Tokens</h3>
+<h3 id="cl_khr_gl_sharing-new-tokens">10.3. New Tokens</h3>
 <div class="paragraph">
 <p>Returned by <strong>clCreateContext</strong>, <strong>clCreateContextFromType</strong>, and
 <strong>clGetGLContextInfoKHR</strong> when an invalid OpenGL context or share group object
@@ -3241,7 +5893,7 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR      -1000</pre>
+<pre>CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR</pre>
 </div>
 </div>
 <div class="paragraph">
@@ -3249,8 +5901,8 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR        0x2006
-CL_DEVICES_FOR_GL_CONTEXT_KHR               0x2007</pre>
+<pre>CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR
+CL_DEVICES_FOR_GL_CONTEXT_KHR</pre>
 </div>
 </div>
 <div class="paragraph">
@@ -3259,16 +5911,16 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_GL_CONTEXT_KHR                           0x2008
-CL_EGL_DISPLAY_KHR                          0x2009
-CL_GLX_DISPLAY_KHR                          0x200A
-CL_WGL_HDC_KHR                              0x200B
-CL_CGL_SHAREGROUP_KHR                       0x200C</pre>
+<pre>CL_GL_CONTEXT_KHR
+CL_EGL_DISPLAY_KHR
+CL_GLX_DISPLAY_KHR
+CL_WGL_HDC_KHR
+CL_CGL_SHAREGROUP_KHR</pre>
 </div>
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_sharing-additions-to-chapter-4">3.4. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
+<h3 id="cl_khr_gl_sharing-additions-to-chapter-4">10.4. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
 <div class="paragraph">
 <p>In <em>section 4.4</em>, replace the description of <em>properties</em> under
 <strong>clCreateContext</strong> with:</p>
@@ -3337,8 +5989,8 @@
 <div class="paragraph">
 <p>Add to <em>table 4.5</em>:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 11. <em>OpenGL Sharing Context Creation Attributes</em></caption>
+<table class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 25. <em>OpenGL Sharing Context Creation Attributes</em></caption>
 <colgroup>
 <col style="width: 33.3333%;">
 <col style="width: 33.3333%;">
@@ -3476,7 +6128,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_sharing-additions-to-chapter-5">3.5. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
+<h3 id="cl_khr_gl_sharing-additions-to-chapter-5">10.5. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
 <div class="paragraph">
 <p>Add a new section to describe the new API for querying OpenCL devices that
 support sharing with OpenGL:</p>
@@ -3497,10 +6149,10 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_int clGetGLContextInfoKHR(const cl_context_properties *properties,
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetGLContextInfoKHR(<span class="directive">const</span> cl_context_properties *properties,
                              cl_gl_context_info param_name,
                              size_t param_value_size,
-                             void *param_value,
+                             <span class="directive">void</span> *param_value,
                              size_t *param_value_size_ret)</code></pre>
 </div>
 </div>
@@ -3530,8 +6182,8 @@
 queried by <em>param_value</em>.
 If <em>param_value_size_ret</em> is <code>NULL</code>, it is ignored.</p>
 </div>
-<table id="cl_khr_gl_sharing-clGetGLContextInfoKHR-table" class="tableblock frame-all grid-all spread">
-<caption class="title">Table 12. <em>Supported Device Types for</em> <strong>clGetGLContextInfoKHR</strong></caption>
+<table id="cl_khr_gl_sharing-clGetGLContextInfoKHR-table" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 26. <em>Supported Device Types for</em> <strong>clGetGLContextInfoKHR</strong></caption>
 <colgroup>
 <col style="width: 40%;">
 <col style="width: 20%;">
@@ -3656,7 +6308,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_sharing-issues">3.6. Issues</h3>
+<h3 id="cl_khr_gl_sharing-issues">10.6. Issues</h3>
 <div class="olist arabic">
 <ol class="arabic">
 <li>
@@ -3819,12 +6471,11 @@
 </li>
 </ol>
 </div>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="cl_khr_gl_sharing__memobjs">4. Creating OpenCL Memory Objects from OpenGL Objects</h2>
+<h2 id="cl_khr_gl_sharing__memobjs">11. Creating OpenCL Memory Objects from OpenGL Objects</h2>
 <div class="sectionbody">
 <div class="paragraph">
 <p>This section describes OpenCL functions that allow applications to use
@@ -3860,9 +6511,9 @@
 (i.e. objects named zero), which may not be shared.</p>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_sharing__memobjs-lifetime-of-shared-objects">4.1. Lifetime of Shared Objects</h3>
+<h3 id="cl_khr_gl_sharing__memobjs-lifetime-of-shared-objects">11.1. Lifetime of Shared Objects</h3>
 <div class="paragraph">
-<p>An OpenCL memory object created from an OpenGL object (hereinafter refered
+<p>An OpenCL memory object created from an OpenGL object (hereinafter referred
 to as a &#8220;shared CL/GL object&#8221;) remains valid as long as the corresponding
 GL object has not been deleted.
 If the GL object is deleted through the GL API (e.g. <strong>glDeleteBuffers</strong>,
@@ -3883,14 +6534,14 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_sharing__memobjs-cl-buffer-objects-from-gl-buffer-objects">4.2. OpenCL Buffer Objects from OpenGL Buffer Objects</h3>
+<h3 id="cl_khr_gl_sharing__memobjs-cl-buffer-objects-from-gl-buffer-objects">11.2. OpenCL Buffer Objects from OpenGL Buffer Objects</h3>
 <div class="paragraph">
 <p>The function
 </p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_mem clCreateFromGLBuffer(cl_context context,
+<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateFromGLBuffer(cl_context context,
                             cl_mem_flags flags,
                             GLuint bufobj,
                             cl_int *errcode_ret)</code></pre>
@@ -3969,14 +6620,14 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_sharing__memobjs-cl-image-objects-from-gl-textures">4.3. OpenCL Image Objects from OpenGL Textures</h3>
+<h3 id="cl_khr_gl_sharing__memobjs-cl-image-objects-from-gl-textures">11.3. OpenCL Image Objects from OpenGL Textures</h3>
 <div class="paragraph">
 <p>The function
 </p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_mem clCreateFromGLTexture(cl_context context,
+<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateFromGLTexture(cl_context context,
                              cl_mem_flags flags,
                              GLenum texture_target,
                              GLint miplevel,
@@ -4025,7 +6676,7 @@
 GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
 GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
 GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, or
-GL_TEXTURE_RECTANGLE (Note: CL_TEXTURE_RECTANGLE requires OpenGL 3.1.
+GL_TEXTURE_RECTANGLE (Note: GL_TEXTURE_RECTANGLE requires OpenGL 3.1.
 Alternatively, GL_TEXTURE_RECTANGLE_ARB may be specified if the OpenGL
 extension <strong>GL_ARB_texture_rectangle</strong> is supported.).
 <em>texture_target</em> is used only to define the image type of <em>texture</em>.
@@ -4121,7 +6772,7 @@
 retain and release the image objects.</p>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_gl_sharing__memobjs-list-of-opengl-and-corresponding-opencl-image-formats">4.3.1. List of OpenGL and corresponding OpenCL Image Formats</h4>
+<h4 id="cl_khr_gl_sharing__memobjs-list-of-opengl-and-corresponding-opencl-image-formats">11.3.1. List of OpenGL and corresponding OpenCL Image Formats</h4>
 <div class="paragraph">
 <p>The table below describes the list of OpenGL texture internal formats and
 the corresponding OpenCL image formats.
@@ -4134,8 +6785,8 @@
 at least the number of bits/component actually allocated by OpenGL for that
 format.</p>
 </div>
-<table id="cl_khr_gl_sharing__memobjs-mapping-of-image-formats" class="tableblock frame-all grid-all spread">
-<caption class="title">Table 13. <em>OpenGL internal formats and corresponding OpenCL internal formats</em></caption>
+<table id="cl_khr_gl_sharing__memobjs-mapping-of-image-formats" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 27. <em>OpenGL internal formats and corresponding OpenCL internal formats</em></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -4151,8 +6802,8 @@
 <tbody>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">GL_RGBA8</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNORM_INT8 or
-</p><p class="tableblock">CL_BGRA, CL_UNORM_INT8</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNORM_INT8 or</p>
+<p class="tableblock">CL_BGRA, CL_UNORM_INT8</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">GL_SRGB8_ALPHA8</p></td>
@@ -4339,14 +6990,14 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_sharing__memobjs-cl-image-objects-from-gl-renderbuffers">4.4. OpenCL Image Objects from OpenGL Renderbuffers</h3>
+<h3 id="cl_khr_gl_sharing__memobjs-cl-image-objects-from-gl-renderbuffers">11.4. OpenCL Image Objects from OpenGL Renderbuffers</h3>
 <div class="paragraph">
 <p>The function
 </p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_mem clCreateFromGLRenderbuffer(cl_context context,
+<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateFromGLRenderbuffer(cl_context context,
                                   cl_mem_flags flags,
                                   GLuint renderbuffer,
                                   cl_int *errcode_ret)</code></pre>
@@ -4443,7 +7094,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_sharing__memobjs-querying-gl-object-information-from-a-cl-memory-object">4.5. Querying OpenGL object information from an OpenCL memory object</h3>
+<h3 id="cl_khr_gl_sharing__memobjs-querying-gl-object-information-from-a-cl-memory-object">11.5. Querying OpenGL object information from an OpenCL memory object</h3>
 <div class="paragraph">
 <p>The OpenGL object used to create the OpenCL memory object and information
 about the object type i.e. whether it is a texture, renderbuffer or buffer
@@ -4452,7 +7103,7 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_int clGetGLObjectInfo(cl_mem memobj,
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetGLObjectInfo(cl_mem memobj,
                          cl_gl_object_type *gl_object_type,
                          GLuint *gl_object_name)</code></pre>
 </div>
@@ -4498,10 +7149,10 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_int clGetGLTextureInfo(cl_mem memobj,
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetGLTextureInfo(cl_mem memobj,
                           cl_gl_texture_info param_name,
                           size_t param_value_size,
-                          void *param_value,
+                          <span class="directive">void</span> *param_value,
                           size_t *param_value_size_ret)</code></pre>
 </div>
 </div>
@@ -4530,8 +7181,8 @@
 <em>param_value</em>.
 If <em>param_value_size_ret</em> is <code>NULL</code>, it is ignored.</p>
 </div>
-<table id="cl_khr_gl_sharing__memobjs-clGetGLTextureInfo-queries" class="tableblock frame-all grid-all spread">
-<caption class="title">Table 14. <em>OpenGL texture info that may be queried with</em> <strong>clGetGLTextureInfo</strong></caption>
+<table id="cl_khr_gl_sharing__memobjs-clGetGLTextureInfo-queries" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 28. <em>OpenGL texture info that may be queried with</em> <strong>clGetGLTextureInfo</strong></caption>
 <colgroup>
 <col style="width: 33.3333%;">
 <col style="width: 33.3333%;">
@@ -4589,18 +7240,18 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_sharing__memobjs-sharing-memory-objects-that-map-to-gl-objects-between-gl-and-cl-contexts">4.6. Sharing memory objects that map to GL objects between GL and CL contexts</h3>
+<h3 id="cl_khr_gl_sharing__memobjs-sharing-memory-objects-that-map-to-gl-objects-between-gl-and-cl-contexts">11.6. Sharing memory objects that map to GL objects between GL and CL contexts</h3>
 <div class="paragraph">
 <p>The function
 </p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_int  clEnqueueAcquireGLObjects(cl_command_queue command_queue,
+<pre class="CodeRay highlight"><code data-lang="c">cl_int  clEnqueueAcquireGLObjects(cl_command_queue command_queue,
                                   cl_uint num_objects,
-                                  const cl_mem *mem_objects,
+                                  <span class="directive">const</span> cl_mem *mem_objects,
                                   cl_uint num_events_in_wait_list,
-                                  const cl_event *event_wait_list,
+                                  <span class="directive">const</span> cl_event *event_wait_list,
                                   cl_event *event)</code></pre>
 </div>
 </div>
@@ -4702,11 +7353,11 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_int clEnqueueReleaseGLObjects(cl_command_queue command_queue,
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueReleaseGLObjects(cl_command_queue command_queue,
                                  cl_uint num_objects,
-                                 const cl_mem *mem_objects,
+                                 <span class="directive">const</span> cl_mem *mem_objects,
                                  cl_uint num_events_in_wait_list,
-                                 const cl_event *event_wait_list,
+                                 <span class="directive">const</span> cl_event *event_wait_list,
                                  cl_event *event)</code></pre>
 </div>
 </div>
@@ -4737,7 +7388,7 @@
 The events specified in <em>event_wait_list</em> act as synchronization points.</p>
 </div>
 <div class="paragraph">
-<p><em>event</em> returns an event object that identifies this particular read / write
+<p><em>event</em> returns an event object that identifies this particular
 command and can be used to query or queue a wait for the command to
 complete.
 <em>event</em> can be`NULL` in which case it will not be possible for the
@@ -4793,7 +7444,7 @@
 </ul>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_gl_sharing__memobjs-synchronizing-opencl-and-opengl-access-to-shared-objects">4.6.1. Synchronizing OpenCL and OpenGL Access to Shared Objects</h4>
+<h4 id="cl_khr_gl_sharing__memobjs-synchronizing-opencl-and-opengl-access-to-shared-objects">11.6.1. Synchronizing OpenCL and OpenGL Access to Shared Objects</h4>
 <div class="paragraph">
 <p>In order to ensure data integrity, the application is responsible for
 synchronizing access to shared CL/GL objects by their respective APIs.
@@ -4847,16 +7498,15 @@
 has been acquired by the OpenCL command queue, or after it has been
 released, will result in undefined behavior.</p>
 </div>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="cl_khr_gl_event-creating">5. Creating OpenCL Event Objects from OpenGL Sync Objects</h2>
+<h2 id="cl_khr_gl_event">12. Creating OpenCL Event Objects from OpenGL Sync Objects</h2>
 <div class="sectionbody">
 <div class="sect2">
-<h3 id="cl_khr_gl_event-overview">5.1. Overview</h3>
+<h3 id="cl_khr_gl_event-overview">12.1. Overview</h3>
 <div class="paragraph">
 <p>This section describes the <strong>cl_khr_gl_event</strong> extension.
 This extension allows creating OpenCL event objects linked to OpenGL fence
@@ -4873,28 +7523,28 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_event-new-procedures-and-functions">5.2. New Procedures and Functions</h3>
+<h3 id="cl_khr_gl_event-new-procedures-and-functions">12.2. New Procedures and Functions</h3>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_event clCreateEventFromGLsyncKHR(cl_context context,
+<pre class="CodeRay highlight"><code data-lang="c">cl_event clCreateEventFromGLsyncKHR(cl_context context,
                                     GLsync sync,
                                     cl_int *errcode_ret);</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_event-new-tokens">5.3. New Tokens</h3>
+<h3 id="cl_khr_gl_event-new-tokens">12.3. New Tokens</h3>
 <div class="paragraph">
 <p>Returned by <strong>clGetEventInfo</strong> when <em>param_name</em> is CL_EVENT_COMMAND_TYPE:</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D</pre>
+<pre>CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR</pre>
 </div>
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_event-additions-to-chapter-5">5.4. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
+<h3 id="cl_khr_gl_event-additions-to-chapter-5">12.4. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
 <div class="paragraph">
 <p>Add following to the fourth paragraph of <em>section 5.11</em> (prior to the
 description of <strong>clWaitForEvents</strong>):</p>
@@ -4929,7 +7579,7 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_event clCreateEventFromGLsyncKHR(cl_context context,
+<pre class="CodeRay highlight"><code data-lang="c">cl_event clCreateEventFromGLsyncKHR(cl_context context,
                                     GLsync sync,
                                     cl_int *errcode_ret)</code></pre>
 </div>
@@ -5004,7 +7654,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_event-additions-to-extension-specification">5.5. Additions to the OpenCL Extension Specification</h3>
+<h3 id="cl_khr_gl_event-additions-to-extension-specification">12.5. Additions to the OpenCL Extension Specification</h3>
 <div class="paragraph">
 <p>Add following the paragraph describing parameter <em>event</em> to
 <strong>clEnqueueAcquireGLObjects</strong>:</p>
@@ -5106,7 +7756,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_event-issues">5.6. Issues</h3>
+<h3 id="cl_khr_gl_event-issues">12.6. Issues</h3>
 <div class="olist arabic">
 <ol class="arabic">
 <li>
@@ -5203,87 +7853,85 @@
 </li>
 </ol>
 </div>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="cl_khr_dx9_media_sharing">6. Creating OpenCL Memory Objects from DirectX 9 Media Surfaces</h2>
+<h2 id="cl_khr_d3d10_sharing">13. Creating OpenCL Memory Objects from Direct3D 10 Buffers and Textures</h2>
 <div class="sectionbody">
 <div class="sect2">
-<h3 id="cl_khr_dx9_media_sharing-overview">6.1. Overview</h3>
+<h3 id="cl_khr_d3d10_sharing-overview">13.1. Overview</h3>
 <div class="paragraph">
-<p>This section describes the <strong>cl_khr_dx9_media_sharing</strong> extension.
-The goal of this extension is to allow applications to use media surfaces as
-OpenCL memory objects.
-This allows efficient sharing of data between OpenCL and selected adapter
-APIs (only DX9 for now).
-If this extension is supported, an OpenCL image object can be created from a
-media surface and the OpenCL API can be used to execute kernels that read
-and/or write memory objects that are media surfaces.
-Note that OpenCL memory objects may be created from the adapter media
-surface if and only if the OpenCL context has been created from that
-adapter.</p>
+<p>This section describes the <strong>cl_khr_d3d10_sharing</strong> extension.
+The goal of this extension is to provide interoperability between OpenCL and
+Direct3D 10.</p>
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_dx9_media_sharing-new-procedures-and-functions">6.2. New Procedures and Functions</h3>
+<h3 id="cl_khr_d3d10_sharing-new-procedures-and-functions">13.2. New Procedures and Functions</h3>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_int clGetDeviceIDsFromDX9MediaAdapterKHR(
-                                    cl_platform_id platform,
-                                    cl_uint num_media_adapters,
-                                    cl_dx9_media_adapter_type_khr *media_adapters_type,
-                                    void *media_adapters,
-                                    cl_dx9_media_adapter_set_khr media_adapter_set,
-                                    cl_uint num_entries,
-                                    cl_device_id *devices,
-                                    cl_int *num_devices)
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetDeviceIDsFromD3D10KHR(cl_platform_id platform,
+                                  cl_d3d10_device_source_khr d3d_device_source,
+                                  <span class="directive">void</span> *d3d_object,
+                                  cl_d3d10_device_set_khr d3d_device_set,
+                                  cl_uint num_entries,
+                                  cl_device_id *devices,
+                                  cl_uint *num_devices)
 
-cl_mem clCreateFromDX9MediaSurfaceKHR(cl_context context,
-                                      cl_mem_flags flags,
-                                      cl_dx9_media_adapter_type_khr adapter_type,
-                                      void *surface_info,
-                                      cl_uint plane,
-                                      cl_int *errcode_ret)
+cl_mem clCreateFromD3D10BufferKHR(cl_context context,
+                                  cl_mem_flags flags,
+                                  ID3D10Buffer *resource,
+                                  cl_int *errcode_ret)
 
-cl_int clEnqueueAcquireDX9MediaSurfacesKHR(cl_command_queue command_queue,
-                                           cl_uint num_objects,
-                                           const cl_mem *mem_objects,
-                                           cl_uint num_events_in_wait_list,
-                                           const cl_event *event_wait_list,
-                                           cl_event *event)
+cl_mem clCreateFromD3D10Texture2DKHR(cl_context context,
+                                     cl_mem_flags flags,
+                                     ID3D10Texture2D *resource,
+                                     UINT subresource,
+                                     cl_int *errcode_ret)
 
-cl_int clEnqueueReleaseDX9MediaSurfacesKHR(cl_command_queue command_queue,
-                                           cl_uint num_objects,
-                                           const cl_mem *mem_objects,
-                                           cl_uint num_events_in_wait_list,
-                                           const cl_event *event_wait_list,
-                                           cl_event *event)</code></pre>
+cl_mem clCreateFromD3D10Texture3DKHR(cl_context context,
+                                     cl_mem_flags flags,
+                                     ID3D10Texture3D *resource,
+                                     UINT subresource,
+                                     cl_int *errcode_ret)
+
+cl_int clEnqueueAcquireD3D10ObjectsKHR(cl_command_queue command_queue,
+                                       cl_uint num_objects,
+                                       <span class="directive">const</span> cl_mem *mem_objects,
+                                       cl_uint num_events_in_wait_list,
+                                       <span class="directive">const</span> cl_event *event_wait_list,
+                                       cl_event *event)
+
+cl_int clEnqueueReleaseD3D10ObjectsKHR(cl_command_queue command_queue,
+                                       cl_uint num_objects,
+                                       <span class="directive">const</span> cl_mem *mem_objects,
+                                       cl_uint num_events_in_wait_list,
+                                       <span class="directive">const</span> cl_event *event_wait_list,
+                                       cl_event *event)</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_dx9_media_sharing-new-tokens">6.3. New Tokens</h3>
+<h3 id="cl_khr_d3d10_sharing-new-tokens">13.3. New Tokens</h3>
 <div class="paragraph">
-<p>Accepted by the <em>media_adapter_type</em> parameter of
-<strong>clGetDeviceIDsFromDX9MediaAdapterKHR</strong>:</p>
+<p>Accepted as a Direct3D 10 device source in the <em>d3d_device_source</em> parameter
+of <strong>clGetDeviceIDsFromD3D10KHR</strong>:</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_ADAPTER_D3D9_KHR         0x2020
-CL_ADAPTER_D3D9EX_KHR       0x2021
-CL_ADAPTER_DXVA_KHR         0x2022</pre>
+<pre>CL_D3D10_DEVICE_KHR
+CL_D3D10_DXGI_ADAPTER_KHR</pre>
 </div>
 </div>
 <div class="paragraph">
-<p>Accepted by the <em>media_adapter_set</em> parameter of
-<strong>clGetDeviceIDsFromDX9MediaAdapterKHR</strong>:</p>
+<p>Accepted as a set of Direct3D 10 devices in the <em>d3d_device_set</em> parameter
+of <strong>clGetDeviceIDsFromD3D10KHR</strong>:</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR  0x2023
-CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR        0x2024</pre>
+<pre>CL_PREFERRED_DEVICES_FOR_D3D10_KHR
+CL_ALL_DEVICES_FOR_D3D10_KHR</pre>
 </div>
 </div>
 <div class="paragraph">
@@ -5292,9 +7940,16 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_CONTEXT_ADAPTER_D3D9_KHR     0x2025
-CL_CONTEXT_ADAPTER_D3D9EX_KHR   0x2026
-CL_CONTEXT_ADAPTER_DXVA_KHR     0x2027</pre>
+<pre>CL_CONTEXT_D3D10_DEVICE_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Accepted as a property name in the <em>param_name</em> parameter of
+<strong>clGetContextInfo</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR</pre>
 </div>
 </div>
 <div class="paragraph">
@@ -5303,8 +7958,7 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR   0x2028
-CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR   0x2029</pre>
+<pre>CL_MEM_D3D10_RESOURCE_KHR</pre>
 </div>
 </div>
 <div class="paragraph">
@@ -5313,7 +7967,7 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_IMAGE_DX9_MEDIA_PLANE_KHR    0x202A</pre>
+<pre>CL_IMAGE_D3D10_SUBRESOURCE_KHR</pre>
 </div>
 </div>
 <div class="paragraph">
@@ -5322,56 +7976,52 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR   0x202B
-CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR   0x202C</pre>
+<pre>CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR
+CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR</pre>
 </div>
 </div>
 <div class="paragraph">
-<p>Returned by <strong>clCreateContext</strong> and <strong>clCreateContextFromType</strong> if the media
-adapter specified for interoperability is not compatible with the devices
+<p>Returned by <strong>clCreateContext</strong> and <strong>clCreateContextFromType</strong> if the Direct3D
+10 device specified for interoperability is not compatible with the devices
 against which the context is to be created:</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_INVALID_DX9_MEDIA_ADAPTER_KHR    -1010</pre>
+<pre>CL_INVALID_D3D10_DEVICE_KHR</pre>
 </div>
 </div>
 <div class="paragraph">
-<p>Returned by <strong>clCreateFromDX9MediaSurfaceKHR</strong> when <em>adapter_type</em> is set to a
-media adapter and the <em>surface_info</em> does not reference a media surface of
-the required type, or if <em>adapter_type</em> is set to a media adapter type and
-<em>surface_info</em> does not contain a valid reference to a media surface on that
-adapter, by <strong>clGetMemObjectInfo</strong> when <em>param_name</em> is a surface or handle
-when the image was not created from an appropriate media surface, and from
-<strong>clGetImageInfo</strong> when <em>param_name</em> is CL IMAGE_DX9_MEDIA_PLANE KHR and image
-was not created from an appropriate media surface.</p>
+<p>Returned by <strong>clCreateFromD3D10BufferKHR</strong> when <em>resource</em> is not a Direct3D
+10 buffer object, and by <strong>clCreateFromD3D10Texture2DKHR</strong> and
+<strong>clCreateFromD3D10Texture3DKHR</strong> when <em>resource</em> is not a Direct3D 10 texture
+object:</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_INVALID_DX9_MEDIA_SURFACE_KHR    -1011</pre>
+<pre>CL_INVALID_D3D10_RESOURCE_KHR</pre>
 </div>
 </div>
 <div class="paragraph">
-<p>Returned by <strong>clEnqueueAcquireDX9MediaSurfacesKHR</strong> when any of <em>mem_objects</em>
-are currently acquired by OpenCL</p>
+<p>Returned by <strong>clEnqueueAcquireD3D10ObjectsKHR</strong> when any of <em>mem_objects</em> are
+currently acquired by OpenCL:</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR   -1012</pre>
+<pre>CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR</pre>
 </div>
 </div>
 <div class="paragraph">
-<p>Returned by <strong>clEnqueueReleaseDX9MediaSurfacesKHR</strong> when any of <em>mem_objects</em>
-are not currently acquired by OpenCL</p>
+<p>Returned by <strong>clEnqueueReleaseD3D10ObjectsKHR</strong> when any of <em>mem_objects</em> are
+not currently acquired by OpenCL:</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR   -1013</pre>
+<pre>CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR</pre>
 </div>
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_dx9_media_sharing-additions-to-chapter-4">6.4. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
+<h3 id="cl_khr_d3d10_sharing-additions-to-chapter-4">13.4. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
 <div class="paragraph">
 <p>In <em>section 4.4</em>, replace the description of <em>properties</em> under
 <strong>clCreateContext</strong> with:</p>
@@ -5389,7 +8039,2566 @@
 <div class="paragraph">
 <p>Add the following to <em>table 4.5</em>:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 40%;">
+<col style="width: 20%;">
+<col style="width: 40%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_context_properties enum</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Property value</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_CONTEXT_D3D10_DEVICE_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">ID3D10Device *</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies the ID3D10Device * to use for Direct3D 10 interoperability.
+  The default value is <code>NULL</code>.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Add to the list of errors for <strong>clCreateContext</strong>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_D3D10_DEVICE_KHR if the value of the property
+CL_CONTEXT_D3D10_DEVICE_KHR is non-<code>NULL</code> and does not specify a valid
+Direct3D 10 device with which the <em>cl_device_ids</em> against which this
+context is to be created may interoperate.</p>
+</li>
+<li>
+<p>CL_INVALID_OPERATION if Direct3D 10 interoperability is specified by
+setting CL_INVALID_D3D10_DEVICE_KHR to a non-<code>NULL</code> value, and
+interoperability with another graphics API is also specified.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Add to the list of errors for <strong>clCreateContextFromType</strong> the same new errors
+described above for <strong>clCreateContext</strong>.</p>
+</div>
+<div class="paragraph">
+<p>Add the following row to <em>table 4.6</em>:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 40%;">
+<col style="width: 20%;">
+<col style="width: 40%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_context_info</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Information returned in param_value</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_bool</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns CL_TRUE if Direct3D 10 resources created as shared by setting
+  <em>MiscFlags</em> to include D3D10_RESOURCE_MISC_SHARED will perform faster when
+  shared with OpenCL, compared with resources which have not set this flag.
+  Otherwise returns CL_FALSE.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_d3d10_sharing-additions-to-chapter-5">13.5. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
+<div class="paragraph">
+<p>Add to the list of errors for <strong>clGetMemObjectInfo</strong>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_D3D10_RESOURCE_KHR if <em>param_name</em> is
+CL_MEM_D3D10_RESOURCE_KHR and <em>memobj</em> was not created by the function
+<strong>clCreateFromD3D10BufferKHR</strong>, <strong>clCreateFromD3D10Texture2DKHR</strong>, or
+<strong>clCreateFromD3D10Texture3DKHR</strong>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Extend <em>table 5.12</em> to include the following entry.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 40%;">
+<col style="width: 20%;">
+<col style="width: 40%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_mem_info</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Info. returned in <em>param_value</em></strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_D3D10_RESOURCE_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">ID3D10Resource *</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">If <em>memobj</em> was created using <strong>clCreateFromD3D10BufferKHR</strong>,
+  <strong>clCreateFromD3D10Texture2DKHR</strong>, or <strong>clCreateFromD3D10Texture3DKHR</strong>,
+  returns the <em>resource</em> argument specified when <em>memobj</em> was created.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Add to the list of errors for <strong>clGetImageInfo</strong>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_D3D10_RESOURCE_KHR if <em>param_name</em> is
+CL_MEM_D3D10_SUBRESOURCE_KHR and <em>image</em> was not created by the function
+<strong>clCreateFromD3D10Texture2DKHR</strong>, or <strong>clCreateFromD3D10Texture3DKHR</strong>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Extend <em>table 5.9</em> to include the following entry.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 40%;">
+<col style="width: 20%;">
+<col style="width: 40%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_image_info</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Info. returned in <em>param_value</em></strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_D3D10_SUBRESOURCE_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">If <em>image</em> was created using <strong>clCreateFromD3D10Texture2DKHR</strong>, or
+  <strong>clCreateFromD3D10Texture3DKHR</strong>, returns the <em>subresource</em> argument
+  specified when <em>image</em> was created.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Add to <em>table 5.22</em> in the <strong>Info returned in &lt;param_value&gt;</strong> column for
+<em>cl_event_info</em> = CL_EVENT_COMMAND_TYPE:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR
+CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_d3d10_sharing-sharing-memory-objects-with-direct3d-10-resources">13.6. Sharing Memory Objects with Direct3D 10 Resources</h3>
+<div class="paragraph">
+<p>This section discusses OpenCL functions that allow applications to use
+Direct3D 10 resources as OpenCL memory objects.
+This allows efficient sharing of data between OpenCL and Direct3D 10.
+The OpenCL API may be used to execute kernels that read and/or write memory
+objects that are also Direct3D 10 resources.
+An OpenCL image object may be created from a Direct3D 10 texture resource.
+An OpenCL buffer object may be created from a Direct3D 10 buffer resource.
+OpenCL memory objects may be created from Direct3D 10 objects if and only if
+the OpenCL context has been created from a Direct3D 10 device.</p>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_d3d10_sharing-querying-opencl-devices-corresponding-to-direct3d-10-devices">13.6.1. Querying OpenCL Devices Corresponding to Direct3D 10 Devices</h4>
+<div class="paragraph">
+<p>The OpenCL devices corresponding to a Direct3D 10 device may be queried.
+The OpenCL devices corresponding to a DXGI adapter may also be queried.
+The OpenCL devices corresponding to a Direct3D 10 device will be a subset of
+the OpenCL devices corresponding to the DXGI adapter against which the
+Direct3D 10 device was created.</p>
+</div>
+<div class="paragraph">
+<p>The OpenCL devices corresponding to a Direct3D 10 device or a DXGI device
+may be queried using the function
+</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetDeviceIDsFromD3D10KHR(cl_platform_id platform,
+                                  cl_d3d10_device_source_khr d3d_device_source,
+                                  <span class="directive">void</span> *d3d_object,
+                                  cl_d3d10_device_set_khr d3d_device_set,
+                                  cl_uint num_entries,
+                                  cl_device_id *devices,
+                                  cl_uint *num_devices)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><em>platform</em> refers to the platform ID returned by <strong>clGetPlatformIDs</strong>.</p>
+</div>
+<div class="paragraph">
+<p><em>d3d_device_source</em> specifies the type of <em>d3d_object</em>, and must be one of
+the values shown in the table below.</p>
+</div>
+<div class="paragraph">
+<p><em>d3d_object</em> specifies the object whose corresponding OpenCL devices are
+being queried.
+The type of <em>d3d_object</em> must be as specified in the table below.</p>
+</div>
+<div class="paragraph">
+<p><em>d3d_device_set</em> specifies the set of devices to return, and must be one of
+the values shown in the table below.</p>
+</div>
+<div class="paragraph">
+<p><em>num_entries</em> is the number of cl_device_id entries that can be added to
+<em>devices</em>.
+If <em>devices</em> is not <code>NULL</code> then <em>num_entries</em> must be greater than zero.</p>
+</div>
+<div class="paragraph">
+<p><em>devices</em> returns a list of OpenCL devices found.
+The cl_device_id values returned in <em>devices</em> can be used to identify a
+specific OpenCL device.
+If <em>devices</em> is <code>NULL</code>, this argument is ignored.
+The number of OpenCL devices returned is the minimum of the value specified
+by <em>num_entries</em> and the number of OpenCL devices corresponding to
+<em>d3d_object</em>.</p>
+</div>
+<div class="paragraph">
+<p><em>num_devices</em> returns the number of OpenCL devices available that correspond
+to <em>d3d_object</em>.
+If <em>num_devices</em> is <code>NULL</code>, this argument is ignored.</p>
+</div>
+<div class="paragraph">
+<p><strong>clGetDeviceIDsFromD3D10KHR</strong> returns CL_SUCCESS if the function is executed
+successfully.
+Otherwise it may return</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_PLATFORM if <em>platform</em> is not a valid platform.</p>
+</li>
+<li>
+<p>CL_INVALID_VALUE if <em>d3d_device_source</em> is not a valid value,
+<em>d3d_device_set</em> is not a valid value, <em>num_entries</em> is equal to zero
+and <em>devices</em> is not <code>NULL</code>, or if both <em>num_devices</em> and <em>devices</em> are
+<code>NULL</code>.</p>
+</li>
+<li>
+<p>CL_DEVICE_NOT_FOUND if no OpenCL devices that correspond to <em>d3d_object</em>
+were found.</p>
+</li>
+</ul>
+</div>
+<table id="cl_khr_d3d10_sharing-clGetDeviceIDsFromD3D10KHR-object-type" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 29. <em>Direct3D 10 object types that may be used by</em> <strong>clGetDeviceIDsFromD3D10KHR</strong></caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_d3d_device_source_khr</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Type of <em>d3d_object</em></strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_D3D10_DEVICE_KHR</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">ID3D10Device *</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_D3D10_DXGI_ADAPTER_KHR</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">IDXGIAdapter *</p></td>
+</tr>
+</tbody>
+</table>
+<table id="cl_khr_d3d10_sharing-clGetDeviceIDsFromD3D10KHR-devices" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 30. <em>Sets of devices queriable using</em> <strong>clGetDeviceIDsFromD3D10KHR</strong></caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_d3d_device_set_khr</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Devices returned in <em>devices</em></strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_PREFERRED_DEVICES_FOR_D3D10_KHR</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The preferred OpenCL devices associated with the specified Direct3D
+  object.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_ALL_DEVICES_FOR_D3D10_KHR</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">All OpenCL devices which may interoperate with the specified Direct3D
+  object.
+  Performance of sharing data on these devices may be considerably less than
+  on the preferred devices.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_d3d10_sharing-lifetime-of-shared-objects">13.6.2. Lifetime of Shared Objects</h4>
+<div class="paragraph">
+<p>An OpenCL memory object created from a Direct3D 10 resource remains valid as
+long as the corresponding Direct3D 10 resource has not been deleted.
+If the Direct3D 10 resource is deleted through the Direct3D 10 API,
+subsequent use of the OpenCL memory object will result in undefined
+behavior, including but not limited to possible OpenCL errors, data
+corruption, and program termination.</p>
+</div>
+<div class="paragraph">
+<p>The successful creation of a cl_context against a Direct3D 10 device
+specified via the context create parameter CL_CONTEXT_D3D10_DEVICE_KHR will
+increment the internal Direct3D reference count on the specified Direct3D 10
+device.
+The internal Direct3D reference count on that Direct3D 10 device will be
+decremented when the OpenCL reference count on the returned OpenCL context
+drops to zero.</p>
+</div>
+<div class="paragraph">
+<p>The OpenCL context and corresponding command-queues are dependent on the
+existence of the Direct3D 10 device from which the OpenCL context was
+created.
+If the Direct3D 10 device is deleted through the Direct3D 10 API, subsequent
+use of the OpenCL context will result in undefined behavior, including but
+not limited to possible OpenCL errors, data corruption, and program
+termination.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_d3d10_sharing-sharing-direct3d-10-buffer-resources-as-opencl-buffer-objects">13.6.3. Sharing Direct3D 10 Buffer Resources as OpenCL Buffer Objects</h4>
+<div class="paragraph">
+<p>The function
+</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateFromD3D10BufferKHR(cl_context context,
+                                  cl_mem_flags flags,
+                                  ID3D10Buffer *resource,
+                                  cl_int *errcode_ret)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>creates an OpenCL buffer object from a Direct3D 10 buffer.</p>
+</div>
+<div class="paragraph">
+<p><em>context</em> is a valid OpenCL context created from a Direct3D 10 device.</p>
+</div>
+<div class="paragraph">
+<p><em>flags</em> is a bit-field that is used to specify usage information.
+Refer to <em>table 5.3</em> for a description of <em>flags</em>.
+Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM_READ_WRITE values
+specified in <em>table 5.3</em> can be used.</p>
+</div>
+<div class="paragraph">
+<p><em>resource</em> is a pointer to the Direct3D 10 buffer to share.</p>
+</div>
+<div class="paragraph">
+<p><em>errcode_ret</em> will return an appropriate error code.
+If <em>errcode_ret</em> is <code>NULL</code>, no error code is returned.</p>
+</div>
+<div class="paragraph">
+<p><strong>clCreateFromD3D10BufferKHR</strong> returns a valid non-zero OpenCL buffer object
+and <em>errcode_ret</em> is set to CL_SUCCESS if the buffer object is created
+successfully.
+Otherwise, it returns a <code>NULL</code> value with one of the following error values
+returned in <em>errcode_ret</em>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
+</li>
+<li>
+<p>CL_INVALID_VALUE if values specified in <em>flags</em> are not valid.</p>
+</li>
+<li>
+<p>CL_INVALID_D3D10_RESOURCE_KHR if <em>resource</em> is not a Direct3D 10 buffer
+resource, if <em>resource</em> was created with the D3D10_USAGE flag
+D3D10_USAGE_IMMUTABLE, if a cl_mem from <em>resource</em> has already been
+created using <strong>clCreateFromD3D10BufferKHR</strong>, or if <em>context</em> was not
+created against the same Direct3D 10 device from which <em>resource</em> was
+created.</p>
+</li>
+<li>
+<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The size of the returned OpenCL buffer object is the same as the size of
+<em>resource</em>.
+This call will increment the internal Direct3D reference count on
+<em>resource</em>.
+The internal Direct3D reference count on <em>resource</em> will be decremented when
+the OpenCL reference count on the returned OpenCL memory object drops to
+zero.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_d3d10_sharing-sharing-direct3d-10-texture-and-resources-as-opencl-image-objects">13.6.4. Sharing Direct3D 10 Texture and Resources as OpenCL Image Objects</h4>
+<div class="paragraph">
+<p>The function
+</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateFromD3D10Texture2DKHR(cl_context context,
+                                     cl_mem_flags flags,
+                                     ID3D10Texture2D *resource,
+                                     UINT subresource,
+                                     cl_int *errcode_ret)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>creates an OpenCL 2D image object from a subresource of a Direct3D 10 2D
+texture.</p>
+</div>
+<div class="paragraph">
+<p><em>context</em> is a valid OpenCL context created from a Direct3D 10 device.</p>
+</div>
+<div class="paragraph">
+<p><em>flags</em> is a bit-field that is used to specify usage information.
+Refer to <em>table 5.3</em> for a description of <em>flags</em>.
+Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM_READ_WRITE values
+specified in <em>table 5.3</em> can be used.</p>
+</div>
+<div class="paragraph">
+<p><em>resource</em> is a pointer to the Direct3D 10 2D texture to share.</p>
+</div>
+<div class="paragraph">
+<p><em>subresource</em> is the subresource of <em>resource</em> to share.</p>
+</div>
+<div class="paragraph">
+<p><em>errcode_ret</em> will return an appropriate error code.
+If <em>errcode_ret</em> is <code>NULL</code>, no error code is returned.</p>
+</div>
+<div class="paragraph">
+<p><strong>clCreateFromD3D10Texture2DKHR</strong> returns a valid non-zero OpenCL image object
+and <em>errcode_ret</em> is set to CL_SUCCESS if the image object is created
+successfully.
+Otherwise, it returns a <code>NULL</code> value with one of the following error values
+returned in <em>errcode_ret</em>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
+</li>
+<li>
+<p>CL_INVALID_VALUE if values specified in <em>flags</em> are not valid or if
+<em>subresource</em> is not a valid subresource index for <em>resource</em>.</p>
+</li>
+<li>
+<p>CL_INVALID_D3D10_RESOURCE_KHR if <em>resource</em> is not a Direct3D 10 texture
+resource, if <em>resource</em> was created with the D3D10_USAGE flag
+D3D10_USAGE_IMMUTABLE, if <em>resource</em> is a multisampled texture, if a
+cl_mem from subresource <em>subresource</em> of <em>resource</em> has already been
+created using <strong>clCreateFromD3D10Texture2DKHR</strong>, or if <em>context</em> was not
+created against the same Direct3D 10 device from which <em>resource</em> was
+created.</p>
+</li>
+<li>
+<p>CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the Direct3D 10 texture format of
+<em>resource</em> is not listed in the table
+<a href="#cl_khr_d3d10_sharing-mapping-of-image-formats"><em>Direct3D 10 formats and
+corresponding OpenCL image formats</em></a> or if the Direct3D 10 texture
+format of <em>resource</em> does not map to a supported OpenCL image format.</p>
+</li>
+<li>
+<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The width and height of the returned OpenCL 2D image object are determined
+by the width and height of subresource <em>subresource</em> of <em>resource</em>.
+The channel type and order of the returned OpenCL 2D image object is
+determined by the format of <em>resource</em> by the table
+<a href="#cl_khr_d3d10_sharing-mapping-of-image-formats"><em>Direct3D 10 formats and
+corresponding OpenCL image formats</em></a>.</p>
+</div>
+<div class="paragraph">
+<p>This call will increment the internal Direct3D reference count on
+<em>resource</em>.
+The internal Direct3D reference count on <em>resource</em> will be decremented when
+the OpenCL reference count on the returned OpenCL memory object drops to
+zero.</p>
+</div>
+<div class="paragraph">
+<p>The function
+</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateFromD3D10Texture3DKHR(cl_context context,
+                                     cl_mem_flags flags,
+                                     ID3D10Texture3D *resource,
+                                     UINT subresource,
+                                     cl_int *errcode_ret)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>creates an OpenCL 3D image object from a subresource of a Direct3D 10 3D
+texture.</p>
+</div>
+<div class="paragraph">
+<p><em>context</em> is a valid OpenCL context created from a Direct3D 10 device.</p>
+</div>
+<div class="paragraph">
+<p><em>flags</em> is a bit-field that is used to specify usage information.
+Refer to table 5.3 for a description of <em>flags</em>.
+Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM_READ_WRITE values
+specified in <em>table 5.3</em> can be used.</p>
+</div>
+<div class="paragraph">
+<p><em>resource</em> is a pointer to the Direct3D 10 3D texture to share.</p>
+</div>
+<div class="paragraph">
+<p><em>subresource</em> is the subresource of <em>resource</em> to share.</p>
+</div>
+<div class="paragraph">
+<p><em>errcode_ret</em> will return an appropriate error code.
+If <em>errcode_ret</em> is <code>NULL</code>, no error code is returned.</p>
+</div>
+<div class="paragraph">
+<p><strong>clCreateFromD3D10Texture3DKHR</strong> returns a valid non-zero OpenCL image object
+and <em>errcode_ret</em> is set to CL_SUCCESS if the image object is created
+successfully.
+Otherwise, it returns a <code>NULL</code> value with one of the following error values
+returned in <em>errcode_ret</em>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
+</li>
+<li>
+<p>CL_INVALID_VALUE if values specified in <em>flags</em> are not valid or if
+<em>subresource</em> is not a valid subresource index for <em>resource</em>.</p>
+</li>
+<li>
+<p>CL_INVALID_D3D10_RESOURCE_KHR if <em>resource</em> is not a Direct3D 10 texture
+resource, if <em>resource</em> was created with the D3D10_USAGE flag
+D3D10_USAGE_IMMUTABLE, if <em>resource</em> is a multisampled texture, if a
+cl_mem from subresource <em>subresource</em> of <em>resource</em> has already been
+created using <strong>clCreateFromD3D10Texture3DKHR</strong>, or if <em>context</em> was not
+created against the same Direct3D 10 device from which <em>resource</em> was
+created.</p>
+</li>
+<li>
+<p>CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the Direct3D 10 texture format of
+<em>resource</em> is not listed in the table
+<a href="#cl_khr_d3d10_sharing-mapping-of-image-formats"><em>Direct3D 10 formats and
+corresponding OpenCL image formats</em></a> or if the Direct3D 10 texture
+format of <em>resource</em> does not map to a supported OpenCL image format.</p>
+</li>
+<li>
+<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The width, height and depth of the returned OpenCL 3D image object are
+determined by the width, height and depth of subresource <em>subresource</em> of
+<em>resource</em>.
+The channel type and order of the returned OpenCL 3D image object is
+determined by the format of <em>resource</em> by the table
+<a href="#cl_khr_d3d10_sharing-mapping-of-image-formats"><em>Direct3D 10 formats and
+corresponding OpenCL image formats</em></a>.</p>
+</div>
+<div class="paragraph">
+<p>This call will increment the internal Direct3D reference count on
+<em>resource</em>.
+The internal Direct3D reference count on <em>resource</em> will be decremented when
+the OpenCL reference count on the returned OpenCL memory object drops to
+zero.</p>
+</div>
+<table id="cl_khr_d3d10_sharing-mapping-of-image-formats" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 31. <em>Direct3D 10 formats and corresponding OpenCL image formats</em></caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>DXGI format</strong></th>
+<th class="tableblock halign-left valign-top"><strong>CL image format</strong>
+
+<strong>(channel order, channel data type)</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32B32A32_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_FLOAT</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32B32A32_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNSIGNED_INT32</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32B32A32_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SIGNED_INT32</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_HALF_FLOAT</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_UNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNORM_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNSIGNED_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_SNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SNORM_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SIGNED_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_B8G8R8A8_UNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_BGRA, CL_UNORM_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_UNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNORM_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNSIGNED_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_SNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SNORM_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SIGNED_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_FLOAT</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNSIGNED_INT32</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SIGNED_INT32</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_HALF_FLOAT</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_UNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNORM_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNSIGNED_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_SNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SNORM_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SIGNED_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_UNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNORM_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNSIGNED_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_SNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SNORM_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SIGNED_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_FLOAT</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNSIGNED_INT32</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SIGNED_INT32</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_HALF_FLOAT</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_UNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNORM_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNSIGNED_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_SNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SNORM_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SIGNED_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_UNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNORM_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNSIGNED_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_SNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SNORM_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SIGNED_INT8</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_d3d10_sharing-querying-direct3d-properties-of-memory-objects-created-from-direct3d-10-resources">13.6.5. Querying Direct3D properties of memory objects created from Direct3D 10 resources</h4>
+<div class="paragraph">
+<p>Properties of Direct3D 10 objects may be queried using <strong>clGetMemObjectInfo</strong>
+and <strong>clGetImageInfo</strong> with <em>param_name</em> CL_MEM_D3D10_RESOURCE_KHR and</p>
+</div>
+<div class="paragraph">
+<p>CL_IMAGE_D3D10_SUBRESOURCE_KHR respectively as described in <em>sections 5.4.3</em>
+and <em>5.3.6</em>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_d3d10_sharing-sharing-memory-objects-created-from-direct3d-10-resources-between-direct3d-10-and-opencl-contexts">13.6.6. Sharing memory objects created from Direct3D 10 resources between Direct3D 10 and OpenCL contexts</h4>
+<div class="paragraph">
+<p>The function
+</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueAcquireD3D10ObjectsKHR(cl_command_queue command_queue,
+                                       cl_uint num_objects,
+                                       <span class="directive">const</span> cl_mem *mem_objects,
+                                       cl_uint num_events_in_wait_list,
+                                       <span class="directive">const</span> cl_event *event_wait_list,
+                                       cl_event *event)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is used to acquire OpenCL memory objects that have been created from
+Direct3D 10 resources.
+The Direct3D 10 objects are acquired by the OpenCL context associated with
+<em>command_queue</em> and can therefore be used by all command-queues associated
+with the OpenCL context.</p>
+</div>
+<div class="paragraph">
+<p>OpenCL memory objects created from Direct3D 10 resources must be acquired
+before they can be used by any OpenCL commands queued to a command-queue.
+If an OpenCL memory object created from a Direct3D 10 resource is used while
+it is not currently acquired by OpenCL, the call attempting to use that
+OpenCL memory object will return CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR.</p>
+</div>
+<div class="paragraph">
+<p>If CL_CONTEXT_INTEROP_USER_SYNC is not specified as CL_TRUE during context
+creation, <strong>clEnqueueAcquireD3D10ObjectsKHR</strong> provides the synchronization
+guarantee that any Direct3D 10 calls involving the interop device(s) used in
+the OpenCL context made before <strong>clEnqueueAcquireD3D10ObjectsKHR</strong> is called
+will complete executing before <em>event</em> reports completion and before the
+execution of any subsequent OpenCL work issued in <em>command_queue</em> begins.
+If the context was created with properties specifying
+CL_CONTEXT_INTEROP_USER_SYNC as CL_TRUE, the user is responsible for
+guaranteeing that any Direct3D 10 calls involving the interop device(s) used
+in the OpenCL context made before <strong>clEnqueueAcquireD3D10ObjectsKHR</strong> is
+called have completed before calling <strong>clEnqueueAcquireD3D10ObjectsKHR.</strong></p>
+</div>
+<div class="paragraph">
+<p><em>command_queue</em> is a valid command-queue.</p>
+</div>
+<div class="paragraph">
+<p><em>num_objects</em> is the number of memory objects to be acquired in
+<em>mem_objects</em>.</p>
+</div>
+<div class="paragraph">
+<p><em>mem_objects</em> is a pointer to a list of OpenCL memory objects that were
+created from Direct3D 10 resources.</p>
+</div>
+<div class="paragraph">
+<p><em>event_wait_list</em> and <em>num_events_in_wait_list</em> specify events that need to
+complete before this particular command can be executed.
+If <em>event_wait_list</em> is <code>NULL</code>, then this particular command does not wait
+on any event to complete.
+If <em>event_wait_list</em> is <code>NULL</code>, <em>num_events_in_wait_list</em> must be 0.
+If <em>event_wait_list</em> is not <code>NULL</code>, the list of events pointed to by
+<em>event_wait_list</em> must be valid and <em>num_events_in_wait_list</em> must be
+greater than 0.
+The events specified in <em>event_wait_list</em> act as synchronization points.</p>
+</div>
+<div class="paragraph">
+<p><em>event</em> returns an event object that identifies this particular command and
+can be used to query or queue a wait for this particular command to
+complete.
+<em>event</em> can be <code>NULL</code> in which case it will not be possible for the
+application to query the status of this command or queue a wait for this
+command to complete.
+If the <em>event_wait_list</em> and the <em>event</em> arguments are not <code>NULL</code>, the
+<em>event</em> argument should not refer to an element of the <em>event_wait_list</em>
+array.</p>
+</div>
+<div class="paragraph">
+<p><strong>clEnqueueAcquireD3D10ObjectsKHR</strong> returns CL_SUCCESS if the function is
+executed successfully.
+If <em>num_objects</em> is 0 and <em>mem_objects</em> is <code>NULL</code> then the function does
+nothing and returns CL_SUCCESS.
+Otherwise it returns one of the following errors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_VALUE if <em>num_objects</em> is zero and <em>mem_objects</em> is not a
+<code>NULL</code> value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is <code>NULL</code>.</p>
+</li>
+<li>
+<p>CL_INVALID_MEM_OBJECT if memory objects in <em>mem_objects</em> are not valid
+OpenCL memory objects or if memory objects in <em>mem_objects</em> have not
+been created from Direct3D 10 resources.</p>
+</li>
+<li>
+<p>CL_INVALID_COMMAND_QUEUE if <em>command_queue</em> is not a valid
+command-queue.</p>
+</li>
+<li>
+<p>CL_INVALID_CONTEXT if context associated with <em>command_queue</em> was not
+created from an Direct3D 10 context.</p>
+</li>
+<li>
+<p>CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR if memory objects in
+<em>mem_objects</em> have previously been acquired using
+<strong>clEnqueueAcquireD3D10ObjectsKHR</strong> but have not been released using
+<strong>clEnqueueReleaseD3D10ObjectsKHR</strong>.</p>
+</li>
+<li>
+<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
+<em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not <code>NULL</code> and
+<em>num_events_in_wait_list</em> is 0, or if event objects in <em>event_wait_list</em>
+are not valid events.</p>
+</li>
+<li>
+<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The function
+</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueReleaseD3D10ObjectsKHR(cl_command_queue command_queue,
+                                       cl_uint num_objects,
+                                       <span class="directive">const</span> cl_mem *mem_objects,
+                                       cl_uint num_events_in_wait_list,
+                                       <span class="directive">const</span> cl_event *event_wait_list,
+                                       cl_event *event)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is used to release OpenCL memory objects that have been created from
+Direct3D 10 resources.
+The Direct3D 10 objects are released by the OpenCL context associated with
+<em>command_queue</em>.</p>
+</div>
+<div class="paragraph">
+<p>OpenCL memory objects created from Direct3D 10 resources which have been
+acquired by OpenCL must be released by OpenCL before they may be accessed by
+Direct3D 10.
+Accessing a Direct3D 10 resource while its corresponding OpenCL memory
+object is acquired is in error and will result in undefined behavior,
+including but not limited to possible OpenCL errors, data corruption, and
+program termination.</p>
+</div>
+<div class="paragraph">
+<p>If CL_CONTEXT_INTEROP_USER_SYNC is not specified as CL_TRUE during context
+creation, <strong>clEnqueueReleaseD3D10ObjectsKHR</strong> provides the synchronization
+guarantee that any calls to Direct3D 10 calls involving the interop
+device(s) used in the OpenCL context made after the call to
+<strong>clEnqueueReleaseD3D10ObjectsKHR</strong> will not start executing until after all
+events in <em>event_wait_list</em> are complete and all work already submitted to
+<em>command_queue</em> completes execution.
+If the context was created with properties specifying
+CL_CONTEXT_INTEROP_USER_SYNC as CL_TRUE, the user is responsible for
+guaranteeing that any Direct3D 10 calls involving the interop device(s) used
+in the OpenCL context made after <strong>clEnqueueReleaseD3D10ObjectsKHR</strong> will not
+start executing until after event returned by
+<strong>clEnqueueReleaseD3D10ObjectsKHR</strong> reports completion.</p>
+</div>
+<div class="paragraph">
+<p><em>num_objects</em> is the number of memory objects to be released in
+<em>mem_objects</em>.</p>
+</div>
+<div class="paragraph">
+<p><em>mem_objects</em> is a pointer to a list of OpenCL memory objects that were
+created from Direct3D 10 resources.</p>
+</div>
+<div class="paragraph">
+<p><em>event_wait_list</em> and <em>num_events_in_wait_list</em> specify events that need to
+complete before this particular command can be executed.
+If <em>event_wait_list</em> is <code>NULL</code>, then this particular command does not wait
+on any event to complete.
+If <em>event_wait_list</em> is <code>NULL</code>, <em>num_events_in_wait_list</em> must be 0.
+If <em>event_wait_list</em> is not <code>NULL</code>, the list of events pointed to by
+<em>event_wait_list</em> must be valid and <em>num_events_in_wait_list</em> must be
+greater than 0.
+The event specified by <em>event</em> returns an event object that identifies this
+particular command and can be used to query or queue a wait for this
+particular command to complete.
+<em>event</em> can be <code>NULL</code> in which case it will not be possible for the
+application to query the status of this command or queue a wait for this
+command to complete.
+If the <em>event_wait_list</em> and the <em>event</em> arguments are not <code>NULL</code>, the
+<em>event</em> argument should not refer to an element of the <em>event_wait_list</em>
+array.</p>
+</div>
+<div class="paragraph">
+<p><strong>clEnqueueReleaseD3D10ObjectsKHR</strong> returns CL_SUCCESS if the function is
+executed successfully.
+If <em>num_objects</em> is 0 and <em>mem_objects</em> is <code>NULL</code> the function does nothing
+and returns CL_SUCCESS.
+Otherwise it returns one of the following errors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_VALUE if <em>num_objects</em> is zero and <em>mem_objects</em> is not a
+<code>NULL</code> value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is <code>NULL</code>.</p>
+</li>
+<li>
+<p>CL_INVALID_MEM_OBJECT if memory objects in <em>mem_objects</em> are not valid
+OpenCL memory objects or if memory objects in <em>mem_objects</em> have not
+been created from Direct3D 10 resources.</p>
+</li>
+<li>
+<p>CL_INVALID_COMMAND_QUEUE if <em>command_queue</em> is not a valid
+command-queue.</p>
+</li>
+<li>
+<p>CL_INVALID_CONTEXT if context associated with <em>command_queue</em> was not
+created from a Direct3D 10 device.</p>
+</li>
+<li>
+<p>CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR if memory objects in <em>mem_objects</em>
+have not previously been acquired using
+<strong>clEnqueueAcquireD3D10ObjectsKHR</strong>, or have been released using
+<strong>clEnqueueReleaseD3D10ObjectsKHR</strong> since the last time that they were
+acquired.</p>
+</li>
+<li>
+<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
+<em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not <code>NULL</code> and
+<em>num_events_in_wait_list</em>&gt; is 0, or if event objects in
+<em>event_wait_list</em> are not valid events.</p>
+</li>
+<li>
+<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_d3d10_sharing-issues">13.7. Issues</h3>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>Should this extension be KHR or EXT?</p>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>PROPOSED: KHR.
+If this extension is to be approved by Khronos then it should be KHR,
+otherwise EXT.
+Not all platforms can support this extension, but that is also true of
+OpenGL interop.</p>
+</div>
+<div class="paragraph">
+<p>RESOLVED: KHR.</p>
+</div>
+</div>
+</div>
+</li>
+<li>
+<p>Requiring SharedHandle on ID3D10Resource</p>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>Requiring this can largely simplify things at the DDI level and make some
+implementations faster.
+However, the DirectX spec only defines the shared handle for a subset of the
+resources we would like to support:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>D3D10_RESOURCE_MISC_SHARED - Enables the sharing of resource data between
+two or more Direct3D devices.
+The only resources that can be shared are 2D non-mipmapped textures.</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>PROPOSED A: Add wording to the spec about some implementations needing the
+resource setup as shared:</p>
+</div>
+<div class="paragraph">
+<p>&#8220;Some implementations may require the resource to be shared on the D3D10
+side of the API&#8221;</p>
+</div>
+<div class="paragraph">
+<p>If we do that, do we need another enum to describe this failure case?</p>
+</div>
+<div class="paragraph">
+<p>PROPOSED B: Require that all implementations support both shared and
+non-shared resources.
+The restrictions prohibiting multisample textures and the flag
+D3D10_USAGE_IMMUTABLE guarantee software access to all shareable resources.</p>
+</div>
+<div class="paragraph">
+<p>RESOLVED: Require that implementations support both
+D3D10_RESOURCE_MISC_SHARED being set and not set.
+Add the query for CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR to determine
+on a per-context basis which method will be faster.</p>
+</div>
+</div>
+</div>
+</li>
+<li>
+<p>Texture1D support</p>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>There is not a matching CL type, so do we want to support this and map to
+buffer or Texture2D? If so the command might correspond to the 2D / 3D
+versions:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateFromD3D10Texture1D(cl_context context,
+                                  cl_mem_flags flags,
+                                  ID3D10Texture2D *resource,
+                                  UINT subresource,
+                                  cl_int *errcode_ret)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>RESOLVED: We will not add support for ID3D10Texture1D objects unless a
+corresponding OpenCL 1D Image type is created.</p>
+</div>
+</div>
+</div>
+</li>
+<li>
+<p>CL/D3D10 queries</p>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>The GL interop has clGetGLObjectInfo and clGetGLTextureInfo.
+It is unclear if these are needed on the D3D10 interop side since the D3D10
+spec makes these queries trivial on the D3D10 object itself.
+Also, not all of the semantics of the GL call map across.</p>
+</div>
+<div class="paragraph">
+<p>PROPOSED: Add the <strong>clGetMemObjectInfo</strong> and <strong>clGetImageInfo</strong> parameter names
+CL_MEM_D3D10_RESOURCE_KHR and CL_IMAGE_D3D10_SUBRESOURCE_KHR to query the
+D3D10 resource from which a cl_mem was created.
+From this data, any D3D10 side information may be queried using the D3D10
+API.</p>
+</div>
+<div class="paragraph">
+<p>RESOLVED: We will use <strong>clGetMemObjectInfo</strong> and <strong>clGetImageInfo</strong> to access
+this information.</p>
+</div>
+</div>
+</div>
+</li>
+</ol>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_d3d11_sharing">14. Creating OpenCL Memory Objects from Direct3D 11 Buffers and Textures</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="cl_khr_d3d11_sharing-overview">14.1. Overview</h3>
+<div class="paragraph">
+<p>This section describes the <strong>cl_khr_d3d11_sharing</strong> extension.
+The goal of this extension is to provide interoperability between OpenCL and
+Direct3D 11.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_d3d11_sharing-new-procedures-and-functions">14.2. New Procedures and Functions</h3>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetDeviceIDsFromD3D11KHR(cl_platform_id platform,
+                                  cl_d3d11_device_source_khr d3d_device_source,
+                                  <span class="directive">void</span> *d3d_object,
+                                  cl_d3d11_device_set_khr d3d_device_set,
+                                  cl_uint num_entries,
+                                  cl_device_id *devices,
+                                  cl_uint *num_devices)
+
+cl_mem clCreateFromD3D11BufferKHR(cl_context context,
+                                  cl_mem_flags flags,
+                                  ID3D11Buffer *resource,
+                                  cl_int *errcode_ret)
+
+cl_mem clCreateFromD3D11Texture2DKHR(cl_context context,
+                                     cl_mem_flags flags,
+                                     ID3D11Texture2D *resource,
+                                     UINT subresource,
+                                     cl_int *errcode_ret)
+
+cl_mem clCreateFromD3D11Texture3DKHR(cl_context context,
+                                     cl_mem_flags flags,
+                                     ID3D11Texture3D *resource,
+                                     UINT subresource,
+                                     cl_int *errcode_ret)
+
+cl_int clEnqueueAcquireD3D11ObjectsKHR(cl_command_queue command_queue,
+                                       cl_uint num_objects,
+                                       <span class="directive">const</span> cl_mem *mem_objects,
+                                       cl_uint num_events_in_wait_list,
+                                       <span class="directive">const</span> cl_event *event_wait_list,
+                                       cl_event *event)
+
+cl_int clEnqueueReleaseD3D11ObjectsKHR(cl_command_queue command_queue,
+                                       cl_uint num_objects,
+                                       <span class="directive">const</span> cl_mem *mem_objects,
+                                       cl_uint num_events_in_wait_list,
+                                       <span class="directive">const</span> cl_event *event_wait_list,
+                                       cl_event *event)</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_d3d11_sharing-new-tokens">14.3. New Tokens</h3>
+<div class="paragraph">
+<p>Accepted as a Direct3D 11 device source in the <em>d3d_device_source</em> parameter
+of <strong>clGetDeviceIDsFromD3D11KHR</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_D3D11_DEVICE_KHR
+CL_D3D11_DXGI_ADAPTER_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Accepted as a set of Direct3D 11 devices in the _d3d_device_set_parameter of
+<strong>clGetDeviceIDsFromD3D11KHR</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_PREFERRED_DEVICES_FOR_D3D11_KHR
+CL_ALL_DEVICES_FOR_D3D11_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Accepted as a property name in the <em>properties</em> parameter of
+<strong>clCreateContext</strong> and <strong>clCreateContextFromType</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_CONTEXT_D3D11_DEVICE_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Accepted as a property name in the <em>param_name</em> parameter of
+<strong>clGetContextInfo</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Accepted as the property being queried in the <em>param_name</em> parameter of
+<strong>clGetMemObjectInfo</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_MEM_D3D11_RESOURCE_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Accepted as the property being queried in the <em>param_name</em> parameter of
+<strong>clGetImageInfo</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_IMAGE_D3D11_SUBRESOURCE_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returned in the <em>param_value</em> parameter of <strong>clGetEventInfo</strong> when
+<em>param_name</em> is CL_EVENT_COMMAND_TYPE:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR
+CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returned by <strong>clCreateContext</strong> and <strong>clCreateContextFromType</strong> if the Direct3D
+11 device specified for interoperability is not compatible with the devices
+against which the context is to be created:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_INVALID_D3D11_DEVICE_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returned by <strong>clCreateFromD3D11BufferKHR</strong> when <em>resource</em> is not a Direct3D
+11 buffer object, and by <strong>clCreateFromD3D11Texture2DKHR</strong> and
+<strong>clCreateFromD3D11Texture3DKHR</strong> when <em>resource</em> is not a Direct3D 11 texture
+object.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_INVALID_D3D11_RESOURCE_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returned by <strong>clEnqueueAcquireD3D11ObjectsKHR</strong> when any of <em>mem_objects</em> are
+currently acquired by OpenCL:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returned by <strong>clEnqueueReleaseD3D11ObjectsKHR</strong> when any of <em>mem_objects</em> are
+not currently acquired by OpenCL:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_d3d11_sharing-additions-to-chapter-4">14.4. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
+<div class="paragraph">
+<p>In <em>section 4.4</em>, replace the description of <em>properties</em> under
+<strong>clCreateContext</strong> with:</p>
+</div>
+<div class="paragraph">
+<p>&#8220;_properties_ specifies a list of context property names and their
+corresponding values.
+Each property is followed immediately by the corresponding desired value.
+The list is terminated with zero.
+If a property is not specified in <em>properties</em>, then its default value
+(listed in <em>table 4.5</em>) is used (it is said to be specified implicitly).
+If <em>properties</em> is <code>NULL</code> or empty (points to a list whose first value is
+zero), all attributes take on their default values.&#8221;</p>
+</div>
+<div class="paragraph">
+<p>Add the following to <em>table 4.5</em>:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 40%;">
+<col style="width: 20%;">
+<col style="width: 40%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_context_properties enum</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Property value</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_CONTEXT_D3D11_DEVICE_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">ID3D11Device *</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies the ID3D11Device * to use for Direct3D 11 interoperability.</p>
+<p class="tableblock">  The default value is <code>NULL</code>.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Add to the list of errors for <strong>clCreateContext</strong>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_D3D11_DEVICE_KHR if the value of the property
+CL_CONTEXT_D3D11_DEVICE_KHR is non-<code>NULL</code> and does not specify a valid
+Direct3D 11 device with which the <em>cl_device_ids</em> against which this
+context is to be created may interoperate.</p>
+</li>
+<li>
+<p>CL_INVALID_OPERATION if Direct3D 11 interoperability is specified by
+setting CL_INVALID_D3D11_DEVICE_KHR to a non-<code>NULL</code> value, and
+interoperability with another graphics API is also specified.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Add to the list of errors for <strong>clCreateContextFromType</strong> the same new errors
+described above for <strong>clCreateContext</strong>.</p>
+</div>
+<div class="paragraph">
+<p>Add the following row to <em>table 4.6</em>:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 40%;">
+<col style="width: 20%;">
+<col style="width: 40%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_context_info</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Information returned in param_value</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_bool</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns CL_TRUE if Direct3D 11 resources created as shared by setting
+  <em>MiscFlags</em> to include D3D11_RESOURCE_MISC_SHARED will perform faster when
+  shared with OpenCL, compared with resources which have not set this flag.
+  Otherwise returns CL_FALSE.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_d3d11_sharing-additions-to-chapter-5">14.5. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
+<div class="paragraph">
+<p>Add to the list of errors for <strong>clGetMemObjectInfo</strong>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_D3D11_RESOURCE_KHR if <em>param_name</em> is
+CL_MEM_D3D11_RESOURCE_KHR and <em>memobj</em> was not created by the function
+<strong>clCreateFromD3D11BufferKHR</strong>, <strong>clCreateFromD3D11Texture2DKHR</strong>, or
+<strong>clCreateFromD3D11Texture3DKHR</strong>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Extend <em>table 5.12</em> to include the following entry.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 40%;">
+<col style="width: 20%;">
+<col style="width: 40%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_mem_info</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Info. returned in <em>param_value</em></strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_D3D11_RESOURCE_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">ID3D11Resource *</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">If <em>memobj</em> was created using <strong>clCreateFromD3D11BufferKHR</strong>,
+  <strong>clCreateFromD3D11Texture2DKHR</strong>, or <strong>clCreateFromD3D11Texture3DKHR</strong>,
+  returns the <em>resource</em> argument specified when <em>memobj</em> was created.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Add to the list of errors for <strong>clGetImageInfo</strong>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_D3D11_RESOURCE_KHR if <em>param_name</em> is
+CL_MEM_D3D11_SUBRESOURCE_KHR and <em>image</em> was not created by the function
+<strong>clCreateFromD3D11Texture2DKHR</strong>, or <strong>clCreateFromD3D11Texture3DKHR</strong>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Extend <em>table 5.9</em> to include the following entry.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 40%;">
+<col style="width: 20%;">
+<col style="width: 40%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_image_info</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Info. returned in <em>param_value</em></strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_D3D11_SUBRESOURCE_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">If <em>image</em> was created using <strong>clCreateFromD3D11Texture2DKHR</strong>, or
+  <strong>clCreateFromD3D11Texture3DKHR</strong>, returns the <em>subresource</em> argument
+  specified when <em>image</em> was created.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Add to <em>table 5.22</em> in the <strong>Info returned in param_value</strong> column for
+<em>cl_event_info</em> = CL_EVENT_COMMAND_TYPE:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR
+CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_d3d11_sharing-sharing-memory-objects-with-direct3d-11-resources">14.6. Sharing Memory Objects with Direct3D 11 Resources</h3>
+<div class="paragraph">
+<p>This section discusses OpenCL functions that allow applications to use
+Direct3D 11 resources as OpenCL memory objects.
+This allows efficient sharing of data between OpenCL and Direct3D 11.
+The OpenCL API may be used to execute kernels that read and/or write memory
+objects that are also Direct3D 11 resources.
+An OpenCL image object may be created from a Direct3D 11 texture resource.
+An OpenCL buffer object may be created from a Direct3D 11 buffer resource.
+OpenCL memory objects may be created from Direct3D 11 objects if and only if
+the OpenCL context has been created from a Direct3D 11 device.</p>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_d3d11_sharing-querying-opencl-devices-corresponding-to-direct3d-11-devices">14.6.1. Querying OpenCL Devices Corresponding to Direct3D 11 Devices</h4>
+<div class="paragraph">
+<p>The OpenCL devices corresponding to a Direct3D 11 device may be queried.
+The OpenCL devices corresponding to a DXGI adapter may also be queried.
+The OpenCL devices corresponding to a Direct3D 11 device will be a subset of
+the OpenCL devices corresponding to the DXGI adapter against which the
+Direct3D 11 device was created.</p>
+</div>
+<div class="paragraph">
+<p>The OpenCL devices corresponding to a Direct3D 11 device or a DXGI device
+may be queried using the function
+</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetDeviceIDsFromD3D11KHR(cl_platform_id platform,
+                                  cl_d3d11_device_source_khr d3d_device_source,
+                                  <span class="directive">void</span> *d3d_object,
+                                  cl_d3d11_device_set_khr d3d_device_set,
+                                  cl_uint num_entries,
+                                  cl_device_id *devices,
+                                  cl_uint *num_devices)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><em>platform</em> refers to the platform ID returned by <strong>clGetPlatformIDs</strong>.</p>
+</div>
+<div class="paragraph">
+<p><em>d3d_device_source</em> specifies the type of <em>d3d_object</em>, and must be one of
+the values shown in the table below.</p>
+</div>
+<div class="paragraph">
+<p><em>d3d_object</em> specifies the object whose corresponding OpenCL devices are
+being queried.
+The type of <em>d3d_object</em> must be as specified in the table below.</p>
+</div>
+<div class="paragraph">
+<p><em>d3d_device_set</em> specifies the set of devices to return, and must be one of
+the values shown in the table below.</p>
+</div>
+<div class="paragraph">
+<p><em>num_entries</em> is the number of cl_device_id entries that can be added to
+<em>devices</em>.
+If <em>devices</em> is not <code>NULL</code> then <em>num_entries</em> must be greater than zero.</p>
+</div>
+<div class="paragraph">
+<p><em>devices</em> returns a list of OpenCL devices found.
+The cl_device_id values returned in <em>devices</em> can be used to identify a
+specific OpenCL device.
+If <em>devices</em> is <code>NULL</code>, this argument is ignored.
+The number of OpenCL devices returned is the minimum of the value specified
+by <em>num_entries</em> and the number of OpenCL devices corresponding to
+<em>d3d_object</em>.</p>
+</div>
+<div class="paragraph">
+<p><em>num_devices</em> returns the number of OpenCL devices available that correspond
+to <em>d3d_object</em>.
+If <em>num_devices</em> is <code>NULL</code>, this argument is ignored.</p>
+</div>
+<div class="paragraph">
+<p><strong>clGetDeviceIDsFromD3D10KHR</strong> returns CL_SUCCESS if the function is executed
+successfully.
+Otherwise it may return</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_PLATFORM if <em>platform</em> is not a valid platform.</p>
+</li>
+<li>
+<p>CL_INVALID_VALUE if <em>d3d_device_source</em> is not a valid value,
+<em>d3d_device_set</em> is not a valid value, <em>num_entries</em> is equal to zero
+and <em>devices</em> is not <code>NULL</code>, or if both <em>num_devices</em> and <em>devices</em> are
+<code>NULL</code>.</p>
+</li>
+<li>
+<p>CL_DEVICE_NOT_FOUND if no OpenCL devices that correspond to <em>d3d_object</em>
+were found.</p>
+</li>
+</ul>
+</div>
+<table id="cl_khr_d3d11_sharing-clGetDeviceIDsFromD3D11KHR-object-type" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 32. <em>Direct3D 11 object types that may be used by</em> <strong>clGetDeviceIDsFromD3D11KHR</strong></caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_d3d_device_source_khr</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Type of <em>d3d_object</em></strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_D3D11_DEVICE_KHR</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">ID3D11Device *</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_D3D11_DXGI_ADAPTER_KHR</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">IDXGIAdapter *</p></td>
+</tr>
+</tbody>
+</table>
+<table id="cl_khr_d3d11_sharing-clGetDeviceIDsFromD3D10KHR-devices" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 33. <em>Sets of devices queriable using</em> <strong>clGetDeviceIDsFromD3D11KHR</strong></caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_d3d_device_set_khr</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Devices returned in <em>devices</em></strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_PREFERRED_DEVICES_FOR_D3D11_KHR</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The preferred OpenCL devices associated with the specified Direct3D
+  object.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_ALL_DEVICES_FOR_D3D11_KHR</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">All OpenCL devices which may interoperate with the specified Direct3D
+  object.
+  Performance of sharing data on these devices may be considerably less than
+  on the preferred devices.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_d3d11_sharing-lifetime-of-shared-objects">14.6.2. Lifetime of Shared Objects</h4>
+<div class="paragraph">
+<p>An OpenCL memory object created from a Direct3D 11 resource remains valid as
+long as the corresponding Direct3D 11 resource has not been deleted.
+If the Direct3D 11 resource is deleted through the Direct3D 11 API,
+subsequent use of the OpenCL memory object will result in undefined
+behavior, including but not limited to possible OpenCL errors, data
+corruption, and program termination.</p>
+</div>
+<div class="paragraph">
+<p>The successful creation of a cl_context against a Direct3D 11 device
+specified via the context create parameter CL_CONTEXT_D3D11_DEVICE_KHR will
+increment the internal Direct3D reference count on the specified Direct3D 11
+device.
+The internal Direct3D reference count on that Direct3D 11 device will be
+decremented when the OpenCL reference count on the returned OpenCL context
+drops to zero.</p>
+</div>
+<div class="paragraph">
+<p>The OpenCL context and corresponding command-queues are dependent on the
+existence of the Direct3D 11 device from which the OpenCL context was
+created.
+If the Direct3D 11 device is deleted through the Direct3D 11 API, subsequent
+use of the OpenCL context will result in undefined behavior, including but
+not limited to possible OpenCL errors, data corruption, and program
+termination.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_d3d11_sharing-sharing-direct3d-11-buffer-resources-as-opencl-buffer-objects">14.6.3. Sharing Direct3D 11 Buffer Resources as OpenCL Buffer Objects</h4>
+<div class="paragraph">
+<p>The function
+</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateFromD3D11BufferKHR(cl_context context,
+                                  cl_mem_flags flags,
+                                  ID3D11Buffer *resource,
+                                  cl_int *errcode_ret)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>creates an OpenCL buffer object from a Direct3D 11 buffer.</p>
+</div>
+<div class="paragraph">
+<p><em>context</em> is a valid OpenCL context created from a Direct3D 11 device.</p>
+</div>
+<div class="paragraph">
+<p><em>flags</em> is a bit-field that is used to specify usage information.
+Refer to table 5.3 for a description of <em>flags</em>.
+Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM_READ_WRITE values
+specified in <em>table 5.3</em> can be used.</p>
+</div>
+<div class="paragraph">
+<p><em>resource</em> is a pointer to the Direct3D 11 buffer to share.</p>
+</div>
+<div class="paragraph">
+<p><em>errcode_ret</em> will return an appropriate error code.
+If <em>errcode_ret</em> is <code>NULL</code>, no error code is returned.</p>
+</div>
+<div class="paragraph">
+<p><strong>clCreateFromD3D11BufferKHR</strong> returns a valid non-zero OpenCL buffer object
+and <em>errcode_ret</em> is set to CL_SUCCESS if the buffer object is created
+successfully.
+Otherwise, it returns a <code>NULL</code> value with one of the following error values
+returned in <em>errcode_ret</em>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
+</li>
+<li>
+<p>CL_INVALID_VALUE if values specified in <em>flags</em> are not valid.</p>
+</li>
+<li>
+<p>CL_INVALID_D3D11_RESOURCE_KHR if <em>resource</em> is not a Direct3D 11 buffer
+resource, if <em>resource</em> was created with the D3D11_USAGE flag
+D3D11_USAGE_IMMUTABLE, if a cl_mem from <em>resource</em> has already been
+created using <strong>clCreateFromD3D11BufferKHR</strong>, or if <em>context</em> was not
+created against the same Direct3D 11 device from which <em>resource</em> was
+created.</p>
+</li>
+<li>
+<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The size of the returned OpenCL buffer object is the same as the size of
+<em>resource</em>.
+This call will increment the internal Direct3D reference count on
+<em>resource</em>.
+The internal Direct3D reference count on <em>resource</em> will be decremented when
+the OpenCL reference count on the returned OpenCL memory object drops to
+zero.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_d3d11_sharing-sharing-direct3d-11-texture-and-resources-as-opencl-image-objects">14.6.4. Sharing Direct3D 11 Texture and Resources as OpenCL Image Objects</h4>
+<div class="paragraph">
+<p>The function
+</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateFromD3D11Texture2DKHR(cl_context context,
+                                     cl_mem_flags flags,
+                                     ID3D11Texture2D *resource,
+                                     UINT subresource,
+                                     cl_int *errcode_ret)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>creates an OpenCL 2D image object from a subresource of a Direct3D 11 2D
+texture.</p>
+</div>
+<div class="paragraph">
+<p><em>context</em> is a valid OpenCL context created from a Direct3D 11 device.</p>
+</div>
+<div class="paragraph">
+<p><em>flags</em> is a bit-field that is used to specify usage information.
+Refer to <em>table 5.3</em> for a description of <em>flags</em>.
+Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM_READ_WRITE values
+specified in <em>table 5.3</em> can be used.</p>
+</div>
+<div class="paragraph">
+<p><em>resource</em> is a pointer to the Direct3D 11 2D texture to share.</p>
+</div>
+<div class="paragraph">
+<p><em>subresource</em> is the subresource of <em>resource</em> to share.</p>
+</div>
+<div class="paragraph">
+<p><em>errcode_ret</em> will return an appropriate error code.
+If <em>errcode_ret</em> is <code>NULL</code>, no error code is returned.</p>
+</div>
+<div class="paragraph">
+<p><strong>clCreateFromD3D11Texture2DKHR</strong> returns a valid non-zero OpenCL image object
+and <em>errcode_ret</em> is set to CL_SUCCESS if the image object is created
+successfully.
+Otherwise, it returns a <code>NULL</code> value with one of the following error values
+returned in <em>errcode_ret</em>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
+</li>
+<li>
+<p>CL_INVALID_VALUE if values specified in <em>flags</em> are not valid or if
+<em>subresource</em> is not a valid subresource index for <em>resource</em>.</p>
+</li>
+<li>
+<p>CL_INVALID_D3D11_RESOURCE_KHR if <em>resource</em> is not a Direct3D 11 texture
+resource, if <em>resource</em> was created with the D3D11_USAGE flag
+D3D11_USAGE_IMMUTABLE, if <em>resource</em> is a multisampled texture, if a
+cl_mem from subresource <em>subresource</em> of <em>resource</em> has already been
+created using <strong>clCreateFromD3D11Texture2DKHR</strong>, or if <em>context</em> was not
+created against the same Direct3D 10 device from which <em>resource</em> was
+created.</p>
+</li>
+<li>
+<p>CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the Direct3D 11 texture format of
+<em>resource</em> is not listed in the table
+<a href="#cl_khr_d3d11_sharing-mapping-of-image-formats"><em>Direct3D 11 formats and
+corresponding OpenCL image formats</em></a> or if the Direct3D 11 texture
+format of <em>resource</em> does not map to a supported OpenCL image format.</p>
+</li>
+<li>
+<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The width and height of the returned OpenCL 2D image object are determined
+by the width and height of subresource <em>subresource</em> of <em>resource</em>.
+The channel type and order of the returned OpenCL 2D image object is
+determined by the format of <em>resource</em> by the table
+<a href="#cl_khr_d3d11_sharing-mapping-of-image-formats"><em>Direct3D 11 formats and
+corresponding OpenCL image formats</em></a>.</p>
+</div>
+<div class="paragraph">
+<p>This call will increment the internal Direct3D reference count on
+<em>resource</em>.
+The internal Direct3D reference count on <em>resource</em> will be decremented when
+the OpenCL reference count on the returned OpenCL memory object drops to
+zero.</p>
+</div>
+<div class="paragraph">
+<p>The function
+</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateFromD3D11Texture3DKHR(cl_context context,
+                                     cl_mem_flags flags,
+                                     ID3D11Texture3D *resource,
+                                     UINT subresource,
+                                     cl_int *errcode_ret)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>creates an OpenCL 3D image object from a subresource of a Direct3D 11 3D
+texture.</p>
+</div>
+<div class="paragraph">
+<p><em>context</em> is a valid OpenCL context created from a Direct3D 11 device.</p>
+</div>
+<div class="paragraph">
+<p><em>flags</em> is a bit-field that is used to specify usage information.
+Refer to <em>table 5.3</em> for a description of <em>flags</em>.
+Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM_READ_WRITE values
+specified in <em>table 5.3</em> can be used.</p>
+</div>
+<div class="paragraph">
+<p><em>resource</em> is a pointer to the Direct3D 11 3D texture to share.</p>
+</div>
+<div class="paragraph">
+<p><em>subresource</em> is the subresource of <em>resource</em> to share.</p>
+</div>
+<div class="paragraph">
+<p><em>errcode_ret</em> will return an appropriate error code.
+If <em>errcode_ret</em> is <code>NULL</code>, no error code is returned.</p>
+</div>
+<div class="paragraph">
+<p><strong>clCreateFromD3D11Texture3DKHR</strong> returns a valid non-zero OpenCL image object
+and <em>errcode_ret</em> is set to CL_SUCCESS if the image object is created
+successfully.
+Otherwise, it returns a <code>NULL</code> value with one of the following error values
+returned in <em>errcode_ret</em>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
+</li>
+<li>
+<p>CL_INVALID_VALUE if values specified in <em>flags</em> are not valid or if
+<em>subresource</em> is not a valid subresource index for <em>resource</em>.</p>
+</li>
+<li>
+<p>CL_INVALID_D3D11_RESOURCE_KHR if <em>resource</em> is not a Direct3D 11 texture
+resource, if <em>resource</em> was created with the D3D11_USAGE flag
+D3D11_USAGE_IMMUTABLE, if <em>resource</em> is a multisampled texture, if a
+cl_mem from subresource <em>subresource</em> of <em>resource</em> has already been
+created using <strong>clCreateFromD3D11Texture3DKHR</strong>, or if <em>context</em> was not
+created against the same Direct3D 11 device from which <em>resource</em> was
+created.</p>
+</li>
+<li>
+<p>CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the Direct3D 11 texture format of
+<em>resource</em> is not listed in the table
+<a href="#cl_khr_d3d11_sharing-mapping-of-image-formats"><em>Direct3D 11 formats and
+corresponding OpenCL image formats</em></a> or if the Direct3D 11 texture
+format of <em>resource</em> does not map to a supported OpenCL image format.</p>
+</li>
+<li>
+<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The width, height and depth of the returned OpenCL 3D image object are
+determined by the width, height and depth of subresource <em>subresource</em> of
+<em>resource</em>.
+The channel type and order of the returned OpenCL 3D image object is
+determined by the format of <em>resource</em> by the table
+<a href="#cl_khr_d3d11_sharing-mapping-of-image-formats"><em>Direct3D 11 formats and
+corresponding OpenCL image formats</em></a>.</p>
+</div>
+<div class="paragraph">
+<p>This call will increment the internal Direct3D reference count on
+<em>resource</em>.
+The internal Direct3D reference count on <em>resource</em> will be decremented when
+the OpenCL reference count on the returned OpenCL memory object drops to
+zero.</p>
+</div>
+<table id="cl_khr_d3d11_sharing-mapping-of-image-formats" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 34. <em>Direct3D 11 formats and corresponding OpenCL image formats</em></caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>DXGI format</strong></th>
+<th class="tableblock halign-left valign-top"><strong>CL image format</strong>
+
+<strong>(channel order, channel data type)</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32B32A32_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_FLOAT</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32B32A32_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNSIGNED_INT32</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32B32A32_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SIGNED_INT32</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_HALF_FLOAT</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_UNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNORM_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNSIGNED_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_SNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SNORM_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SIGNED_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_B8G8R8A8_UNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_BGRA, CL_UNORM_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_UNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNORM_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNSIGNED_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_SNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SNORM_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SIGNED_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_FLOAT</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNSIGNED_INT32</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SIGNED_INT32</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_HALF_FLOAT</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_UNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNORM_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNSIGNED_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_SNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SNORM_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SIGNED_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_UNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNORM_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNSIGNED_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_SNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SNORM_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SIGNED_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_FLOAT</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNSIGNED_INT32</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SIGNED_INT32</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_HALF_FLOAT</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_UNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNORM_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNSIGNED_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_SNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SNORM_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SIGNED_INT16</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_UNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNORM_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_UINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNSIGNED_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_SNORM</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SNORM_INT8</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_SINT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SIGNED_INT8</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_d3d11_sharing-querying-direct3d-properties-of-memory-objects-created-from-direct3d-11-resources">14.6.5. Querying Direct3D properties of memory objects created from Direct3D 11 resources</h4>
+<div class="paragraph">
+<p>Properties of Direct3D 11 objects may be queried using <strong>clGetMemObjectInfo</strong>
+and <strong>clGetImageInfo</strong> with <em>param_name</em> CL_MEM_D3D11_RESOURCE_KHR and</p>
+</div>
+<div class="paragraph">
+<p>CL_IMAGE_D3D11_SUBRESOURCE_KHR respectively as described in <em>sections 5.4.3</em>
+and <em>5.3.6</em>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_d3d11_sharing-sharing-memory-objects-created-from-direct3d-11-resources-between-direct3d-11-and-opencl-contexts">14.6.6. Sharing memory objects created from Direct3D 11 resources between Direct3D 11 and OpenCL contexts</h4>
+<div class="paragraph">
+<p>The function
+</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueAcquireD3D11ObjectsKHR(cl_command_queue command_queue,
+                                       cl_uint num_objects,
+                                       <span class="directive">const</span> cl_mem *mem_objects,
+                                       cl_uint num_events_in_wait_list,
+                                       <span class="directive">const</span> cl_event *event_wait_list,
+                                       cl_event *event)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is used to acquire OpenCL memory objects that have been created from
+Direct3D 11 resources.
+The Direct3D 11 objects are acquired by the OpenCL context associated with
+<em>command_queue</em> and can therefore be used by all command-queues associated
+with the OpenCL context.</p>
+</div>
+<div class="paragraph">
+<p>OpenCL memory objects created from Direct3D 11 resources must be acquired
+before they can be used by any OpenCL commands queued to a command-queue.
+If an OpenCL memory object created from a Direct3D 11 resource is used while
+it is not currently acquired by OpenCL, the call attempting to use that
+OpenCL memory object will return CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR.</p>
+</div>
+<div class="paragraph">
+<p>If CL_CONTEXT_INTEROP_USER_SYNC is not specified as CL_TRUE during context
+creation, <strong>clEnqueueAcquireD3D11ObjectsKHR</strong> provides the synchronization
+guarantee that any Direct3D 11 calls involving the interop device(s) used in
+the OpenCL context made before <strong>clEnqueueAcquireD3D11ObjectsKHR</strong> is called
+will complete executing before <em>event</em> reports completion and before the
+execution of any subsequent OpenCL work issued in <em>command_queue</em> begins.
+If the context was created with properties specifying
+CL_CONTEXT_INTEROP_USER_SYNC as CL_TRUE, the user is responsible for
+guaranteeing that any Direct3D 11 calls involving the interop device(s) used
+in the OpenCL context made before <strong>clEnqueueAcquireD3D11ObjectsKHR</strong> is
+called have completed before calling <strong>clEnqueueAcquireD3D11ObjectsKHR.</strong></p>
+</div>
+<div class="paragraph">
+<p><em>command_queue</em> is a valid command-queue.</p>
+</div>
+<div class="paragraph">
+<p><em>num_objects</em> is the number of memory objects to be acquired in
+<em>mem_objects</em>.</p>
+</div>
+<div class="paragraph">
+<p><em>mem_objects</em> is a pointer to a list of OpenCL memory objects that were
+created from Direct3D 11 resources.</p>
+</div>
+<div class="paragraph">
+<p><em>event_wait_list</em> and <em>num_events_in_wait_list</em> specify events that need to
+complete before this particular command can be executed.
+If <em>event_wait_list</em> is <code>NULL</code>, then this particular command does not wait
+on any event to complete.
+If <em>event_wait_list</em> is <code>NULL</code>, <em>num_events_in_wait_list</em> must be 0.
+If <em>event_wait_list</em> is not <code>NULL</code>, the list of events pointed to by
+<em>event_wait_list</em> must be valid and <em>num_events_in_wait_list</em> must be
+greater than 0.
+The events specified in <em>event_wait_list</em> act as synchronization points.</p>
+</div>
+<div class="paragraph">
+<p><em>event</em> returns an event object that identifies this particular command and
+can be used to query or queue a wait for this particular command to
+complete.
+<em>event</em> can be <code>NULL</code> in which case it will not be possible for the
+application to query the status of this command or queue a wait for this
+command to complete.
+If the <em>event_wait_list</em> and the <em>event</em> arguments are not <code>NULL</code>, the
+<em>event</em> argument should not refer to an element of the <em>event_wait_list</em>
+array.</p>
+</div>
+<div class="paragraph">
+<p><strong>clEnqueueAcquireD3D11ObjectsKHR</strong> returns CL_SUCCESS if the function is
+executed successfully.
+If <em>num_objects</em> is 0 and <em>mem_objects</em> is <code>NULL</code> then the function does
+nothing and returns CL_SUCCESS.
+Otherwise it returns one of the following errors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_VALUE if <em>num_objects</em> is zero and <em>mem_objects</em> is not a
+<code>NULL</code> value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is <code>NULL</code>.</p>
+</li>
+<li>
+<p>CL_INVALID_MEM_OBJECT if memory objects in <em>mem_objects</em> are not valid
+OpenCL memory objects or if memory objects in <em>mem_objects</em> have not
+been created from Direct3D 11 resources.</p>
+</li>
+<li>
+<p>CL_INVALID_COMMAND_QUEUE if <em>command_queue</em> is not a valid
+command-queue.</p>
+</li>
+<li>
+<p>CL_INVALID_CONTEXT if context associated with <em>command_queue</em> was not
+created from an Direct3D 11 context.</p>
+</li>
+<li>
+<p>CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR if memory objects in
+<em>mem_objects</em> have previously been acquired using
+<strong>clEnqueueAcquireD3D11ObjectsKHR</strong> but have not been released using
+<strong>clEnqueueReleaseD3D11ObjectsKHR</strong>.</p>
+</li>
+<li>
+<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
+<em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not <code>NULL</code> and
+<em>num_events_in_wait_list</em> is 0, or if event objects in <em>event_wait_list</em>
+are not valid events.</p>
+</li>
+<li>
+<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The function
+</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueReleaseD3D11ObjectsKHR(cl_command_queue command_queue,
+                                       cl_uint num_objects,
+                                       <span class="directive">const</span> cl_mem *mem_objects,
+                                       cl_uint num_events_in_wait_list,
+                                       <span class="directive">const</span> cl_event *event_wait_list,
+                                       cl_event *event)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is used to release OpenCL memory objects that have been created from
+Direct3D 11 resources.
+The Direct3D 11 objects are released by the OpenCL context associated with
+<em>command_queue</em>.</p>
+</div>
+<div class="paragraph">
+<p>OpenCL memory objects created from Direct3D 11 resources which have been
+acquired by OpenCL must be released by OpenCL before they may be accessed by
+Direct3D 11.
+Accessing a Direct3D 11 resource while its corresponding OpenCL memory
+object is acquired is in error and will result in undefined behavior,
+including but not limited to possible OpenCL errors, data corruption, and
+program termination.</p>
+</div>
+<div class="paragraph">
+<p>If CL_CONTEXT_INTEROP_USER_SYNC is not specified as CL_TRUE during context
+creation, <strong>clEnqueueReleaseD3D11ObjectsKHR</strong> provides the synchronization
+guarantee that any calls to Direct3D 11 calls involving the interop
+device(s) used in the OpenCL context made after the call to
+<strong>clEnqueueReleaseD3D11ObjectsKHR</strong> will not start executing until after all
+events in <em>event_wait_list</em> are complete and all work already submitted to
+<em>command_queue</em> completes execution.
+If the context was created with properties specifying
+CL_CONTEXT_INTEROP_USER_SYNC as CL_TRUE, the user is responsible for
+guaranteeing that any Direct3D 11 calls involving the interop device(s) used
+in the OpenCL context made after <strong>clEnqueueReleaseD3D11ObjectsKHR</strong> will not
+start executing until after event returned by
+<strong>clEnqueueReleaseD3D11ObjectsKHR</strong> reports completion.</p>
+</div>
+<div class="paragraph">
+<p><em>num_objects</em> is the number of memory objects to be released in
+<em>mem_objects</em>.</p>
+</div>
+<div class="paragraph">
+<p><em>mem_objects</em> is a pointer to a list of OpenCL memory objects that were
+created from Direct3D 11 resources.</p>
+</div>
+<div class="paragraph">
+<p><em>event_wait_list</em> and <em>num_events_in_wait_list</em> specify events that need to
+complete before this particular command can be executed.
+If <em>event_wait_list</em> is <code>NULL</code>, then this particular command does not wait
+on any event to complete.
+If <em>event_wait_list</em> is <code>NULL</code>, <em>num_events_in_wait_list</em> must be 0.
+If <em>event_wait_list</em> is not <code>NULL</code>, the list of events pointed to by
+<em>event_wait_list</em> must be valid and <em>num_events_in_wait_list</em> must be
+greater than 0.
+The event specified by <em>event</em> returns an event object that identifies this
+particular command and can be used to query or queue a wait for this
+particular command to complete.
+<em>event</em> can be <code>NULL</code> in which case it will not be possible for the
+application to query the status of this command or queue a wait for this
+command to complete.
+If the <em>event_wait_list</em> and the <em>event</em> arguments are not <code>NULL</code>, the
+<em>event</em> argument should not refer to an element of the <em>event_wait_list</em>
+array.</p>
+</div>
+<div class="paragraph">
+<p><strong>clEnqueueReleaseD3D11ObjectsKHR</strong> returns CL_SUCCESS if the function is
+executed successfully.
+If <em>num_objects</em> is 0 and <em>mem_objects</em> is <code>NULL</code> the function does nothing
+and returns CL_SUCCESS.
+Otherwise it returns one of the following errors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_VALUE if <em>num_objects</em> is zero and <em>mem_objects</em> is not a
+<code>NULL</code> value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is <code>NULL</code>.</p>
+</li>
+<li>
+<p>CL_INVALID_MEM_OBJECT if memory objects in <em>mem_objects</em> are not valid
+OpenCL memory objects or if memory objects in <em>mem_objects</em> have not
+been created from Direct3D 11 resources.</p>
+</li>
+<li>
+<p>CL_INVALID_COMMAND_QUEUE if <em>command_queue</em> is not a valid
+command-queue.</p>
+</li>
+<li>
+<p>CL_INVALID_CONTEXT if context associated with <em>command_queue</em> was not
+created from a Direct3D 11 device.</p>
+</li>
+<li>
+<p>CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR if memory objects in <em>mem_objects</em>
+have not previously been acquired using
+<strong>clEnqueueAcquireD3D11ObjectsKHR</strong>, or have been released using
+<strong>clEnqueueReleaseD3D11ObjectsKHR</strong> since the last time that they were
+acquired.</p>
+</li>
+<li>
+<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
+<em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not <code>NULL</code> and
+<em>num_events_in_wait_list</em>&gt; is 0, or if event objects in
+<em>event_wait_list</em> are not valid events.</p>
+</li>
+<li>
+<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_dx9_media_sharing">15. Creating OpenCL Memory Objects from DirectX 9 Media Surfaces</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="cl_khr_dx9_media_sharing-overview">15.1. Overview</h3>
+<div class="paragraph">
+<p>This section describes the <strong>cl_khr_dx9_media_sharing</strong> extension.
+The goal of this extension is to allow applications to use media surfaces as
+OpenCL memory objects.
+This allows efficient sharing of data between OpenCL and selected adapter
+APIs (only DX9 for now).
+If this extension is supported, an OpenCL image object can be created from a
+media surface and the OpenCL API can be used to execute kernels that read
+and/or write memory objects that are media surfaces.
+Note that OpenCL memory objects may be created from the adapter media
+surface if and only if the OpenCL context has been created from that
+adapter.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_dx9_media_sharing-new-procedures-and-functions">15.2. New Procedures and Functions</h3>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetDeviceIDsFromDX9MediaAdapterKHR(
+                                    cl_platform_id platform,
+                                    cl_uint num_media_adapters,
+                                    cl_dx9_media_adapter_type_khr *media_adapters_type,
+                                    <span class="directive">void</span> *media_adapters,
+                                    cl_dx9_media_adapter_set_khr media_adapter_set,
+                                    cl_uint num_entries,
+                                    cl_device_id *devices,
+                                    cl_int *num_devices)
+
+cl_mem clCreateFromDX9MediaSurfaceKHR(cl_context context,
+                                      cl_mem_flags flags,
+                                      cl_dx9_media_adapter_type_khr adapter_type,
+                                      <span class="directive">void</span> *surface_info,
+                                      cl_uint plane,
+                                      cl_int *errcode_ret)
+
+cl_int clEnqueueAcquireDX9MediaSurfacesKHR(cl_command_queue command_queue,
+                                           cl_uint num_objects,
+                                           <span class="directive">const</span> cl_mem *mem_objects,
+                                           cl_uint num_events_in_wait_list,
+                                           <span class="directive">const</span> cl_event *event_wait_list,
+                                           cl_event *event)
+
+cl_int clEnqueueReleaseDX9MediaSurfacesKHR(cl_command_queue command_queue,
+                                           cl_uint num_objects,
+                                           <span class="directive">const</span> cl_mem *mem_objects,
+                                           cl_uint num_events_in_wait_list,
+                                           <span class="directive">const</span> cl_event *event_wait_list,
+                                           cl_event *event)</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_dx9_media_sharing-new-tokens">15.3. New Tokens</h3>
+<div class="paragraph">
+<p>Accepted by the <em>media_adapter_type</em> parameter of
+<strong>clGetDeviceIDsFromDX9MediaAdapterKHR</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_ADAPTER_D3D9_KHR
+CL_ADAPTER_D3D9EX_KHR
+CL_ADAPTER_DXVA_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Accepted by the <em>media_adapter_set</em> parameter of
+<strong>clGetDeviceIDsFromDX9MediaAdapterKHR</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR
+CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Accepted as a property name in the <em>properties</em> parameter of
+<strong>clCreateContext</strong> and <strong>clCreateContextFromType</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_CONTEXT_ADAPTER_D3D9_KHR
+CL_CONTEXT_ADAPTER_D3D9EX_KHR
+CL_CONTEXT_ADAPTER_DXVA_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Accepted as the property being queried in the <em>param_name</em> parameter of
+<strong>clGetMemObjectInfo</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR
+CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Accepted as the property being queried in the <em>param_name</em> parameter of
+<strong>clGetImageInfo</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_IMAGE_DX9_MEDIA_PLANE_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returned in the <em>param_value</em> parameter of <strong>clGetEventInfo</strong> when
+<em>param_name</em> is CL_EVENT_COMMAND_TYPE:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR
+CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returned by <strong>clCreateContext</strong> and <strong>clCreateContextFromType</strong> if the media
+adapter specified for interoperability is not compatible with the devices
+against which the context is to be created:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_INVALID_DX9_MEDIA_ADAPTER_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returned by <strong>clCreateFromDX9MediaSurfaceKHR</strong> when <em>adapter_type</em> is set to a
+media adapter and the <em>surface_info</em> does not reference a media surface of
+the required type, or if <em>adapter_type</em> is set to a media adapter type and
+<em>surface_info</em> does not contain a valid reference to a media surface on that
+adapter, by <strong>clGetMemObjectInfo</strong> when <em>param_name</em> is a surface or handle
+when the image was not created from an appropriate media surface, and from
+<strong>clGetImageInfo</strong> when <em>param_name</em> is CL IMAGE_DX9_MEDIA_PLANE KHR and image
+was not created from an appropriate media surface.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_INVALID_DX9_MEDIA_SURFACE_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returned by <strong>clEnqueueAcquireDX9MediaSurfacesKHR</strong> when any of <em>mem_objects</em>
+are currently acquired by OpenCL:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returned by <strong>clEnqueueReleaseDX9MediaSurfacesKHR</strong> when any of <em>mem_objects</em>
+are not currently acquired by OpenCL:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_dx9_media_sharing-additions-to-chapter-4">15.4. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
+<div class="paragraph">
+<p>In <em>section 4.4</em>, replace the description of <em>properties</em> under
+<strong>clCreateContext</strong> with:</p>
+</div>
+<div class="paragraph">
+<p>&#8220;_properties_ specifies a list of context property names and their
+corresponding values.
+Each property is followed immediately by the corresponding desired value.
+The list is terminated with zero.
+If a property is not specified in <em>properties</em>, then its default value
+(listed in <em>table 4.5</em>) is used (it is said to be specified implicitly).
+If <em>properties</em> is <code>NULL</code> or empty (points to a list whose first value is
+zero), all attributes take on their default values.&#8221;</p>
+</div>
+<div class="paragraph">
+<p>Add the following to <em>table 4.5</em>:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 33.3333%;">
 <col style="width: 33.3333%;">
@@ -5440,7 +10649,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_dx9_media_sharing-additions-to-chapter-5">6.5. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
+<h3 id="cl_khr_dx9_media_sharing-additions-to-chapter-5">15.5. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
 <div class="paragraph">
 <p>Add to the list of errors for <strong>clGetMemObjectInfo</strong>:</p>
 </div>
@@ -5456,7 +10665,7 @@
 <div class="paragraph">
 <p>Extend <em>table 5.12</em> to include the following entry:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 33.3333%;">
 <col style="width: 33.3333%;">
@@ -5499,7 +10708,7 @@
 <div class="paragraph">
 <p>Extend <em>table 5.9</em> to include the following entry.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 33.3333%;">
 <col style="width: 33.3333%;">
@@ -5533,7 +10742,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_dx9_media_sharing-sharing-media-surfaces-with-opencl">6.6. Sharing Media Surfaces with OpenCL</h3>
+<h3 id="cl_khr_dx9_media_sharing-sharing-media-surfaces-with-opencl">15.6. Sharing Media Surfaces with OpenCL</h3>
 <div class="paragraph">
 <p>This section discusses OpenCL functions that allow applications to use media
 surfaces as OpenCL memory objects.
@@ -5545,7 +10754,7 @@
 OpenCL context has been created from a media adapter.</p>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_dx9_media_sharing-querying-opencl-devices-corresponding-to-media-adapters">6.6.1. Querying OpenCL Devices corresponding to Media Adapters</h4>
+<h4 id="cl_khr_dx9_media_sharing-querying-opencl-devices-corresponding-to-media-adapters">15.6.1. Querying OpenCL Devices corresponding to Media Adapters</h4>
 <div class="paragraph">
 <p>Media adapters are an abstraction associated with devices that provide media
 capabilities.</p>
@@ -5556,11 +10765,11 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_int clGetDeviceIDsFromDX9MediaAdapterKHR(
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetDeviceIDsFromDX9MediaAdapterKHR(
                                     cl_platform_id platform,
                                     cl_uint num_media_adapters,
                                     cl_dx9_media_adapter_type_khr *media_adapters_type,
-                                    void *media_adapters,
+                                    <span class="directive">void</span> *media_adapters,
                                     cl_dx9_media_adapter_set_khr media_adapter_set,
                                     cl_uint num_entries,
                                     cl_device_id *devices,
@@ -5583,8 +10792,8 @@
 Each entry specifies the type of media adapter and must be one of the values
 described in the table below.</p>
 </div>
-<table id="cl_khr_dx9_media_sharing-media-adapter-types" class="tableblock frame-all grid-all spread">
-<caption class="title">Table 15. <em>cl_dx9_media_adapter_type_khr values</em></caption>
+<table id="cl_khr_dx9_media_sharing-media-adapter-types" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 35. <em>cl_dx9_media_adapter_type_khr values</em></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -5610,8 +10819,8 @@
 </tr>
 </tbody>
 </table>
-<table id="cl_khr_dx9_media_sharing-media-adapter-sets" class="tableblock frame-all grid-all spread">
-<caption class="title">Table 16. <em>cl_dx9_media_adapter_set_khr values</em></caption>
+<table id="cl_khr_dx9_media_sharing-media-adapter-sets" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 36. <em>cl_dx9_media_adapter_set_khr values</em></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -5705,17 +10914,17 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_dx9_media_sharing-creating-media-resources-as-opencl-image-objects">6.6.2. Creating Media Resources as OpenCL Image Objects</h4>
+<h4 id="cl_khr_dx9_media_sharing-creating-media-resources-as-opencl-image-objects">15.6.2. Creating Media Resources as OpenCL Image Objects</h4>
 <div class="paragraph">
 <p>The function
 </p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_mem clCreateFromDX9MediaSurfaceKHR(cl_context context,
+<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateFromDX9MediaSurfaceKHR(cl_context context,
                                       cl_mem_flags flags,
                                       cl_dx9_media_adapter_type_khr adapter_type,
-                                      void *surface_info,
+                                      <span class="directive">void</span> *surface_info,
                                       cl_uint plane,
                                       cl_int *errcode_ret)</code></pre>
 </div>
@@ -5750,7 +10959,7 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>typedef struct _cl_dx9_surface_info_khr
+<pre class="CodeRay highlight"><code data-lang="c"><span class="keyword">typedef</span> <span class="keyword">struct</span> _cl_dx9_surface_info_khr
 {
     IDirect3DSurface9 *resource;
     HANDLE shared_handle;
@@ -5844,7 +11053,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_dx9_media_sharing-querying-media-surface-properties-of-memory-objects-created-from-media-surfaces">6.6.3. Querying Media Surface Properties of Memory Objects created from Media Surfaces</h4>
+<h4 id="cl_khr_dx9_media_sharing-querying-media-surface-properties-of-memory-objects-created-from-media-surfaces">15.6.3. Querying Media Surface Properties of Memory Objects created from Media Surfaces</h4>
 <div class="paragraph">
 <p>Properties of media surface objects may be queried using
 <strong>clGetMemObjectInfo</strong> and <strong>clGetImageInfo</strong> with <em>param_name</em>
@@ -5853,18 +11062,18 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_dx9_media_sharing-sharing-memory-objects-created-from-media-surfaces-between-a-media-adapter-and-opencl">6.6.4. Sharing Memory Objects created from Media Surfaces between a Media Adapter and OpenCL</h4>
+<h4 id="cl_khr_dx9_media_sharing-sharing-memory-objects-created-from-media-surfaces-between-a-media-adapter-and-opencl">15.6.4. Sharing Memory Objects created from Media Surfaces between a Media Adapter and OpenCL</h4>
 <div class="paragraph">
 <p>The function
 </p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_int clEnqueueAcquireDX9MediaSurfacesKHR(cl_command_queue command_queue,
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueAcquireDX9MediaSurfacesKHR(cl_command_queue command_queue,
                                            cl_uint num_objects,
-                                           const cl_mem *mem_objects,
+                                           <span class="directive">const</span> cl_mem *mem_objects,
                                            cl_uint num_events_in_wait_list,
-                                           const cl_event *event_wait_list,
+                                           <span class="directive">const</span> cl_event *event_wait_list,
                                            cl_event *event)</code></pre>
 </div>
 </div>
@@ -5981,11 +11190,11 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_int clEnqueueReleaseDX9MediaSurfacesKHR(cl_command_queue command_queue,
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueReleaseDX9MediaSurfacesKHR(cl_command_queue command_queue,
                                            cl_uint num_objects,
-                                           const cl_mem *mem_objects,
+                                           <span class="directive">const</span> cl_mem *mem_objects,
                                            cl_uint num_events_in_wait_list,
-                                           const cl_event *event_wait_list,
+                                           <span class="directive">const</span> cl_event *event_wait_list,
                                            cl_event *event)</code></pre>
 </div>
 </div>
@@ -6036,7 +11245,7 @@
 If <em>event_wait_list</em> is not <code>NULL</code>, the list of events pointed to by
 <em>event_wait_list</em> must be valid and <em>num_events_in_wait_list</em> must be
 greater than 0.
-The events specified in <em>event</em> returns an event object that identifies this
+The event specified by <em>event</em> returns an event object that identifies this
 particular command and can be used to query or queue a wait for this
 particular command to complete.
 <em>event</em> can be <code>NULL</code> in which case it will not be possible for the
@@ -6093,7 +11302,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_dx9_media_sharing-surface-formats-for-media-surface-sharing">6.6.5. Surface formats for Media Surface Sharing</h4>
+<h4 id="cl_khr_dx9_media_sharing-surface-formats-for-media-surface-sharing">15.6.5. Surface formats for Media Surface Sharing</h4>
 <div class="paragraph">
 <p>This section includes the D3D surface formats that are supported when the
 adapter type is one of the Direct 3D lineage .
@@ -6110,8 +11319,8 @@
 <a href="#cl_khr_dx9_media_sharing-d3d-image-formats"><em>Direct3D formats and
 corresponding OpenCL image formats</em></a>.</p>
 </div>
-<table id="cl_khr_dx9_media_sharing-fourcc-image-formats" class="tableblock frame-all grid-all spread">
-<caption class="title">Table 17. <em>YUV FourCC codes and corresponding OpenCL image format</em></caption>
+<table id="cl_khr_dx9_media_sharing-fourcc-image-formats" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 37. <em>YUV FourCC codes and corresponding OpenCL image format</em></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -6157,8 +11366,8 @@
 Note that the YUV formats map to CL_R and CL_RG but do not perform any YUV
 to RGB conversion and vice-versa.</p>
 </div>
-<table id="cl_khr_dx9_media_sharing-d3d-image-formats" class="tableblock frame-all grid-all spread">
-<caption class="title">Table 18. <em>Direct3D formats and corresponding OpenCL image formats</em></caption>
+<table id="cl_khr_dx9_media_sharing-d3d-image-formats" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 38. <em>Direct3D formats and corresponding OpenCL image formats</em></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -6252,2575 +11461,404 @@
 For example, the layout of channels for each pixel for D3DFMT_A32FB32FG32FR32F
 is the same as CL_RGBA, CL_FLOAT.</p>
 </div>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="cl_khr_d3d10_sharing">7. Creating OpenCL Memory Objects from Direct3D 10 Buffers and Textures</h2>
+<h2 id="cl_khr_depth_images">16. Depth Images</h2>
 <div class="sectionbody">
-<div class="sect2">
-<h3 id="cl_khr_d3d10_sharing-overview">7.1. Overview</h3>
 <div class="paragraph">
-<p>This section describes the <strong>cl_khr_d3d10_sharing</strong> extension.
-The goal of this extension is to provide interoperability between OpenCL and
-Direct3D 10.</p>
+<p>This section describes the <strong>cl_khr_depth_images</strong> extension.</p>
 </div>
+<div class="paragraph">
+<p>This extension adds support for depth images.</p>
+</div>
+<div class="paragraph">
+<p>This extension became a core feature in OpenCL 2.0.</p>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_d3d10_sharing-new-procedures-and-functions">7.2. New Procedures and Functions</h3>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_int clGetDeviceIDsFromD3D10KHR(cl_platform_id platform,
-                                  cl_d3d10_device_source_khr d3d_device_source,
-                                  void *d3d_object,
-                                  cl_d3d10_device_set_khr d3d_device_set,
-                                  cl_uint num_entries,
-                                  cl_device_id *devices,
-                                  cl_uint *num_devices)
-
-cl_mem clCreateFromD3D10BufferKHR(cl_context context,
-                                  cl_mem_flags flags,
-                                  ID3D10Buffer *resource,
-                                  cl_int *errcode_ret)
-
-cl_mem clCreateFromD3D10Texture2DKHR(cl_context context,
-                                     cl_mem_flags flags,
-                                     ID3D10Texture2D *resource,
-                                     UINT subresource,
-                                     cl_int *errcode_ret)
-
-cl_mem clCreateFromD3D10Texture3DKHR(cl_context context,
-                                     cl_mem_flags flags,
-                                     ID3D10Texture3D *resource,
-                                     UINT subresource,
-                                     cl_int *errcode_ret)
-
-cl_int clEnqueueAcquireD3D10ObjectsKHR(cl_command_queue command_queue,
-                                       cl_uint num_objects,
-                                       const cl_mem *mem_objects,
-                                       cl_uint num_events_in_wait_list,
-                                       const cl_event *event_wait_list,
-                                       cl_event *event)
-
-cl_int clEnqueueReleaseD3D10ObjectsKHR(cl_command_queue command_queue,
-                                       cl_uint num_objects,
-                                       const cl_mem *mem_objects,
-                                       cl_uint num_events_in_wait_list,
-                                       const cl_event *event_wait_list,
-                                       cl_event *event)</code></pre>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_d3d10_sharing-new-tokens">7.3. New Tokens</h3>
+<h3 id="cl_khr_depth_images-additions-to-chapter-5">16.1. Additions to Chapter 5 of the OpenCL 1.2 Specification</h3>
 <div class="paragraph">
-<p>Accepted as a Direct3D 10 device source in the <em>d3d_device_source</em> parameter
-of <strong>clGetDeviceIDsFromD3D10KHR</strong>:</p>
+<p>This extension adds the following new image formats for depth images to <em>tables 5.6 and 5.7</em> of the OpenCL 1.2 specification.</p>
 </div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_D3D10_DEVICE_KHR                 0x4010
-CL_D3D10_DXGI_ADAPTER_KHR           0x4011</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Accepted as a set of Direct3D 10 devices in the <em>d3d_device_set</em> parameter
-of <strong>clGetDeviceIDsFromD3D10KHR</strong>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_PREFERRED_DEVICES_FOR_D3D10_KHR  0x4012
-CL_ALL_DEVICES_FOR_D3D10_KHR        0x4013</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Accepted as a property name in the <em>properties</em> parameter of
-<strong>clCreateContext</strong> and <strong>clCreateContextFromType</strong>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_CONTEXT_D3D10_DEVICE_KHR         0x4014</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Accepted as a property name in the <em>param_name</em> parameter of
-<strong>clGetContextInfo</strong>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR    0x402C</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Accepted as the property being queried in the <em>param_name</em> parameter of
-<strong>clGetMemObjectInfo</strong>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_MEM_D3D10_RESOURCE_KHR           0x4015</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Accepted as the property being queried in the <em>param_name</em> parameter of
-<strong>clGetImageInfo</strong>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_IMAGE_D3D10_SUBRESOURCE_KHR      0x4016</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Returned in the <em>param_value</em> parameter of <strong>clGetEventInfo</strong> when
-<em>param_name</em> is CL_EVENT_COMMAND_TYPE:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR    0x4017
-CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR    0x4018</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Returned by <strong>clCreateContext</strong> and <strong>clCreateContextFromType</strong> if the Direct3D
-10 device specified for interoperability is not compatible with the devices
-against which the context is to be created:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_INVALID_D3D10_DEVICE_KHR         -1002</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Returned by <strong>clCreateFromD3D10BufferKHR</strong> when <em>resource</em> is not a Direct3D
-10 buffer object, and by <strong>clCreateFromD3D10Texture2DKHR</strong> and
-<strong>clCreateFromD3D10Texture3DKHR</strong> when <em>resource</em> is not a Direct3D 10 texture
-object:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_INVALID_D3D10_RESOURCE_KHR       -1003</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Returned by <strong>clEnqueueAcquireD3D10ObjectsKHR</strong> when any of <em>mem_objects</em> are
-currently acquired by OpenCL:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR  -1004</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Returned by <strong>clEnqueueReleaseD3D10ObjectsKHR</strong> when any of <em>mem_objects</em> are
-not currently acquired by OpenCL:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR  -1005</pre>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_d3d10_sharing-additions-to-chapter-4">7.4. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
-<div class="paragraph">
-<p>In <em>section 4.4</em>, replace the description of <em>properties</em> under
-<strong>clCreateContext</strong> with:</p>
-</div>
-<div class="paragraph">
-<p>&#8220;_properties_ specifies a list of context property names and their
-corresponding values.
-Each property is followed immediately by the corresponding desired value.
-The list is terminated with zero.
-If a property is not specified in <em>properties</em>, then its default value
-(listed in <em>table 4.5</em>) is used (it is said to be specified implicitly).
-If <em>properties</em> is <code>NULL</code> or empty (points to a list whose first value is
-zero), all attributes take on their default values.&#8221;</p>
-</div>
-<div class="paragraph">
-<p>Add the following to <em>table 4.5</em>:</p>
-</div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
-<col style="width: 40%;">
-<col style="width: 20%;">
-<col style="width: 40%;">
+<col style="width: 100%;">
 </colgroup>
 <thead>
 <tr>
-<th class="tableblock halign-left valign-top"><strong>cl_context_properties enum</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Property value</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Enum values that can be specified in channel_order</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEPTH.</strong> This format can only be used if channel data type = CL_UNORM_INT16 or CL_FLOAT.</p></td>
+</tr>
+</tbody>
+</table>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 40%;">
+<col style="width: 60%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Image Channel Data Type</strong></th>
 <th class="tableblock halign-left valign-top"><strong>Description</strong></th>
 </tr>
 </thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_CONTEXT_D3D10_DEVICE_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">ID3D10Device *</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies the ID3D10Device * to use for Direct3D 10 interoperability.
-  The default value is <code>NULL</code>.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_UNORM_INT16</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Each channel component is a normalized unsigned 16-bit integer value</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_FLOAT</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Each channel component is a single precision floating-point value</p></td>
 </tr>
 </tbody>
 </table>
 <div class="paragraph">
-<p>Add to the list of errors for <strong>clCreateContext</strong>:</p>
+<p>This extension adds the following new image format to the minimum list of supported image formats described in <em>table 5.8</em>:</p>
 </div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_D3D10_DEVICE_KHR if the value of the property
-CL_CONTEXT_D3D10_DEVICE_KHR is non-<code>NULL</code> and does not specify a valid
-Direct3D 10 device with which the <em>cl_device_ids</em> against which this
-context is to be created may interoperate.</p>
-</li>
-<li>
-<p>CL_INVALID_OPERATION if Direct3D 10 interoperability is specified by
-setting CL_INVALID_D3D10_DEVICE_KHR to a non-<code>NULL</code> value, and
-interoperability with another graphics API is also specified.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>Add to the list of errors for <strong>clCreateContextFromType</strong> the same new errors
-described above for <strong>clCreateContext</strong>.</p>
-</div>
-<div class="paragraph">
-<p>Add the following row to <em>table 4.6</em>:</p>
-</div>
-<table class="tableblock frame-all grid-all spread">
+<table id="cl_khr_depth_images-required-image-formats" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 39. <em>Required Image Formats for</em> <strong>cl_khr_depth_images</strong></caption>
 <colgroup>
-<col style="width: 40%;">
-<col style="width: 20%;">
-<col style="width: 40%;">
+<col style="width: 33.3333%;">
+<col style="width: 33.3333%;">
+<col style="width: 33.3334%;">
 </colgroup>
 <thead>
 <tr>
-<th class="tableblock halign-left valign-top"><strong>cl_context_info</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Information returned in param_value</strong></th>
+<th class="tableblock halign-left valign-top"><strong>num_channels</strong></th>
+<th class="tableblock halign-left valign-top"><strong>channel_order</strong></th>
+<th class="tableblock halign-left valign-top"><strong>channel_data_type</strong></th>
 </tr>
 </thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_bool</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns CL_TRUE if Direct3D 10 resources created as shared by setting
-  <em>MiscFlags</em> to include D3D10_RESOURCE_MISC_SHARED will perform faster when
-  shared with OpenCL, compared with resources which have not set this flag.
-  Otherwise returns CL_FALSE.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_d3d10_sharing-additions-to-chapter-5">7.5. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
-<div class="paragraph">
-<p>Add to the list of errors for <strong>clGetMemObjectInfo</strong>:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_D3D10_RESOURCE_KHR if <em>param_name</em> is
-CL_MEM_D3D10_RESOURCE_KHR and <em>memobj</em> was not created by the function
-<strong>clCreateFromD3D10BufferKHR</strong>, <strong>clCreateFromD3D10Texture2DKHR</strong>, or
-<strong>clCreateFromD3D10Texture3DKHR</strong>.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>Extend <em>table 5.12</em> to include the following entry.</p>
-</div>
-<table class="tableblock frame-all grid-all spread">
-<colgroup>
-<col style="width: 40%;">
-<col style="width: 20%;">
-<col style="width: 40%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_mem_info</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Return type</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Info. returned in <em>param_value</em></strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_D3D10_RESOURCE_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">ID3D10Resource *</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">If <em>memobj</em> was created using <strong>clCreateFromD3D10BufferKHR</strong>,
-  <strong>clCreateFromD3D10Texture2DKHR</strong>, or <strong>clCreateFromD3D10Texture3DKHR</strong>,
-  returns the <em>resource</em> argument specified when <em>memobj</em> was created.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">1</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEPTH</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_UNORM_INT<br>
+CL_FLOAT</p></td>
 </tr>
 </tbody>
 </table>
 <div class="paragraph">
-<p>Add to the list of errors for <strong>clGetImageInfo</strong>:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_D3D10_RESOURCE_KHR if <em>param_name</em> is
-CL_MEM_D3D10_SUBRESOURCE_KHR and <em>image</em> was not created by the function
-<strong>clCreateFromD3D10Texture2DKHR</strong>, or <strong>clCreateFromD3D10Texture3DKHR</strong>.</p>
-</li>
-</ul>
+<p>NOTE:</p>
 </div>
 <div class="paragraph">
-<p>Extend <em>table 5.9</em> to include the following entry.</p>
+<p>Depth image objects can be initialized, read and written using the appropriate CL APIs i.e. clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapImage and clEnqueueFillImage.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<div class="paragraph">
+<p>For clEnqueueFillImage, the fill color is a 4-component value where the R component refers to the depth value if the image format is CL_DEPTH.  The fill color will be converted to the appropriate image channel format and order associated with image.</p>
+</div>
+<div class="paragraph">
+<p>Update text that describes arg value argument to clSetKernelArg with the following:</p>
+</div>
+<div class="paragraph">
+<p>If the kernel argument is declared to be of type image2d_depth_t or image2d_array_depth t, the arg_value entry will be a pointer to a depth image or depth image array object.</p>
+</div>
+<div class="paragraph">
+<p>Add the following error condition for clSetKernelArg:</p>
+</div>
+<div class="paragraph">
+<p>CL_INVALID_MEM_OBJECT for an argument declared to be a depth image or a depth image
+array and the argument value specified in arg_value does not follow the rules described above
+for a depth memory object or memory array object argument.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_depth_images-additions-to-chapter-6">16.2. Additions to Chapter 6 of the OpenCL 1.2 Specification</h3>
+<div class="paragraph">
+<p>Add the following new data types to <em>table 6.3</em> in <em>section 6.1.3</em> of the OpenCL 1.2 specification:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 40%;">
-<col style="width: 20%;">
-<col style="width: 40%;">
+<col style="width: 60%;">
 </colgroup>
 <thead>
 <tr>
-<th class="tableblock halign-left valign-top"><strong>cl_image_info</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Return type</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Info. returned in <em>param_value</em></strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_D3D10_SUBRESOURCE_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">If <em>image</em> was created using <strong>clCreateFromD3D10Texture2DKHR</strong>, or
-  <strong>clCreateFromD3D10Texture3DKHR</strong>, returns the <em>subresource</em> argument
-  specified when <em>image</em> was created.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph">
-<p>Add to <em>table 5.22</em> in the <strong>Info returned in &lt;param_value&gt;</strong> column for
-<em>cl_event_info</em> = CL_EVENT_COMMAND_TYPE:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR
-CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR</pre>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_d3d10_sharing-sharing-memory-objects-with-direct3d-10-resources">7.6. Sharing Memory Objects with Direct3D 10 Resources</h3>
-<div class="paragraph">
-<p>This section discusses OpenCL functions that allow applications to use
-Direct3D 10 resources as OpenCL memory objects.
-This allows efficient sharing of data between OpenCL and Direct3D 10.
-The OpenCL API may be used to execute kernels that read and/or write memory
-objects that are also Direct3D 10 resources.
-An OpenCL image object may be created from a Direct3D 10 texture resource.
-An OpenCL buffer object may be created from a Direct3D 10 buffer resource.
-OpenCL memory objects may be created from Direct3D 10 objects if and only if
-the OpenCL context has been created from a Direct3D 10 device.</p>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d10_sharing-querying-opencl-devices-corresponding-to-direct3d-10-devices">7.6.1. Querying OpenCL Devices Corresponding to Direct3D 10 Devices</h4>
-<div class="paragraph">
-<p>The OpenCL devices corresponding to a Direct3D 10 device may be queried.
-The OpenCL devices corresponding to a DXGI adapter may also be queried.
-The OpenCL devices corresponding to a Direct3D 10 device will be a subset of
-the OpenCL devices corresponding to the DXGI adapter against which the
-Direct3D 10 device was created.</p>
-</div>
-<div class="paragraph">
-<p>The OpenCL devices corresponding to a Direct3D 10 device or a DXGI device
-may be queried using the function
-</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_int clGetDeviceIDsFromD3D10KHR(cl_platform_id platform,
-                                  cl_d3d10_device_source_khr d3d_device_source,
-                                  void *d3d_object,
-                                  cl_d3d10_device_set_khr d3d_device_set,
-                                  cl_uint num_entries,
-                                  cl_device_id *devices,
-                                  cl_uint *num_devices)</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p><em>platform</em> refers to the platform ID returned by <strong>clGetPlatformIDs</strong>.</p>
-</div>
-<div class="paragraph">
-<p><em>d3d_device_source</em> specifies the type of <em>d3d_object</em>, and must be one of
-the values shown in the table below.</p>
-</div>
-<div class="paragraph">
-<p><em>d3d_object</em> specifies the object whose corresponding OpenCL devices are
-being queried.
-The type of <em>d3d_object</em> must be as specified in the table below.</p>
-</div>
-<div class="paragraph">
-<p><em>d3d_device_set</em> specifies the set of devices to return, and must be one of
-the values shown in the table below.</p>
-</div>
-<div class="paragraph">
-<p><em>num_entries</em> is the number of cl_device_id entries that can be added to
-<em>devices</em>.
-If <em>devices</em> is not <code>NULL</code> then <em>num_entries</em> must be greater than zero.</p>
-</div>
-<div class="paragraph">
-<p><em>devices</em> returns a list of OpenCL devices found.
-The cl_device_id values returned in <em>devices</em> can be used to identify a
-specific OpenCL device.
-If <em>devices</em> is <code>NULL</code>, this argument is ignored.
-The number of OpenCL devices returned is the minimum of the value specified
-by <em>num_entries</em> and the number of OpenCL devices corresponding to
-<em>d3d_object</em>.</p>
-</div>
-<div class="paragraph">
-<p><em>num_devices</em> returns the number of OpenCL devices available that correspond
-to <em>d3d_object</em>.
-If <em>num_devices</em> is <code>NULL</code>, this argument is ignored.</p>
-</div>
-<div class="paragraph">
-<p><strong>clGetDeviceIDsFromD3D10KHR</strong> returns CL_SUCCESS if the function is executed
-successfully.
-Otherwise it may return</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_PLATFORM if <em>platform</em> is not a valid platform.</p>
-</li>
-<li>
-<p>CL_INVALID_VALUE if <em>d3d_device_source</em> is not a valid value,
-<em>d3d_device_set</em> is not a valid value, <em>num_entries</em> is equal to zero
-and <em>devices</em> is not <code>NULL</code>, or if both <em>num_devices</em> and <em>devices</em> are
-<code>NULL</code>.</p>
-</li>
-<li>
-<p>CL_DEVICE_NOT_FOUND if no OpenCL devices that correspond to <em>d3d_object</em>
-were found.</p>
-</li>
-</ul>
-</div>
-<table id="cl_khr_d3d10_sharing-clGetDeviceIDsFromD3D10KHR-object-type" class="tableblock frame-all grid-all spread">
-<caption class="title">Table 19. <em>Direct3D 10 object types that may be used by</em> <strong>clGetDeviceIDsFromD3D10KHR</strong></caption>
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_d3d_device_source_khr</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Type of <em>d3d_object</em></strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_D3D10_DEVICE_KHR</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">ID3D10Device *</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_D3D10_DXGI_ADAPTER_KHR</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">IDXGIAdapter *</p></td>
-</tr>
-</tbody>
-</table>
-<table id="cl_khr_d3d10_sharing-clGetDeviceIDsFromD3D10KHR-devices" class="tableblock frame-all grid-all spread">
-<caption class="title">Table 20. <em>Sets of devices queriable using</em> <strong>clGetDeviceIDsFromD3D10KHR</strong></caption>
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_d3d_device_set_khr</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Devices returned in <em>devices</em></strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_PREFERRED_DEVICES_FOR_D3D10_KHR</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">The preferred OpenCL devices associated with the specified Direct3D
-  object.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_ALL_DEVICES_FOR_D3D10_KHR</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">All OpenCL devices which may interoperate with the specified Direct3D
-  object.
-  Performance of sharing data on these devices may be considerably less than
-  on the preferred devices.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d10_sharing-lifetime-of-shared-objects">7.6.2. Lifetime of Shared Objects</h4>
-<div class="paragraph">
-<p>An OpenCL memory object created from a Direct3D 10 resource remains valid as
-long as the corresponding Direct3D 10 resource has not been deleted.
-If the Direct3D 10 resource is deleted through the Direct3D 10 API,
-subsequent use of the OpenCL memory object will result in undefined
-behavior, including but not limited to possible OpenCL errors, data
-corruption, and program termination.</p>
-</div>
-<div class="paragraph">
-<p>The successful creation of a cl_context against a Direct3D 10 device
-specified via the context create parameter CL_CONTEXT_D3D10_DEVICE_KHR will
-increment the internal Direct3D reference count on the specified Direct3D 10
-device.
-The internal Direct3D reference count on that Direct3D 10 device will be
-decremented when the OpenCL reference count on the returned OpenCL context
-drops to zero.</p>
-</div>
-<div class="paragraph">
-<p>The OpenCL context and corresponding command-queues are dependent on the
-existence of the Direct3D 10 device from which the OpenCL context was
-created.
-If the Direct3D 10 device is deleted through the Direct3D 10 API, subsequent
-use of the OpenCL context will result in undefined behavior, including but
-not limited to possible OpenCL errors, data corruption, and program
-termination.</p>
-</div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d10_sharing-sharing-direct3d-10-buffer-resources-as-opencl-buffer-objects">7.6.3. Sharing Direct3D 10 Buffer Resources as OpenCL Buffer Objects</h4>
-<div class="paragraph">
-<p>The function
-</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_mem clCreateFromD3D10BufferKHR(cl_context context,
-                                  cl_mem_flags flags,
-                                  ID3D10Buffer *resource,
-                                  cl_int *errcode_ret)</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>creates an OpenCL buffer object from a Direct3D 10 buffer.</p>
-</div>
-<div class="paragraph">
-<p><em>context</em> is a valid OpenCL context created from a Direct3D 10 device.</p>
-</div>
-<div class="paragraph">
-<p><em>flags</em> is a bit-field that is used to specify usage information.
-Refer to <em>table 5.3</em> for a description of <em>flags</em>.
-Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM_READ_WRITE values
-specified in <em>table 5.3</em> can be used.</p>
-</div>
-<div class="paragraph">
-<p><em>resource</em> is a pointer to the Direct3D 10 buffer to share.</p>
-</div>
-<div class="paragraph">
-<p><em>errcode_ret</em> will return an appropriate error code.
-If <em>errcode_ret</em> is <code>NULL</code>, no error code is returned.</p>
-</div>
-<div class="paragraph">
-<p><strong>clCreateFromD3D10BufferKHR</strong> returns a valid non-zero OpenCL buffer object
-and <em>errcode_ret</em> is set to CL_SUCCESS if the buffer object is created
-successfully.
-Otherwise, it returns a <code>NULL</code> value with one of the following error values
-returned in <em>errcode_ret</em>:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
-</li>
-<li>
-<p>CL_INVALID_VALUE if values specified in <em>flags</em> are not valid.</p>
-</li>
-<li>
-<p>CL_INVALID_D3D10_RESOURCE_KHR if <em>resource</em> is not a Direct3D 10 buffer
-resource, if <em>resource</em> was created with the D3D10_USAGE flag
-D3D10_USAGE_IMMUTABLE, if a cl_mem from <em>resource</em> has already been
-created using <strong>clCreateFromD3D10BufferKHR</strong>, or if <em>context</em> was not
-created against the same Direct3D 10 device from which <em>resource</em> was
-created.</p>
-</li>
-<li>
-<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
-required by the OpenCL implementation on the host.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>The size of the returned OpenCL buffer object is the same as the size of
-<em>resource</em>.
-This call will increment the internal Direct3D reference count on
-<em>resource</em>.
-The internal Direct3D reference count on <em>resource</em> will be decremented when
-the OpenCL reference count on the returned OpenCL memory object drops to
-zero.</p>
-</div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d10_sharing-sharing-direct3d-10-texture-and-resources-as-opencl-image-objects">7.6.4. Sharing Direct3D 10 Texture and Resources as OpenCL Image Objects</h4>
-<div class="paragraph">
-<p>The function
-</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_mem clCreateFromD3D10Texture2DKHR(cl_context context,
-                                     cl_mem_flags flags,
-                                     ID3D10Texture2D *resource,
-                                     UINT subresource,
-                                     cl_int *errcode_ret)</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>creates an OpenCL 2D image object from a subresource of a Direct3D 10 2D
-texture.</p>
-</div>
-<div class="paragraph">
-<p><em>context</em> is a valid OpenCL context created from a Direct3D 10 device.</p>
-</div>
-<div class="paragraph">
-<p><em>flags</em> is a bit-field that is used to specify usage information.
-Refer to <em>table 5.3</em> for a description of <em>flags</em>.
-Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM_READ_WRITE values
-specified in <em>table 5.3</em> can be used.</p>
-</div>
-<div class="paragraph">
-<p><em>resource</em> is a pointer to the Direct3D 10 2D texture to share.</p>
-</div>
-<div class="paragraph">
-<p><em>subresource</em> is the subresource of <em>resource</em> to share.</p>
-</div>
-<div class="paragraph">
-<p><em>errcode_ret</em> will return an appropriate error code.
-If <em>errcode_ret</em> is <code>NULL</code>, no error code is returned.</p>
-</div>
-<div class="paragraph">
-<p><strong>clCreateFromD3D10Texture2DKHR</strong> returns a valid non-zero OpenCL image object
-and <em>errcode_ret</em> is set to CL_SUCCESS if the image object is created
-successfully.
-Otherwise, it returns a <code>NULL</code> value with one of the following error values
-returned in <em>errcode_ret</em>:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
-</li>
-<li>
-<p>CL_INVALID_VALUE if values specified in <em>flags</em> are not valid or if
-<em>subresource</em> is not a valid subresource index for <em>resource</em>.</p>
-</li>
-<li>
-<p>CL_INVALID_D3D10_RESOURCE_KHR if <em>resource</em> is not a Direct3D 10 texture
-resource, if <em>resource</em> was created with the D3D10_USAGE flag
-D3D10_USAGE_IMMUTABLE, if <em>resource</em> is a multisampled texture, if a
-cl_mem from subresource <em>subresource</em> of <em>resource</em> has already been
-created using <strong>clCreateFromD3D10Texture2DKHR</strong>, or if <em>context</em> was not
-created against the same Direct3D 10 device from which <em>resource</em> was
-created.</p>
-</li>
-<li>
-<p>CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the Direct3D 10 texture format of
-<em>resource</em> is not listed in the table
-<a href="#cl_khr_d3d10_sharing-mapping-of-image-formats"><em>Direct3D 10 formats and
-corresponding OpenCL image formats</em></a> or if the Direct3D 10 texture
-format of <em>resource</em> does not map to a supported OpenCL image format.</p>
-</li>
-<li>
-<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
-required by the OpenCL implementation on the host.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>The width and height of the returned OpenCL 2D image object are determined
-by the width and height of subresource <em>subresource</em> of <em>resource</em>.
-The channel type and order of the returned OpenCL 2D image object is
-determined by the format of <em>resource</em> by the table
-<a href="#cl_khr_d3d10_sharing-mapping-of-image-formats"><em>Direct3D 10 formats and
-corresponding OpenCL image formats</em></a>.</p>
-</div>
-<div class="paragraph">
-<p>This call will increment the internal Direct3D reference count on
-<em>resource</em>.
-The internal Direct3D reference count on <em>resource</em> will be decremented when
-the OpenCL reference count on the returned OpenCL memory object drops to
-zero.</p>
-</div>
-<div class="paragraph">
-<p>The function
-</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_mem clCreateFromD3D10Texture3DKHR(cl_context context,
-                                     cl_mem_flags flags,
-                                     ID3D10Texture3D *resource,
-                                     UINT subresource,
-                                     cl_int *errcode_ret)</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>creates an OpenCL 3D image object from a subresource of a Direct3D 10 3D
-texture.</p>
-</div>
-<div class="paragraph">
-<p><em>context</em> is a valid OpenCL context created from a Direct3D 10 device.</p>
-</div>
-<div class="paragraph">
-<p><em>flags</em> is a bit-field that is used to specify usage information.
-Refer to table 5.3 for a description of <em>flags</em>.
-Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM_READ_WRITE values
-specified in <em>table 5.3</em> can be used.</p>
-</div>
-<div class="paragraph">
-<p><em>resource</em> is a pointer to the Direct3D 10 3D texture to share.</p>
-</div>
-<div class="paragraph">
-<p><em>subresource</em> is the subresource of <em>resource</em> to share.</p>
-</div>
-<div class="paragraph">
-<p><em>errcode_ret</em> will return an appropriate error code.
-If <em>errcode_ret</em> is <code>NULL</code>, no error code is returned.</p>
-</div>
-<div class="paragraph">
-<p><strong>clCreateFromD3D10Texture3DKHR</strong> returns a valid non-zero OpenCL image object
-and <em>errcode_ret</em> is set to CL_SUCCESS if the image object is created
-successfully.
-Otherwise, it returns a <code>NULL</code> value with one of the following error values
-returned in <em>errcode_ret</em>:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
-</li>
-<li>
-<p>CL_INVALID_VALUE if values specified in <em>flags</em> are not valid or if
-<em>subresource</em> is not a valid subresource index for <em>resource</em>.</p>
-</li>
-<li>
-<p>CL_INVALID_D3D10_RESOURCE_KHR if <em>resource</em> is not a Direct3D 10 texture
-resource, if <em>resource</em> was created with the D3D10_USAGE flag
-D3D10_USAGE_IMMUTABLE, if <em>resource</em> is a multisampled texture, if a
-cl_mem from subresource <em>subresource</em> of <em>resource</em> has already been
-created using <strong>clCreateFromD3D10Texture3DKHR</strong>, or if <em>context</em> was not
-created against the same Direct3D 10 device from which <em>resource</em> was
-created.</p>
-</li>
-<li>
-<p>CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the Direct3D 10 texture format of
-<em>resource</em> is not listed in the table
-<a href="#cl_khr_d3d10_sharing-mapping-of-image-formats"><em>Direct3D 10 formats and
-corresponding OpenCL image formats</em></a> or if the Direct3D 10 texture
-format of <em>resource</em> does not map to a supported OpenCL image format.</p>
-</li>
-<li>
-<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
-required by the OpenCL implementation on the host.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>The width, height and depth of the returned OpenCL 3D image object are
-determined by the width, height and depth of subresource <em>subresource</em> of
-<em>resource</em>.
-The channel type and order of the returned OpenCL 3D image object is
-determined by the format of <em>resource</em> by the table
-<a href="#cl_khr_d3d10_sharing-mapping-of-image-formats"><em>Direct3D 10 formats and
-corresponding OpenCL image formats</em></a>.</p>
-</div>
-<div class="paragraph">
-<p>This call will increment the internal Direct3D reference count on
-<em>resource</em>.
-The internal Direct3D reference count on <em>resource</em> will be decremented when
-the OpenCL reference count on the returned OpenCL memory object drops to
-zero.</p>
-</div>
-<table id="cl_khr_d3d10_sharing-mapping-of-image-formats" class="tableblock frame-all grid-all spread">
-<caption class="title">Table 21. <em>Direct3D 10 formats and corresponding OpenCL image formats</em></caption>
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>DXGI format</strong></th>
-<th class="tableblock halign-left valign-top"><strong>CL image format</strong>
-
-<strong>(channel order, channel data type)</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32B32A32_FLOAT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_FLOAT</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32B32A32_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNSIGNED_INT32</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32B32A32_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SIGNED_INT32</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_FLOAT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_HALF_FLOAT</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_UNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNORM_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNSIGNED_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_SNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SNORM_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SIGNED_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_B8G8R8A8_UNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_BGRA, CL_UNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_UNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNSIGNED_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_SNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SIGNED_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32_FLOAT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_FLOAT</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNSIGNED_INT32</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SIGNED_INT32</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_FLOAT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_HALF_FLOAT</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_UNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNORM_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNSIGNED_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_SNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SNORM_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SIGNED_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_UNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNSIGNED_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_SNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SIGNED_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32_FLOAT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_FLOAT</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNSIGNED_INT32</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SIGNED_INT32</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_FLOAT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_HALF_FLOAT</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_UNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNORM_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNSIGNED_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_SNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SNORM_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SIGNED_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_UNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNSIGNED_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_SNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SIGNED_INT8</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d10_sharing-querying-direct3d-properties-of-memory-objects-created-from-direct3d-10-resources">7.6.5. Querying Direct3D properties of memory objects created from Direct3D 10 resources</h4>
-<div class="paragraph">
-<p>Properties of Direct3D 10 objects may be queried using <strong>clGetMemObjectInfo</strong>
-and <strong>clGetImageInfo</strong> with <em>param_name</em> CL_MEM_D3D10_RESOURCE_KHR and</p>
-</div>
-<div class="paragraph">
-<p>CL_IMAGE_D3D10_SUBRESOURCE_KHR respectively as described in <em>sections 5.4.3</em>
-and <em>5.3.6</em>.</p>
-</div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d10_sharing-sharing-memory-objects-created-from-direct3d-10-resources-between-direct3d-10-and-opencl-contexts">7.6.6. Sharing memory objects created from Direct3D 10 resources between Direct3D 10 and OpenCL contexts</h4>
-<div class="paragraph">
-<p>The function
-</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_int clEnqueueAcquireD3D10ObjectsKHR(cl_command_queue command_queue,
-                                       cl_uint num_objects,
-                                       const cl_mem *mem_objects,
-                                       cl_uint num_events_in_wait_list,
-                                       const cl_event *event_wait_list,
-                                       cl_event *event)</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>is used to acquire OpenCL memory objects that have been created from
-Direct3D 10 resources.
-The Direct3D 10 objects are acquired by the OpenCL context associated with
-<em>command_queue</em> and can therefore be used by all command-queues associated
-with the OpenCL context.</p>
-</div>
-<div class="paragraph">
-<p>OpenCL memory objects created from Direct3D 10 resources must be acquired
-before they can be used by any OpenCL commands queued to a command-queue.
-If an OpenCL memory object created from a Direct3D 10 resource is used while
-it is not currently acquired by OpenCL, the call attempting to use that
-OpenCL memory object will return CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR.</p>
-</div>
-<div class="paragraph">
-<p>If CL_CONTEXT_INTEROP_USER_SYNC is not specified as CL_TRUE during context
-creation, <strong>clEnqueueAcquireD3D10ObjectsKHR</strong> provides the synchronization
-guarantee that any Direct3D 10 calls involving the interop device(s) used in
-the OpenCL context made before <strong>clEnqueueAcquireD3D10ObjectsKHR</strong> is called
-will complete executing before <em>event</em> reports completion and before the
-execution of any subsequent OpenCL work issued in <em>command_queue</em> begins.
-If the context was created with properties specifying
-CL_CONTEXT_INTEROP_USER_SYNC as CL_TRUE, the user is responsible for
-guaranteeing that any Direct3D 10 calls involving the interop device(s) used
-in the OpenCL context made before <strong>clEnqueueAcquireD3D10ObjectsKHR</strong> is
-called have completed before calling <strong>clEnqueueAcquireD3D10ObjectsKHR.</strong></p>
-</div>
-<div class="paragraph">
-<p><em>command_queue</em> is a valid command-queue.</p>
-</div>
-<div class="paragraph">
-<p><em>num_objects</em> is the number of memory objects to be acquired in
-<em>mem_objects</em>.</p>
-</div>
-<div class="paragraph">
-<p><em>mem_objects</em> is a pointer to a list of OpenCL memory objects that were
-created from Direct3D 10 resources.</p>
-</div>
-<div class="paragraph">
-<p><em>event_wait_list</em> and <em>num_events_in_wait_list</em> specify events that need to
-complete before this particular command can be executed.
-If <em>event_wait_list</em> is <code>NULL</code>, then this particular command does not wait
-on any event to complete.
-If <em>event_wait_list</em> is <code>NULL</code>, <em>num_events_in_wait_list</em> must be 0.
-If <em>event_wait_list</em> is not <code>NULL</code>, the list of events pointed to by
-<em>event_wait_list</em> must be valid and <em>num_events_in_wait_list</em> must be
-greater than 0.
-The events specified in <em>event_wait_list</em> act as synchronization points.</p>
-</div>
-<div class="paragraph">
-<p><em>event</em> returns an event object that identifies this particular command and
-can be used to query or queue a wait for this particular command to
-complete.
-<em>event</em> can be <code>NULL</code> in which case it will not be possible for the
-application to query the status of this command or queue a wait for this
-command to complete.
-If the <em>event_wait_list</em> and the <em>event</em> arguments are not <code>NULL</code>, the
-<em>event</em> argument should not refer to an element of the <em>event_wait_list</em>
-array.</p>
-</div>
-<div class="paragraph">
-<p><strong>clEnqueueAcquireD3D10ObjectsKHR</strong> returns CL_SUCCESS if the function is
-executed successfully.
-If <em>num_objects</em> is 0 and <em>mem_objects</em> is <code>NULL</code> then the function does
-nothing and returns CL_SUCCESS.
-Otherwise it returns one of the following errors:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_VALUE if <em>num_objects</em> is zero and <em>mem_objects</em> is not a
-<code>NULL</code> value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is <code>NULL</code>.</p>
-</li>
-<li>
-<p>CL_INVALID_MEM_OBJECT if memory objects in <em>mem_objects</em> are not valid
-OpenCL memory objects or if memory objects in <em>mem_objects</em> have not
-been created from Direct3D 10 resources.</p>
-</li>
-<li>
-<p>CL_INVALID_COMMAND_QUEUE if <em>command_queue</em> is not a valid
-command-queue.</p>
-</li>
-<li>
-<p>CL_INVALID_CONTEXT if context associated with <em>command_queue</em> was not
-created from an Direct3D 10 context.</p>
-</li>
-<li>
-<p>CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR if memory objects in
-<em>mem_objects</em> have previously been acquired using
-<strong>clEnqueueAcquireD3D10ObjectsKHR</strong> but have not been released using
-<strong>clEnqueueReleaseD3D10ObjectsKHR</strong>.</p>
-</li>
-<li>
-<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
-<em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not <code>NULL</code> and
-<em>num_events_in_wait_list</em> is 0, or if event objects in <em>event_wait_list</em>
-are not valid events.</p>
-</li>
-<li>
-<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
-required by the OpenCL implementation on the host.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>The function
-</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_int clEnqueueReleaseD3D10ObjectsKHR(cl_command_queue command_queue,
-                                       cl_uint num_objects,
-                                       const cl_mem *mem_objects,
-                                       cl_uint num_events_in_wait_list,
-                                       const cl_event *event_wait_list,
-                                       cl_event *event)</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>is used to release OpenCL memory objects that have been created from
-Direct3D 10 resources.
-The Direct3D 10 objects are released by the OpenCL context associated with
-<em>command_queue</em>.</p>
-</div>
-<div class="paragraph">
-<p>OpenCL memory objects created from Direct3D 10 resources which have been
-acquired by OpenCL must be released by OpenCL before they may be accessed by
-Direct3D 10.
-Accessing a Direct3D 10 resource while its corresponding OpenCL memory
-object is acquired is in error and will result in undefined behavior,
-including but not limited to possible OpenCL errors, data corruption, and
-program termination.</p>
-</div>
-<div class="paragraph">
-<p>If CL_CONTEXT_INTEROP_USER_SYNC is not specified as CL_TRUE during context
-creation, <strong>clEnqueueReleaseD3D10ObjectsKHR</strong> provides the synchronization
-guarantee that any calls to Direct3D 10 calls involving the interop
-device(s) used in the OpenCL context made after the call to
-<strong>clEnqueueReleaseD3D10ObjectsKHR</strong> will not start executing until after all
-events in <em>event_wait_list</em> are complete and all work already submitted to
-<em>command_queue</em> completes execution.
-If the context was created with properties specifying
-CL_CONTEXT_INTEROP_USER_SYNC as CL_TRUE, the user is responsible for
-guaranteeing that any Direct3D 10 calls involving the interop device(s) used
-in the OpenCL context made after <strong>clEnqueueReleaseD3D10ObjectsKHR</strong> will not
-start executing until after event returned by
-<strong>clEnqueueReleaseD3D10ObjectsKHR</strong> reports completion.</p>
-</div>
-<div class="paragraph">
-<p><em>num_objects</em> is the number of memory objects to be released in
-<em>mem_objects</em>.</p>
-</div>
-<div class="paragraph">
-<p><em>mem_objects</em> is a pointer to a list of OpenCL memory objects that were
-created from Direct3D 10 resources.</p>
-</div>
-<div class="paragraph">
-<p><em>event_wait_list</em> and <em>num_events_in_wait_list</em> specify events that need to
-complete before this particular command can be executed.
-If <em>event_wait_list</em> is <code>NULL</code>, then this particular command does not wait
-on any event to complete.
-If <em>event_wait_list</em> is <code>NULL</code>, <em>num_events_in_wait_list</em> must be 0.
-If <em>event_wait_list</em> is not <code>NULL</code>, the list of events pointed to by
-<em>event_wait_list</em> must be valid and <em>num_events_in_wait_list</em> must be
-greater than 0.
-The events specified in <em>event</em> returns an event object that identifies this
-particular command and can be used to query or queue a wait for this
-particular command to complete.
-<em>event</em> can be <code>NULL</code> in which case it will not be possible for the
-application to query the status of this command or queue a wait for this
-command to complete.
-If the <em>event_wait_list</em> and the <em>event</em> arguments are not <code>NULL</code>, the
-<em>event</em> argument should not refer to an element of the <em>event_wait_list</em>
-array.</p>
-</div>
-<div class="paragraph">
-<p><strong>clEnqueueReleaseD3D10ObjectsKHR</strong> returns CL_SUCCESS if the function is
-executed successfully.
-If <em>num_objects</em> is 0 and <em>mem_objects</em> is <code>NULL</code> the function does nothing
-and returns CL_SUCCESS.
-Otherwise it returns one of the following errors:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_VALUE if <em>num_objects</em> is zero and <em>mem_objects</em> is not a
-<code>NULL</code> value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is <code>NULL</code>.</p>
-</li>
-<li>
-<p>CL_INVALID_MEM_OBJECT if memory objects in <em>mem_objects</em> are not valid
-OpenCL memory objects or if memory objects in <em>mem_objects</em> have not
-been created from Direct3D 10 resources.</p>
-</li>
-<li>
-<p>CL_INVALID_COMMAND_QUEUE if <em>command_queue</em> is not a valid
-command-queue.</p>
-</li>
-<li>
-<p>CL_INVALID_CONTEXT if context associated with <em>command_queue</em> was not
-created from a Direct3D 10 device.</p>
-</li>
-<li>
-<p>CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR if memory objects in <em>mem_objects</em>
-have not previously been acquired using
-<strong>clEnqueueAcquireD3D10ObjectsKHR</strong>, or have been released using
-<strong>clEnqueueReleaseD3D10ObjectsKHR</strong> since the last time that they were
-acquired.</p>
-</li>
-<li>
-<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
-<em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not <code>NULL</code> and
-<em>num_events_in_wait_list</em>&gt; is 0, or if event objects in
-<em>event_wait_list</em> are not valid events.</p>
-</li>
-<li>
-<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
-required by the OpenCL implementation on the host.</p>
-</li>
-</ul>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_d3d10_sharing-issues">7.7. Issues</h3>
-<div class="olist arabic">
-<ol class="arabic">
-<li>
-<p>Should this extension be KHR or EXT?</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph">
-<p>PROPOSED: KHR.
-If this extension is to be approved by Khronos then it should be KHR,
-otherwise EXT.
-Not all platforms can support this extension, but that is also true of
-OpenGL interop.</p>
-</div>
-<div class="paragraph">
-<p>RESOLVED: KHR.</p>
-</div>
-</div>
-</div>
-</li>
-<li>
-<p>Requiring SharedHandle on ID3D10Resource</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph">
-<p>Requiring this can largely simplify things at the DDI level and make some
-implementations faster.
-However, the DirectX spec only defines the shared handle for a subset of the
-resources we would like to support:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>D3D10_RESOURCE_MISC_SHARED - Enables the sharing of resource data between
-two or more Direct3D devices.
-The only resources that can be shared are 2D non-mipmapped textures.</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>PROPOSED A: Add wording to the spec about some implementations needing the
-resource setup as shared:</p>
-</div>
-<div class="paragraph">
-<p>&#8220;Some implementations may require the resource to be shared on the D3D10
-side of the API&#8221;</p>
-</div>
-<div class="paragraph">
-<p>If we do that, do we need another enum to describe this failure case?</p>
-</div>
-<div class="paragraph">
-<p>PROPOSED B: Require that all implementations support both shared and
-non-shared resources.
-The restrictions prohibiting multisample textures and the flag
-D3D10_USAGE_IMMUTABLE guarantee software access to all shareable resources.</p>
-</div>
-<div class="paragraph">
-<p>RESOLVED: Require that implementations support both
-D3D10_RESOURCE_MISC_SHARED being set and not set.
-Add the query for CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR to determine
-on a per-context basis which method will be faster.</p>
-</div>
-</div>
-</div>
-</li>
-<li>
-<p>Texture1D support</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph">
-<p>There is not a matching CL type, so do we want to support this and map to
-buffer or Texture2D? If so the command might correspond to the 2D / 3D
-versions:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_mem clCreateFromD3D10Texture1D(cl_context context,
-                                  cl_mem_flags flags,
-                                  ID3D10Texture2D *resource,
-                                  UINT subresource,
-                                  cl_int *errcode_ret)</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>RESOLVED: We will not add support for ID3D10Texture1D objects unless a
-corresponding OpenCL 1D Image type is created.</p>
-</div>
-</div>
-</div>
-</li>
-<li>
-<p>CL/D3D10 queries</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph">
-<p>The GL interop has clGetGLObjectInfo and clGetGLTextureInfo.
-It is unclear if these are needed on the D3D10 interop side since the D3D10
-spec makes these queries trivial on the D3D10 object itself.
-Also, not all of the sematics of the GL call map across.</p>
-</div>
-<div class="paragraph">
-<p>PROPOSED: Add the <strong>clGetMemObjectInfo</strong> and <strong>clGetImageInfo</strong> parameter names
-CL_MEM_D3D10_RESOURCE_KHR and CL_IMAGE_D3D10_SUBRESOURCE_KHR to query the
-D3D10 resource from which a cl_mem was created.
-From this data, any D3D10 side information may be queried using the D3D10
-API.</p>
-</div>
-<div class="paragraph">
-<p>RESOLVED: We will use <strong>clGetMemObjectInfo</strong> and <strong>clGetImageInfo</strong> to access
-this information.</p>
-</div>
-</div>
-</div>
-</li>
-</ol>
-</div>
-<div style="page-break-after: always;"></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="cl_khr_d3d11_sharing">8. Creating OpenCL Memory Objects from Direct3D 11 Buffers and Textures</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="cl_khr_d3d11_sharing-overview">8.1. Overview</h3>
-<div class="paragraph">
-<p>This section describes the <strong>cl_khr_d3d11_sharing</strong> extension.
-The goal of this extension is to provide interoperability between OpenCL and
-Direct3D 11.</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_d3d11_sharing-new-procedures-and-functions">8.2. New Procedures and Functions</h3>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_int clGetDeviceIDsFromD3D11KHR(cl_platform_id platform,
-                                  cl_d3d11_device_source_khr d3d_device_source,
-                                  void *d3d_object,
-                                  cl_d3d11_device_set_khr d3d_device_set,
-                                  cl_uint num_entries,
-                                  cl_device_id *devices,
-                                  cl_uint *num_devices)
-
-cl_mem clCreateFromD3D11BufferKHR(cl_context context,
-                                  cl_mem_flags flags,
-                                  ID3D11Buffer *resource,
-                                  cl_int *errcode_ret)
-
-cl_mem clCreateFromD3D11Texture2DKHR(cl_context context,
-                                     cl_mem_flags flags,
-                                     ID3D11Texture2D *resource,
-                                     UINT subresource,
-                                     cl_int *errcode_ret)
-
-cl_mem clCreateFromD3D11Texture3DKHR(cl_context context,
-                                     cl_mem_flags flags,
-                                     ID3D11Texture3D *resource,
-                                     UINT subresource,
-                                     cl_int *errcode_ret)
-
-cl_int clEnqueueAcquireD3D11ObjectsKHR(cl_command_queue command_queue,
-                                       cl_uint num_objects,
-                                       const cl_mem *mem_objects,
-                                       cl_uint num_events_in_wait_list,
-                                       const cl_event *event_wait_list,
-                                       cl_event *event)
-
-cl_int clEnqueueReleaseD3D11ObjectsKHR(cl_command_queue command_queue,
-                                       cl_uint num_objects,
-                                       const cl_mem *mem_objects,
-                                       cl_uint num_events_in_wait_list,
-                                       const cl_event *event_wait_list,
-                                       cl_event *event)</code></pre>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_d3d11_sharing-new-tokens">8.3. New Tokens</h3>
-<div class="paragraph">
-<p>Accepted as a Direct3D 11 device source in the <em>d3d_device_source</em> parameter
-of <strong>clGetDeviceIDsFromD3D11KHR</strong>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_D3D11_DEVICE_KHR                 0x4019
-CL_D3D11_DXGI_ADAPTER_KHR           0x401A</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Accepted as a set of Direct3D 11 devices in the _d3d_device_set_parameter of
-<strong>clGetDeviceIDsFromD3D11KHR</strong>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_PREFERRED_DEVICES_FOR_D3D11_KHR  0x401B
-CL_ALL_DEVICES_FOR_D3D11_KHR        0x401C</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Accepted as a property name in the <em>properties</em> parameter of
-<strong>clCreateContext</strong> and <strong>clCreateContextFromType</strong>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_CONTEXT_D3D11_DEVICE_KHR         0x401D</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Accepted as a property name in the <em>param_name</em> parameter of
-<strong>clGetContextInfo</strong>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR    0x402D</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Accepted as the property being queried in the <em>param_name</em> parameter of
-<strong>clGetMemObjectInfo</strong>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_MEM_D3D11_RESOURCE_KHR           0x401E</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Accepted as the property being queried in the <em>param_name</em> parameter of
-<strong>clGetImageInfo</strong>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_IMAGE_D3D11_SUBRESOURCE_KHR      0x401F</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Returned in the <em>param_value</em> parameter of <strong>clGetEventInfo</strong> when
-<em>param_name</em> is CL_EVENT_COMMAND_TYPE:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR    0x4020
-CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR    0x4021</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Returned by <strong>clCreateContext</strong> and <strong>clCreateContextFromType</strong> if the Direct3D
-11 device specified for interoperability is not compatible with the devices
-against which the context is to be created:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_INVALID_D3D11_DEVICE_KHR         -1006</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Returned by <strong>clCreateFromD3D11BufferKHR</strong> when <em>resource</em> is not a Direct3D
-11 buffer object, and by <strong>clCreateFromD3D11Texture2DKHR</strong> and
-<strong>clCreateFromD3D11Texture3DKHR</strong> when <em>resource</em> is not a Direct3D 11 texture
-object.</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_INVALID_D3D11_RESOURCE_KHR       -1007</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Returned by <strong>clEnqueueAcquireD3D11ObjectsKHR</strong> when any of <em>mem_objects</em> are
-currently acquired by OpenCL</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR  -1008</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Returned by <strong>clEnqueueReleaseD3D11ObjectsKHR</strong> when any of <em>mem_objects</em> are
-not currently acquired by OpenCL</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR  -1009</pre>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_d3d11_sharing-additions-to-chapter-4">8.4. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
-<div class="paragraph">
-<p>In <em>section 4.4</em>, replace the description of <em>properties</em> under
-<strong>clCreateContext</strong> with:</p>
-</div>
-<div class="paragraph">
-<p>&#8220;_properties_ specifies a list of context property names and their
-corresponding values.
-Each property is followed immediately by the corresponding desired value.
-The list is terminated with zero.
-If a property is not specified in <em>properties</em>, then its default value
-(listed in <em>table 4.5</em>) is used (it is said to be specified implicitly).
-If <em>properties</em> is <code>NULL</code> or empty (points to a list whose first value is
-zero), all attributes take on their default values.&#8221;</p>
-</div>
-<div class="paragraph">
-<p>Add the following to <em>table 4.5</em>:</p>
-</div>
-<table class="tableblock frame-all grid-all spread">
-<colgroup>
-<col style="width: 40%;">
-<col style="width: 20%;">
-<col style="width: 40%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_context_properties enum</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Property value</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Type</strong></th>
 <th class="tableblock halign-left valign-top"><strong>Description</strong></th>
 </tr>
 </thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_CONTEXT_D3D11_DEVICE_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">ID3D11Device *</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies the ID3D11Device * to use for Direct3D 11 interoperability.
-</p><p class="tableblock">  The default value is <code>NULL</code>.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>image2d_depth_t</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A 2D depth image. Refer to <em>section 6.12.14</em> for a detailed
+description of the built-in functions that use this type.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>image2d_array_depth_t</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A 2D depth image array. Refer to <em>section 6.12.14</em> for a
+detailed description of the built-in functions that use this
+type.</p></td>
 </tr>
 </tbody>
 </table>
 <div class="paragraph">
-<p>Add to the list of errors for <strong>clCreateContext</strong>:</p>
+<p>Add the following to the bulleted list in section 6.12.14.1.1 - Determining the border color:</p>
 </div>
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_D3D11_DEVICE_KHR if the value of the property
-CL_CONTEXT_D3D11_DEVICE_KHR is non-<code>NULL</code> and does not specify a valid
-Direct3D 11 device with which the <em>cl_device_ids</em> against which this
-context is to be created may interoperate.</p>
-</li>
-<li>
-<p>CL_INVALID_OPERATION if Direct3D 11 interoperability is specified by
-setting CL_INVALID_D3D11_DEVICE_KHR to a non-<code>NULL</code> value, and
-interoperability with another graphics API is also specified.</p>
+<p>If the image channel order is <code>CL_DEPTH</code>, the border value is <code>0.0f</code>.</p>
 </li>
 </ul>
 </div>
 <div class="paragraph">
-<p>Add to the list of errors for <strong>clCreateContextFromType</strong> the same new errors
-described above for <strong>clCreateContext</strong>.</p>
+<p>Add the following built-in functions to section 6.12.14.2 - BuiltIn Image Read Functions:</p>
 </div>
-<div class="paragraph">
-<p>Add the following row to <em>table 4.6</em>:</p>
-</div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 40%;">
-<col style="width: 20%;">
-<col style="width: 40%;">
+<col style="width: 60%;">
 </colgroup>
 <thead>
 <tr>
-<th class="tableblock halign-left valign-top"><strong>cl_context_info</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Information returned in param_value</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
 </tr>
 </thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_bool</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns CL_TRUE if Direct3D 11 resources created as shared by setting
-  <em>MiscFlags</em> to include D3D11_RESOURCE_MISC_SHARED will perform faster when
-  shared with OpenCL, compared with resources which have not set this flag.
-  Otherwise returns CL_FALSE.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">float <strong>read_imagef</strong>(read_only image2d_depth_t <em>image</em>,
+  sampler_t <em>sampler</em>, int2 <em>coord</em>)<br>
+  float <strong>read_imagef</strong>(read_only image2d_depth_t <em>image</em>,
+  sampler_t <em>sampler</em>, float2 <em>coord</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate (<em>coord.x</em>, <em>coord.y</em>) to do an element lookup in
+      the 2D depth image object specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value in the range [0.0, 1.0]
+      for depth image objects created with <em>image_channel_data_type</em> set to
+      <code>CL_UNORM_INT16</code> or <code>CL_UNORM_INT24</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value for depth image objects
+      created with <em>image_channel_data_type</em> set to <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
+      sampler with filter mode set to <code>CLK_FILTER_NEAREST</code>, normalized
+      coordinates set to <code>CLK_NORMALIZED_COORDS_FALSE</code> and addressing mode
+      set to <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>, <code>CLK_ADDRESS_CLAMP</code> or
+      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for depth image objects with
+      <em>image_channel_data_type</em> values not specified in the description
+      above are undefined.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">float <strong>read_imagef</strong>(read_only image2d_array_depth_t <em>image</em>,
+  sampler_t <em>sampler</em>, int4 <em>coord</em>)<br>
+  float <strong>read_imagef</strong>(read_only image2d_array_depth_t <em>image</em>,
+  sampler_t <em>sampler</em>, float4 <em>coord</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.xy</em> to do an element lookup in the 2D image identified by
+      <em>coord.z</em> in the 2D depth image array specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value in the range [0.0, 1.0]
+      for depth image objects created with <em>image_channel_data_type</em> set to
+      <code>CL_UNORM_INT16</code> or <code>CL_UNORM_INT24</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value for depth image objects
+      created with <em>image_channel_data_type</em> set to <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      The <strong>read_imagef</strong> calls that take integer coordinates must use a
+      sampler with filter mode set to <code>CLK_FILTER_NEAREST</code>, normalized
+      coordinates set to <code>CLK_NORMALIZED_COORDS_FALSE</code> and addressing mode
+      set to <code>CLK_ADDRESS_CLAMP_TO_EDGE</code>, <code>CLK_ADDRESS_CLAMP</code> or
+      <code>CLK_ADDRESS_NONE</code>; otherwise the values returned are undefined.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <em>image_channel_data_type</em> values not specified in the description
+      above are undefined.</p></td>
 </tr>
 </tbody>
 </table>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_d3d11_sharing-additions-to-chapter-5">8.5. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
 <div class="paragraph">
-<p>Add to the list of errors for <strong>clGetMemObjectInfo</strong>:</p>
+<p>Add the following built-in functions to section 6.12.14.3 - BuiltIn Image Sampler-less Read Functions:</p>
 </div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_D3D11_RESOURCE_KHR if <em>param_name</em> is
-CL_MEM_D3D11_RESOURCE_KHR and <em>memobj</em> was not created by the function
-<strong>clCreateFromD3D11BufferKHR</strong>, <strong>clCreateFromD3D11Texture2DKHR</strong>, or
-<strong>clCreateFromD3D11Texture3DKHR</strong>.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>Extend <em>table 5.12</em> to include the following entry.</p>
-</div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 40%;">
-<col style="width: 20%;">
-<col style="width: 40%;">
+<col style="width: 60%;">
 </colgroup>
 <thead>
 <tr>
-<th class="tableblock halign-left valign-top"><strong>cl_mem_info</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Return type</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Info. returned in <em>param_value</em></strong></th>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
 </tr>
 </thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_D3D11_RESOURCE_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">ID3D11Resource *</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">If <em>memobj</em> was created using <strong>clCreateFromD3D11BufferKHR</strong>,
-  <strong>clCreateFromD3D11Texture2DKHR</strong>, or <strong>clCreateFromD3D11Texture3DKHR</strong>,
-  returns the <em>resource</em> argument specified when <em>memobj</em> was created.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">float <strong>read_imagef</strong>(image2d_depth_t <em>image</em>, int2 <em>coord</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Use the coordinate (<em>coord.x</em>, <em>coord.y</em>) to do an element lookup in
+      the 2D depth image object specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value in the range [0.0, 1.0]
+      for depth image objects created with <em>image_channel_data_type</em> set to
+      <code>CL_UNORM_INT16</code> or <code>CL_UNORM_INT24</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value for depth image objects
+      created with <em>image_channel_data_type</em> set to <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <em>image_channel_data_type</em> values not specified in the description
+      above are undefined.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">float <strong>read_imagef</strong>(image2d_array_depth_t <em>image</em>, int4 <em>coord</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Use <em>coord.xy</em> to do an element lookup in the 2D image identified by
+      <em>coord.z</em> in the 2D depth image array specified by <em>image</em>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value in the range [0.0, 1.0]
+      for depth image objects created with <em>image_channel_data_type</em> set to
+      <code>CL_UNORM_INT16</code> or <code>CL_UNORM_INT24</code>.</p>
+<p class="tableblock">      <strong>read_imagef</strong> returns a floating-point value for depth image objects
+      created with <em>image_channel_data_type</em> set to <code>CL_FLOAT</code>.</p>
+<p class="tableblock">      Values returned by <strong>read_imagef</strong> for image objects with
+      <em>image_channel_data_type</em> values not specified in the description
+      above are undefined.</p></td>
 </tr>
 </tbody>
 </table>
 <div class="paragraph">
-<p>Add to the list of errors for <strong>clGetImageInfo</strong>:</p>
+<p>Add the following built-in functions to section 6.12.14.4 – BuiltIn Image Write Functions:</p>
 </div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_D3D11_RESOURCE_KHR if <em>param_name</em> is
-CL_MEM_D3D11_SUBRESOURCE_KHR and <em>image</em> was not created by the function
-<strong>clCreateFromD3D11Texture2DKHR</strong>, or <strong>clCreateFromD3D11Texture3DKHR</strong>.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>Extend <em>table 5.9</em> to include the following entry.</p>
-</div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 40%;">
-<col style="width: 20%;">
+<col style="width: 60%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>write_imagef</strong>(image2d_depth_t <em>image</em>, int2 <em>coord</em>,
+  float <em>depth</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Write <em>depth</em> value to location specified by <em>coord.xy</em> in the 2D
+      depth image object specified by <em>image</em>.
+      Appropriate data format conversion to the specified image format is
+      done before writing the depth value.
+      <em>coord.x</em> and <em>coord.y</em> are considered to be unnormalized coordinates,
+      and must be in the range [0, image width-1], and [0, image height-1],
+      respectively.</p>
+<p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to <code>CL_UNORM_INT16</code>, <code>CL_UNORM_INT24</code> or
+      <code>CL_FLOAT</code>.
+      Appropriate data format conversion will be done to convert depth value
+      from a floating-point value to actual data format associated with the
+      image.</p>
+<p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
+      image objects created with <em>image_channel_data_type</em> values not
+      specified in the description above or with (<em>x</em>, <em>y</em>) coordinate
+      values that are not in the range [0, image width-1] and [0, image
+      height-1], respectively, is undefined.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>write_imagef</strong>(image2d_array_depth_t <em>image</em>, int4 <em>coord</em>,
+  float <em>depth</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Write <em>depth</em> value to location specified by <em>coord.xy</em> in the 2D
+      image identified by <em>coord.z</em> in the 2D depth image array specified by
+      <em>image</em>.
+      Appropriate data format conversion to the specified image format is
+      done before writing the depth value.
+      <em>coord.x</em>, <em>coord.y</em> and <em>coord.z</em> are considered to be unnormalized
+      coordinates, and must be in the range [0, image width-1], [0, image
+      height-1], and [0, image number of layers-1], respectively.</p>
+<p class="tableblock">      <strong>write_imagef</strong> can only be used with image objects created with
+      <em>image_channel_data_type</em> set to <code>CL_UNORM_INT16</code>, <code>CL_UNORM_INT24</code> or
+      <code>CL_FLOAT</code>.
+      Appropriate data format conversion will be done to convert depth valye
+      from a floating-point value to actual data format associated with the
+      image.</p>
+<p class="tableblock">      The behavior of <strong>write_imagef</strong>, <strong>write_imagei</strong> and <strong>write_imageui</strong> for
+      image objects created with <em>image_channel_data_type</em> values not
+      specified in the description above or with (<em>x</em>, <em>y</em>, <em>z</em>) coordinate
+      values that are not in the range [0, image width-1], [0, image
+      height-1], [0, image number of layers-1], respectively, is undefined.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Add the following built-in functions to section 6.12.14.5 – BuiltIn Image Query Functions:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
 <col style="width: 40%;">
+<col style="width: 60%;">
 </colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_image_info</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Return type</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Info. returned in <em>param_value</em></strong></th>
-</tr>
-</thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_D3D11_SUBRESOURCE_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">If <em>image</em> was created using <strong>clCreateFromD3D11Texture2DKHR</strong>, or
-  <strong>clCreateFromD3D11Texture3DKHR</strong>, returns the <em>subresource</em> argument
-  specified when <em>image</em> was created.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Function</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Description</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>get_image_width</strong>(image2d_depth_t <em>image</em>)<br>
+  int <strong>get_image_width</strong>(image2d_array_depth_t <em>image</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return the image width in pixels.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>get_image_height</strong>(image2d_depth_t <em>image</em>)<br>
+  int <strong>get_image_height</strong>(image2d_array_depth_t <em>image</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return the image height in pixels.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>get_image_channel_data_type</strong>(image2d_depth_t <em>image</em>)<br>
+  int <strong>get_image_channel_data_type</strong>(image2d_array_depth_t <em>image</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return the channel data type. Valid values are:</p>
+<p class="tableblock">      <code>CLK_UNORM_INT16</code><br>
+      <code>CLK_FLOAT</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>get_image_channel_order</strong>(image2d_depth_t <em>image</em>)<br>
+  int <strong>get_image_channel_order</strong>(image2d_array_depth_t <em>image</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return the image channel order. Valid values are:</p>
+<p class="tableblock">      <code>CLK_DEPTH</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int2 <strong>get_image_dim</strong>(image2d_depth_t <em>image</em>)<br>
+  int2 <strong>get_image_dim</strong>(image2d_array_depth_t <em>image</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return the 2D image width and height as an int2 type.
+      The width is returned in the <em>x</em> component, and the height in the <em>y</em>
+      component.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">size_t <strong>get_image_array_size</strong>(image2d_array_depth_t <em>image</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return the number of images in the 2D image array.</p></td>
 </tr>
 </tbody>
 </table>
 <div class="paragraph">
-<p>Add to <em>table 5.22</em> in the <strong>Info returned in param_value</strong> column for
-<em>cl_event_info</em> = CL_EVENT_COMMAND_TYPE:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR
-CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR</pre>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_d3d11_sharing-sharing-memory-objects-with-direct3d-11-resources">8.6. Sharing Memory Objects with Direct3D 11 Resources</h3>
-<div class="paragraph">
-<p>This section discusses OpenCL functions that allow applications to use
-Direct3D 11 resources as OpenCL memory objects.
-This allows efficient sharing of data between OpenCL and Direct3D 11.
-The OpenCL API may be used to execute kernels that read and/or write memory
-objects that are also Direct3D 11 resources.
-An OpenCL image object may be created from a Direct3D 11 texture resource.
-An OpenCL buffer object may be created from a Direct3D 11 buffer resource.
-OpenCL memory objects may be created from Direct3D 11 objects if and only if
-the OpenCL context has been created from a Direct3D 11 device.</p>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d11_sharing-querying-opencl-devices-corresponding-to-direct3d-11-devices">8.6.1. Querying OpenCL Devices Corresponding to Direct3D 11 Devices</h4>
-<div class="paragraph">
-<p>The OpenCL devices corresponding to a Direct3D 11 device may be queried.
-The OpenCL devices corresponding to a DXGI adapter may also be queried.
-The OpenCL devices corresponding to a Direct3D 11 device will be a subset of
-the OpenCL devices corresponding to the DXGI adapter against which the
-Direct3D 11 device was created.</p>
+<p>Add the following text below the table in section 6.12.14.6 - Mapping image channels to color values returned by read_image
+and color values passed to write_image to image channels:</p>
 </div>
 <div class="paragraph">
-<p>The OpenCL devices corresponding to a Direct3D 11 device or a DXGI device
-may be queried using the function
-</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_int clGetDeviceIDsFromD3D11KHR(cl_platform_id platform,
-                                  cl_d3d11_device_source_khr d3d_device_source,
-                                  void *d3d_object,
-                                  cl_d3d11_device_set_khr d3d_device_set,
-                                  cl_uint num_entries,
-                                  cl_device_id *devices,
-                                  cl_uint *num_devices)</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p><em>platform</em> refers to the platform ID returned by <strong>clGetPlatformIDs</strong>.</p>
-</div>
-<div class="paragraph">
-<p><em>d3d_device_source</em> specifies the type of <em>d3d_object</em>, and must be one of
-the values shown in the table below.</p>
-</div>
-<div class="paragraph">
-<p><em>d3d_object</em> specifies the object whose corresponding OpenCL devices are
-being queried.
-The type of <em>d3d_object</em> must be as specified in the table below.</p>
-</div>
-<div class="paragraph">
-<p><em>d3d_device_set</em> specifies the set of devices to return, and must be one of
-the values shown in the table below.</p>
-</div>
-<div class="paragraph">
-<p><em>num_entries</em> is the number of cl_device_id entries that can be added to
-<em>devices</em>.
-If <em>devices</em> is not <code>NULL</code> then <em>num_entries</em> must be greater than zero.</p>
-</div>
-<div class="paragraph">
-<p><em>devices</em> returns a list of OpenCL devices found.
-The cl_device_id values returned in <em>devices</em> can be used to identify a
-specific OpenCL device.
-If <em>devices</em> is <code>NULL</code>, this argument is ignored.
-The number of OpenCL devices returned is the minimum of the value specified
-by <em>num_entries</em> and the number of OpenCL devices corresponding to
-<em>d3d_object</em>.</p>
-</div>
-<div class="paragraph">
-<p><em>num_devices</em> returns the number of OpenCL devices available that correspond
-to <em>d3d_object</em>.
-If <em>num_devices</em> is <code>NULL</code>, this argument is ignored.</p>
-</div>
-<div class="paragraph">
-<p><strong>clGetDeviceIDsFromD3D10KHR</strong> returns CL_SUCCESS if the function is executed
-successfully.
-Otherwise it may return</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_PLATFORM if <em>platform</em> is not a valid platform.</p>
-</li>
-<li>
-<p>CL_INVALID_VALUE if <em>d3d_device_source</em> is not a valid value,
-<em>d3d_device_set</em> is not a valid value, <em>num_entries</em> is equal to zero
-and <em>devices</em> is not <code>NULL</code>, or if both <em>num_devices</em> and <em>devices</em> are
-<code>NULL</code>.</p>
-</li>
-<li>
-<p>CL_DEVICE_NOT_FOUND if no OpenCL devices that correspond to <em>d3d_object</em>
-were found.</p>
-</li>
-</ul>
-</div>
-<table id="cl_khr_d3d11_sharing-clGetDeviceIDsFromD3D11KHR-object-type" class="tableblock frame-all grid-all spread">
-<caption class="title">Table 22. <em>Direct3D 11 object types that may be used by</em> <strong>clGetDeviceIDsFromD3D11KHR</strong></caption>
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_d3d_device_source_khr</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Type of <em>d3d_object</em></strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_D3D11_DEVICE_KHR</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">ID3D11Device *</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_D3D11_DXGI_ADAPTER_KHR</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">IDXGIAdapter *</p></td>
-</tr>
-</tbody>
-</table>
-<table id="cl_khr_d3d11_sharing-clGetDeviceIDsFromD3D10KHR-devices" class="tableblock frame-all grid-all spread">
-<caption class="title">Table 23. <em>Sets of devices queriable using</em> <strong>clGetDeviceIDsFromD3D11KHR</strong></caption>
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_d3d_device_set_khr</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Devices returned in <em>devices</em></strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_PREFERRED_DEVICES_FOR_D3D11_KHR</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">The preferred OpenCL devices associated with the specified Direct3D
-  object.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_ALL_DEVICES_FOR_D3D11_KHR</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">All OpenCL devices which may interoperate with the specified Direct3D
-  object.
-  Performance of sharing data on these devices may be considerably less than
-  on the preferred devices.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d11_sharing-lifetime-of-shared-objects">8.6.2. Lifetime of Shared Objects</h4>
-<div class="paragraph">
-<p>An OpenCL memory object created from a Direct3D 11 resource remains valid as
-long as the corresponding Direct3D 11 resource has not been deleted.
-If the Direct3D 11 resource is deleted through the Direct3D 11 API,
-subsequent use of the OpenCL memory object will result in undefined
-behavior, including but not limited to possible OpenCL errors, data
-corruption, and program termination.</p>
-</div>
-<div class="paragraph">
-<p>The successful creation of a cl_context against a Direct3D 11 device
-specified via the context create parameter CL_CONTEXT_D3D11_DEVICE_KHR will
-increment the internal Direct3D reference count on the specified Direct3D 11
-device.
-The internal Direct3D reference count on that Direct3D 11 device will be
-decremented when the OpenCL reference count on the returned OpenCL context
-drops to zero.</p>
-</div>
-<div class="paragraph">
-<p>The OpenCL context and corresponding command-queues are dependent on the
-existence of the Direct3D 11 device from which the OpenCL context was
-created.
-If the Direct3D 11 device is deleted through the Direct3D 11 API, subsequent
-use of the OpenCL context will result in undefined behavior, including but
-not limited to possible OpenCL errors, data corruption, and program
-termination.</p>
-</div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d11_sharing-sharing-direct3d-11-buffer-resources-as-opencl-buffer-objects">8.6.3. Sharing Direct3D 11 Buffer Resources as OpenCL Buffer Objects</h4>
-<div class="paragraph">
-<p>The function
-</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_mem clCreateFromD3D11BufferKHR(cl_context context,
-                                  cl_mem_flags flags,
-                                  ID3D11Buffer *resource,
-                                  cl_int *errcode_ret)</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>creates an OpenCL buffer object from a Direct3D 11 buffer.</p>
-</div>
-<div class="paragraph">
-<p><em>context</em> is a valid OpenCL context created from a Direct3D 11 device.</p>
-</div>
-<div class="paragraph">
-<p><em>flags</em> is a bit-field that is used to specify usage information.
-Refer to table 5.3 for a description of <em>flags</em>.
-Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM_READ_WRITE values
-specified in <em>table 5.3</em> can be used.</p>
-</div>
-<div class="paragraph">
-<p><em>resource</em> is a pointer to the Direct3D 11 buffer to share.</p>
-</div>
-<div class="paragraph">
-<p><em>errcode_ret</em> will return an appropriate error code.
-If <em>errcode_ret</em> is <code>NULL</code>, no error code is returned.</p>
-</div>
-<div class="paragraph">
-<p><strong>clCreateFromD3D11BufferKHR</strong> returns a valid non-zero OpenCL buffer object
-and <em>errcode_ret</em> is set to CL_SUCCESS if the buffer object is created
-successfully.
-Otherwise, it returns a <code>NULL</code> value with one of the following error values
-returned in <em>errcode_ret</em>:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
-</li>
-<li>
-<p>CL_INVALID_VALUE if values specified in <em>flags</em> are not valid.</p>
-</li>
-<li>
-<p>CL_INVALID_D3D11_RESOURCE_KHR if <em>resource</em> is not a Direct3D 11 buffer
-resource, if <em>resource</em> was created with the D3D11_USAGE flag
-D3D11_USAGE_IMMUTABLE, if a cl_mem from <em>resource</em> has already been
-created using <strong>clCreateFromD3D11BufferKHR</strong>, or if <em>context</em> was not
-created against the same Direct3D 11 device from which <em>resource</em> was
-created.</p>
-</li>
-<li>
-<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
-required by the OpenCL implementation on the host.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>The size of the returned OpenCL buffer object is the same as the size of
-<em>resource</em>.
-This call will increment the internal Direct3D reference count on
-<em>resource</em>.
-The internal Direct3D reference count on <em>resource</em> will be decremented when
-the OpenCL reference count on the returned OpenCL memory object drops to
-zero.</p>
-</div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d11_sharing-sharing-direct3d-11-texture-and-resources-as-opencl-image-objects">8.6.4. Sharing Direct3D 11 Texture and Resources as OpenCL Image Objects</h4>
-<div class="paragraph">
-<p>The function
-</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_mem clCreateFromD3D11Texture2DKHR(cl_context context,
-                                     cl_mem_flags flags,
-                                     ID3D11Texture2D *resource,
-                                     UINT subresource,
-                                     cl_int *errcode_ret)</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>creates an OpenCL 2D image object from a subresource of a Direct3D 11 2D
-texture.</p>
-</div>
-<div class="paragraph">
-<p><em>context</em> is a valid OpenCL context created from a Direct3D 11 device.</p>
-</div>
-<div class="paragraph">
-<p><em>flags</em> is a bit-field that is used to specify usage information.
-Refer to <em>table 5.3</em> for a description of <em>flags</em>.
-Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM_READ_WRITE values
-specified in <em>table 5.3</em> can be used.</p>
-</div>
-<div class="paragraph">
-<p><em>resource</em> is a pointer to the Direct3D 11 2D texture to share.</p>
-</div>
-<div class="paragraph">
-<p><em>subresource</em> is the subresource of <em>resource</em> to share.</p>
-</div>
-<div class="paragraph">
-<p><em>errcode_ret</em> will return an appropriate error code.
-If <em>errcode_ret</em> is <code>NULL</code>, no error code is returned.</p>
-</div>
-<div class="paragraph">
-<p><strong>clCreateFromD3D11Texture2DKHR</strong> returns a valid non-zero OpenCL image object
-and <em>errcode_ret</em> is set to CL_SUCCESS if the image object is created
-successfully.
-Otherwise, it returns a <code>NULL</code> value with one of the following error values
-returned in <em>errcode_ret</em>:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
-</li>
-<li>
-<p>CL_INVALID_VALUE if values specified in <em>flags</em> are not valid or if
-<em>subresource</em> is not a valid subresource index for <em>resource</em>.</p>
-</li>
-<li>
-<p>CL_INVALID_D3D11_RESOURCE_KHR if <em>resource</em> is not a Direct3D 11 texture
-resource, if <em>resource</em> was created with the D3D11_USAGE flag
-D3D11_USAGE_IMMUTABLE, if <em>resource</em> is a multisampled texture, if a
-cl_mem from subresource <em>subresource</em> of <em>resource</em> has already been
-created using <strong>clCreateFromD3D11Texture2DKHR</strong>, or if <em>context</em> was not
-created against the same Direct3D 10 device from which <em>resource</em> was
-created.</p>
-</li>
-<li>
-<p>CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the Direct3D 11 texture format of
-<em>resource</em> is not listed in the table
-<a href="#cl_khr_d3d11_sharing-mapping-of-image-formats"><em>Direct3D 11 formats and
-corresponding OpenCL image formats</em></a> or if the Direct3D 11 texture
-format of <em>resource</em> does not map to a supported OpenCL image format.</p>
-</li>
-<li>
-<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
-required by the OpenCL implementation on the host.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>The width and height of the returned OpenCL 2D image object are determined
-by the width and height of subresource <em>subresource</em> of <em>resource</em>.
-The channel type and order of the returned OpenCL 2D image object is
-determined by the format of <em>resource</em> by the table
-<a href="#cl_khr_d3d11_sharing-mapping-of-image-formats"><em>Direct3D 11 formats and
-corresponding OpenCL image formats</em></a>.</p>
-</div>
-<div class="paragraph">
-<p>This call will increment the internal Direct3D reference count on
-<em>resource</em>.
-The internal Direct3D reference count on <em>resource</em> will be decremented when
-the OpenCL reference count on the returned OpenCL memory object drops to
-zero.</p>
-</div>
-<div class="paragraph">
-<p>The function
-</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_mem clCreateFromD3D11Texture3DKHR(cl_context context,
-                                     cl_mem_flags flags,
-                                     ID3D11Texture3D *resource,
-                                     UINT subresource,
-                                     cl_int *errcode_ret)</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>creates an OpenCL 3D image object from a subresource of a Direct3D 11 3D
-texture.</p>
-</div>
-<div class="paragraph">
-<p><em>context</em> is a valid OpenCL context created from a Direct3D 11 device.</p>
-</div>
-<div class="paragraph">
-<p><em>flags</em> is a bit-field that is used to specify usage information.
-Refer to <em>table 5.3</em> for a description of <em>flags</em>.
-Only CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM_READ_WRITE values
-specified in <em>table 5.3</em> can be used.</p>
-</div>
-<div class="paragraph">
-<p><em>resource</em> is a pointer to the Direct3D 11 3D texture to share.</p>
-</div>
-<div class="paragraph">
-<p><em>subresource</em> is the subresource of <em>resource</em> to share.</p>
-</div>
-<div class="paragraph">
-<p><em>errcode_ret</em> will return an appropriate error code.
-If <em>errcode_ret</em> is <code>NULL</code>, no error code is returned.</p>
-</div>
-<div class="paragraph">
-<p><strong>clCreateFromD3D11Texture3DKHR</strong> returns a valid non-zero OpenCL image object
-and <em>errcode_ret</em> is set to CL_SUCCESS if the image object is created
-successfully.
-Otherwise, it returns a <code>NULL</code> value with one of the following error values
-returned in <em>errcode_ret</em>:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
-</li>
-<li>
-<p>CL_INVALID_VALUE if values specified in <em>flags</em> are not valid or if
-<em>subresource</em> is not a valid subresource index for <em>resource</em>.</p>
-</li>
-<li>
-<p>CL_INVALID_D3D11_RESOURCE_KHR if <em>resource</em> is not a Direct3D 11 texture
-resource, if <em>resource</em> was created with the D3D11_USAGE flag
-D3D11_USAGE_IMMUTABLE, if <em>resource</em> is a multisampled texture, if a
-cl_mem from subresource <em>subresource</em> of <em>resource</em> has already been
-created using <strong>clCreateFromD3D11Texture3DKHR</strong>, or if <em>context</em> was not
-created against the same Direct3D 11 device from which <em>resource</em> was
-created.</p>
-</li>
-<li>
-<p>CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the Direct3D 11 texture format of
-<em>resource</em> is not listed in the table
-<a href="#cl_khr_d3d11_sharing-mapping-of-image-formats"><em>Direct3D 11 formats and
-corresponding OpenCL image formats</em></a> or if the Direct3D 11 texture
-format of <em>resource</em> does not map to a supported OpenCL image format.</p>
-</li>
-<li>
-<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
-required by the OpenCL implementation on the host.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>The width, height and depth of the returned OpenCL 3D image object are
-determined by the width, height and depth of subresource <em>subresource</em> of
-<em>resource</em>.
-The channel type and order of the returned OpenCL 3D image object is
-determined by the format of <em>resource</em> by the table
-<a href="#cl_khr_d3d11_sharing-mapping-of-image-formats"><em>Direct3D 11 formats and
-corresponding OpenCL image formats</em></a>.</p>
-</div>
-<div class="paragraph">
-<p>This call will increment the internal Direct3D reference count on
-<em>resource</em>.
-The internal Direct3D reference count on <em>resource</em> will be decremented when
-the OpenCL reference count on the returned OpenCL memory object drops to
-zero.</p>
-</div>
-<table id="cl_khr_d3d11_sharing-mapping-of-image-formats" class="tableblock frame-all grid-all spread">
-<caption class="title">Table 24. <em>Direct3D 11 formats and corresponding OpenCL image formats</em></caption>
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>DXGI format</strong></th>
-<th class="tableblock halign-left valign-top"><strong>CL image format</strong>
-
-<strong>(channel order, channel data type)</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32B32A32_FLOAT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_FLOAT</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32B32A32_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNSIGNED_INT32</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32B32A32_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SIGNED_INT32</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_FLOAT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_HALF_FLOAT</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_UNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNORM_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNSIGNED_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_SNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SNORM_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16B16A16_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SIGNED_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_B8G8R8A8_UNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_BGRA, CL_UNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_UNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_UNSIGNED_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_SNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8B8A8_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RGBA, CL_SIGNED_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32_FLOAT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_FLOAT</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNSIGNED_INT32</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32G32_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SIGNED_INT32</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_FLOAT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_HALF_FLOAT</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_UNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNORM_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNSIGNED_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_SNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SNORM_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16G16_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SIGNED_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_UNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_UNSIGNED_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_SNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8G8_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_RG, CL_SIGNED_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32_FLOAT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_FLOAT</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNSIGNED_INT32</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R32_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SIGNED_INT32</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_FLOAT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_HALF_FLOAT</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_UNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNORM_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNSIGNED_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_SNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SNORM_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R16_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SIGNED_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_UNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_UINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_UNSIGNED_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_SNORM</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">DXGI_FORMAT_R8_SINT</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_R, CL_SIGNED_INT8</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d11_sharing-querying-direct3d-properties-of-memory-objects-created-from-direct3d-11-resources">8.6.5. Querying Direct3D properties of memory objects created from Direct3D 11 resources</h4>
-<div class="paragraph">
-<p>Properties of Direct3D 11 objects may be queried using <strong>clGetMemObjectInfo</strong>
-and <strong>clGetImageInfo</strong> with <em>param_name</em> CL_MEM_D3D11_RESOURCE_KHR and</p>
-</div>
-<div class="paragraph">
-<p>CL_IMAGE_D3D11_SUBRESOURCE_KHR respectively as described in <em>sections 5.4.3</em>
-and <em>5.3.6</em>.</p>
-</div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d11_sharing-sharing-memory-objects-created-from-direct3d-11-resources-between-direct3d-11-and-opencl-contexts">8.6.6. Sharing memory objects created from Direct3D 11 resources between Direct3D 11 and OpenCL contexts</h4>
-<div class="paragraph">
-<p>The function
-</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_int clEnqueueAcquireD3D11ObjectsKHR(cl_command_queue command_queue,
-                                       cl_uint num_objects,
-                                       const cl_mem *mem_objects,
-                                       cl_uint num_events_in_wait_list,
-                                       const cl_event *event_wait_list,
-                                       cl_event *event)</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>is used to acquire OpenCL memory objects that have been created from
-Direct3D 11 resources.
-The Direct3D 11 objects are acquired by the OpenCL context associated with
-<em>command_queue</em> and can therefore be used by all command-queues associated
-with the OpenCL context.</p>
-</div>
-<div class="paragraph">
-<p>OpenCL memory objects created from Direct3D 11 resources must be acquired
-before they can be used by any OpenCL commands queued to a command-queue.
-If an OpenCL memory object created from a Direct3D 11 resource is used while
-it is not currently acquired by OpenCL, the call attempting to use that
-OpenCL memory object will return CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR.</p>
-</div>
-<div class="paragraph">
-<p>If CL_CONTEXT_INTEROP_USER_SYNC is not specified as CL_TRUE during context
-creation, <strong>clEnqueueAcquireD3D11ObjectsKHR</strong> provides the synchronization
-guarantee that any Direct3D 11 calls involving the interop device(s) used in
-the OpenCL context made before <strong>clEnqueueAcquireD3D11ObjectsKHR</strong> is called
-will complete executing before <em>event</em> reports completion and before the
-execution of any subsequent OpenCL work issued in <em>command_queue</em> begins.
-If the context was created with properties specifying
-CL_CONTEXT_INTEROP_USER_SYNC as CL_TRUE, the user is responsible for
-guaranteeing that any Direct3D 11 calls involving the interop device(s) used
-in the OpenCL context made before <strong>clEnqueueAcquireD3D11ObjectsKHR</strong> is
-called have completed before calling <strong>clEnqueueAcquireD3D11ObjectsKHR.</strong></p>
-</div>
-<div class="paragraph">
-<p><em>command_queue</em> is a valid command-queue.</p>
-</div>
-<div class="paragraph">
-<p><em>num_objects</em> is the number of memory objects to be acquired in
-<em>mem_objects</em>.</p>
-</div>
-<div class="paragraph">
-<p><em>mem_objects</em> is a pointer to a list of OpenCL memory objects that were
-created from Direct3D 11 resources.</p>
-</div>
-<div class="paragraph">
-<p><em>event_wait_list</em> and <em>num_events_in_wait_list</em> specify events that need to
-complete before this particular command can be executed.
-If <em>event_wait_list</em> is <code>NULL</code>, then this particular command does not wait
-on any event to complete.
-If <em>event_wait_list</em> is <code>NULL</code>, <em>num_events_in_wait_list</em> must be 0.
-If <em>event_wait_list</em> is not <code>NULL</code>, the list of events pointed to by
-<em>event_wait_list</em> must be valid and <em>num_events_in_wait_list</em> must be
-greater than 0.
-The events specified in <em>event_wait_list</em> act as synchronization points.</p>
-</div>
-<div class="paragraph">
-<p><em>event</em> returns an event object that identifies this particular command and
-can be used to query or queue a wait for this particular command to
-complete.
-<em>event</em> can be <code>NULL</code> in which case it will not be possible for the
-application to query the status of this command or queue a wait for this
-command to complete.
-If the <em>event_wait_list</em> and the <em>event</em> arguments are not <code>NULL</code>, the
-<em>event</em> argument should not refer to an element of the <em>event_wait_list</em>
-array.</p>
-</div>
-<div class="paragraph">
-<p><strong>clEnqueueAcquireD3D11ObjectsKHR</strong> returns CL_SUCCESS if the function is
-executed successfully.
-If <em>num_objects</em> is 0 and <em>mem_objects</em> is <code>NULL</code> then the function does
-nothing and returns CL_SUCCESS.
-Otherwise it returns one of the following errors:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_VALUE if <em>num_objects</em> is zero and <em>mem_objects</em> is not a
-<code>NULL</code> value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is <code>NULL</code>.</p>
-</li>
-<li>
-<p>CL_INVALID_MEM_OBJECT if memory objects in <em>mem_objects</em> are not valid
-OpenCL memory objects or if memory objects in <em>mem_objects</em> have not
-been created from Direct3D 11 resources.</p>
-</li>
-<li>
-<p>CL_INVALID_COMMAND_QUEUE if <em>command_queue</em> is not a valid
-command-queue.</p>
-</li>
-<li>
-<p>CL_INVALID_CONTEXT if context associated with <em>command_queue</em> was not
-created from an Direct3D 11 context.</p>
-</li>
-<li>
-<p>CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR if memory objects in
-<em>mem_objects</em> have previously been acquired using
-<strong>clEnqueueAcquireD3D11ObjectsKHR</strong> but have not been released using
-<strong>clEnqueueReleaseD3D11ObjectsKHR</strong>.</p>
-</li>
-<li>
-<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
-<em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not <code>NULL</code> and
-<em>num_events_in_wait_list</em> is 0, or if event objects in <em>event_wait_list</em>
-are not valid events.</p>
-</li>
-<li>
-<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
-required by the OpenCL implementation on the host.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>The function
-</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_int clEnqueueReleaseD3D11ObjectsKHR(cl_command_queue command_queue,
-                                       cl_uint num_objects,
-                                       const cl_mem *mem_objects,
-                                       cl_uint num_events_in_wait_list,
-                                       const cl_event *event_wait_list,
-                                       cl_event *event)</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>is used to release OpenCL memory objects that have been created from
-Direct3D 11 resources.
-The Direct3D 11 objects are released by the OpenCL context associated with
-<em>command_queue</em>.</p>
-</div>
-<div class="paragraph">
-<p>OpenCL memory objects created from Direct3D 11 resources which have been
-acquired by OpenCL must be released by OpenCL before they may be accessed by
-Direct3D 11.
-Accessing a Direct3D 11 resource while its corresponding OpenCL memory
-object is acquired is in error and will result in undefined behavior,
-including but not limited to possible OpenCL errors, data corruption, and
-program termination.</p>
-</div>
-<div class="paragraph">
-<p>If CL_CONTEXT_INTEROP_USER_SYNC is not specified as CL_TRUE during context
-creation, <strong>clEnqueueReleaseD3D11ObjectsKHR</strong> provides the synchronization
-guarantee that any calls to Direct3D 11 calls involving the interop
-device(s) used in the OpenCL context made after the call to
-<strong>clEnqueueReleaseD3D11ObjectsKHR</strong> will not start executing until after all
-events in <em>event_wait_list</em> are complete and all work already submitted to
-<em>command_queue</em> completes execution.
-If the context was created with properties specifying
-CL_CONTEXT_INTEROP_USER_SYNC as CL_TRUE, the user is responsible for
-guaranteeing that any Direct3D 11 calls involving the interop device(s) used
-in the OpenCL context made after <strong>clEnqueueReleaseD3D11ObjectsKHR</strong> will not
-start executing until after event returned by
-<strong>clEnqueueReleaseD3D11ObjectsKHR</strong> reports completion.</p>
-</div>
-<div class="paragraph">
-<p><em>num_objects</em> is the number of memory objects to be released in
-<em>mem_objects</em>.</p>
-</div>
-<div class="paragraph">
-<p><em>mem_objects</em> is a pointer to a list of OpenCL memory objects that were
-created from Direct3D 11 resources.</p>
-</div>
-<div class="paragraph">
-<p><em>event_wait_list</em> and <em>num_events_in_wait_list</em> specify events that need to
-complete before this particular command can be executed.
-If <em>event_wait_list</em> is <code>NULL</code>, then this particular command does not wait
-on any event to complete.
-If <em>event_wait_list</em> is <code>NULL</code>, <em>num_events_in_wait_list</em> must be 0.
-If <em>event_wait_list</em> is not <code>NULL</code>, the list of events pointed to by
-<em>event_wait_list</em> must be valid and <em>num_events_in_wait_list</em> must be
-greater than 0.
-The events specified in <em>event</em> returns an event object that identifies this
-particular command and can be used to query or queue a wait for this
-particular command to complete.
-<em>event</em> can be <code>NULL</code> in which case it will not be possible for the
-application to query the status of this command or queue a wait for this
-command to complete.
-If the <em>event_wait_list</em> and the <em>event</em> arguments are not <code>NULL</code>, the
-<em>event</em> argument should not refer to an element of the <em>event_wait_list</em>
-array.</p>
-</div>
-<div class="paragraph">
-<p><strong>clEnqueueReleaseD3D11ObjectsKHR</strong> returns CL_SUCCESS if the function is
-executed successfully.
-If <em>num_objects</em> is 0 and <em>mem_objects</em> is <code>NULL</code> the function does nothing
-and returns CL_SUCCESS.
-Otherwise it returns one of the following errors:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_INVALID_VALUE if <em>num_objects</em> is zero and <em>mem_objects</em> is not a
-<code>NULL</code> value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is <code>NULL</code>.</p>
-</li>
-<li>
-<p>CL_INVALID_MEM_OBJECT if memory objects in <em>mem_objects</em> are not valid
-OpenCL memory objects or if memory objects in <em>mem_objects</em> have not
-been created from Direct3D 11 resources.</p>
-</li>
-<li>
-<p>CL_INVALID_COMMAND_QUEUE if <em>command_queue</em> is not a valid
-command-queue.</p>
-</li>
-<li>
-<p>CL_INVALID_CONTEXT if context associated with <em>command_queue</em> was not
-created from a Direct3D 11 device.</p>
-</li>
-<li>
-<p>CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR if memory objects in <em>mem_objects</em>
-have not previously been acquired using
-<strong>clEnqueueAcquireD3D11ObjectsKHR</strong>, or have been released using
-<strong>clEnqueueReleaseD3D11ObjectsKHR</strong> since the last time that they were
-acquired.</p>
-</li>
-<li>
-<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
-<em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not <code>NULL</code> and
-<em>num_events_in_wait_list</em>&gt; is 0, or if event objects in
-<em>event_wait_list</em> are not valid events.</p>
-</li>
-<li>
-<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
-required by the OpenCL implementation on the host.</p>
-</li>
-</ul>
-</div>
-<div style="page-break-after: always;"></div>
+<p>For <code>CL_DEPTH</code> images, a scalar value is returned by <strong>read_imagef</strong> or
+supplied to <strong>write_imagef</strong>.</p>
 </div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="cl_khr_gl_depth_images">9. Sharing OpenGL and OpenGL ES Depth and Depth-Stencil Images</h2>
+<h2 id="cl_khr_gl_depth_images">17. Sharing OpenGL and OpenGL ES Depth and Depth-Stencil Images</h2>
 <div class="sectionbody">
 <div class="paragraph">
 <p>This section describes the <strong>cl_khr_gl_depth_images</strong> extension.
@@ -8831,7 +11869,7 @@
 depth-stencil texture.</p>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_depth_images-additions-to-chapter-5">9.1. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
+<h3 id="cl_khr_gl_depth_images-additions-to-chapter-5">17.1. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
 <div class="paragraph">
 <p>The <strong>cl_khr_gl_depth_images</strong> extension extends OpenCL / OpenGL sharing by
 allowing an OpenCL depth image to be created from an OpenGL depth or
@@ -8843,7 +11881,7 @@
 <p>This extension adds the following new image format for depth-stencil images
 to <em>table 5.6 and 5.7</em> of the OpenCL 2.2 specification.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 100%;">
 </colgroup>
@@ -8860,7 +11898,7 @@
 </tr>
 </tbody>
 </table>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -8886,8 +11924,8 @@
 <p>This extension adds the following new image format to the minimum list of
 supported image formats described in <em>tables 5.8.a</em> and <em>5.8.b</em>.</p>
 </div>
-<table id="cl_khr_gl_depth_images-required-image-formats" class="tableblock frame-all grid-all spread">
-<caption class="title">Table 25. <em>Required Image Formats for</em> <strong>cl_khr_gl_depth_images</strong></caption>
+<table id="cl_khr_gl_depth_images-required-image-formats" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 40. <em>Required Image Formats for</em> <strong>cl_khr_gl_depth_images</strong></caption>
 <colgroup>
 <col style="width: 25%;">
 <col style="width: 25%;">
@@ -8934,7 +11972,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_depth_images-additions-to-extension-specification">9.2. Additions to the OpenCL Extension Specification</h3>
+<h3 id="cl_khr_gl_depth_images-additions-to-extension-specification">17.2. Additions to the OpenCL Extension Specification</h3>
 <div class="paragraph">
 <p>The following new image formats are added to the table of
 <a href="#cl_khr_gl_sharing__memobjs-mapping-of-image-formats">OpenGL internal
@@ -8944,7 +11982,7 @@
 successfully created by OpenGL, then there is guaranteed to be a mapping to
 one of the corresponding OpenCL image format(s) in that table.</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -8976,12 +12014,11 @@
 </tr>
 </tbody>
 </table>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="cl_khr_gl_msaa_sharing">10. Creating OpenCL Memory Obejcts from OpenGL MSAA Textures</h2>
+<h2 id="cl_khr_gl_msaa_sharing">18. Creating OpenCL Memory Objects from OpenGL MSAA Textures</h2>
 <div class="sectionbody">
 <div class="paragraph">
 <p>This extension extends the OpenCL / OpenGL sharing (the
@@ -8996,7 +12033,7 @@
 This extension requires <strong>cl_khr_gl_depth_images</strong>.</p>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_msaa_sharing-additions-to-extension-specification">10.1. Additions to the OpenCL Extension Specification</h3>
+<h3 id="cl_khr_gl_msaa_sharing-additions-to-extension-specification">18.1. Additions to the OpenCL Extension Specification</h3>
 <div class="paragraph">
 <p>Allow <em>texture_target</em> argument to <strong>clCreateFromGLTexture</strong> to be
 GL_TEXTURE_2D_MULTISAMPLE or GL_TEXTURE_2D_MULTISAMPLE_ARRAY.</p>
@@ -9023,7 +12060,7 @@
 <a href="#cl_khr_gl_sharing__memobjs-clGetGLTextureInfo-queries">OpenGL texture info
 that may be queried with clGetGLTextureInfo</a>:</strong></p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 33.3333%;">
 <col style="width: 33.3333%;">
@@ -9041,14 +12078,14 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_GL_NUM_SAMPLES</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">GLsizei</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">The <em>samples</em> argument passed to <strong>glTexImage2DMultisample</strong> or
-  <strong>glTexImage3DMultisample</strong>.
-</p><p class="tableblock">  If <em>image</em> is not a MSAA texture, 1 is returned.</p></td>
+  <strong>glTexImage3DMultisample</strong>.</p>
+<p class="tableblock">  If <em>image</em> is not a MSAA texture, 1 is returned.</p></td>
 </tr>
 </tbody>
 </table>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_msaa_sharing-additions-to-chapter-5">10.2. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
+<h3 id="cl_khr_gl_msaa_sharing-additions-to-chapter-5">18.2. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
 <div class="paragraph">
 <p>The formats described in tables 5.8.a and 5.8.b of the OpenCL 2.2
 specification and the additional formats described in
@@ -9085,12 +12122,12 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_gl_msaa_sharing-additions-to-chapter-6">10.3. Additions to Chapter 6 of the OpenCL 2.2 Specification</h3>
+<h3 id="cl_khr_gl_msaa_sharing-additions-to-chapter-6">18.3. Additions to Chapter 6 of the OpenCL 2.2 Specification</h3>
 <div class="paragraph">
 <p><strong>Add the following new data types to <em>table 6.3</em> in <em>section 6.1.3</em> of the
 OpenCL 2.2 specification:</strong></p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -9134,10 +12171,10 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>float4 read_imagef(
+<pre class="CodeRay highlight"><code data-lang="c">float4 read_imagef(
     image2d_msaa_t image,
     int2 coord,
-    int sample)</code></pre>
+    <span class="predefined-type">int</span> sample)</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -9165,13 +12202,13 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>int4 read_imagei(image2d_msaa_t image,
+<pre class="CodeRay highlight"><code data-lang="c">int4 read_imagei(image2d_msaa_t image,
                  int2 coord,
-                 int sample)
+                 <span class="predefined-type">int</span> sample)
 
 uint4 read_imageui(image2d_msaa_t image,
                    int2 coord,
-                   int sample)</code></pre>
+                   <span class="predefined-type">int</span> sample)</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -9227,9 +12264,9 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>float4 read_imagef(image2d_array_msaa_t image,
+<pre class="CodeRay highlight"><code data-lang="c">float4 read_imagef(image2d_array_msaa_t image,
                    int4 coord,
-                   int sample)</code></pre>
+                   <span class="predefined-type">int</span> sample)</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -9257,13 +12294,13 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>int4 read_imagei(image2d_array_msaa_t image,
+<pre class="CodeRay highlight"><code data-lang="c">int4 read_imagei(image2d_array_msaa_t image,
                  int4 coord,
-                 int sample)
+                 <span class="predefined-type">int</span> sample)
 
 uint4 read_imageui(image2d_array_msaa_t image,
                    int4 coord,
-                   int sample)</code></pre>
+                   <span class="predefined-type">int</span> sample)</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -9319,9 +12356,9 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>float read_imagef(image2d_msaa_depth_t image,
+<pre class="CodeRay highlight"><code data-lang="c"><span class="predefined-type">float</span> read_imagef(image2d_msaa_depth_t image,
                   int2 coord,
-                  int sample)</code></pre>
+                  <span class="predefined-type">int</span> sample)</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -9344,9 +12381,9 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>float read_imagef(image2d_array_msaaa_depth_t image,
+<pre class="CodeRay highlight"><code data-lang="c"><span class="predefined-type">float</span> read_imagef(image2d_array_msaaa_depth_t image,
                   int4 coord,
-                  int sample)</code></pre>
+                  <span class="predefined-type">int</span> sample)</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -9390,13 +12427,13 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>int get_image_width(image2d_msaa_t image)
+<pre class="CodeRay highlight"><code data-lang="c"><span class="predefined-type">int</span> get_image_width(image2d_msaa_t image)
 
-int get_image_width(image2d_array_msaa_t image)
+<span class="predefined-type">int</span> get_image_width(image2d_array_msaa_t image)
 
-int get_image_width(image2d_msaa_depth_t image)
+<span class="predefined-type">int</span> get_image_width(image2d_msaa_depth_t image)
 
-int get_image_width(image2d_array_msaa_depth_t image)</code></pre>
+<span class="predefined-type">int</span> get_image_width(image2d_array_msaa_depth_t image)</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -9404,13 +12441,13 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>int get_image_height(image2d_msaa_t image)
+<pre class="CodeRay highlight"><code data-lang="c"><span class="predefined-type">int</span> get_image_height(image2d_msaa_t image)
 
-int get_image_height(image2d_array_msaa_t image)
+<span class="predefined-type">int</span> get_image_height(image2d_array_msaa_t image)
 
-int get_image_height(image2d_msaa_depth_t image)
+<span class="predefined-type">int</span> get_image_height(image2d_msaa_depth_t image)
 
-int get_image_height(image2d_array_msaa_depth_t image)</code></pre>
+<span class="predefined-type">int</span> get_image_height(image2d_array_msaa_depth_t image)</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -9418,13 +12455,13 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>int get_image_channel_data_type(image2d_msaa_t image)
+<pre class="CodeRay highlight"><code data-lang="c"><span class="predefined-type">int</span> get_image_channel_data_type(image2d_msaa_t image)
 
-int get_image_channel_data_type(image2d_array_msaa_t image)
+<span class="predefined-type">int</span> get_image_channel_data_type(image2d_array_msaa_t image)
 
-int get_image_channel_data_type(image2d_msaa_depth_t image)
+<span class="predefined-type">int</span> get_image_channel_data_type(image2d_msaa_depth_t image)
 
-int get_image_channel_data_type(image2d_array_msaa_depth_t image)</code></pre>
+<span class="predefined-type">int</span> get_image_channel_data_type(image2d_array_msaa_depth_t image)</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -9432,13 +12469,13 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>int get_image_channel_order(image2d_msaa_t image)
+<pre class="CodeRay highlight"><code data-lang="c"><span class="predefined-type">int</span> get_image_channel_order(image2d_msaa_t image)
 
-int get_image_channel_order(image2d_array_msaa_t image)
+<span class="predefined-type">int</span> get_image_channel_order(image2d_array_msaa_t image)
 
-int get_image_channel_order(image2d_msaa_depth_t image)
+<span class="predefined-type">int</span> get_image_channel_order(image2d_msaa_depth_t image)
 
-int get_image_channel_order(image2d_array_msaa_depth_t image)</code></pre>
+<span class="predefined-type">int</span> get_image_channel_order(image2d_array_msaa_depth_t image)</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -9446,7 +12483,7 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>int2 get_image_dim(image2d_msaa_t image)
+<pre class="CodeRay highlight"><code data-lang="c">int2 get_image_dim(image2d_msaa_t image)
 
 int2 get_image_dim(image2d_array_msaa_t image)
 
@@ -9462,7 +12499,7 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>size_t get_image_array_size(image2d_array_msaa_depth_t image)</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c">size_t get_image_array_size(image2d_array_msaa_depth_t image)</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -9470,1375 +12507,287 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>int get_image_num_samples(image2d_msaa_t image)
+<pre class="CodeRay highlight"><code data-lang="c"><span class="predefined-type">int</span> get_image_num_samples(image2d_msaa_t image)
 
-int get_image_num_samples(image2d_array_msaa_t image)
+<span class="predefined-type">int</span> get_image_num_samples(image2d_array_msaa_t image)
 
-int get_image_num_samples(image2d_msaa_depth_t image)
+<span class="predefined-type">int</span> get_image_num_samples(image2d_msaa_depth_t image)
 
-int get_image_num_samples(image2d_array_msaa_depth_t image)</code></pre>
+<span class="predefined-type">int</span> get_image_num_samples(image2d_array_msaa_depth_t image)</code></pre>
 </div>
 </div>
 <div class="paragraph">
 <p>Return the number of samples in the 2D MSAA image</p>
 </div>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="cl_khr_initialize_memory">11. Local and Private Memory Initialization</h2>
+<h2 id="cl_khr_egl_event">19. Creating OpenCL Event Objects from EGL Sync Objects</h2>
 <div class="sectionbody">
+<div class="sect2">
+<h3 id="cl_khr_egl_event-overview">19.1. Overview</h3>
 <div class="paragraph">
-<p>Memory is allocated in various forms in OpenCL both explicitly (global
-memory) or implicitly (local, private memory).
-This allocation so far does not provide a straightforward mechanism to
-initialize the memory on allocation.
-In other words what is lacking is the equivalent of calloc for the currently
-supported malloc like capability.
-This functionality is useful for a variety of reasons including ease of
-debugging, application controlled limiting of visibility to previous
-contents of memory and in some cases, optimization</p>
+<p>This section describes the <strong>cl_khr_egl_event</strong> extension.
+This extension allows creating OpenCL event objects linked to EGL fence sync
+objects, potentially improving efficiency of sharing images and buffers
+between the two APIs.
+The companion <strong>EGL_KHR_cl_event</strong> extension provides the complementary
+functionality of creating an EGL sync object from an OpenCL event object.</p>
 </div>
-<div class="paragraph">
-<p>This extension adds support for initializing local and private memory before
-a kernel begins execution.
-This extension name is <strong>cl_khr_initialize_memory</strong>.</p>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_initialize_memory-additions-to-chapter-4">11.1. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
-<div class="paragraph">
-<p>Add a new context property to <em>table 4.5</em> in <em>section 4.4</em>.</p>
+<h3 id="cl_khr_egl_event-new-procedures-and-functions">19.2. New Procedures and Functions</h3>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_event clCreateEventFromEGLSyncKHR(cl_context context,
+                                     CLeglSyncKHR sync,
+                                     CLeglDisplayKHR display,
+                                     cl_int *errcode_ret);</code></pre>
 </div>
-<table class="tableblock frame-all grid-all spread">
-<colgroup>
-<col style="width: 33.3333%;">
-<col style="width: 22.2222%;">
-<col style="width: 44.4445%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_context_properties enum</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Property value</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_CONTEXT_MEMORY_INITIALIZE_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">cl_context_memory_initialize_khr</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Describes which memory types for the context must be initialized.
-  This is a bit-field, where the following values are currently supported:
-</p><p class="tableblock">  CL_CONTEXT_MEMORY_INITIALIZE_LOCAL_KHR&#8201;&#8212;&#8201;Initialize local memory to
-  zeros.
-</p><p class="tableblock">  CL_CONTEXT_MEMORY_INITIALIZE_PRIVATE_KHR&#8201;&#8212;&#8201;Initialize private memory to
-  zeros.</p></td>
-</tr>
-</tbody>
-</table>
+</div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_initialize_memory-additions-to-chapter-6">11.2. Additions to Chapter 6 of the OpenCL 2.2 Specification</h3>
+<h3 id="cl_khr_egl_event-new-tokens">19.3. New Tokens</h3>
 <div class="paragraph">
-<p>Updates to <em>section 6.9</em>&#8201;&#8212;&#8201;Restrictions</p>
+<p>Returned by clCreateEventFromEGLSyncKHR if <em>sync</em> is not a valid EGLSyncKHR
+handle created with respect to EGLDisplay <em>display</em>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_INVALID_EGL_OBJECT_KHR</pre>
+</div>
 </div>
 <div class="paragraph">
-<p>If the context is created with CL CONTEXT MEMORY INITIALIZE KHR, appropriate
-memory locations as specified by the bit-field is initialized with zeroes,
-prior to the start of execution of any kernel.
-The driver chooses when, prior to kernel execution, the initialization of
-local and/or private memory is performed.
-The only requirement is there should be no values set from outside the
-context, which can be read during a kernel execution.</p>
+<p>Returned by <strong>clGetEventInfo</strong> when <em>param_name</em> is CL_EVENT_COMMAND_TYPE:</p>
 </div>
-<div style="page-break-after: always;"></div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR</pre>
 </div>
 </div>
 </div>
-<div class="sect1">
-<h2 id="cl_khr_terminate_context">12. Terminating OpenCL contexts</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p>Today, OpenCL provides an API to release a context.
-This operation is done only after all queues, memory object, programs and
-kernels are released, which in turn might wait for all ongoing operations to
-complete.
-However, there are cases in which a fast release is required, or release
-operation cannot be done, as commands are stuck in mid execution.
-An example of the first case can be program termination due to exception, or
-quick shutdown due to low power.
-Examples of the second case are when a kernel is running too long, or gets
-stuck, or it may result from user action which makes the results of the
-computation unnecessary.</p>
-</div>
-<div class="paragraph">
-<p>In many cases, the driver or the device is capable of speeding up the
-closure of ongoing operations when the results are no longer required in a
-much more expedient manner than waiting for all previously enqueued
-operations to finish.</p>
-</div>
-<div class="paragraph">
-<p>This extension implements a new query to check whether a device can
-terminate an OpenCL context and adds an API to terminate a context.</p>
-</div>
-<div class="paragraph">
-<p>The extension name is <strong>cl_khr_terminate_context</strong>.</p>
-</div>
 <div class="sect2">
-<h3 id="cl_khr_terminate_context-additions-to-chapter-4">12.1. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
+<h3 id="cl_khr_egl_event-additions-to-chapter-5">19.4. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
 <div class="paragraph">
-<p>Add a new device property to <em>table 4.3</em> in <em>section 4.2</em>.</p>
-</div>
-<table class="tableblock frame-all grid-all spread">
-<colgroup>
-<col style="width: 33.3333%;">
-<col style="width: 22.2222%;">
-<col style="width: 44.4445%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_device_info</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_TERMINATE_CAPABILITY_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_device_terminate_capability_khr</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Describes the termination capability of the OpenCL device.
-  This is a bit-field, where the following values are currently supported:
-</p><p class="tableblock">  CL_DEVICE_TERMINATE_CAPABILITY_CONTEXT_KHR - Indicates that context
-  termination is supported.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph">
-<p>Add a new context property to <em>table 4.5</em> in <em>section 4.4</em>.</p>
-</div>
-<table class="tableblock frame-all grid-all spread">
-<colgroup>
-<col style="width: 33.3333%;">
-<col style="width: 22.2222%;">
-<col style="width: 44.4445%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_context_properties enum</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Property value</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_CONTEXT_TERMINATE_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_bool</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies whether the context can be terminated.
-  The default value is CL_FALSE.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph">
-<p>CL_CONTEXT_TERMINATE_KHR can be specified in the context properties only if
-all devices associated with the context support the ability to support
-context termination (i.e. CL_DEVICE_TERMINATE_CAPABILITY_CONTEXT_KHR is set
-for CL_DEVICE_TERMINATE_CAPABILITY_KHR).
-Otherwise, context creation fails with error code of CL_INVALID_PROPERTY.</p>
+<p>Add following to the fourth paragraph of <em>section 5.11</em> (prior to the
+description of <strong>clWaitForEvents</strong>):</p>
 </div>
 <div class="paragraph">
-<p>The new function
+<p>&#8220;Event objects can also be used to reflect the status of an EGL fence sync
+object.
+The sync object in turn refers to a fence command executing in an EGL client
+API command stream.
+This provides another method of coordinating sharing of EGL / EGL client API
+objects with OpenCL.
+Completion of EGL / EGL client API commands may be determined by placing an
+EGL fence command after commands using eglCreateSyncKHR, creating an event
+from the resulting EGL sync object using clCreateEventFromEGLSyncKHR and
+then specifying it in the <em>event_wait_list</em> of a clEnqueueAcquire***
+command.
+This method may be considerably more efficient than calling operations like
+glFinish, and is referred to as <em>explicit synchronization</em>.
+The application is responsible for ensuring the command stream associated
+with the EGL fence is flushed to ensure the CL queue is submitted to the
+device.
+Explicit synchronization is most useful when an EGL client API context bound
+to another thread is accessing the memory objects.&#8221;</p>
+</div>
+<div class="paragraph">
+<p>Add CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR to the valid <em>param_value</em> values
+returned by <strong>clGetEventInfo</strong> for <em>param_name</em> CL_EVENT_COMMAND_TYPE (in the
+third row and third column of <em>table 5.22</em>).</p>
+</div>
+<div class="paragraph">
+<p>Add new <em>subsection 5.11.2</em>:</p>
+</div>
+<div class="paragraph">
+<p>"`<strong>5.11.2 Linking Event Objects to EGL Synchronization Objects</strong></p>
+</div>
+<div class="paragraph">
+<p>An event object may be created by linking to an EGL <strong>sync object</strong>.
+Completion of such an event object is equivalent to waiting for completion
+of the fence command associated with the linked EGL sync object.</p>
+</div>
+<div class="paragraph">
+<p>The function
 </p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_int clTerminateContextKHR(cl context context)</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c">cl_event clCreateEventFromEGLSyncKHR(cl_context context,
+                                     CLeglSyncKHR sync,
+                                     CLeglDisplayKHR display,
+                                     cl_int *errcode_ret)</code></pre>
 </div>
 </div>
 <div class="paragraph">
-<p>terminates all pending work associated with the context and renders all data
-owned by the context invalid.
-It is the responsibility of the application to release all objects
-associated with the context being terminated.</p>
+<p>creates a linked event object.</p>
 </div>
 <div class="paragraph">
-<p>When a context is terminated:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>The execution status of enqueued commands will be CL_TERMINATED_KHR.
-Event objects can be queried using <strong>clGetEventInfo</strong>.
-Event callbacks can be registered and registered event callbacks will be
-called with <em>event_command_exec_status</em> set to CL_TERMINATED_KHR.
-<strong>clWaitForEvents</strong> will return as immediately for commands associated
-with event objects specified in event_list.
-The status of user events can be set.
-Event objects can be retained and released.
-<strong>clGetEventProfilingInfo</strong> returns CL_PROFILING_INFO_NOT_AVAILABLE.</p>
-</li>
-<li>
-<p>The context is considered to be terminated.
-A callback function registered when the context was created will be
-called.
-Only queries, retain and release operations can be performed on the
-context.
-All other APIs that use a context as an argument will return
-CL_CONTEXT_TERMINATED_KHR.</p>
-</li>
-<li>
-<p>The contents of the memory regions of the memory objects is undefined.
-Queries, registering a destructor callback, retain and release
-operations can be performed on the memory objects.</p>
-</li>
-<li>
-<p>Once a context has been terminated, all OpenCL API calls that create
-objects or enqueue commands will return CL_CONTEXT_TERMINATED_KHR.
-APIs that release OpenCL objects will continue to operate as though
-<strong>clTerminateContextKHR</strong> was not called.</p>
-</li>
-<li>
-<p>The behavior of callbacks will remain unchanged, and will report
-appropriate error, if executing after termination of context.
-This behavior is similar to enqueued commands, after the command queue
-has become invalid.</p>
-</li>
-</ul>
+<p><em>context</em> is a valid OpenCL context created from an OpenGL context or share
+group, using the <strong>cl_khr_gl_sharing</strong> extension.</p>
 </div>
 <div class="paragraph">
-<p><strong>clTerminateContextKHR</strong> returns CL_SUCCESS if the function is executed
+<p><em>sync</em> is the name of a sync object of type EGL_SYNC_FENCE_KHR created with
+respect to EGLDisplay <em>display</em>.</p>
+</div>
+<div class="paragraph">
+<p><strong>clCreateEventFromEGLSyncKHR</strong> returns a valid OpenCL event object and
+<em>errcode_ret</em> is set to CL_SUCCESS if the event object is created
 successfully.
-Otherwise, it returns one of the following errors:</p>
+Otherwise, it returns a <code>NULL</code> value with one of the following error values
+returned in <em>errcode_ret</em>:</p>
 </div>
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid OpenCL context.</p>
+<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context, or was not
+created from a GL context.</p>
 </li>
 <li>
-<p>CL_CONTEXT_TERMINATED_KHR if <em>context</em> has already been terminated.</p>
-</li>
-<li>
-<p>CL_INVALID_OPERATION if <em>context</em> was not created with
-CL_CONTEXT_TERMNATE_KHR set to CL_TRUE.</p>
-</li>
-<li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
-by the OpenCL implementation on the device.</p>
-</li>
-<li>
-<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
-required by the OpenCL implementation on the host.</p>
+<p>CL_INVALID_EGL_OBJECT_KHR if <em>sync</em> is not a valid EGLSyncKHR object of
+type EGL_SYNC_FENCE_KHR created with respect to EGLDisplay <em>display</em>.</p>
 </li>
 </ul>
 </div>
 <div class="paragraph">
-<p>An implementation that supports this extension must be able to terminate
-commands currently executing on devices or queued across all command-queues
-associated with the context that is being terminated.
-The implementation cannot implement this extension by waiting for currently
-executing (or queued) commands to finish execution on devices associated
-with this context (i.e. doing a <strong>clFinish</strong>).</p>
-</div>
-<div style="page-break-after: always;"></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="cl_khr_spir">13. SPIR 1.2 Binaries</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p>This extension adds the ability to create an OpenCL program object from a
-Standard Portable Intermediate Representation (SPIR) instance.
-A SPIR instance is a vendor-neutral non-source representation for OpenCL C
-programs.</p>
-</div>
-<div class="paragraph">
-<p>The extension name is <strong>cl_khr_spir</strong>.
-This extension has been superseded by the SPIR-V intermediate
-representation, which became a core feature in OpenCL 2.1.</p>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_spir-additions-to-chapter-4">13.1. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
-<div class="paragraph">
-<p><strong>Add a new device property to <em>table 4.3</em> in <em>section 4.2</em>:</strong></p>
-</div>
-<table class="tableblock frame-all grid-all spread">
-<colgroup>
-<col style="width: 28.5714%;">
-<col style="width: 14.2857%;">
-<col style="width: 57.1429%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_device_info</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_SPIR_VERSIONS</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">char[]</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">A space separated list of SPIR versions supported by the device.
-</p><p class="tableblock">  For example, returning <code>"1.2"</code> in this query implies that SPIR version 1.2
-  is supported by the implementation.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_spir-additions-to-chapter-5">13.2. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
-<div class="paragraph">
-<p><strong>Additions to <em>section 5.8.1</em>&#8201;&#8212;&#8201;Creating Program Objects:</strong></p>
-</div>
-<div class="paragraph">
-<p>&#8220;<strong>clCreateProgramWithBinary</strong> can be used to load a SPIR binary.
-Once a program object has been created from a SPIR binary, <strong>clBuildProgram</strong>
-can be called to build a program executable or <strong>clCompileProgram</strong> can be
-called to compile the SPIR binary.&#8221;</p>
-</div>
-<div class="paragraph">
-<p>Modify the CL_PROGRAM_BINARY_TYPE entry in <em>table 5.14</em>
-(<strong>clGetProgramBuildInfo</strong>) to add a potential value
-CL_PROGRAM_BINARY_TYPE_INTERMEDIATE:</p>
-</div>
-<table class="tableblock frame-all grid-all spread">
-<colgroup>
-<col style="width: 28.5714%;">
-<col style="width: 14.2857%;">
-<col style="width: 57.1429%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_program_build_info</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Info. returned in <em>param_value</em></strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_PROGRAM_BINARY_TYPE</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_program_binary_type</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_PROGRAM_BINARY_TYPE_INTERMEDIATE&#8201;&#8212;&#8201;An intermediate (non-source)
-  representation for the program is loaded as a binary.
-  The program must be further processed with <strong>clCompileProgram</strong> or
-  <strong>clBuildProgram</strong>.
-</p><p class="tableblock">  If processed with <strong>clCompileProgram</strong>, the result will be a binary of type
-  CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT or CL_PROGRAM_BINARY_TYPE_LIBRARY.
-  If processed with <strong>clBuildProgram</strong>, the result will be a binary of type
-  CL_PROGRAM_BINARY_TYPE_EXECUTABLE.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph">
-<p><strong>Additions to <em>section 5.8.4</em>&#8201;&#8212;&#8201;Compiler Options:</strong></p>
-</div>
-<div class="paragraph">
-<p>&#8220;The compile option <strong>-x spir</strong> must be specified to indicate that the binary
-is in SPIR format, and the compile option <strong>-spir-std</strong> must be used to
-specify the version of the SPIR specification that describes the format and
-meaning of the binary.
-For example, if the binary is as described in SPIR version 1.2, then
-<strong>-spir-std=1.2</strong> must be specified.
-Failing to specify these compile options may result in implementation
-defined behavior.&#8221;</p>
-</div>
-<div class="paragraph">
-<p><strong>Additions to <em>section 5.9.3</em>&#8201;&#8212;&#8201;Kernel Object Queries:</strong></p>
-</div>
-<div class="paragraph">
-<p>Modify following text in clGetKernelArgInfo from:</p>
-</div>
-<div class="paragraph">
-<p>&#8220;Kernel argument information is only available if the program object
-associated with <em>kernel</em> is created with <strong>clCreateProgramWithSource</strong> and the
-program executable is built with the -cl-kernel-arg-info option specified in
-<em>options</em> argument to <strong>clBuildProgram</strong> or <strong>clCompileProgram</strong>.&#8221;</p>
-</div>
-<div class="paragraph">
-<p>to:</p>
-</div>
-<div class="paragraph">
-<p>&#8220;Kernel argument information is only available if the program object
-associated with <em>kernel</em> is created with <strong>clCreateProgramWithSource</strong> and the
-program executable is built with the -cl-kernel-arg-info option specified in
-<em>options</em> argument to <strong>clBuildProgram</strong> or <strong>clCompileProgram</strong>, or if the
-program object associated with <em>kernel</em> is created with
-<strong>clCreateProgramWithBinary</strong> and the program executable is built with the
--cl-kernel-arg-info and --x spir options specified in <em>options</em> argument to
-<strong>clBuildProgram</strong> or <strong>clCompileProgram</strong>.&#8221;</p>
-</div>
-<div style="page-break-after: always;"></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="cl_khr_icd-opencl">14. OpenCL Installable Client Driver (ICD)</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="cl_khr_icd-overview">14.1. Overview</h3>
-<div class="paragraph">
-<p>This section describes a platform extension which defines a simple mechanism
-through which the Khronos OpenCL installable client driver loader (ICD
-Loader) may expose multiple separate vendor installable client drivers
-(Vendor ICDs) for OpenCL.
-An application written against the ICD Loader will be able to access all
-cl_platform_ids exposed by all vendor implementations with the ICD Loader
-acting as a demultiplexor.</p>
-</div>
-<div class="paragraph">
-<p>This is a platform extension, so if this extension is supported by an
-implementation, the string <strong>cl_khr_icd</strong> will be present in the
-<code>CL_PLATFORM_EXTENSIONS</code> string.</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_icd-inferring-vendors-from-function-call-arguments">14.2. Inferring Vendors from Function Call Arguments</h3>
-<div class="paragraph">
-<p>At every OpenCL function call, the ICD Loader infers the vendor ICD function
-to call from the arguments to the function.
-An object is said to be ICD compatible if it is of the following structure:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>struct _cl_&lt;object&gt;
-{
-    struct _cl_icd_dispatch *dispatch;
-    // ... remainder of internal data
-};</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>&lt;object&gt; is one of platform_id, device_id, context, command_queue, mem,
-program, kernel, event, or sampler.</p>
-</div>
-<div class="paragraph">
-<p>The structure <code>_cl_icd_dispatch</code> is a function pointer dispatch table which
-is used to direct calls to a particular vendor implementation.
-All objects created from ICD compatible objects must be ICD compatible.</p>
-</div>
-<div class="paragraph">
-<p>The order of the functions in <code>_cl_icd_dispatch</code> is determined by the ICD
-Loader&#8217;s source.
-The ICD Loader&#8217;s source&#8217;s <code>_cl_icd_dispatch</code> table is to be appended to
-only.</p>
-</div>
-<div class="paragraph">
-<p>Functions which do not have an argument from which the vendor implementation
-may be inferred have been deprecated and may be ignored.</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_icd-icd-data">14.3. ICD Data</h3>
-<div class="paragraph">
-<p>A Vendor ICD is defined by two pieces of data:</p>
+<p>The parameters of an event object linked to an EGL sync object will return
+the following values when queried with <strong>clGetEventInfo</strong>:</p>
 </div>
 <div class="ulist">
 <ul>
 <li>
-<p>The Vendor ICD library specifies a library which contains the OpenCL
-entry points for the vendor&#8217;s OpenCL implementation.
-The vendor ICD&#8217;s library file name should include the vendor name, or a
-vendor-specific implementation identifier.</p>
+<p>The CL_EVENT_COMMAND_QUEUE of a linked event is <code>NULL</code>, because the
+event is not associated with any OpenCL command queue.</p>
 </li>
 <li>
-<p>The Vendor ICD extension suffix is a short string which specifies the
-default suffix for extensions implemented only by that vendor.
-The vendor suffix string is optional.</p>
+<p>The CL_EVENT_COMMAND_TYPE of a linked event is
+CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR, indicating that the event is
+associated with a EGL sync object, rather than an OpenCL command.</p>
+</li>
+<li>
+<p>The CL_EVENT_COMMAND_EXECUTION_STATUS of a linked event is either
+CL_SUBMITTED, indicating that the fence command associated with the sync
+object has not yet completed, or CL_COMPLETE, indicating that the fence
+command has completed.</p>
 </li>
 </ul>
 </div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_icd-icd-loader-vendor-enumeration-on-windows">14.4. ICD Loader Vendor Enumeration on Windows</h3>
 <div class="paragraph">
-<p>To enumerate Vendor ICDs on Windows, the ICD Loader will first
-scan for REG_SZ string values in the "Display Adapter" and
-"Software Components" HKR registry keys.  The exact registry
-keys to scan should be obtained via PnP Configuration Manager
-APIs, but will look like:</p>
+<p><strong>clCreateEventFromEGLSyncKHR</strong> performs an implicit <strong>clRetainEvent</strong> on the
+returned event object.
+Creating a linked event object also places a reference on the linked EGL
+sync object.
+When the event object is deleted, the reference will be removed from the EGL
+sync object.</p>
 </div>
 <div class="paragraph">
-<p>For 64-bit ICDs:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>HKLM\SYSTEM\CurrentControlSet\Control\Class\
-{Display Adapter GUID}\{Instance ID}\OpenCLDriverName, or
-
-HKLM\SYSTEM\CurrentControlSet\Control\Class\
-{Software Component GUID}\{Instance ID}\OpenCLDriverName</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>For 32-bit ICDs:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>HKLM\SYSTEM\CurrentControlSet\Control\Class\
-{Display Adapter GUID}\{Instance ID}\OpenCLDriverNameWoW, or
-
-HKLM\SYSTEM\CurrentControlSet\Control\Class\
-{Software Component GUID}\{Instance ID}\OpenCLDriverNameWoW</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>These registry values contain the path to the Vendor ICD library.
-For example, if the registry contains the value:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>[HKLM\SYSTEM\CurrentControlSet\Control\Class\{GUID}\{Instance}]
-"OpenCLDriverName"="c:\\vendor a\\vndra_ocl.dll"</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Then the ICD Loader will open the Vendor ICD library:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>c:\vendor a\vndra_ocl.dll</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>The ICD Loader will also scan for REG_DWORD values in the registry
-key:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>HKLM\SOFTWARE\Khronos\OpenCL\Vendors</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>For each registry value in this key which has data set to 0, the
-ICD Loader will open the Vendor ICD library specified by the name
-of the registry value.</p>
-</div>
-<div class="paragraph">
-<p>For example, if the registry contains the value:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>[HKLM\SOFTWARE\Khronos\OpenCL\Vendors]
-"c:\\vendor a\\vndra_ocl.dll"=dword:00000000</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Then the ICD will open the Vendor ICD library:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>c:\vendor a\vndra_ocl.dll</pre>
-</div>
+<p>Events returned from <strong>clCreateEventFromEGLSyncKHR</strong> may only be consumed by
+<strong>clEnqueueAcquire</strong>*** commands.
+Passing such events to any other CL API that enqueues commands will generate
+a CL_INVALID_EVENT error.`"</p>
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_icd-icd-loader-vendor-enumeration-on-linux">14.5. ICD Loader Vendor Enumeration on Linux</h3>
+<h3 id="cl_khr_egl_event-additions-to-extension-specification">19.5. Additions to the OpenCL Extension Specification</h3>
 <div class="paragraph">
-<p>To enumerate vendor ICDs on Linux, the ICD Loader scans the files in the
-path <code>/etc/OpenCL/vendors</code>.
-For each file in this path, the ICD Loader opens the file as a text file.
-The expected format for the file is a single line of text which specifies
-the Vendor ICD&#8217;s library.
-The ICD Loader will attempt to open that file as a shared object using
-dlopen().
-Note that the library specified may be an absolute path or just a file name.</p>
+<p>Replace the second paragraph of
+<a href="#cl_khr_gl_sharing__memobjs-synchronizing-opencl-and-opengl-access-to-shared-objects">Synchronizing OpenCL and OpenGL Access to Shared Objects</a> with:</p>
 </div>
 <div class="paragraph">
-<p>For example, if the following file exists</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>/etc/OpenCL/vendors/VendorA.icd</pre>
-</div>
+<p>"`Prior to calling <strong>clEnqueueAcquireGLObjects</strong>, the application must ensure
+that any pending EGL or EGL client API operations which access the objects
+specified in <em>mem_objects</em> have completed.</p>
 </div>
 <div class="paragraph">
-<p>and contains the text</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>libVendorAOpenCL.so</pre>
-</div>
+<p>If the <strong>cl_khr_egl_event</strong> extension is supported and the EGL context in
+question supports fence sync objects, <em>explicit synchronization</em> can be
+achieved as set out in <em>section 5.7.1</em>.</p>
 </div>
 <div class="paragraph">
-<p>then the ICD Loader will load the library <code>libVendorAOpenCL.so</code>.</p>
+<p>If the <strong>cl_khr_egl_event</strong> extension is not supported, completion of EGL
+client API commands may be determined by issuing and waiting for completion
+of commands such as glFinish or vgFinish on all client API contexts with
+pending references to these objects.
+Some implementations may offer other efficient synchronization methods.
+If such methods exist they will be described in platform-specific
+documentation.</p>
+</div>
+<div class="paragraph">
+<p>Note that no synchronization methods other than glFinish and vgFinish are
+portable between all EGL client API implementations and all OpenCL
+implementations.
+While this is the only way to ensure completion that is portable to all
+platforms, these are expensive operation and their use should be avoided if
+the cl_khr_egl_event extension is supported on a platform.`"</p>
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_icd-icd-loader-vendor-enumeration-on-android">14.6. ICD Loader Vendor Enumeration on Android</h3>
+<h3 id="cl_khr_egl_event-issues">19.6. Issues</h3>
 <div class="paragraph">
-<p>To enumerate vendor ICDs on Android, the ICD Loader scans the files in the
-path <code>/system/vendor/Khronos/OpenCL/vendors</code>.
-For each file in this path, the ICD Loader opens the file as a text file.
-The expected format for the file is a single line of text which specifies
-the Vendor ICD&#8217;s library.
-The ICD Loader will attempt to open that file as a shared object using
-dlopen().
-Note that the library specified may be an absolute path or just a file name.</p>
+<p>Most issues are shared with <strong>cl_khr_gl_event</strong> and are resolved as described
+in that extension.</p>
 </div>
-<div class="paragraph">
-<p>For example, if the following file exists</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>/system/vendor/Khronos/OpenCL/vendors/VendorA.icd</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>and contains the text</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>libVendorAOpenCL.so</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>then the ICD Loader will load the library <code>libVendorAOpenCL.so</code>.</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_icd-adding-a-vendor-library">14.7. Adding a Vendor Library</h3>
-<div class="paragraph">
-<p>Upon successfully loading a Vendor ICD&#8217;s library, the ICD Loader queries the
-following functions from the library: <strong>clIcdGetPlatformIDsKHR</strong>,
-<strong>clGetPlatformInfo</strong>, and <strong>clGetExtensionFunctionAddress</strong> (note:
-<strong>clGetExtensionFunctionAddress</strong> has been deprecated, but is still required
-for the ICD loader).
-If any of these functions are not present then the ICD Loader will close and
-ignore the library.</p>
-</div>
-<div class="paragraph">
-<p>Next the ICD Loader queries available ICD-enabled platforms in the library
-using <strong>clIcdGetPlatformIDsKHR</strong>.
-For each of these platforms, the ICD Loader queries the platform&#8217;s extension
-string to verify that <strong>cl_khr_icd</strong> is supported, then queries the platform&#8217;s
-Vendor ICD extension suffix using <strong>clGetPlatformInfo</strong> with the value
-CL_PLATFORM_ICD_SUFFIX_KHR.</p>
-</div>
-<div class="paragraph">
-<p>If any of these steps fail, the ICD Loader will ignore the Vendor ICD and
-continue on to the next.</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_icd-new-procedures-and-functions">14.8. New Procedures and Functions</h3>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_int clIcdGetPlatformIDsKHR(cl_uint num_entries,
-                              cl_platform_id *platforms,
-                              cl_uint *num_platforms);</code></pre>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_icd-new-tokens">14.9. New Tokens</h3>
-<div class="paragraph">
-<p>Accepted as <em>param_name</em> to the function <strong>clGetPlatformInfo</strong>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_PLATFORM_ICD_SUFFIX_KHR  0x0920</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Returned by <strong>clGetPlatformIDs</strong> when no platforms are found:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_PLATFORM_NOT_FOUND_KHR   -1001</pre>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_icd-additions-to-chapter-4">14.10. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
-<div class="paragraph">
-<p>In <em>section 4.1</em>, replace the description of the return values of
-<strong>clGetPlatformIDs</strong> with:</p>
-</div>
-<div class="paragraph">
-<p>"clGetPlatformIDs* returns CL_SUCCESS if the function is executed
-successfully and there are a non zero number of platforms available.
-It returns CL_PLATFORM_NOT_FOUND_KHR if zero platforms are available.
-It returns CL_INVALID_VALUE if <em>num_entries</em> is equal to zero and
-<em>platforms</em> is not <code>NULL</code> or if both <em>num_platforms</em> and <em>platforms</em> are
-<code>NULL</code>."</p>
-</div>
-<div class="paragraph">
-<p>In <em>section 4.1</em>, add the following after the description of
-<strong>clGetPlatformIDs</strong>:</p>
-</div>
-<div class="paragraph">
-<p>"The list of platforms accessible through the Khronos ICD Loader can be
-obtained using the following function:
-</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_int clIcdGetPlatformIDsKHR(cl_uint num_entries,
-                              cl_platform_id *platforms,
-                              cl_uint *num_platforms);</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p><em>num_entries</em> is the number of cl_platform_id entries that can be added to
-<em>platforms</em>.
-If <em>platforms</em> is not <code>NULL</code>, then <em>num_entries</em> must be greater than zero.</p>
-</div>
-<div class="paragraph">
-<p><em>platforms</em> returns a list of OpenCL platforms available for access through
-the Khronos ICD Loader.
-The cl_platform_id values returned in <em>platforms</em> are ICD compatible and can
-be used to identify a specific OpenCL platform.
-If the <em>platforms</em> argument is <code>NULL</code>, then this argument is ignored.
-The number of OpenCL platforms returned is the minimum of the value
-specified by <em>num_entries</em> or the number of OpenCL platforms available.</p>
-</div>
-<div class="paragraph">
-<p><em>num_platforms</em> returns the number of OpenCL platforms available.
-If <em>num_platforms</em> is <code>NULL</code>, then this argument is ignored.</p>
-</div>
-<div class="paragraph">
-<p><strong>clIcdGetPlatformIDsKHR</strong> returns CL_SUCCESS if the function is executed
-successfully and there are a non zero number of platforms available.
-It returns CL_PLATFORM_NOT_FOUND_KHR if zero platforms are available.
-It returns CL_INVALID_VALUE if <em>num_entries</em> is equal to zero and
-<em>platforms</em> is not <code>NULL</code> or if both <em>num_platforms</em> and <em>platforms</em> are
-<code>NULL</code>."</p>
-</div>
-<div class="paragraph">
-<p>Add the following to <em>table 4.1</em>:</p>
-</div>
-<table class="tableblock frame-all grid-all spread">
-<colgroup>
-<col style="width: 40%;">
-<col style="width: 20%;">
-<col style="width: 40%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_platform_info enum</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_PLATFORM_ICD_SUFFIX_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">char[]</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">The function name suffix used to identify extension functions to be
-  directed to this platform by the ICD Loader.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_icd-source-code">14.11. Source Code</h3>
-<div class="paragraph">
-<p>The official source for the ICD loader is available on github, at:</p>
-</div>
-<div class="paragraph">
-<p><a href="https://github.com/KhronosGroup/OpenCL-ICD-Loader" class="bare">https://github.com/KhronosGroup/OpenCL-ICD-Loader</a></p>
-</div>
-<div class="paragraph">
-<p>The complete <code>_cl_icd_dispatch</code> structure is defined in the header
-<strong>icd_dispatch.h</strong>, which is available as a part of the source code.</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_icd-issues">14.12. Issues</h3>
 <div class="olist arabic">
 <ol class="arabic">
 <li>
-<p>Some OpenCL functions do not take an object argument from which their
-vendor library may be identified (e.g, clUnloadCompiler), how will they
-be handled?</p>
+<p>Should we support implicit synchronization?</p>
 <div class="openblock">
 <div class="content">
 <div class="paragraph">
-<p>RESOLVED: Such functions will be a noop for all calls through the ICD.</p>
+<p>RESOLVED: No, as this may be very difficult since the synchronization would
+not be with EGL, it would be with currently bound EGL client APIs.
+It would be necessary to know which client APIs might be bound, to validate
+that they&#8217;re associated with the EGLDisplay associated with the OpenCL
+context, and to reach into each such context.</p>
 </div>
 </div>
 </div>
 </li>
 <li>
-<p>How are OpenCL extension to be handled?</p>
+<p>Do we need to have typedefs to use EGL handles in OpenCL?</p>
 <div class="openblock">
 <div class="content">
 <div class="paragraph">
-<p>RESOLVED: OpenCL extension functions may be added to the ICD as soon as they
-are implemented by any vendor.
-The suffix mechanism provides access for vendor extensions which are not yet
-added to the ICD.</p>
+<p>RESOLVED Using typedefs for EGL handles.</p>
 </div>
 </div>
 </div>
 </li>
 <li>
-<p>How will the ICD handle a <code>NULL</code> cl_platform_id?</p>
+<p>Should we restrict which CL APIs can be used with this cl_event?</p>
 <div class="openblock">
 <div class="content">
 <div class="paragraph">
-<p>RESOLVED: The ICD will by default choose the first enumerated platform as
-the <code>NULL</code> platform.
-The user can override this default by setting an environment variable
-OPENCL_ICD_DEFAULT_PLATFORM to the desired platform index.
-The API calls that deal with platforms will return CL_INVALID_PLATFORM if
-the index is not between zero and (number of platforms - 1), both inclusive.</p>
+<p>RESOLVED Use is limited to clEnqueueAcquire*** calls only.</p>
 </div>
 </div>
 </div>
 </li>
 <li>
-<p>There exists no mechanism to unload the ICD, should there be one?</p>
+<p>What is the desired behaviour for this extension when EGLSyncKHR is of a
+type other than EGL_SYNC_FENCE_KHR?</p>
 <div class="openblock">
 <div class="content">
 <div class="paragraph">
-<p>RESOLVED: As there is no standard mechanism for unloading a vendor
-implementation, do not add one for the ICD.</p>
-</div>
-</div>
-</div>
-</li>
-<li>
-<p>How will the ICD loader handle <code>NULL</code> objects passed to the OpenCL
-functions?</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph">
-<p>RESOLVED: The ICD loader will check for <code>NULL</code> objects passed to the OpenCL
-functions without trying to dereference the <code>NULL</code> objects for obtaining the
-ICD dispatch table.
-On detecting a <code>NULL</code> object it will return one of the CL_INVALID_* error
-values corresponding to the object in question.</p>
+<p>RESOLVED This extension only requires support for EGL_SYNC_FENCE_KHR.
+Support of other types is an implementation choice, and will result in
+CL_INVALID_EGL_OBJECT_KHR if unsupported.</p>
 </div>
 </div>
 </div>
 </li>
 </ol>
 </div>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="cl_khr_subgroups">15. Subgroups</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p>This section describes the <strong>cl_khr_subgroups</strong> extension.</p>
-</div>
-<div class="paragraph">
-<p>This extension adds support for implementation-controlled groups of work
-items, known as subgroups.
-Subgroups behave similarly to work groups and have their own sets of
-builtins and synchronization primitives, but subgroups within a work group
-are independent, may make forward progress with respect to each other, and
-may map to optimized hardware structures where that makes sense.</p>
-</div>
-<div class="paragraph">
-<p>Subgroups became a core feature in OpenCL 2.1, so this section only
-describes changes to the OpenCL 2.0 C specification.
-Please refer to the OpenCL API specification for descriptions of the
-subgroups APIs, to the SPIR-V specification for information about using
-subgroups in the SPIR-V intermediate representation, and to the OpenCL C++
-specification for descriptions of OpenCL C++ subgroup built-in functions.</p>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_subgroups-additions-to-chapter-6-of-the-opencl-2.0-specification">15.1. Additions to Chapter 6 of the OpenCL 2.0 C Specification</h3>
-<div class="sect3">
-<h4 id="cl_khr_subgroups-additions-to-section-6.13.1-work-item-functions">15.1.1. Additions to section 6.13.1&#8201;&#8212;&#8201;Work Item Functions</h4>
-<table class="tableblock frame-all grid-all spread">
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p>uint <strong>get_sub_group_size</strong> ()</p>
-</div></div></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the number of work items in the subgroup.
-  This value is no more than the maximum subgroup size and is
-  implementation-defined based on a combination of the compiled kernel and
-  the dispatch dimensions.
-  This will be a constant value for the lifetime of the subgroup.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p>uint <strong>get_max_sub_group_size</strong> ()</p>
-</div></div></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the maximum size of a subgroup within the dispatch.
-  This value will be invariant for a given set of dispatch dimensions and a
-  kernel object compiled for a given device.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p>uint <strong>get_num_sub_groups</strong> ()</p>
-</div></div></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the number of subgroups that the current work group is divided
-  into.
-</p><p class="tableblock">  This number will be constant for the duration of a work group&#8217;s execution.
-  If the kernel is executed with a non-uniform work group size
-  (i.e. the global_work_size values specified to <strong>clEnqueueNDRangeKernel</strong>
-  are not evenly divisible by the local_work_size values for any dimension,
-  calls to this built-in from some work groups may return different values
-  than calls to this built-in from other work groups.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p>uint <strong>get_enqueued_num_sub_groups</strong> ()</p>
-</div></div></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the same value as that returned by <strong>get_num_sub_groups</strong> if the
-  kernel is executed with a uniform work group size.
-</p><p class="tableblock">  If the kernel is executed with a non-uniform work group size, returns the
-  number of subgroups in each of the work groups that make up the uniform
-  region of the global range.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p>uint <strong>get_sub_group_id</strong> ()</p>
-</div></div></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>get_sub_group_id</strong> returns the subgroup ID which is a number from 0 ..
-  <strong>get_num_sub_groups</strong>() - 1.
-</p><p class="tableblock">  For <strong>clEnqueueTask</strong>, this returns 0.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p>uint <strong>get_sub_group_local_id</strong> ()</p>
-</div></div></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the unique work item ID within the current subgroup.
-  The mapping from <strong>get_local_id</strong>(<em>dimindx</em>) to <strong>get_sub_group_local_id</strong>
-  will be invariant for the lifetime of the work group.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_subgroups-additions-to-section-6.13.8-synchronization-functions">15.1.2. Additions to section 6.13.8&#8201;&#8212;&#8201;Synchronization Functions</h4>
-<table class="tableblock frame-all grid-all spread">
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>sub_group_barrier</strong> (<br>
-  cl_mem_fence_flags <em>flags</em>)
-</p><p class="tableblock">  void <strong>sub_group_barrier</strong> (<br>
-  cl_mem_fence_flags <em>flags</em>, memory_scope <em>scope</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">All work items in a subgroup executing the kernel on a processor must
-  execute this function before any are allowed to continue execution beyond
-  the subgroup barrier.
-  This function must be encountered by all work items in a subgroup
-  executing the kernel.
-  These rules apply to ND-ranges implemented with uniform and non-uniform
-  work groups.
-</p><p class="tableblock">  If <strong>subgroup_barrier</strong> is inside a conditional statement, then all work
-  items within the subgroup must enter the conditional if any work item in
-  the subgroup enters the conditional statement and executes the
-  subgroup_barrier.
-</p><p class="tableblock">  If <strong>subgroup_barrier</strong> is inside a loop, all work items within the subgroup
-  must execute the subgroup_barrier for each iteration of the loop before
-  any are allowed to continue execution beyond the subgroup_barrier.
-</p><p class="tableblock">  The <strong>subgroup_barrier</strong> function also queues a memory fence (reads and
-  writes) to ensure correct ordering of memory operations to local or global
-  memory.
-</p><p class="tableblock">  The flags argument specifies the memory address space and can be set to a
-  combination of the following values:
-</p><p class="tableblock">  CLK_LOCAL_MEM_FENCE - The <strong>subgroup_barrier</strong> function will either flush
-  any variables stored in local memory or queue a memory fence to ensure
-  correct ordering of memory operations to local memory.
-</p><p class="tableblock">  CLK_GLOBAL_MEM_FENCE&#8201;&#8212;&#8201;The <strong>subgroup_barrier</strong> function will queue a
-  memory fence to ensure correct ordering of memory operations to global
-  memory.
-  This can be useful when work items, for example, write to buffer objects
-  and then want to read the updated data from these buffer objects.
-</p><p class="tableblock">  CLK_IMAGE_MEM_FENCE&#8201;&#8212;&#8201;The <strong>subgroup_barrier</strong> function will queue a memory
-  fence to ensure correct ordering of memory operations to image objects.
-  This can be useful when work items, for example, write to image objects
-  and then want to read the updated data from these image objects.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_subgroups-additions-to-section-6.13.11-atomic-functions">15.1.3. Additions to section 6.13.11&#8201;&#8212;&#8201;Atomic Functions</h4>
-<div class="paragraph">
-<p>Add the following new value to the enumerated type <code>memory_scope</code> defined in
-<em>section 6.13.11.4</em>.</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>memory_scope_sub_group</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>The <code>memory_scope_sub_group</code> specifies that the memory ordering constraints
-given by <code>memory_order</code> apply to work items in a subgroup.
-This memory scope can be used when performing atomic operations to global or
-local memory.</p>
-</div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_subgroups-additions-to-section-6.13.15-work-group-functions">15.1.4. Additions to section 6.13.15&#8201;&#8212;&#8201;Work Group Functions</h4>
-<div class="paragraph">
-<p>The OpenCL C programming language implements the following built-in
-functions that operate on a subgroup level.
-These built-in functions must be encountered by all work items in a subgroup
-executing the kernel.
-We use the generic type name <code>gentype</code> to indicate the built-in data types
-<code>half</code> (only if the <strong>cl_khr_fp16</strong> extension is supported), <code>int</code>,
-<code>uint</code>, <code>long</code>, <code>ulong</code>, <code>float</code> or <code>double</code> (only if double
-precision is supported) as the type for the arguments.</p>
-</div>
-<table class="tableblock frame-all grid-all spread">
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>sub_group_all</strong> (int <em>predicate</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Evaluates <em>predicate</em> for all work items in the subgroup and returns a
-  non-zero value if <em>predicate</em> evaluates to non-zero for all work items in
-  the subgroup.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>sub_group_any</strong> (int <em>predicate</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Evaluates <em>predicate</em> for all work items in the subgroup and returns a
-  non-zero value if <em>predicate</em> evaluates to non-zero for any work items in
-  the subgroup.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sub_group_broadcast</strong> (<br>
-  gentype <em>x</em>, uint <em>sub_group_local_id</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Broadcast the value of <em>x</em> for work item identified by
-  <em>sub_group_local_id</em> (value returned by <strong>get_sub_group_local_id</strong>) to all
-  work items in the subgroup.
-</p><p class="tableblock">  <em>sub_group_local_id</em> must be the same value for all work items in the
-  subgroup.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sub_group_reduce_&lt;op&gt;</strong> (<br>
-  gentype <em>x</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Return result of reduction operation specified by <strong>&lt;op&gt;</strong> for all values of
-  <em>x</em> specified by work items in a subgroup.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sub_group_scan_exclusive_&lt;op&gt;</strong> (<br>
-  gentype <em>x</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Do an exclusive scan operation specified by <strong>&lt;op&gt;</strong> of all values specified
-  by work items in a subgroup.
-  The scan results are returned for each work item.
-</p><p class="tableblock">  The scan order is defined by increasing subgroup local ID within the
-  subgroup.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sub_group_scan_inclusive_&lt;op&gt;</strong> (<br>
-  gentype <em>x</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Do an inclusive scan operation specified by <strong>&lt;op&gt;</strong> of all values specified
-  by work items in a subgroup.
-  The scan results are returned for each work item.
-</p><p class="tableblock">  The scan order is defined by increasing subgroup local ID within the
-  subgroup.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_subgroups-additions-to-section-6.13.16-pipe-functions">15.1.5. Additions to section 6.13.16&#8201;&#8212;&#8201;Pipe Functions</h4>
-<div class="paragraph">
-<p>The OpenCL C programming language implements the following built-in pipe
-functions that operate at a subgroup level.
-These built-in functions must be encountered by all work items in a subgroup
-executing the kernel with the same argument values; otherwise the behavior
-is undefined.
-We use the generic type name <code>gentype</code> to indicate the built-in OpenCL C
-scalar or vector integer or floating-point data types or any user defined
-type built from these scalar and vector data types can be used as the type
-for the arguments to the pipe functions listed in <em>table 6.29</em>.</p>
-</div>
-<table class="tableblock frame-all grid-all spread">
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">reserve_id_t <strong>sub_group_reserve_read_pipe</strong> (<br>
-  read_only pipe gentype <em>pipe</em>,<br>
-  uint <em>num_packets</em>)
-</p><p class="tableblock">  reserve_id_t <strong>sub_group_reserve_write_pipe</strong> (<br>
-  write_only pipe gentype <em>pipe</em>,<br>
-  uint <em>num_packets</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Reserve <em>num_packets</em> entries for reading from or writing to <em>pipe</em>.
-  Returns a valid non-zero reservation ID if the reservation is successful
-  and 0 otherwise.
-</p><p class="tableblock">  The reserved pipe entries are referred to by indices that go from 0 &#8230;&#8203;
-  <em>num_packets</em> - 1.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>sub_group_commit_read_pipe</strong> (<br>
-  read_only pipe gentype <em>pipe</em>,<br>
-  reserve_id_t <em>reserve_id</em>)
-</p><p class="tableblock">  void <strong>sub_group_commit_write_pipe</strong> (<br>
-  write_only pipe gentype <em>pipe</em>,<br>
-  reserve_id_t <em>reserve_id</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Indicates that all reads and writes to <em>num_packets</em> associated with
-  reservation <em>reserve_id</em> are completed.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph">
-<p>Note: Reservations made by a subgroup are ordered in the pipe as they are
-ordered in the program.
-Reservations made by different subgroups that belong to the same work group
-can be ordered using subgroup synchronization.
-The order of subgroup based reservations that belong to different work
-groups is implementation defined.</p>
-</div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_subgroups-additions-to-section-6.13.17.6-enqueuing-kernels-kernel-query-functions">15.1.6. Additions to section 6.13.17.6&#8201;&#8212;&#8201;Enqueuing Kernels (Kernel Query Functions)</h4>
-<table class="tableblock frame-all grid-all spread">
-<colgroup>
-<col style="width: 55.5555%;">
-<col style="width: 44.4445%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>Built-in Function</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">uint <strong>get_kernel_sub_group_count_for_ndrange</strong> (<br>
-  const ndrange_t <em>ndrange</em>,<br>
-  void (^block)(void));
-</p><p class="tableblock">  uint <strong>get_kernel_sub_group_count_for_ndrange</strong> (<br>
-  const ndrange_t <em>ndrange</em>,<br>
-  void (^block)(local void *, &#8230;&#8203;));</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the number of subgroups in each work group of the dispatch (except
-  for the last in cases where the global size does not divide cleanly into
-  work groups) given the combination of the passed ndrange and block.
-</p><p class="tableblock">  <em>block</em> specifies the block to be enqueued.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">uint <strong>get_kernel_max_sub_group_size_for_ndrange</strong> (<br>
-  const ndrange_t <em>ndrange</em>,<br>
-  void (^block)(void));<br>
-</p><p class="tableblock">  uint <strong>get_kernel_max_sub_group_size_for_ndrange</strong> (<br>
-  const ndrange_t <em>ndrange</em>,<br>
-  void (^block)(local void *, &#8230;&#8203;));</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the maximum subgroup size for a block.</p></td>
-</tr>
-</tbody>
-</table>
-<div style="page-break-after: always;"></div>
-</div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="cl_khr_mipmap_image">16. Mipmaps</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p>This section describes OpenCL support for mipmaps.</p>
-</div>
-<div class="paragraph">
-<p>There are two optional mipmap extensions.
-The <strong>cl_khr_mipmap_image</strong> extension adds the ability to create a mip-mapped
-image, enqueue commands to read/write/copy/map/unmap a region of a mipmapped
-image, and built-in functions that can be used to read a mip-mapped image in
-an OpenCL C program.
-The <strong>cl_khr_mipmap_image_writes</strong> extension adds built-in functions that can
-be used to write a mip-mapped image in an OpenCL C program.
-If the <strong>cl_khr_mipmap_image_writes</strong> extension is supported by the OpenCL
-device, the <strong>cl_khr_mipmap_image</strong> extension must also be supported.</p>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_mipmap_image-additions-to-chapter-5">16.1. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
-<div class="sect3">
-<h4 id="cl_khr_mipmap_image-additions-to-section-5.3">16.1.1. Additions to section 5.3&#8201;&#8212;&#8201;Image Objects</h4>
-<div class="paragraph">
-<p>A mip-mapped 1D image, 1D image array, 2D image, 2D image array or 3D image
-is created by specifying <em>num_mip_levels</em> to be a value greater than one in
-the <em>cl_image_desc</em> passed to <strong>clCreateImage</strong>.
-The dimensions of a mip-mapped image can be a power of two or a non-power of
-two.
-Each successively smaller mipmap level is half the size of the previous
-level.
-If this half value is a fractional value, it is rounded down to the nearest
-integer.</p>
-</div>
-<div class="paragraph">
-<p><strong>Restrictions</strong></p>
-</div>
-<div class="paragraph">
-<p>The following restrictions apply when mip-mapped images are created with
-<strong>clCreateImage</strong>:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>CL_MEM_USE_HOST_PTR or CL_MEM_COPY_HOST_PTR cannot be specified if a
-mip-mapped image is created.</p>
-</li>
-<li>
-<p>The <em>host_ptr</em> argument to <strong>clCreateImage</strong> must be a <code>NULL</code> value.</p>
-</li>
-<li>
-<p>Mip-mapped images cannot be created for CL_MEM_OBJECT_IMAGE1D_BUFFER
-images, depth images or multi-sampled (i.e. msaa) images.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>Calls to <strong>clEnqueueReadImage</strong>, <strong>clEnqueueWriteImage</strong> and <strong>clEnqueueMapImage</strong>
-can be used to read from or write to a specific mip-level of a mip-mapped
-image.
-If image argument is a 1D image, <em>origin</em>[1] specifies the mip-level to use.
-If image argument is a 1D image array, <em>origin</em>[2] specifies the mip-level
-to use.
-If image argument is a 2D image, <em>origin</em>[2] specifies the mip-level to use.
-If image argument is a 2D image array or a 3D image, <em>origin</em>[3] specifies
-the mip-level to use.</p>
-</div>
-<div class="paragraph">
-<p>Calls to <strong>clEnqueueCopyImage</strong>, <strong>clEnqueueCopyImageToBuffer</strong> and
-<strong>clEnqueueCopyBufferToImage</strong> can also be used to copy from and to a specific
-mip-level of a mip-mapped image.
-If <em>src_image</em> argument is a 1D image, <em>src_origin</em>[1] specifies the
-mip-level to use.
-If <em>src_image</em> argument is a 1D image array, <em>src_origin</em>[2] specifies the
-mip-level to use.
-If <em>src_image</em> argument is a 2D image, <em>src_origin</em>[2] specifies the
-mip-level to use.
-If <em>src_image</em> argument is a 2D image array or a 3D image, <em>src_origin</em>[3]
-specifies the mip-level to use.
-If <em>dst_image</em> argument is a 1D image, <em>dst_origin</em>[1] specifies the
-mip-level to use.
-If <em>dst_image</em> argument is a 1D image array, <em>dst_origin</em>[2] specifies the
-mip-level to use.
-If <em>dst_image</em> argument is a 2D image, <em>dst_origin</em>[2] specifies the
-mip-level to use.
-If <em>dst_image</em> argument is a 2D image array or a 3D image, <em>dst_origin</em>[3]
-specifies the mip-level to use.</p>
-</div>
-<div class="paragraph">
-<p>If the mip level specified is not a valid value, these functions return the
-error CL_INVALID_MIP_LEVEL.</p>
-</div>
-<div class="paragraph">
-<p>Calls to clEnqueueFillImage can be used to write to a specific mip-level of
-a mip-mapped image.
-If image argument is a 1D image, origin[1] specifies the mip-level to use.
-If image argument is a 1D image array, origin[2] specifies the mip-level to
-use.
-If image argument is a 2D image, origin[2] specifies the mip-level to use.
-If image argument is a 2D image array or a 3D image, origin[3] specifies the
-mip-level to use.</p>
-</div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_mipmap_image-additions-to-section-5.7">16.1.2. Additions to section 5.7&#8201;&#8212;&#8201;Sampler Objects</h4>
-<div class="paragraph">
-<p>Add the following sampler properties <em>to table 5.14</em> that can be specified
-when a sampler object is created using <strong>clCreateSamplerWithProperties</strong>.</p>
-</div>
-<table class="tableblock frame-all grid-all spread">
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 16.6666%;">
-<col style="width: 33.3334%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_sampler_properties enum</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Property Value</strong></th>
-<th class="tableblock halign-left valign-top"><strong>Default Value</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_SAMPLER_MIP_FILTER_MODE_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">cl_filter_mode</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_FILTER_NEAREST</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_SAMPLER_LOD_MIN_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">cl_float</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">0.0f</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_SAMPLER_LOD_MAX_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">cl_float</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">MAXFLOAT</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph">
-<p>Note: The sampler properties CL_SAMPLER_MIP_FILTER_MODE_KHR,
-CL_SAMPLER_LOD_MIN_KHR and CL_SAMPLER_LOD_MAX_KHR cannot be specified with
-any samplers initialized in the OpenCL program source.
-Only the default values for these properties will be used.
-To create a sampler with specific values for these properties, a sampler
-object must be created with <strong>clCreateSamplerWithProperties</strong> and passed as an
-argument to a kernel.</p>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_mipmap_image-additions-to-creating-opencl-memory-objects-from-opengl-objects">16.2. Additions to <a href="#cl_khr_gl_sharing__memobjs">Creating OpenCL Memory Objects from OpenGL Objects</a></h3>
-<div class="paragraph">
-<p>If both the <strong><code>cl_khr_mipmap_image</code></strong> and <strong><code>cl_khr_gl_sharing</code></strong> extensions are
-supported by the OpenCL device, the <strong><code>cl_khr_gl_sharing</code></strong> extension may also
-be used to create a mipmapped OpenCL image from a mipmapped OpenGL texture.</p>
-</div>
-<div class="paragraph">
-<p>To create a mipmapped OpenCL image from a mipmapped OpenGL texture, pass a
-negative value as the <em>miplevel</em> argument to <strong>clCreateFromGLTexture</strong>.
-If <em>miplevel</em> is a negative value then an OpenCL mipmapped image object is
-created from a mipmapped OpenGL texture object, instead of an OpenCL image
-object for a specific miplevel of the OpenGL texture.</p>
-</div>
-<div class="paragraph">
-<p>Note: For a detailed description of how the level of detail is computed,
-please refer to <em>section 3.9.7</em> of the OpenGL 3.0 specification.</p>
-</div>
-<div style="page-break-after: always;"></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="cl_khr_egl_image">17. Creating OpenCL Memory Objects from EGL Images</h2>
+<h2 id="cl_khr_egl_image">20. Creating OpenCL Memory Objects from EGL Images</h2>
 <div class="sectionbody">
 <div class="sect2">
-<h3 id="cl_khr_egl_image-overview">17.1. Overview</h3>
+<h3 id="cl_khr_egl_image-overview">20.1. Overview</h3>
 <div class="paragraph">
 <p>This section describes the <strong>cl_khr_egl_image</strong> extension.
 This extension provides a mechanism to creating OpenCL memory objects from
@@ -10846,41 +12795,41 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_egl_image-new-procedures-and-functions">17.2. New Procedures and Functions</h3>
+<h3 id="cl_khr_egl_image-new-procedures-and-functions">20.2. New Procedures and Functions</h3>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_mem clCreateFromEGLImageKHR(cl_context context,
+<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateFromEGLImageKHR(cl_context context,
                                CLeglDisplayKHR display,
                                CLeglImageKHR image,
                                cl_mem_flags flags,
-                               const cl_egl_image_properties_khr *properties,
+                               <span class="directive">const</span> cl_egl_image_properties_khr *properties,
                                cl_int *errcode_ret);
 
 cl_int clEnqueueAcquireEGLObjectsKHR(cl_command_queue command_queue,
                                      cl_uint num_objects,
-                                     const cl_mem *mem_objects,
+                                     <span class="directive">const</span> cl_mem *mem_objects,
                                      cl_uint num_events_in_wait_list,
-                                     const cl_event *event_wait_list,
+                                     <span class="directive">const</span> cl_event *event_wait_list,
                                      cl_event *event)
 
 cl_int clEnqueueReleaseEGLObjectsKHR(cl_command_queue command_queue,
                                      cl_uint num_objects,
-                                     const cl_mem *mem_objects,
+                                     <span class="directive">const</span> cl_mem *mem_objects,
                                      cl_uint num_events_in_wait_list,
-                                     const cl_event *event_wait_list,
+                                     <span class="directive">const</span> cl_event *event_wait_list,
                                      cl_event *event)</code></pre>
 </div>
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_egl_image-new-tokens">17.3. New Tokens</h3>
+<h3 id="cl_khr_egl_image-new-tokens">20.3. New Tokens</h3>
 <div class="paragraph">
 <p>New error codes:</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_EGL_RESOURCE_NOT_ACQUIRED_KHR    -1092
-CL_INVALID_EGL_OBJECT_KHR           -1093</pre>
+<pre>CL_EGL_RESOURCE_NOT_ACQUIRED_KHR
+CL_INVALID_EGL_OBJECT_KHR</pre>
 </div>
 </div>
 <div class="paragraph">
@@ -10888,13 +12837,13 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR  0x202D
-CL_COMMAND_RELEASE_EGL_OBJECTS_KHR  0x202E</pre>
+<pre>CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR
+CL_COMMAND_RELEASE_EGL_OBJECTS_KHR</pre>
 </div>
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_egl_image-additions-to-chapter-5">17.4. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
+<h3 id="cl_khr_egl_image-additions-to-chapter-5">20.4. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
 <div class="paragraph">
 <p>In section 5.2.4, add the following text after the paragraph defining
 clCreateImage:</p>
@@ -10905,11 +12854,11 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_mem clCreateFromEGLImageKHR(cl_context context,
+<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateFromEGLImageKHR(cl_context context,
                                CLeglDisplayKHR display,
                                CLeglImageKHR image,
                                cl_mem_flags flags,
-                               const cl_egl_image_properties_khr *properties,
+                               <span class="directive">const</span> cl_egl_image_properties_khr *properties,
                                cl_int *errcode_ret);</code></pre>
 </div>
 </div>
@@ -11002,7 +12951,7 @@
 </ul>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_egl_image-lifetime-of-shared-objects">17.4.1. Lifetime of Shared Objects</h4>
+<h4 id="cl_khr_egl_image-lifetime-of-shared-objects">20.4.1. Lifetime of Shared Objects</h4>
 <div class="paragraph">
 <p>An OpenCL memory object created from an EGL image remains valid according to
 the lifetime behavior as described in EGL_KHR_image_base.</p>
@@ -11016,7 +12965,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_egl_image-synchronizing-opengl-and-egl-access-to-shared-objects">17.4.2. Synchronizing OpenCL and EGL Access to Shared Objects</h4>
+<h4 id="cl_khr_egl_image-synchronizing-opengl-and-egl-access-to-shared-objects">20.4.2. Synchronizing OpenCL and EGL Access to Shared Objects</h4>
 <div class="paragraph">
 <p>In order to ensure data integrity, the application is responsible for
 synchronizing access to shared CL/EGL objects by their respective APIs.
@@ -11053,18 +13002,18 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="cl_khr_egl_image-sharing-memory-objects-created-from-egl-resources-between-egldisplays-and-opencl-contexts">17.4.3. Sharing memory objects created from EGL resources between EGLDisplays and OpenCL contexts</h4>
+<h4 id="cl_khr_egl_image-sharing-memory-objects-created-from-egl-resources-between-egldisplays-and-opencl-contexts">20.4.3. Sharing memory objects created from EGL resources between EGLDisplays and OpenCL contexts</h4>
 <div class="paragraph">
 <p>The function
 </p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_int clEnqueueAcquireEGLObjectsKHR(cl_command_queue command_queue,
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueAcquireEGLObjectsKHR(cl_command_queue command_queue,
                                      cl_uint num_objects,
-                                     const cl_mem *mem_objects,
+                                     <span class="directive">const</span> cl_mem *mem_objects,
                                      cl_uint num_events_in_wait_list,
-                                     const cl_event *event_wait_list,
+                                     <span class="directive">const</span> cl_event *event_wait_list,
                                      cl_event *event)</code></pre>
 </div>
 </div>
@@ -11159,11 +13108,11 @@
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_int clEnqueueReleaseEGLObjectsKHR(cl_command_queue command_queue,
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueReleaseEGLObjectsKHR(cl_command_queue command_queue,
                                      cl_uint num_objects,
-                                     const cl_mem *mem_objects,
+                                     <span class="directive">const</span> cl_mem *mem_objects,
                                      cl_uint num_events_in_wait_list,
-                                     const cl_event *event_wait_list,
+                                     <span class="directive">const</span> cl_event *event_wait_list,
                                      cl_event *event)</code></pre>
 </div>
 </div>
@@ -11256,7 +13205,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_egl_image-issues">17.5. Issues</h3>
+<h3 id="cl_khr_egl_image-issues">20.5. Issues</h3>
 <div class="olist arabic">
 <ol class="arabic">
 <li>
@@ -11358,274 +13307,1666 @@
 </li>
 </ol>
 </div>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="cl_khr_egl_event">18. Creating OpenCL Event Objects from EGL Sync Objects</h2>
+<h2 id="cl_khr_image2d_from_buffer">21. Creating a 2D Image From A Buffer</h2>
 <div class="sectionbody">
-<div class="sect2">
-<h3 id="cl_khr_egl_event-overview">18.1. Overview</h3>
 <div class="paragraph">
-<p>This section describes the <strong>cl_khr_egl_event</strong> extension.
-This extension allows creating OpenCL event objects linked to EGL fence sync
-objects, potentially improving efficiency of sharing images and buffers
-between the two APIs.
-The companion <strong>EGL_KHR_cl_event</strong> extension provides the complementary
-functionality of creating an EGL sync object from an OpenCL event object.</p>
+<p>This section describes the <strong>cl_khr_image2d_from_buffer</strong> extension.</p>
 </div>
+<div class="paragraph">
+<p>This extension allows a 2D image to be created from an existing OpenCL buffer memory object.</p>
+</div>
+<div class="paragraph">
+<p>This extension became a core feature in OpenCL 2.0.</p>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_egl_event-new-procedures-and-functions">18.2. New Procedures and Functions</h3>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code>cl_event clCreateEventFromEGLSyncKHR(cl_context context,
-                                     CLeglSyncKHR sync,
-                                     CLeglDisplayKHR display,
-                                     cl_int *errcode_ret);</code></pre>
+<h3 id="_additions_to_chapter_4_of_the_opencl_1_2_specification">21.1. Additions to Chapter 4 of the OpenCL 1.2 Specification</h3>
+<div class="paragraph">
+<p>The following table entry describes the additions to <em>table 4.3,</em> which allows applications to query the configuration information using <strong>clGetDeviceInfo</strong> for an OpenCL device that supports creating a 2D image from a buffer.</p>
 </div>
-</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 40%;">
+<col style="width: 20%;">
+<col style="width: 40%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_device_info</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_IMAGE_<br>
+PITCH_ALIGNMENT</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">cl_uint</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The row pitch alignment size in pixels for images created from a buffer.  The value returned must be a power of 2.<br>
+<br>
+If the device does not support images, this value should be 0.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_IMAGE_<br>
+BASE_ADDRESS_ALIGNMENT</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">cl_uint</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">This query should be used when an image is created from a buffer which was created using CL_MEM_USE_HOST_PTR. The value returned must be a power of 2.<br>
+<br>
+This query specifies the minimum alignment in pixels of the <em>host_ptr</em> specified to <strong>clCreateBuffer</strong>.<br>
+<br>
+If the device does not support images, this value should be 0.</p></td>
+</tr>
+</tbody>
+</table>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_egl_event-new-tokens">18.3. New Tokens</h3>
+<h3 id="_additions_to_chapter_5_of_the_opencl_1_2_specification">21.2. Additions to Chapter 5 of the OpenCL 1.2 Specification</h3>
 <div class="paragraph">
-<p>Returned by clCreateEventFromEGLSyncKHR if <em>sync</em> is not a valid EGLSyncKHR
-handle created with respect to EGLDisplay <em>display</em>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_INVALID_EGL_OBJECT_KHR               -1093</pre>
-</div>
+<p>Add to Section 5.3.1: Creating Image Objects:</p>
 </div>
 <div class="paragraph">
-<p>Returned by <strong>clGetEventInfo</strong> when <em>param_name</em> is CL_EVENT_COMMAND_TYPE:</p>
+<p>A 2D image can be created from a buffer by specifying a buffer object in the image_desc-&gt;buffer passed to <strong>clCreateImage</strong> for image_desc-&gt;image_type equal to CL_MEM_OBJECT_IMAGE2D. When the 2D image from buffer is created, the client must specify the width, height and image format (i.e. channel order and channel data type). If these are not specified, <strong>clCreateImage</strong> returns a NULL value with <em>errcode_ret</em> set to CL_INVALID_IMAGE_FORMAT_DESCRIPTOR.  The pitch can be optionally specified. If the pitch is not specified, the pitch is computed as width * bytes per pixel based on the image format.</p>
 </div>
-<div class="listingblock">
-<div class="content">
-<pre>CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR    0x202F</pre>
+<div class="paragraph">
+<p>The pitch specified (or computed if pitch specified is 0) must be a multiple of the maximum of the CL_DEVICE_IMAGE_PITCH_ALIGNMENT value for all devices in the context associated with image_desc-&gt;buffer that support images.  Otherwise, <strong>clCreateImage</strong> returns a NULL value with <em>errcode_ret</em> set to CL_INVALID_IMAGE_FORMAT_DESCRIPTOR.</p>
+</div>
+<div class="paragraph">
+<p>If image_desc-&gt;buffer is created with CL_MEM_USE_HOST_PTR, the <em>host_ptr</em> specified to clCreateBuffer must be aligned to the maximum of the CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT value for all devices in the context associated with image_desc&#8594;buffer that support images.  Otherwise, <strong>clCreateImage</strong> returns a NULL value with <em>errcode_ret</em> set to CL_INVALID_IMAGE_FORMAT_DESCRIPTOR.</p>
+</div>
+<div class="paragraph">
+<p>The minimum list of supported image formats described in <em>table 5.8</em> of the OpenCL 1.2 specification must be supported for 2D images created from a buffer.</p>
+</div>
+<div class="paragraph">
+<p>The OpenCL runtime APIs that operate on images (i.e. clEnqueueReadImage, clEnqueueWriteImage, clEnqueueFillImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage and clEnqueueMapImage) are supported for a 2D image created from a buffer.</p>
+</div>
+<div class="paragraph">
+<p>When the contents of a buffer objects data store are modified, those changes are reflected in the contents of the 2D image object and vice-versa at corresponding synchronization points. The
+image_height * image_row_pitch specified in image_desc must be &#8656; size of buffer object data
+store.</p>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+Concurrent reading from, writing to and copying between both a buffer object and the 2D image object associated with the buffer object is undefined. Only reading from both a buffer object and 2D image object associated with the buffer object is defined. A 2D image or a 2D image created form a buffer use the same image type in OpenCL C i.e. image2d_t. The image built-ins functions described in <em>section 6.12.14.2</em>, <em>6.12.14.3</em>, <em>6.12.14.4</em> and <em>6.12.14.5</em> for image2d_t behave the same way for a 2D image and a 2D image from a buffer.
+</td>
+</tr>
+</table>
 </div>
 </div>
 </div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_initialize_memory">22. Local and Private Memory Initialization</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Memory is allocated in various forms in OpenCL both explicitly (global
+memory) or implicitly (local, private memory).
+This allocation so far does not provide a straightforward mechanism to
+initialize the memory on allocation.
+In other words what is lacking is the equivalent of calloc for the currently
+supported malloc like capability.
+This functionality is useful for a variety of reasons including ease of
+debugging, application controlled limiting of visibility to previous
+contents of memory and in some cases, optimization.</p>
+</div>
+<div class="paragraph">
+<p>This extension adds support for initializing local and private memory before
+a kernel begins execution.
+This extension name is <strong>cl_khr_initialize_memory</strong>.</p>
+</div>
 <div class="sect2">
-<h3 id="cl_khr_egl_event-additions-to-chapter-5">18.4. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
+<h3 id="cl_khr_initialize_memory-additions-to-chapter-4">22.1. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
 <div class="paragraph">
-<p>Add following to the fourth paragraph of <em>section 5.11</em> (prior to the
-description of <strong>clWaitForEvents</strong>):</p>
+<p>Add a new context property to <em>table 4.5</em> in <em>section 4.4</em>.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 22.2222%;">
+<col style="width: 44.4445%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_context_properties enum</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Property value</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_CONTEXT_MEMORY_INITIALIZE_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">cl_context_memory_initialize_khr</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Describes which memory types for the context must be initialized.
+  This is a bit-field, where the following values are currently supported:</p>
+<p class="tableblock">  CL_CONTEXT_MEMORY_INITIALIZE_LOCAL_KHR&#8201;&#8212;&#8201;Initialize local memory to
+  zeros.</p>
+<p class="tableblock">  CL_CONTEXT_MEMORY_INITIALIZE_PRIVATE_KHR&#8201;&#8212;&#8201;Initialize private memory to
+  zeros.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_initialize_memory-additions-to-chapter-6">22.2. Additions to Chapter 6 of the OpenCL 2.2 Specification</h3>
+<div class="paragraph">
+<p>Updates to <em>section 6.9</em>&#8201;&#8212;&#8201;Restrictions</p>
 </div>
 <div class="paragraph">
-<p>&#8220;Event objects can also be used to reflect the status of an EGL fence sync
-object.
-The sync object in turn refers to a fence command executing in an EGL client
-API command stream.
-This provides another method of coordinating sharing of EGL / EGL client API
-objects with OpenCL.
-Completion of EGL / EGL client API commands may be determined by placing an
-EGL fence command after commands using eglCreateSyncKHR, creating an event
-from the resulting EGL sync object using clCreateEventFromEGLSyncKHR and
-then specifying it in the <em>event_wait_list</em> of a clEnqueueAcquire***
-command.
-This method may be considerably more efficient than calling operations like
-glFinish, and is referred to as <em>explicit synchronization</em>.
-The application is responsible for ensuring the command stream associated
-with the EGL fence is flushed to ensure the CL queue is submitted to the
-device.
-Explicit synchronization is most useful when an EGL client API context bound
-to another thread is accessing the memory objects.&#8221;</p>
+<p>If the context is created with CL CONTEXT MEMORY INITIALIZE KHR, appropriate
+memory locations as specified by the bit-field is initialized with zeroes,
+prior to the start of execution of any kernel.
+The driver chooses when, prior to kernel execution, the initialization of
+local and/or private memory is performed.
+The only requirement is there should be no values set from outside the
+context, which can be read during a kernel execution.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_terminate_context">23. Terminating OpenCL contexts</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Today, OpenCL provides an API to release a context.
+This operation is done only after all queues, memory object, programs and
+kernels are released, which in turn might wait for all ongoing operations to
+complete.
+However, there are cases in which a fast release is required, or release
+operation cannot be done, as commands are stuck in mid execution.
+An example of the first case can be program termination due to exception, or
+quick shutdown due to low power.
+Examples of the second case are when a kernel is running too long, or gets
+stuck, or it may result from user action which makes the results of the
+computation unnecessary.</p>
 </div>
 <div class="paragraph">
-<p>Add CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR to the valid <em>param_value</em> values
-returned by <strong>clGetEventInfo</strong> for <em>param_name</em> CL_EVENT_COMMAND_TYPE (in the
-third row and third column of <em>table 5.22</em>).</p>
+<p>In many cases, the driver or the device is capable of speeding up the
+closure of ongoing operations when the results are no longer required in a
+much more expedient manner than waiting for all previously enqueued
+operations to finish.</p>
 </div>
 <div class="paragraph">
-<p>Add new <em>subsection 5.11.2</em>:</p>
+<p>This extension implements a new query to check whether a device can
+terminate an OpenCL context and adds an API to terminate a context.</p>
 </div>
 <div class="paragraph">
-<p>"`<strong>5.11.2 Linking Event Objects to EGL Synchronization Objects</strong></p>
+<p>The extension name is <strong>cl_khr_terminate_context</strong>.</p>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_terminate_context-additions-to-chapter-4">23.1. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
+<div class="paragraph">
+<p>Add a new device property to <em>table 4.3</em> in <em>section 4.2</em>.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 22.2222%;">
+<col style="width: 44.4445%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_device_info</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_TERMINATE_CAPABILITY_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_device_terminate_capability_khr</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Describes the termination capability of the OpenCL device.
+  This is a bit-field, where the following values are currently supported:</p>
+<p class="tableblock">  CL_DEVICE_TERMINATE_CAPABILITY_CONTEXT_KHR - Indicates that context
+  termination is supported.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Add a new context property to <em>table 4.5</em> in <em>section 4.4</em>.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 22.2222%;">
+<col style="width: 44.4445%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_context_properties enum</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Property value</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_CONTEXT_TERMINATE_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_bool</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies whether the context can be terminated.
+  The default value is CL_FALSE.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>CL_CONTEXT_TERMINATE_KHR can be specified in the context properties only if
+all devices associated with the context support the ability to support
+context termination (i.e. CL_DEVICE_TERMINATE_CAPABILITY_CONTEXT_KHR is set
+for CL_DEVICE_TERMINATE_CAPABILITY_KHR).
+Otherwise, context creation fails with error code of CL_INVALID_PROPERTY.</p>
 </div>
 <div class="paragraph">
-<p>An event object may be created by linking to an EGL <strong>sync object</strong>.
-Completion of such an event object is equivalent to waiting for completion
-of the fence command associated with the linked EGL sync object.</p>
-</div>
-<div class="paragraph">
-<p>The function
+<p>The new function
 </p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code>cl_event clCreateEventFromEGLSyncKHR(cl_context context,
-                                     CLeglSyncKHR sync,
-                                     CLeglDisplayKHR display,
-                                     cl_int *errcode_ret)</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clTerminateContextKHR(cl context context)</code></pre>
 </div>
 </div>
 <div class="paragraph">
-<p>creates a linked event object.</p>
+<p>terminates all pending work associated with the context and renders all data
+owned by the context invalid.
+It is the responsibility of the application to release all objects
+associated with the context being terminated.</p>
 </div>
 <div class="paragraph">
-<p><em>context</em> is a valid OpenCL context created from an OpenGL context or share
-group, using the <strong>cl_khr_gl_sharing</strong> extension.</p>
+<p>When a context is terminated:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The execution status of enqueued commands will be CL_TERMINATED_KHR.
+Event objects can be queried using <strong>clGetEventInfo</strong>.
+Event callbacks can be registered and registered event callbacks will be
+called with <em>event_command_exec_status</em> set to CL_TERMINATED_KHR.
+<strong>clWaitForEvents</strong> will return as immediately for commands associated
+with event objects specified in event_list.
+The status of user events can be set.
+Event objects can be retained and released.
+<strong>clGetEventProfilingInfo</strong> returns CL_PROFILING_INFO_NOT_AVAILABLE.</p>
+</li>
+<li>
+<p>The context is considered to be terminated.
+A callback function registered when the context was created will be
+called.
+Only queries, retain and release operations can be performed on the
+context.
+All other APIs that use a context as an argument will return
+CL_CONTEXT_TERMINATED_KHR.</p>
+</li>
+<li>
+<p>The contents of the memory regions of the memory objects is undefined.
+Queries, registering a destructor callback, retain and release
+operations can be performed on the memory objects.</p>
+</li>
+<li>
+<p>Once a context has been terminated, all OpenCL API calls that create
+objects or enqueue commands will return CL_CONTEXT_TERMINATED_KHR.
+APIs that release OpenCL objects will continue to operate as though
+<strong>clTerminateContextKHR</strong> was not called.</p>
+</li>
+<li>
+<p>The behavior of callbacks will remain unchanged, and will report
+appropriate error, if executing after termination of context.
+This behavior is similar to enqueued commands, after the command queue
+has become invalid.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><em>sync</em> is the name of a sync object of type EGL_SYNC_FENCE_KHR created with
-respect to EGLDisplay <em>display</em>.</p>
-</div>
-<div class="paragraph">
-<p><strong>clCreateEventFromEGLSyncKHR</strong> returns a valid OpenCL event object and
-<em>errcode_ret</em> is set to CL_SUCCESS if the event object is created
+<p><strong>clTerminateContextKHR</strong> returns CL_SUCCESS if the function is executed
 successfully.
-Otherwise, it returns a <code>NULL</code> value with one of the following error values
-returned in <em>errcode_ret</em>:</p>
+Otherwise, it returns one of the following errors:</p>
 </div>
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context, or was not
-created from a GL context.</p>
+<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid OpenCL context.</p>
 </li>
 <li>
-<p>CL_INVALID_EGL_OBJECT_KHR if <em>sync</em> is not a valid EGLSyncKHR object of
-type EGL_SYNC_FENCE_KHR created with respect to EGLDisplay <em>display</em>.</p>
+<p>CL_CONTEXT_TERMINATED_KHR if <em>context</em> has already been terminated.</p>
+</li>
+<li>
+<p>CL_INVALID_OPERATION if <em>context</em> was not created with
+CL_CONTEXT_TERMNATE_KHR set to CL_TRUE.</p>
+</li>
+<li>
+<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
 </div>
 <div class="paragraph">
-<p>The parameters of an event object linked to an EGL sync object will return
-the following values when queried with <strong>clGetEventInfo</strong>:</p>
+<p>An implementation that supports this extension must be able to terminate
+commands currently executing on devices or queued across all command-queues
+associated with the context that is being terminated.
+The implementation cannot implement this extension by waiting for currently
+executing (or queued) commands to finish execution on devices associated
+with this context (i.e. doing a <strong>clFinish</strong>).</p>
 </div>
-<div class="ulist">
-<ul>
-<li>
-<p>The CL_EVENT_COMMAND_QUEUE of a linked event is <code>NULL</code>, because the
-event is not associated with any OpenCL command queue.</p>
-</li>
-<li>
-<p>The CL_EVENT_COMMAND_TYPE of a linked event is
-CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR, indicating that the event is
-associated with a EGL sync object, rather than an OpenCL command.</p>
-</li>
-<li>
-<p>The CL_EVENT_COMMAND_EXECUTION_STATUS of a linked event is either
-CL_SUBMITTED, indicating that the fence command associated with the sync
-object has not yet completed, or CL_COMPLETE, indicating that the fence
-command has completed.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p><strong>clCreateEventFromEGLSyncKHR</strong> performs an implicit <strong>clRetainEvent</strong> on the
-returned event object.
-Creating a linked event object also places a reference on the linked EGL
-sync object.
-When the event object is deleted, the reference will be removed from the EGL
-sync object.</p>
-</div>
-<div class="paragraph">
-<p>Events returned from <strong>clCreateEventFromEGLSyncKHR</strong> may only be consumed by
-<strong>clEnqueueAcquire</strong>*** commands.
-Passing such events to any other CL API that enqueues commands will generate
-a CL_INVALID_EVENT error.`"</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_egl_event-additions-to-extension-specification">18.5. Additions to the OpenCL Extension Specification</h3>
-<div class="paragraph">
-<p>Replace the second paragraph of
-<a href="#cl_khr_gl_sharing__memobjs-synchronizing-opencl-and-opengl-access-to-shared-objects">Synchronizing OpenCL and OpenGL Access to Shared Objects</a> with:</p>
-</div>
-<div class="paragraph">
-<p>"`Prior to calling <strong>clEnqueueAcquireGLObjects</strong>, the application must ensure
-that any pending EGL or EGL client API operations which access the objects
-specified in <em>mem_objects</em> have completed.</p>
-</div>
-<div class="paragraph">
-<p>If the <strong>cl_khr_egl_event</strong> extension is supported and the EGL context in
-question supports fence sync objects, <em>explicit synchronization</em> can be
-achieved as set out in <em>section 5.7.1</em>.</p>
-</div>
-<div class="paragraph">
-<p>If the <strong>cl_khr_egl_event</strong> extension is not supported, completion of EGL
-client API commands may be determined by issuing and waiting for completion
-of commands such as glFinish or vgFinish on all client API contexts with
-pending references to these objects.
-Some implementations may offer other efficient synchronization methods.
-If such methods exist they will be described in platform-specific
-documentation.</p>
-</div>
-<div class="paragraph">
-<p>Note that no synchronization methods other than glFinish and vgFinish are
-portable between all EGL client API implementations and all OpenCL
-implementations.
-While this is the only way to ensure completion that is portable to all
-platforms, these are expensive operation and their use should be avoided if
-the cl_khr_egl_event extension is supported on a platform.`"</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_egl_event-issues">18.6. Issues</h3>
-<div class="paragraph">
-<p>Most issues are shared with <strong>cl_khr_gl_event</strong> and are resolved as described
-in that extension.</p>
-</div>
-<div class="olist arabic">
-<ol class="arabic">
-<li>
-<p>Should we support implicit synchronization?</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph">
-<p>RESOLVED: No, as this may be very difficult since the synchronization would
-not be with EGL, it would be with currently bound EGL client APIs.
-It would be necessary to know which client APIs might be bound, to validate
-that they&#8217;re associated with the EGLDisplay associated with the OpenCL
-context, and to reach into each such context.</p>
-</div>
-</div>
-</div>
-</li>
-<li>
-<p>Do we need to have typedefs to use EGL handles in OpenCL?</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph">
-<p>RESOLVED Using typedefs for EGL handles.</p>
-</div>
-</div>
-</div>
-</li>
-<li>
-<p>Should we restrict which CL APIs can be used with this cl_event?</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph">
-<p>RESOLVED Use is limited to clEnqueueAcquire*** calls only.</p>
-</div>
-</div>
-</div>
-</li>
-<li>
-<p>What is the desired behaviour for this extension when EGLSyncKHR is of a
-type other than EGL_SYNC_FENCE_KHR?</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph">
-<p>RESOLVED This extension only requires support for EGL_SYNC_FENCE_KHR.
-Support of other types is an implementation choice, and will result in
-CL_INVALID_EGL_OBJECT_KHR if unsupported.</p>
-</div>
-</div>
-</div>
-</li>
-</ol>
-</div>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="cl_khr_priority_hints">19. Priority Hints</h2>
+<h2 id="cl_khr_spir">24. Standard Portable Intermediate Representation Binaries</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This extension adds the ability to create an OpenCL program object from a
+Standard Portable Intermediate Representation (SPIR) instance.
+A SPIR instance is a vendor-neutral non-source representation for OpenCL C
+programs.</p>
+</div>
+<div class="paragraph">
+<p>The extension name is <strong>cl_khr_spir</strong>.
+This extension has been superseded by the SPIR-V intermediate
+representation, which is supported by the <strong>cl_khr_il_program</strong> extension,
+and is a core feature in OpenCL 2.1.</p>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_spir-additions-to-chapter-4">24.1. Additions to Chapter 4 of the OpenCL 2.2 Specification</h3>
+<div class="paragraph">
+<p><strong>Add a new device property to <em>table 4.3</em> in <em>section 4.2</em>:</strong></p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 28.5714%;">
+<col style="width: 14.2857%;">
+<col style="width: 57.1429%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_device_info</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_SPIR_VERSIONS</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">char[]</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A space separated list of SPIR versions supported by the device.</p>
+<p class="tableblock">  For example, returning <code>"1.2"</code> in this query implies that SPIR version 1.2
+  is supported by the implementation.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_spir-additions-to-chapter-5">24.2. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
+<div class="paragraph">
+<p><strong>Additions to <em>section 5.8.1</em>&#8201;&#8212;&#8201;Creating Program Objects:</strong></p>
+</div>
+<div class="paragraph">
+<p>&#8220;<strong>clCreateProgramWithBinary</strong> can be used to load a SPIR binary.
+Once a program object has been created from a SPIR binary, <strong>clBuildProgram</strong>
+can be called to build a program executable or <strong>clCompileProgram</strong> can be
+called to compile the SPIR binary.&#8221;</p>
+</div>
+<div class="paragraph">
+<p>Modify the CL_PROGRAM_BINARY_TYPE entry in <em>table 5.14</em>
+(<strong>clGetProgramBuildInfo</strong>) to add a potential value
+CL_PROGRAM_BINARY_TYPE_INTERMEDIATE:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 28.5714%;">
+<col style="width: 14.2857%;">
+<col style="width: 57.1429%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_program_build_info</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Info. returned in <em>param_value</em></strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_PROGRAM_BINARY_TYPE</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cl_program_binary_type</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_PROGRAM_BINARY_TYPE_INTERMEDIATE&#8201;&#8212;&#8201;An intermediate (non-source)
+  representation for the program is loaded as a binary.
+  The program must be further processed with <strong>clCompileProgram</strong> or
+  <strong>clBuildProgram</strong>.</p>
+<p class="tableblock">  If processed with <strong>clCompileProgram</strong>, the result will be a binary of type
+  CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT or CL_PROGRAM_BINARY_TYPE_LIBRARY.
+  If processed with <strong>clBuildProgram</strong>, the result will be a binary of type
+  CL_PROGRAM_BINARY_TYPE_EXECUTABLE.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p><strong>Additions to <em>section 5.8.4</em>&#8201;&#8212;&#8201;Compiler Options:</strong></p>
+</div>
+<div class="paragraph">
+<p>&#8220;The compile option <strong>-x spir</strong> must be specified to indicate that the binary
+is in SPIR format, and the compile option <strong>-spir-std</strong> must be used to
+specify the version of the SPIR specification that describes the format and
+meaning of the binary.
+For example, if the binary is as described in SPIR version 1.2, then
+<strong>-spir-std=1.2</strong> must be specified.
+Failing to specify these compile options may result in implementation
+defined behavior.&#8221;</p>
+</div>
+<div class="paragraph">
+<p><strong>Additions to <em>section 5.9.3</em>&#8201;&#8212;&#8201;Kernel Object Queries:</strong></p>
+</div>
+<div class="paragraph">
+<p>Modify following text in clGetKernelArgInfo from:</p>
+</div>
+<div class="paragraph">
+<p>&#8220;Kernel argument information is only available if the program object
+associated with <em>kernel</em> is created with <strong>clCreateProgramWithSource</strong> and the
+program executable is built with the -cl-kernel-arg-info option specified in
+<em>options</em> argument to <strong>clBuildProgram</strong> or <strong>clCompileProgram</strong>.&#8221;</p>
+</div>
+<div class="paragraph">
+<p>to:</p>
+</div>
+<div class="paragraph">
+<p>&#8220;Kernel argument information is only available if the program object
+associated with <em>kernel</em> is created with <strong>clCreateProgramWithSource</strong> and the
+program executable is built with the -cl-kernel-arg-info option specified in
+<em>options</em> argument to <strong>clBuildProgram</strong> or <strong>clCompileProgram</strong>, or if the
+program object associated with <em>kernel</em> is created with
+<strong>clCreateProgramWithBinary</strong> and the program executable is built with the
+-cl-kernel-arg-info and --x spir options specified in <em>options</em> argument to
+<strong>clBuildProgram</strong> or <strong>clCompileProgram</strong>.&#8221;</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_il_program">25. Intermediate Language Programs</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This section describes the <strong>cl_khr_il_program</strong> extension.</p>
+</div>
+<div class="paragraph">
+<p>This extension adds the ability to create programs with intermediate language (IL),
+usually SPIR-V.  Further information about the format and contents of SPIR-V may be
+found in the SPIR-V Specification.  Information about how SPIR-V modules behave in
+the OpenCL environment may be found in the OpenCL SPIR-V Environment Specification.</p>
+</div>
+<div class="paragraph">
+<p>This functionality described by this extension is a core feature in OpenCL 2.1.</p>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_il_program-new-procedures-and-functions">25.1. New Procedures and Functions</h3>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_program clCreateProgramWithILKHR(cl_context context,
+                                    <span class="directive">const</span> <span class="directive">void</span> *il,
+                                    size_t length,
+                                    cl_int *errcode_ret);</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_il_program-new-tokens">25.2. New Tokens</h3>
+<div class="paragraph">
+<p>Accepted as a new <em>param_name</em> argument to <strong>clGetDeviceInfo</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_DEVICE_IL_VERSION_KHR</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Accepted as a new <em>param_name</em> argument to <strong>clGetProgramInfo</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>CL_PROGRAM_IL_KHR</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_il_program-additions-to-chapter-3">25.3. Additions to Chapter 3 of the OpenCL 2.0 Specification</h3>
+<div class="paragraph">
+<p>In section 3.1, replace the fourth paragraph with:</p>
+</div>
+<div class="paragraph">
+<p>"Programmers provide programs in the form of intermediate language binaries (usually SPIR-V), OpenCL C source strings, or implementation-defined binary objects. The OpenCL platform provides a compiler to translate programs represented as intermediate language binaries or OpenCL C source strings into device program executables. The compiler may be <em>online</em> or <em>offline</em>. An <em>online compiler</em> is available during host program execution using standard APIs. An <em>offline compiler</em> is invoked outside of host program control, using platform-specific methods. The OpenCL runtime allows developers to get a previously compiled device program executable and to load and execute a previously compiled device program executable."</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_il_program-additions-to-chapter-4">25.4. Additions to Chapter 4 of the OpenCL 2.0 Specification</h3>
+<div class="paragraph">
+<p>Add a new device property to <strong>Table 4.3</strong> <em>OpenCL Device Queries</em>:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 16.6666%;">
+<col style="width: 50.0001%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_device_info</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_IL_VERSION_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">char[]</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The intermediate languages that are be supported by <strong>clCreateProgramWithILKHR</strong> for this device.<br>
+<br>
+Returns a space separated list of IL version strings of the form:<br>
+<br>
+&lt;IL_Prefix&gt;_&lt;Major_version&gt;.&lt;Minor_version&gt;<br>
+<br>
+A device that supports the <strong>cl_khr_il_program</strong> extension must support the “SPIR-V” IL prefix.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_il_program-additions-to-chapter-5">25.5. Additions to Chapter 5 of the OpenCL 2.0 Specification</h3>
+<div class="paragraph">
+<p>Add to Section 5.8.1: Creating Program Objects:</p>
+</div>
+<div class="paragraph">
+<p>"The function</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_program clCreateProgramWithILKHR(cl_context context,
+                                    <span class="directive">const</span> <span class="directive">void</span> *il,
+                                    size_t length,
+                                    cl_int *errcode_ret);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>creates a new program object for <em>context</em> using the <em>length</em> bytes of intermediate language pointed to by <em>il</em>.</p>
+</div>
+<div class="paragraph">
+<p><em>context</em> must be a valid OpenCL context.</p>
+</div>
+<div class="paragraph">
+<p><em>il</em> is a pointer to a <em>length</em>-byte block of memory containing intermediate langage.</p>
+</div>
+<div class="paragraph">
+<p><em>length</em> is the length of the block of memory pointed to by <em>il</em>.</p>
+</div>
+<div class="paragraph">
+<p><em>errcode_ret</em> will return an appropriate error code. If <em>errcode_ret</em> is NULL, no error code is returned.</p>
+</div>
+<div class="paragraph">
+<p><strong>clCreateProgramWithILKHR</strong> returns a valid non-zero program object and <em>errcode_ret</em> is set to CL_SUCCESS if the program object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in <em>errcode_ret</em>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context</p>
+</li>
+<li>
+<p>CL_INVALID_VALUE if <em>il</em> is NULL or if <em>length</em> is zero.</p>
+</li>
+<li>
+<p>CL_INVALID_VALUE if the <em>length</em>-byte block of memory pointed to by <em>il</em> does not contain well-formed intermediate language.</p>
+</li>
+<li>
+<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host."</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Add to Section 5.8.2: Building Program Executables:</p>
+</div>
+<div class="paragraph">
+<p>Add the following to the description of the <em>options</em> parameter to <strong>clBuildProgram</strong>:</p>
+</div>
+<div class="paragraph">
+<p>"Certain options are ignored when <em>program</em> is created with IL."</p>
+</div>
+<div class="paragraph">
+<p>Additionally, replace the error:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_OPERATION if <em>program</em> was not created with <strong>clCreateProgramWithSource</strong> or <strong>clCreateProgramWithBinary</strong>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>with:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_OPERATION if <em>program</em> was not created with <strong>clCreateProgramWithSource</strong>, <strong>clCreateProgramWithILKHR</strong> or <strong>clCreateProgramWithBinary.</strong></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Add to Section 5.8.3: Separate Compilation and Linking of Programs:</p>
+</div>
+<div class="paragraph">
+<p>Add the following to the description of the <em>options</em> parameter to <strong>clCompileProgram</strong>:</p>
+</div>
+<div class="paragraph">
+<p>"Certain options are ignored when <em>program</em> is created with IL."</p>
+</div>
+<div class="paragraph">
+<p>Additionally, replace the error:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_OPERATION if <em>program</em> has no source i.e. it has not been created with <strong>clCreateProgramWithSource</strong>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>with:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_OPERATION if <em>program</em> was not created with <strong>clCreateProgramWithSource</strong> or <strong>clCreateProgramWithILKHR</strong>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Add to Section 5.8.4.1: Preprocessor Options,<br>
+Add to Section 5.8.4.2: Math Intrinsic Options (for -cl-single-precision-constant-only),<br>
+Add to Section 5.8.4.3: Optimization Options,<br>
+Add to Section 5.8.4.4: Options to Request or Suppress Warnings, and<br>
+Add to Section 5.8.4.5: Options Controlling the OpenCL C Version:</p>
+</div>
+<div class="paragraph">
+<p>"These options are ignored for programs created with IL."</p>
+</div>
+<div class="paragraph">
+<p>Change one entry and add one new entry to <strong>Table 5.17</strong> <em>clGetProgramInfo parameter queries</em>:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 33.3333%;">
+<col style="width: 33.3334%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_program_info</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Info returned in <em>param_value</em></strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_PROGRAM_SOURCE</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">char[]</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return the program source code specified by <strong>clCreateProgramWithSource</strong>. The source string returned is a concatenation of all source strings
+specified to <strong>clCreateProgramWithSource</strong> with a null terminator. The concatenation strips any nulls in the original source strings.<br>
+<br>
+If program is created using <strong>clCreateProgramWithBinary,</strong> <strong>clCreateProgramWithBuiltinKernels,</strong>, or <strong>clCreateProgramWithILKHR</strong> a null string or the appropriate program source code is returned depending on whether or not the program source code is stored in the binary.<br>
+<br>
+The actual number of characters that represents the program source code including the null terminator is returned in <em>param_value_size_ret</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_PROGRAM_IL_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">unsigned char[]</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the program IL for programs created with <strong>clCreateProgramWithILKHR</strong>.<br>
+<br>
+If program is created with <strong>clCreateProgramWithSource</strong>, <strong>clCreateProgramWithBinary</strong>, or <strong>clCreateProgramWithBuiltinKernels</strong>, the memory pointed to by <em>param_value</em> will be unchanged and <em>param_value_size_ret</em> will be set to zero.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_create_command_queue">26. Creating Command Queues with Properties</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_overview">26.1. Overview</h3>
+<div class="paragraph">
+<p>The section describes the <strong>cl_khr_create_command_queue</strong> extension.</p>
+</div>
+<div class="paragraph">
+<p>This extension allows OpenCL 1.x devices to support an equivalent of the
+<strong>clCreateCommandQueueWithProperties</strong> API that was added in OpenCL 2.0.
+This allows OpenCL 1.x devices to support other optional extensions or
+features that use the <strong>clCreateCommandQueueWithProperties</strong> API to specify
+additional command queue properties that cannot be specified using the
+OpenCL 1.x <strong>clCreateCommandQueue</strong> API.</p>
+</div>
+<div class="paragraph">
+<p>No new command queue properties are required by this extension.
+Applications may use the existing CL_DEVICE_QUEUE_PROPERTIES query to
+determine command queue properties that are supported by the device.</p>
+</div>
+<div class="paragraph">
+<p>OpenCL 2.x devices may support this extension for compatibility.  In
+this scenario, the function added by this extension will have the same
+capabilities as the core <strong>clCreateCommandQueueWithProperties</strong> API.
+Applications that only target OpenCL 2.x devices should use the core
+OpenCL 2.x <strong>clCreateCommandQueueWithProperties</strong> API instead of this
+extension API.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_new_api_functions">26.2. New API Functions</h3>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_command_queue clCreateCommandQueueWithPropertiesKHR(
+    cl_context context,
+    cl_device_id device,
+    <span class="directive">const</span> cl_queue_properties_khr *properties,
+    cl_int *errcode_ret)</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_new_api_types">26.3. New API Types</h3>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c"><span class="keyword">typedef</span> cl_bitfield cl_queue_properties_khr;</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_modifications_to_the_opencl_1_2_specification">26.4. Modifications to the OpenCL 1.2 Specification</h3>
+<div class="dlist">
+<dl>
+<dt class="hdlist1">(Add to Table 5.2 for CL_QUEUE_PROPERTIES in Section 5.1) </dt>
+<dd>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p><strong>Table 5.2</strong> <em>List of supported param_names by clGetCommandQueueInfo</em></p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 16.6666%;">
+<col style="width: 50.0001%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_command_queue_info</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Return Type</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Information returned in param_value</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_QUEUE_PROPERTIES</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">cl_command_queue_properties</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the currently specified properties for the command-queue.
+These properties are specified by the <em>properties</em> argument in
+<strong>clCreateCommandQueue</strong>, or by the CL_QUEUE_PROPERTIES property value in
+<strong>clCreateCommandQueueWithPropertiesKHR</strong>.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</dd>
+<dt class="hdlist1">(Add a new Section 5.1.1, <strong>Creating Command Queues With Properties</strong>) </dt>
+<dd>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>The function</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_command_queue clCreateCommandQueueWithPropertiesKHR(
+    cl_context context,
+    cl_device_id device,
+    <span class="directive">const</span> cl_queue_properties_khr *properties,
+    cl_int *errcode_ret)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>allows creation of a command-queue from an array of properties
+for the specified device.</p>
+</div>
+<div class="paragraph">
+<p><em>context</em> must be a valid OpenCL context.</p>
+</div>
+<div class="paragraph">
+<p><em>device</em> must be a device or sub-device associated with <em>context</em>. It
+can either be in the list of devices and sub-devices specified when
+<em>context</em> is created using <strong>clCreateContext</strong> or
+be a root device with the same device type as specified when <em>context</em>
+is created using <strong>clCreateContextFromType</strong>.</p>
+</div>
+<div class="paragraph">
+<p><em>properties</em> specifies a list of properties for the command-queue and
+their corresponding values. Each property name is immediately followed
+by the corresponding desired value. The list is terminated with 0. The
+list of supported properties is described in the table below. If a
+supported property and its value is not specified in <em>properties</em>, its
+default value will be used. <em>properties</em> can be NULL in which case the
+default values for supported command-queue properties will be used.</p>
+</div>
+<div class="paragraph">
+<p><strong>Table X.Y</strong> <em>List of supported cl_queue_properties_khr values and description</em></p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 16.6666%;">
+<col style="width: 50.0001%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Queue Properties</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Property Value</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_QUEUE_PROPERTIES</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">cl_bitfield</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">This is a bitfield and can be set to a combination of the following
+values:<br>
+<br>
+CL_QUEUE_OUT_OF_ORDER_ EXEC_MODE_ENABLE - Determines whether the
+commands queued in the command-queue are executed in-order or out-of-order. If
+set, the commands in the command-queue are executed out-of-order. Otherwise,
+commands are executed in-order.<br>
+<br>
+CL_QUEUE_PROFILING_ENABLE - Enable or disable profiling of commands in
+the command-queue. If set, the profiling of commands is enabled. Otherwise,
+profiling of commands is disabled.<br>
+<br>
+If CL_QUEUE_PROPERTIES is not specified an in-order command queue that
+does not support profiling of commands is created for the specified device.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p><em>errcode_ret</em> will return an appropriate error code. If <em>errcode_ret</em>
+is NULL, no error code is returned.</p>
+</div>
+<div class="paragraph">
+<p><strong>clCreateCommandQueueWithPropertiesKHR</strong> returns a valid non-zero
+command-queue and <em>errcode_ret</em> is set to CL_SUCCESS if the
+command-queue is created successfully. Otherwise, it returns a NULL
+value with one of the following error values returned in <em>errcode_ret</em>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
+</li>
+<li>
+<p>CL_INVALID_DEVICE if <em>device</em> is not a valid device or is not associated
+with <em>context</em>.</p>
+</li>
+<li>
+<p>CL_INVALID_VALUE if values specified in <em>properties</em> are not valid.</p>
+</li>
+<li>
+<p>CL_INVALID_QUEUE_PROPERTIES if values specified in <em>properties</em> are
+valid but are not supported by the device.</p>
+</li>
+<li>
+<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required
+by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_device_enqueue_local_arg_types">27. Device Enqueue Local Argument Types</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This extension allows arguments to blocks that are passed to the +enqueue_kernel* built-in
+function to be pointers to any type (built-in or user-defined) in local memory, instead of
+requiring arguments to blocks to be pointers to void in local memory.</p>
+</div>
+<div class="paragraph">
+<p>The name of this extension is <strong>cl_khr_device_enqueue_local_arg_types</strong>.</p>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_device_enqueue_local_arg_types-additions-to-chapter-6-of-the-opencl-2.0-specification">27.1. Additions to Chapter 6 of the OpenCL 2.0 C Specification</h3>
+<div class="paragraph">
+<p>Modify the second paragraph of Section 6.13.17: Enqueuing Kernels:</p>
+</div>
+<div class="paragraph">
+<p>"The following table describes the list of built-in functions that can be used to enqueue a
+kernel. We use the generic type name gentype to indicate the built-in OpenCL C scalar or
+vector integer or floating-point data types, or any user defined type built from these scalar and
+vector data types, which can be used as the type of the pointee of the arguments of the kernel
+enqueue functions listed in table 6.31."</p>
+</div>
+<div class="paragraph">
+<p>Then, replace all occurrences of local void * in table 6.31 with local gentype *.  For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c"><span class="predefined-type">int</span> enqueue_kernel(queue_t queue,
+                   kernel_enqueue_flags_t flags,
+                   <span class="directive">const</span> ndrange_t ndrange,
+                   <span class="directive">void</span> (^block)(local gentype *, ...),
+                   uint size0, ... )</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Additionally, replace all occurrences of local void* in table 6.33 with local gentype *.  For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">uint get_kernel_work_group_size(
+                    <span class="directive">void</span> (^block)(local gentype *, ...))</code></pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_subgroups">28. Subgroups</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This section describes the <strong>cl_khr_subgroups</strong> extension.</p>
+</div>
+<div class="paragraph">
+<p>This extension adds support for implementation-controlled groups of work
+items, known as subgroups.
+Subgroups behave similarly to work groups and have their own sets of
+builtins and synchronization primitives, but subgroups within a work group
+are independent, may make forward progress with respect to each other, and
+may map to optimized hardware structures where that makes sense.</p>
+</div>
+<div class="paragraph">
+<p>Subgroups became a core feature in OpenCL 2.1.</p>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_subgroups-additions-to-chapter-5-of-the-opencl-2.0-specification">28.1. Additions to Chapter 5 of the OpenCL 2.0 Specification</h3>
+<div class="paragraph">
+<p>The function</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetKernelSubGroupInfoKHR(cl_kernel kernel,
+                                  cl_device_id device,
+                                  cl_kernel_sub_group_info param_name,
+                                  size_t input_value_size,
+                                  <span class="directive">const</span> <span class="directive">void</span> *input_value,
+                                  size_t param_value_size,
+                                  <span class="directive">void</span> *param_value,
+                                  size_t *param_value_size_ret)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>returns information about the kernel object.</p>
+</div>
+<div class="paragraph">
+<p><em>kernel</em> specifies the kernel object being queried.</p>
+</div>
+<div class="paragraph">
+<p><em>device</em> identifies a specific device in the list of devices associated with
+<em>kernel</em>.
+The list of devices is the list of devices in the OpenCL context that is
+associated with <em>kernel</em>.
+If the list of devices associated with <em>kernel</em> is a single device, <em>device</em>
+can be a <code>NULL</code> value.</p>
+</div>
+<div class="paragraph">
+<p><em>param_name</em> specifies the information to query.
+The list of supported <em>param_name</em> types and the information returned in
+<em>param_value</em> by <strong>clGetKernelSubGroupInfoKHR</strong> is described in the
+<a href="#cl_khr_subgroups-kernel-subgroup-info-table">Kernel Object Subgroup Queries</a> table.</p>
+</div>
+<div class="paragraph">
+<p><em>input_value_size</em> is used to specify the size in bytes of memory pointed to
+by <em>input_value</em>.
+This size must be == size of input type as described in the table below.</p>
+</div>
+<div class="paragraph">
+<p><em>input_value</em> is a pointer to memory where the appropriate parameterization
+of the query is passed from.
+If <em>input_value</em> is <code>NULL</code>, it is ignored.</p>
+</div>
+<div class="paragraph">
+<p><em>param_value</em> is a pointer to memory where the appropriate result being
+queried is returned.
+If <em>param_value</em> is <code>NULL</code>, it is ignored.</p>
+</div>
+<div class="paragraph">
+<p><em>param_value_size</em> is used to specify the size in bytes of memory pointed to
+by <em>param_value</em>.
+This size must be ≥ size of return type as described in the
+<a href="#kernel-subgroup-info-table">Kernel Object Subgroup Queries</a> table.</p>
+</div>
+<div class="paragraph">
+<p><em>param_value_size_ret</em> returns the actual size in bytes of data being
+queried by <em>param_name</em>.
+If <em>param_value_size_ret</em> is <code>NULL</code>, it is ignored.</p>
+</div>
+<table id="cl_khr_subgroups-kernel-subgroup-info-table" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 41. <strong>clGetKernelSubGroupInfoKHR</strong> parameter queries</caption>
+<colgroup>
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 25%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_kernel_sub_group_info</strong></th>
+<th class="tableblock halign-left valign-top">Input Type</th>
+<th class="tableblock halign-left valign-top">Return Type</th>
+<th class="tableblock halign-left valign-top">Info. returned in <em>param_value</em></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">size_t *</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">size_t</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the maximum sub-group size for this kernel.
+            All sub-groups must be the same size, while the last subgroup in
+            any work-group (i.e. the subgroup with the maximum index) could
+            be the same or smaller size.</p>
+<p class="tableblock">            The <em>input_value</em> must be an array of size_t values
+            corresponding to the local work size parameter of the intended
+            dispatch.
+            The number of dimensions in the ND-range will be inferred from
+            the value specified for <em>input_value_size</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">size_t *</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">size_t</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the number of sub-groups that will be present in each
+            work-group for a given local work size.
+            All workgroups, apart from the last work-group in each dimension
+            in the presence of non-uniform work-group sizes, will have the
+            same number of sub-groups.</p>
+<p class="tableblock">            The <em>input_value</em> must be an array of size_t values
+            corresponding to the local work size parameter of the intended
+            dispatch.
+            The number of dimensions in the ND-range will be inferred from
+            the value specified for <em>input_value_size</em>.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p><strong>clGetKernelSubGroupInfoKHR</strong> returns CL_SUCCESS if the function is executed
+successfully.
+Otherwise, it returns one of the following errors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_INVALID_DEVICE if <em>device</em> is not in the list of devices associated
+with <em>kernel</em> or if <em>device</em> is <code>NULL</code> but there is more than one device
+associated with <em>kernel</em>.</p>
+</li>
+<li>
+<p>CL_INVALID_VALUE if <em>param_name</em> is not valid, or if size in bytes
+specified by <em>param_value_size</em> is &lt; size of return type as described in
+the <a href="#kernel-subgroup-info-table">Kernel Object Subgroup Queries</a> table
+and <em>param_value</em> is not <code>NULL</code>.</p>
+</li>
+<li>
+<p>CL_INVALID_VALUE if <em>param_name</em> is
+CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE and the size in bytes specified by
+<em>input_value_size</em> is not valid or if <em>input_value</em> is <code>NULL</code>.</p>
+</li>
+<li>
+<p>CL_INVALID_KERNEL if <em>kernel</em> is a not a valid kernel object.</p>
+</li>
+<li>
+<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_subgroups-additions-to-chapter-6-of-the-opencl-2.0-specification">28.2. Additions to Chapter 6 of the OpenCL 2.0 C Specification</h3>
+<div class="sect3">
+<h4 id="cl_khr_subgroups-additions-to-section-6.13.1-work-item-functions">28.2.1. Additions to section 6.13.1&#8201;&#8212;&#8201;Work Item Functions</h4>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
+<p>uint <strong>get_sub_group_size</strong> ()</p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the number of work items in the subgroup.
+  This value is no more than the maximum subgroup size and is
+  implementation-defined based on a combination of the compiled kernel and
+  the dispatch dimensions.
+  This will be a constant value for the lifetime of the subgroup.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
+<p>uint <strong>get_max_sub_group_size</strong> ()</p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the maximum size of a subgroup within the dispatch.
+  This value will be invariant for a given set of dispatch dimensions and a
+  kernel object compiled for a given device.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
+<p>uint <strong>get_num_sub_groups</strong> ()</p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the number of subgroups that the current work group is divided
+  into.</p>
+<p class="tableblock">  This number will be constant for the duration of a work group&#8217;s execution.
+  If the kernel is executed with a non-uniform work group size
+  (i.e. the global_work_size values specified to <strong>clEnqueueNDRangeKernel</strong>
+  are not evenly divisible by the local_work_size values for any dimension,
+  calls to this built-in from some work groups may return different values
+  than calls to this built-in from other work groups.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
+<p>uint <strong>get_enqueued_num_sub_groups</strong> ()</p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the same value as that returned by <strong>get_num_sub_groups</strong> if the
+  kernel is executed with a uniform work group size.</p>
+<p class="tableblock">  If the kernel is executed with a non-uniform work group size, returns the
+  number of subgroups in each of the work groups that make up the uniform
+  region of the global range.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
+<p>uint <strong>get_sub_group_id</strong> ()</p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>get_sub_group_id</strong> returns the subgroup ID which is a number from 0 ..
+  <strong>get_num_sub_groups</strong>() - 1.</p>
+<p class="tableblock">  For <strong>clEnqueueTask</strong>, this returns 0.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
+<p>uint <strong>get_sub_group_local_id</strong> ()</p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the unique work item ID within the current subgroup.
+  The mapping from <strong>get_local_id</strong>(<em>dimindx</em>) to <strong>get_sub_group_local_id</strong>
+  will be invariant for the lifetime of the work group.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_subgroups-additions-to-section-6.13.8-synchronization-functions">28.2.2. Additions to section 6.13.8&#8201;&#8212;&#8201;Synchronization Functions</h4>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 30%;">
+<col style="width: 70%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>sub_group_barrier</strong> (<br>
+  cl_mem_fence_flags <em>flags</em>)</p>
+<p class="tableblock">  void <strong>sub_group_barrier</strong> (<br>
+  cl_mem_fence_flags <em>flags</em>, memory_scope <em>scope</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">All work items in a subgroup executing the kernel on a processor must
+  execute this function before any are allowed to continue execution beyond
+  the subgroup barrier.
+  This function must be encountered by all work items in a subgroup
+  executing the kernel.
+  These rules apply to ND-ranges implemented with uniform and non-uniform
+  work groups.</p>
+<p class="tableblock">  If <strong>subgroup_barrier</strong> is inside a conditional statement, then all work
+  items within the subgroup must enter the conditional if any work item in
+  the subgroup enters the conditional statement and executes the
+  subgroup_barrier.</p>
+<p class="tableblock">  If <strong>subgroup_barrier</strong> is inside a loop, all work items within the subgroup
+  must execute the subgroup_barrier for each iteration of the loop before
+  any are allowed to continue execution beyond the subgroup_barrier.</p>
+<p class="tableblock">  The <strong>subgroup_barrier</strong> function also queues a memory fence (reads and
+  writes) to ensure correct ordering of memory operations to local or global
+  memory.</p>
+<p class="tableblock">  The flags argument specifies the memory address space and can be set to a
+  combination of the following values:</p>
+<p class="tableblock">  CLK_LOCAL_MEM_FENCE - The <strong>subgroup_barrier</strong> function will either flush
+  any variables stored in local memory or queue a memory fence to ensure
+  correct ordering of memory operations to local memory.</p>
+<p class="tableblock">  CLK_GLOBAL_MEM_FENCE&#8201;&#8212;&#8201;The <strong>subgroup_barrier</strong> function will queue a
+  memory fence to ensure correct ordering of memory operations to global
+  memory.
+  This can be useful when work items, for example, write to buffer objects
+  and then want to read the updated data from these buffer objects.</p>
+<p class="tableblock">  CLK_IMAGE_MEM_FENCE&#8201;&#8212;&#8201;The <strong>subgroup_barrier</strong> function will queue a memory
+  fence to ensure correct ordering of memory operations to image objects.
+  This can be useful when work items, for example, write to image objects
+  and then want to read the updated data from these image objects.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_subgroups-additions-to-section-6.13.11-atomic-functions">28.2.3. Additions to section 6.13.11&#8201;&#8212;&#8201;Atomic Functions</h4>
+<div class="paragraph">
+<p>Add the following new value to the enumerated type <code>memory_scope</code> defined in
+<em>section 6.13.11.4</em>.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>memory_scope_sub_group</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>memory_scope_sub_group</code> specifies that the memory ordering constraints
+given by <code>memory_order</code> apply to work items in a subgroup.
+This memory scope can be used when performing atomic operations to global or
+local memory.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_subgroups-additions-to-section-6.13.15-work-group-functions">28.2.4. Additions to section 6.13.15&#8201;&#8212;&#8201;Work Group Functions</h4>
+<div class="paragraph">
+<p>The OpenCL C programming language implements the following built-in
+functions that operate on a subgroup level.
+These built-in functions must be encountered by all work items in a subgroup
+executing the kernel.
+We use the generic type name <code>gentype</code> to indicate the built-in data types
+<code>half</code> (only if the <strong>cl_khr_fp16</strong> extension is supported), <code>int</code>,
+<code>uint</code>, <code>long</code>, <code>ulong</code>, <code>float</code> or <code>double</code> (only if double
+precision is supported) as the type for the arguments.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>sub_group_all</strong> (int <em>predicate</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Evaluates <em>predicate</em> for all work items in the subgroup and returns a
+  non-zero value if <em>predicate</em> evaluates to non-zero for all work items in
+  the subgroup.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int <strong>sub_group_any</strong> (int <em>predicate</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Evaluates <em>predicate</em> for all work items in the subgroup and returns a
+  non-zero value if <em>predicate</em> evaluates to non-zero for any work items in
+  the subgroup.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sub_group_broadcast</strong> (<br>
+  gentype <em>x</em>, uint <em>sub_group_local_id</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Broadcast the value of <em>x</em> for work item identified by
+  <em>sub_group_local_id</em> (value returned by <strong>get_sub_group_local_id</strong>) to all
+  work items in the subgroup.</p>
+<p class="tableblock">  <em>sub_group_local_id</em> must be the same value for all work items in the
+  subgroup.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sub_group_reduce_&lt;op&gt;</strong> (<br>
+  gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return result of reduction operation specified by <strong>&lt;op&gt;</strong> for all values of
+  <em>x</em> specified by work items in a subgroup.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sub_group_scan_exclusive_&lt;op&gt;</strong> (<br>
+  gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Do an exclusive scan operation specified by <strong>&lt;op&gt;</strong> of all values specified
+  by work items in a subgroup.
+  The scan results are returned for each work item.</p>
+<p class="tableblock">  The scan order is defined by increasing subgroup local ID within the
+  subgroup.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">gentype <strong>sub_group_scan_inclusive_&lt;op&gt;</strong> (<br>
+  gentype <em>x</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Do an inclusive scan operation specified by <strong>&lt;op&gt;</strong> of all values specified
+  by work items in a subgroup.
+  The scan results are returned for each work item.</p>
+<p class="tableblock">  The scan order is defined by increasing subgroup local ID within the
+  subgroup.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_subgroups-additions-to-section-6.13.16-pipe-functions">28.2.5. Additions to section 6.13.16&#8201;&#8212;&#8201;Pipe Functions</h4>
+<div class="paragraph">
+<p>The OpenCL C programming language implements the following built-in pipe
+functions that operate at a subgroup level.
+These built-in functions must be encountered by all work items in a subgroup
+executing the kernel with the same argument values; otherwise the behavior
+is undefined.
+We use the generic type name <code>gentype</code> to indicate the built-in OpenCL C
+scalar or vector integer or floating-point data types or any user defined
+type built from these scalar and vector data types can be used as the type
+for the arguments to the pipe functions listed in <em>table 6.29</em>.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">reserve_id_t <strong>sub_group_reserve_read_pipe</strong> (<br>
+  read_only pipe gentype <em>pipe</em>,<br>
+  uint <em>num_packets</em>)</p>
+<p class="tableblock">  reserve_id_t <strong>sub_group_reserve_write_pipe</strong> (<br>
+  write_only pipe gentype <em>pipe</em>,<br>
+  uint <em>num_packets</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Reserve <em>num_packets</em> entries for reading from or writing to <em>pipe</em>.
+  Returns a valid non-zero reservation ID if the reservation is successful
+  and 0 otherwise.</p>
+<p class="tableblock">  The reserved pipe entries are referred to by indices that go from 0 &#8230;&#8203;
+  <em>num_packets</em> - 1.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>sub_group_commit_read_pipe</strong> (<br>
+  read_only pipe gentype <em>pipe</em>,<br>
+  reserve_id_t <em>reserve_id</em>)</p>
+<p class="tableblock">  void <strong>sub_group_commit_write_pipe</strong> (<br>
+  write_only pipe gentype <em>pipe</em>,<br>
+  reserve_id_t <em>reserve_id</em>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Indicates that all reads and writes to <em>num_packets</em> associated with
+  reservation <em>reserve_id</em> are completed.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Note: Reservations made by a subgroup are ordered in the pipe as they are
+ordered in the program.
+Reservations made by different subgroups that belong to the same work group
+can be ordered using subgroup synchronization.
+The order of subgroup based reservations that belong to different work
+groups is implementation defined.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_subgroups-additions-to-section-6.13.17.6-enqueuing-kernels-kernel-query-functions">28.2.6. Additions to section 6.13.17.6&#8201;&#8212;&#8201;Enqueuing Kernels (Kernel Query Functions)</h4>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 55.5555%;">
+<col style="width: 44.4445%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Built-in Function</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">uint <strong>get_kernel_sub_group_count_for_ndrange</strong> (<br>
+  const ndrange_t <em>ndrange</em>,<br>
+  void (^block)(void));</p>
+<p class="tableblock">  uint <strong>get_kernel_sub_group_count_for_ndrange</strong> (<br>
+  const ndrange_t <em>ndrange</em>,<br>
+  void (^block)(local void *, &#8230;&#8203;));</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the number of subgroups in each work group of the dispatch (except
+  for the last in cases where the global size does not divide cleanly into
+  work groups) given the combination of the passed ndrange and block.</p>
+<p class="tableblock">  <em>block</em> specifies the block to be enqueued.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">uint <strong>get_kernel_max_sub_group_size_for_ndrange</strong> (<br>
+  const ndrange_t <em>ndrange</em>,<br>
+  void (^block)(void));<br></p>
+<p class="tableblock">  uint <strong>get_kernel_max_sub_group_size_for_ndrange</strong> (<br>
+  const ndrange_t <em>ndrange</em>,<br>
+  void (^block)(local void *, &#8230;&#8203;));</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the maximum subgroup size for a block.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_mipmap_image">29. Mipmaps</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This section describes OpenCL support for mipmaps.</p>
+</div>
+<div class="paragraph">
+<p>There are two optional mipmap extensions.
+The <strong>cl_khr_mipmap_image</strong> extension adds the ability to create a mip-mapped
+image, enqueue commands to read/write/copy/map/unmap a region of a mipmapped
+image, and built-in functions that can be used to read a mip-mapped image in
+an OpenCL C program.
+The <strong>cl_khr_mipmap_image_writes</strong> extension adds built-in functions that can
+be used to write a mip-mapped image in an OpenCL C program.
+If the <strong>cl_khr_mipmap_image_writes</strong> extension is supported by the OpenCL
+device, the <strong>cl_khr_mipmap_image</strong> extension must also be supported.</p>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_mipmap_image-additions-to-chapter-5">29.1. Additions to Chapter 5 of the OpenCL 2.2 Specification</h3>
+<div class="sect3">
+<h4 id="cl_khr_mipmap_image-additions-to-section-5.3">29.1.1. Additions to section 5.3&#8201;&#8212;&#8201;Image Objects</h4>
+<div class="paragraph">
+<p>A mip-mapped 1D image, 1D image array, 2D image, 2D image array or 3D image
+is created by specifying <em>num_mip_levels</em> to be a value greater than one in
+the <em>cl_image_desc</em> passed to <strong>clCreateImage</strong>.
+The dimensions of a mip-mapped image can be a power of two or a non-power of
+two.
+Each successively smaller mipmap level is half the size of the previous
+level.
+If this half value is a fractional value, it is rounded down to the nearest
+integer.</p>
+</div>
+<div class="paragraph">
+<p><strong>Restrictions</strong></p>
+</div>
+<div class="paragraph">
+<p>The following restrictions apply when mip-mapped images are created with
+<strong>clCreateImage</strong>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CL_MEM_USE_HOST_PTR or CL_MEM_COPY_HOST_PTR cannot be specified if a
+mip-mapped image is created.</p>
+</li>
+<li>
+<p>The <em>host_ptr</em> argument to <strong>clCreateImage</strong> must be a <code>NULL</code> value.</p>
+</li>
+<li>
+<p>Mip-mapped images cannot be created for CL_MEM_OBJECT_IMAGE1D_BUFFER
+images, depth images or multi-sampled (i.e. msaa) images.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Calls to <strong>clEnqueueReadImage</strong>, <strong>clEnqueueWriteImage</strong> and <strong>clEnqueueMapImage</strong>
+can be used to read from or write to a specific mip-level of a mip-mapped
+image.
+If image argument is a 1D image, <em>origin</em>[1] specifies the mip-level to use.
+If image argument is a 1D image array, <em>origin</em>[2] specifies the mip-level
+to use.
+If image argument is a 2D image, <em>origin</em>[2] specifies the mip-level to use.
+If image argument is a 2D image array or a 3D image, <em>origin</em>[3] specifies
+the mip-level to use.</p>
+</div>
+<div class="paragraph">
+<p>Calls to <strong>clEnqueueCopyImage</strong>, <strong>clEnqueueCopyImageToBuffer</strong> and
+<strong>clEnqueueCopyBufferToImage</strong> can also be used to copy from and to a specific
+mip-level of a mip-mapped image.
+If <em>src_image</em> argument is a 1D image, <em>src_origin</em>[1] specifies the
+mip-level to use.
+If <em>src_image</em> argument is a 1D image array, <em>src_origin</em>[2] specifies the
+mip-level to use.
+If <em>src_image</em> argument is a 2D image, <em>src_origin</em>[2] specifies the
+mip-level to use.
+If <em>src_image</em> argument is a 2D image array or a 3D image, <em>src_origin</em>[3]
+specifies the mip-level to use.
+If <em>dst_image</em> argument is a 1D image, <em>dst_origin</em>[1] specifies the
+mip-level to use.
+If <em>dst_image</em> argument is a 1D image array, <em>dst_origin</em>[2] specifies the
+mip-level to use.
+If <em>dst_image</em> argument is a 2D image, <em>dst_origin</em>[2] specifies the
+mip-level to use.
+If <em>dst_image</em> argument is a 2D image array or a 3D image, <em>dst_origin</em>[3]
+specifies the mip-level to use.</p>
+</div>
+<div class="paragraph">
+<p>If the mip level specified is not a valid value, these functions return the
+error CL_INVALID_MIP_LEVEL.</p>
+</div>
+<div class="paragraph">
+<p>Calls to clEnqueueFillImage can be used to write to a specific mip-level of
+a mip-mapped image.
+If image argument is a 1D image, origin[1] specifies the mip-level to use.
+If image argument is a 1D image array, origin[2] specifies the mip-level to
+use.
+If image argument is a 2D image, origin[2] specifies the mip-level to use.
+If image argument is a 2D image array or a 3D image, origin[3] specifies the
+mip-level to use.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="cl_khr_mipmap_image-additions-to-section-5.7">29.1.2. Additions to section 5.7&#8201;&#8212;&#8201;Sampler Objects</h4>
+<div class="paragraph">
+<p>Add the following sampler properties <em>to table 5.14</em> that can be specified
+when a sampler object is created using <strong>clCreateSamplerWithProperties</strong>.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 16.6666%;">
+<col style="width: 33.3334%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_sampler_properties enum</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Property Value</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Default Value</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_SAMPLER_MIP_FILTER_MODE_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">cl_filter_mode</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CL_FILTER_NEAREST</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_SAMPLER_LOD_MIN_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">cl_float</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">0.0f</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_SAMPLER_LOD_MAX_KHR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">cl_float</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">MAXFLOAT</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Note: The sampler properties CL_SAMPLER_MIP_FILTER_MODE_KHR,
+CL_SAMPLER_LOD_MIN_KHR and CL_SAMPLER_LOD_MAX_KHR cannot be specified with
+any samplers initialized in the OpenCL program source.
+Only the default values for these properties will be used.
+To create a sampler with specific values for these properties, a sampler
+object must be created with <strong>clCreateSamplerWithProperties</strong> and passed as an
+argument to a kernel.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="cl_khr_mipmap_image-additions-to-creating-opencl-memory-objects-from-opengl-objects">29.2. Additions to <a href="#cl_khr_gl_sharing__memobjs">Creating OpenCL Memory Objects from OpenGL Objects</a></h3>
+<div class="paragraph">
+<p>If both the <strong><code>cl_khr_mipmap_image</code></strong> and <strong><code>cl_khr_gl_sharing</code></strong> extensions are
+supported by the OpenCL device, the <strong><code>cl_khr_gl_sharing</code></strong> extension may also
+be used to create a mipmapped OpenCL image from a mipmapped OpenGL texture.</p>
+</div>
+<div class="paragraph">
+<p>To create a mipmapped OpenCL image from a mipmapped OpenGL texture, pass a
+negative value as the <em>miplevel</em> argument to <strong>clCreateFromGLTexture</strong>.
+If <em>miplevel</em> is a negative value then an OpenCL mipmapped image object is
+created from a mipmapped OpenGL texture object, instead of an OpenCL image
+object for a specific miplevel of the OpenGL texture.</p>
+</div>
+<div class="paragraph">
+<p>Note: For a detailed description of how the level of detail is computed,
+please refer to <em>section 3.9.7</em> of the OpenGL 3.0 specification.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_srgb_image_writes">30. sRGB Image Writes</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This section describes the <strong>cl_khr_srgb_image_writes</strong> extension.</p>
+</div>
+<div class="paragraph">
+<p>This extension enables kernels to write to sRGB images using the <strong>write_imagef</strong> built-in function.
+The sRGB image formats that may be written to will be returned by <strong>clGetSupportedImageFormats</strong> when <code>CL_MEM_WRITE_ONLY</code> is specified in the <em>flags</em> argument.</p>
+</div>
+<div class="paragraph">
+<p>When the image is an sRGB image, the <strong>write_imagef</strong> built-in function will perform the linear to sRGB conversion.
+Only the R, G, and B components are converted from linear to sRGB; the A component is written as-is.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="cl_khr_priority_hints">31. Priority Hints</h2>
 <div class="sectionbody">
 <div class="paragraph">
 <p>This section describes the <strong>cl_khr_priority_hints</strong> extension.
@@ -11636,7 +14977,7 @@
 guarantees.</p>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_priority_hints-host-side-api-modifications">19.1. Host-side API modifications</h3>
+<h3 id="cl_khr_priority_hints-host-side-api-modifications">31.1. Host-side API modifications</h3>
 <div class="paragraph">
 <p>The function <strong><code>clCreateCommandQueueWithProperties</code></strong> (Section 5.1) is
 extended to support a priority value as part of the <em>properties</em> argument.</p>
@@ -11678,12 +15019,11 @@
 </li>
 </ul>
 </div>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="cl_khr_throttle_hints">20. Throttle Hints</h2>
+<h2 id="cl_khr_throttle_hints">32. Throttle Hints</h2>
 <div class="sectionbody">
 <div class="paragraph">
 <p>This section describes the <strong>cl_khr_throttle_hints</strong> extension.
@@ -11700,7 +15040,7 @@
 (<code>CL_QUEUE_THROTTLE_LOW</code>).</p>
 </div>
 <div class="sect2">
-<h3 id="cl_khr_throttle_hints-host-side-api-modifications">20.1. Host-side API modifications</h3>
+<h3 id="cl_khr_throttle_hints-host-side-api-modifications">32.1. Host-side API modifications</h3>
 <div class="paragraph">
 <p>The function <strong><code>clCreateCommandQueueWithProperties</code></strong> (Section 5.1) is
 extended to support a new <code>CL_QUEUE_THROTTLE_KHR</code> value as part of the
@@ -11739,12 +15079,11 @@
 </li>
 </ul>
 </div>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="cl_khr_subgroup_named_barrier">21. Named Barriers for Subgroups</h2>
+<h2 id="cl_khr_subgroup_named_barrier">33. Named Barriers for Subgroups</h2>
 <div class="sectionbody">
 <div class="paragraph">
 <p>This section describes the <strong>cl_khr_subgroup_named_barrier</strong> extension.
@@ -11759,7 +15098,7 @@
 <div class="paragraph">
 <p>Add to <em>table 4.3</em>:</p>
 </div>
-<table class="tableblock frame-all grid-all spread">
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 33.3333%;">
 <col style="width: 16.6666%;">
@@ -11782,33 +15121,310 @@
 </tr>
 </tbody>
 </table>
-<div style="page-break-after: always;"></div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="_summary_of_changes_from_opencl_2_1">Appendix A: Summary of Changes from OpenCL 2.1</h2>
+<h2 id="spirv_extensions">34. Extensions to the OpenCL SPIR-V Environment</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>The following features are added to OpenCL 2.2:</p>
+<p>An OpenCL SPIR-V environment may be modified by OpenCL extensions.
+Please refer to the OpenCL SPIR-V Environment Specification for descriptions how OpenCL extensions modify an OpenCL SPIR-V environment.
+In addition to the extensions described in this document, the OpenCL SPIR-V Environment Specification also describes how the following OpenCL extensions modify an OpenCL SPIR-V environment:</p>
 </div>
 <div class="ulist">
 <ul>
 <li>
-<p>The OpenCL 2.2 KHR extension <strong>cl_khr_subgroup_named_barrier</strong> has been
-added.</p>
+<p><code>cl_khr_spirv_no_integer_wrap_decoration</code></p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_extensions_promoted_to_core_features">Appendix A: Extensions Promoted to Core Features</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_for_opencl_1_1">A.1. For OpenCL 1.1:</h3>
+<div class="ulist">
+<ul>
+<li>
+<p>The functionality previously described by <strong>cl_khr_byte_addressable_store</strong> is now part of the core feature set.</p>
+</li>
+<li>
+<p>The functionality previously described by <strong>cl_khr_global_int32_base_atomics</strong>, <strong>cl_khr_global_int32_extended_atomics</strong>, <strong>cl_khr_local_int32_base_atomics</strong>, and <strong>cl_khr_local_int32_extended_atomics</strong> is now part of the core feature set.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_for_opencl_1_2">A.2. For OpenCL 1.2:</h3>
+<div class="ulist">
+<ul>
+<li>
+<p>The functionality previously described by <strong>cl_khr_fp64</strong> is now an optional core feature.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_for_opencl_2_0">A.3. For OpenCL 2.0:</h3>
+<div class="ulist">
+<ul>
+<li>
+<p>The functionality described by <strong>cl_khr_3d_image_writes</strong> is part of the core feature set.</p>
+</li>
+<li>
+<p>The functionality described by <strong>cl_khr_create_command_queue</strong> is part of the core feature set.</p>
+</li>
+<li>
+<p>The functionality described by <strong>cl_khr_depth_images</strong> is now part of the core feature set.</p>
+</li>
+<li>
+<p>The functionality described by <strong>cl_khr_image2d_from_buffer</strong> is now part of the core feature set.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_for_opencl_2_1">A.4. For OpenCL 2.1:</h3>
+<div class="ulist">
+<ul>
+<li>
+<p>The functionality described by <strong>cl_khr_il_program</strong> is now part of the core feature set.</p>
+</li>
+<li>
+<p>The API functionality described by <strong>cl_khr_subgroups</strong> is now part of the core API feature set, but the built-in functions described by <strong>cl_khr_subgroups</strong> must still be accessed as an extension to the OpenCL 2.0 C Language specification.</p>
 </li>
 </ul>
 </div>
 </div>
 </div>
 </div>
+<div class="sect1">
+<h2 id="_deprecated_extensions">Appendix B: Deprecated Extensions</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_for_opencl_1_1_2">B.1. For OpenCL 1.1:</h3>
+<div class="ulist">
+<ul>
+<li>
+<p>The <strong>cl_khr_select_fprounding_mode</strong> extension has been deprecated.
+Its use is no longer recommended.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_quick_reference">Appendix C: Quick Reference</h2>
+<div class="sectionbody">
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 45.4545%;">
+<col style="width: 36.3636%;">
+<col style="width: 18.1819%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>Extension Name</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Brief Description</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Status</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_3d_image_writes">cl_khr_3d_image_writes</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Write to 3D images</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Core Feature in OpenCL 2.0</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_byte_addressable_store">cl_khr_byte_addressable_store</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Read and write from 8-bit and 16-bit pointers</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Core Feature in OpenCL 1.1</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_create_command_queue">cl_khr_create_command_queue</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">API to Create Command Queues with Properties</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Core Feature in OpenCL 2.0</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_d3d10_sharing">cl_khr_d3d10_sharing</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Share Direct3D 10 Buffers and Textures with OpenCL</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_d3d11_sharing">cl_khr_d3d11_sharing</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Share Direct3D 11 Buffers and Textures with OpenCL</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_depth_images">cl_khr_depth_images</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Single Channel Depth Images</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Core Feature in OpenCL 2.0</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_device_enqueue_local_arg_types">cl_khr_device_enqueue_local_arg_types</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Pass Non-Void Local Pointers to Child Kernels</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_dx9_media_sharing">cl_khr_dx9_media_sharing</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Share DirectX 9 Media Surfaces with OpenCL</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_egl_event">cl_khr_egl_event</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Share EGL Sync Objects with OpenCL</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_egl_image">cl_khr_egl_image</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Share EGL Images with OpenCL</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_fp16">cl_khr_fp16</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Operations on 16-bit Floating-Point Values</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_fp64">cl_khr_fp64</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Operations on 64-bit Floating-Point Values</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Optional Core Feature in OpenCL 1.2</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_gl_depth_images">cl_khr_gl_depth_images</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Share OpenGL Depth Images with OpenCL</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_gl_event">cl_khr_gl_event</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Share OpenGL Fence Sync Objects with OpenCL</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_gl_msaa_sharing">cl_khr_gl_msaa_sharing</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Share OpenGL MSAA Textures with OpenCL</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_gl_sharing">cl_khr_gl_sharing</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Sharing OpenGL Buffers and Textures with OpenCL</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_int32_atomics">cl_khr_global_int32_base_atomics</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Basic Atomic Operations on 32-bit Integers in Global Memory</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Core Feature in OpenCL 1.1</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_int32_atomics">cl_khr_global_int32_extended_atomics</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extended Atomic Operations on 32-bit Integers in Global Memory</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Core Feature in OpenCL 1.1</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_icd-opencl">cl_khr_icd</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Installable Client Drivers</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_il_program">cl_khr_il_program</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Support for Intermediate Language (IL) Programs (SPIR-V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Core Feature in OpenCL 2.1</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_image2d_from_buffer">cl_khr_image2d_from_buffer</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Create 2D Images from Buffers</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Core Feature in OpenCL 2.0</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_initialize_memory">cl_khr_initialize_memory</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Initialize Local and Private Memory on Allocation</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_int64_atomics">cl_khr_int64_base_atomics</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Basic Atomic Operations on 64-bit Integers in Global and Local Memory</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_int64_atomics">cl_khr_int64_extended_atomics</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extended Atomic Operations on 64-bit Integers in Global and Local Memory</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_int32_atomics">cl_khr_local_int32_base_atomics</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Basic Atomic Operations on 32-bit Integers in Local Memory</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_int32_atomics">cl_khr_local_int32_extended_atomics</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extended Atomic Operations on 32-bit Integers in Local Memory</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_mipmap_image">cl_khr_mipmap_image</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Create and Use Images with Mipmaps</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_mipmap_image">cl_khr_mipmap_image_writes</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Write to Images with Mipmaps</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_priority_hints">cl_khr_priority_hints</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Create Command Queues with Different Priorities</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_select_fprounding_mode">cl_khr_select_fprounding_mode</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Set the Current Kernel Rounding Mode</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">DEPRECATED</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_spir">cl_khr_spir</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Standard Portable Intermediate Representation Programs</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension, Superseded by IL Programs / SPIR-V</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_srgb_image_writes">cl_khr_srgb_image_writes</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Write to sRGB Images</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_subgroup_named_barrier">cl_khr_subgroup_named_barrier</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Barriers for Subsets of a Work Group</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_subgroups">cl_khr_subgroups</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Sub-Groupings of Work Items</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Core Feature in OpenCL 2.1</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_terminate_context">cl_khr_terminate_context</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Terminate an OpenCL Context</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#cl_khr_throttle_hints">cl_khr_throttle_hints</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Create Command Queues with Different Throttle Policies</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Extension</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
 <div id="footer">
 <div id="footer-text">
-Version 2.2-8<br>
-Last updated 2018-09-24 21:35:08 PDT
+Version v2.2-10<br>
+Last updated 2019-02-05 16:03:11 EST
 </div>
 </div>
 
-
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
 </body>
 </html>
\ No newline at end of file
diff --git a/specs/2.2/html/OpenCL_ICD_Installation.html b/specs/2.2/html/OpenCL_ICD_Installation.html
index e16989d..14ae55c 100644
--- a/specs/2.2/html/OpenCL_ICD_Installation.html
+++ b/specs/2.2/html/OpenCL_ICD_Installation.html
@@ -4,9 +4,9 @@
 <meta charset="UTF-8">
 <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta name="generator" content="Asciidoctor 1.5.5">
-<meta name="author" content="Khronos OpenCL Working Group">
-<title>OpenCL ICD Installation Guidelines</title>
+<meta name="generator" content="Asciidoctor 1.5.7">
+<meta name="author" content="Khronos&#174; OpenCL Working Group">
+<title>OpenCL&#8482; ICD Installation Guidelines</title>
 <style>
 /*! normalize.css v2.1.2 | MIT License | git.io/normalize */
 /* ========================================================================== HTML5 display definitions ========================================================================== */
@@ -724,7 +724,7 @@
 .literalblock pre, .listingblock pre { background: #eeeeee; }
 
 </style>
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
 <style>
 /* Stylesheet for CodeRay to match GitHub theme | MIT License | http://foundation.zurb.com */
 /*pre.CodeRay {background-color:#f7f7f8;}*/
@@ -838,12 +838,12 @@
 </script></head>
 <body class="book toc2 toc-left" style="max-width: 100;">
 <div id="header">
-<h1>OpenCL ICD Installation Guidelines</h1>
+<h1>OpenCL<sup>&#8482;</sup> ICD Installation Guidelines</h1>
 <div class="details">
-<span id="author" class="author">Khronos OpenCL Working Group</span><br>
-<span id="revnumber">version 2.2-8,</span>
-<span id="revdate">Mon, 08 Oct 2018 16:52:16 +0000</span>
-<br><span id="revremark">from git branch: master commit: b3cab22fcff5d8c17869907c983e259ddd7ce788</span>
+<span id="author" class="author">Khronos<sup>&#174;</sup> OpenCL Working Group</span><br>
+<span id="revnumber">version v2.2-10,</span>
+<span id="revdate">Tue, 05 Feb 2019 21:20:50 +0000</span>
+<br><span id="revremark">from git branch:  commit: 00422daf5dc013f21ab633479577c7cc225150e2</span>
 </div>
 <div id="toc" class="toc2">
 <div id="toctitle">Table of Contents</div>
@@ -864,7 +864,7 @@
 <li><a href="#_android_icd_installation">4. Android ICD Installation</a>
 <ul class="sectlevel2">
 <li><a href="#_target_device_filesystem">4.1. Target Device Filesystem</a></li>
-<li><a href="#_android_sdk_ndk">4.2. Android SDK/NDK</a></li>
+<li><a href="#_android_sdkndk">4.2. Android SDK/NDK</a></li>
 </ul>
 </li>
 </ul>
@@ -874,7 +874,7 @@
 <div id="preamble">
 <div class="sectionbody">
 <div class="paragraph">
-<p>Copyright 2008-2018 The Khronos Group.</p>
+<p>Copyright 2008-2019 The Khronos Group.</p>
 </div>
 <div class="paragraph">
 <p>This specification is protected by copyright laws and contains material proprietary
@@ -905,7 +905,7 @@
 otherwise, arising from or in connection with these materials.</p>
 </div>
 <div class="paragraph">
-<p>Vulkan is a registered trademark and Khronos, OpenXR, SPIR, SPIR-V, SYCL, WebGL,
+<p>Vulkan and Khronos are registered trademarks, and OpenXR, SPIR, SPIR-V, SYCL, WebGL,
 WebCL, OpenVX, OpenVG, EGL, COLLADA, glTF, NNEF, OpenKODE, OpenKCAM, StreamInput,
 OpenWF, OpenSL ES, OpenMAX, OpenMAX AL, OpenMAX IL, OpenMAX DL, OpenML and DevU are
 trademarks of the Khronos Group Inc. ASTC is a trademark of ARM Holdings PLC,
@@ -1107,7 +1107,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_android_sdk_ndk">4.2. Android SDK/NDK</h3>
+<h3 id="_android_sdkndk">4.2. Android SDK/NDK</h3>
 <div class="paragraph">
 <p>Vendors should package the <code>libOpenCL.so</code> stub for linking to user applications in their Android SDK/NDK and either configure the default environment, or provide instructions for configuring the build environment, or both.</p>
 </div>
@@ -1120,11 +1120,11 @@
 </div>
 <div id="footer">
 <div id="footer-text">
-Version 2.2-8<br>
-Last updated 2018-09-24 21:35:08 PDT
+Version v2.2-10<br>
+Last updated 2019-02-05 16:03:11 EST
 </div>
 </div>
 
-
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
 </body>
 </html>
\ No newline at end of file
diff --git a/specs/2.2/pdf/OpenCL_API.pdf b/specs/2.2/pdf/OpenCL_API.pdf
index 24aed24..d053b51 100644
--- a/specs/2.2/pdf/OpenCL_API.pdf
+++ b/specs/2.2/pdf/OpenCL_API.pdf
Binary files differ
diff --git a/specs/2.2/pdf/OpenCL_C.pdf b/specs/2.2/pdf/OpenCL_C.pdf
index 0e24429..a51089b 100644
--- a/specs/2.2/pdf/OpenCL_C.pdf
+++ b/specs/2.2/pdf/OpenCL_C.pdf
Binary files differ
diff --git a/specs/2.2/pdf/OpenCL_Cxx.pdf b/specs/2.2/pdf/OpenCL_Cxx.pdf
index 0143df9..7e57222 100644
--- a/specs/2.2/pdf/OpenCL_Cxx.pdf
+++ b/specs/2.2/pdf/OpenCL_Cxx.pdf
Binary files differ
diff --git a/specs/2.2/pdf/OpenCL_Env.pdf b/specs/2.2/pdf/OpenCL_Env.pdf
index 862a2b4..77dd2b5 100644
--- a/specs/2.2/pdf/OpenCL_Env.pdf
+++ b/specs/2.2/pdf/OpenCL_Env.pdf
Binary files differ
diff --git a/specs/2.2/pdf/OpenCL_Ext.pdf b/specs/2.2/pdf/OpenCL_Ext.pdf
index e428245..5046d34 100644
--- a/specs/2.2/pdf/OpenCL_Ext.pdf
+++ b/specs/2.2/pdf/OpenCL_Ext.pdf
Binary files differ
diff --git a/specs/2.2/pdf/OpenCL_ICD_Installation.pdf b/specs/2.2/pdf/OpenCL_ICD_Installation.pdf
index 98f495a..4089e72 100644
--- a/specs/2.2/pdf/OpenCL_ICD_Installation.pdf
+++ b/specs/2.2/pdf/OpenCL_ICD_Installation.pdf
Binary files differ
diff --git a/specs/opencl-2.2-cplusplus.html b/specs/opencl-2.2-cplusplus.html
deleted file mode 100644
index a436ae2..0000000
--- a/specs/opencl-2.2-cplusplus.html
+++ /dev/null
@@ -1,19862 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<meta name="generator" content="AsciiDoc 8.6.9">
-<title>The OpenCL C++ 1.0 Specification</title>
-<style type="text/css">
-/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
-
-/* Default font. */
-body {
-  font-family: Georgia,serif;
-}
-
-/* Title font. */
-h1, h2, h3, h4, h5, h6,
-div.title, caption.title,
-thead, p.table.header,
-#toctitle,
-#author, #revnumber, #revdate, #revremark,
-#footer {
-  font-family: Arial,Helvetica,sans-serif;
-}
-
-body {
-  margin: 1em 5% 1em 5%;
-}
-
-a {
-  color: blue;
-  text-decoration: underline;
-}
-a:visited {
-  color: fuchsia;
-}
-
-em {
-  font-style: italic;
-  color: navy;
-}
-
-strong {
-  font-weight: bold;
-  color: #083194;
-}
-
-h1, h2, h3, h4, h5, h6 {
-  color: #527bbd;
-  margin-top: 1.2em;
-  margin-bottom: 0.5em;
-  line-height: 1.3;
-}
-
-h1, h2, h3 {
-  border-bottom: 2px solid silver;
-}
-h2 {
-  padding-top: 0.5em;
-}
-h3 {
-  float: left;
-}
-h3 + * {
-  clear: left;
-}
-h5 {
-  font-size: 1.0em;
-}
-
-div.sectionbody {
-  margin-left: 0;
-}
-
-hr {
-  border: 1px solid silver;
-}
-
-p {
-  margin-top: 0.5em;
-  margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
-  margin-top: 0;
-}
-ul > li     { color: #aaa; }
-ul > li > * { color: black; }
-
-.monospaced, code, pre {
-  font-family: "Courier New", Courier, monospace;
-  font-size: inherit;
-  color: navy;
-  padding: 0;
-  margin: 0;
-}
-pre {
-  white-space: pre-wrap;
-}
-
-#author {
-  color: #527bbd;
-  font-weight: bold;
-  font-size: 1.1em;
-}
-#email {
-}
-#revnumber, #revdate, #revremark {
-}
-
-#footer {
-  font-size: small;
-  border-top: 2px solid silver;
-  padding-top: 0.5em;
-  margin-top: 4.0em;
-}
-#footer-text {
-  float: left;
-  padding-bottom: 0.5em;
-}
-#footer-badges {
-  float: right;
-  padding-bottom: 0.5em;
-}
-
-#preamble {
-  margin-top: 1.5em;
-  margin-bottom: 1.5em;
-}
-div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
-  margin-top: 1.0em;
-  margin-bottom: 1.5em;
-}
-div.admonitionblock {
-  margin-top: 2.0em;
-  margin-bottom: 2.0em;
-  margin-right: 10%;
-  color: #606060;
-}
-
-div.content { /* Block element content. */
-  padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
-  color: #527bbd;
-  font-weight: bold;
-  text-align: left;
-  margin-top: 1.0em;
-  margin-bottom: 0.5em;
-}
-div.title + * {
-  margin-top: 0;
-}
-
-td div.title:first-child {
-  margin-top: 0.0em;
-}
-div.content div.title:first-child {
-  margin-top: 0.0em;
-}
-div.content + div.title {
-  margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
-  background: #ffffee;
-  border: 1px solid #dddddd;
-  border-left: 4px solid #f0f0f0;
-  padding: 0.5em;
-}
-
-div.listingblock > div.content {
-  border: 1px solid #dddddd;
-  border-left: 5px solid #f0f0f0;
-  background: #f8f8f8;
-  padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
-  padding-left: 1.0em;
-  margin-left: 1.0em;
-  margin-right: 10%;
-  border-left: 5px solid #f0f0f0;
-  color: #888;
-}
-
-div.quoteblock > div.attribution {
-  padding-top: 0.5em;
-  text-align: right;
-}
-
-div.verseblock > pre.content {
-  font-family: inherit;
-  font-size: inherit;
-}
-div.verseblock > div.attribution {
-  padding-top: 0.75em;
-  text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
-  text-align: left;
-}
-
-div.admonitionblock .icon {
-  vertical-align: top;
-  font-size: 1.1em;
-  font-weight: bold;
-  text-decoration: underline;
-  color: #527bbd;
-  padding-right: 0.5em;
-}
-div.admonitionblock td.content {
-  padding-left: 0.5em;
-  border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
-  border-left: 3px solid #dddddd;
-  padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; vertical-align: text-bottom; }
-a.image:visited { color: white; }
-
-dl {
-  margin-top: 0.8em;
-  margin-bottom: 0.8em;
-}
-dt {
-  margin-top: 0.5em;
-  margin-bottom: 0;
-  font-style: normal;
-  color: navy;
-}
-dd > *:first-child {
-  margin-top: 0.1em;
-}
-
-ul, ol {
-    list-style-position: outside;
-}
-ol.arabic {
-  list-style-type: decimal;
-}
-ol.loweralpha {
-  list-style-type: lower-alpha;
-}
-ol.upperalpha {
-  list-style-type: upper-alpha;
-}
-ol.lowerroman {
-  list-style-type: lower-roman;
-}
-ol.upperroman {
-  list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
-  margin-top: 0.1em;
-  margin-bottom: 0.1em;
-}
-
-tfoot {
-  font-weight: bold;
-}
-td > div.verse {
-  white-space: pre;
-}
-
-div.hdlist {
-  margin-top: 0.8em;
-  margin-bottom: 0.8em;
-}
-div.hdlist tr {
-  padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
-  font-weight: bold;
-}
-td.hdlist1 {
-  vertical-align: top;
-  font-style: normal;
-  padding-right: 0.8em;
-  color: navy;
-}
-td.hdlist2 {
-  vertical-align: top;
-}
-div.hdlist.compact tr {
-  margin: 0;
-  padding-bottom: 0;
-}
-
-.comment {
-  background: yellow;
-}
-
-.footnote, .footnoteref {
-  font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
-  vertical-align: super;
-}
-
-#footnotes {
-  margin: 20px 0 20px 0;
-  padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
-  margin: 0 0 5px 0;
-}
-
-#footnotes hr {
-  border: none;
-  border-top: 1px solid silver;
-  height: 1px;
-  text-align: left;
-  margin-left: 0;
-  width: 20%;
-  min-width: 100px;
-}
-
-div.colist td {
-  padding-right: 0.5em;
-  padding-bottom: 0.3em;
-  vertical-align: top;
-}
-div.colist td img {
-  margin-top: 0.3em;
-}
-
-@media print {
-  #footer-badges { display: none; }
-}
-
-#toc {
-  margin-bottom: 2.5em;
-}
-
-#toctitle {
-  color: #527bbd;
-  font-size: 1.1em;
-  font-weight: bold;
-  margin-top: 1.0em;
-  margin-bottom: 0.1em;
-}
-
-div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
-  margin-top: 0;
-  margin-bottom: 0;
-}
-div.toclevel2 {
-  margin-left: 2em;
-  font-size: 0.9em;
-}
-div.toclevel3 {
-  margin-left: 4em;
-  font-size: 0.9em;
-}
-div.toclevel4 {
-  margin-left: 6em;
-  font-size: 0.9em;
-}
-
-span.aqua { color: aqua; }
-span.black { color: black; }
-span.blue { color: blue; }
-span.fuchsia { color: fuchsia; }
-span.gray { color: gray; }
-span.green { color: green; }
-span.lime { color: lime; }
-span.maroon { color: maroon; }
-span.navy { color: navy; }
-span.olive { color: olive; }
-span.purple { color: purple; }
-span.red { color: red; }
-span.silver { color: silver; }
-span.teal { color: teal; }
-span.white { color: white; }
-span.yellow { color: yellow; }
-
-span.aqua-background { background: aqua; }
-span.black-background { background: black; }
-span.blue-background { background: blue; }
-span.fuchsia-background { background: fuchsia; }
-span.gray-background { background: gray; }
-span.green-background { background: green; }
-span.lime-background { background: lime; }
-span.maroon-background { background: maroon; }
-span.navy-background { background: navy; }
-span.olive-background { background: olive; }
-span.purple-background { background: purple; }
-span.red-background { background: red; }
-span.silver-background { background: silver; }
-span.teal-background { background: teal; }
-span.white-background { background: white; }
-span.yellow-background { background: yellow; }
-
-span.big { font-size: 2em; }
-span.small { font-size: 0.6em; }
-
-span.underline { text-decoration: underline; }
-span.overline { text-decoration: overline; }
-span.line-through { text-decoration: line-through; }
-
-div.unbreakable { page-break-inside: avoid; }
-
-
-/*
- * xhtml11 specific
- *
- * */
-
-div.tableblock {
-  margin-top: 1.0em;
-  margin-bottom: 1.5em;
-}
-div.tableblock > table {
-  border: 3px solid #527bbd;
-}
-thead, p.table.header {
-  font-weight: bold;
-  color: #527bbd;
-}
-p.table {
-  margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
-  border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
-  border-left-style: none;
-  border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
-  border-top-style: none;
-  border-bottom-style: none;
-}
-
-
-/*
- * html5 specific
- *
- * */
-
-table.tableblock {
-  margin-top: 1.0em;
-  margin-bottom: 1.5em;
-}
-thead, p.tableblock.header {
-  font-weight: bold;
-  color: #527bbd;
-}
-p.tableblock {
-  margin-top: 0;
-}
-table.tableblock {
-  border-width: 3px;
-  border-spacing: 0px;
-  border-style: solid;
-  border-color: #527bbd;
-  border-collapse: collapse;
-}
-th.tableblock, td.tableblock {
-  border-width: 1px;
-  padding: 4px;
-  border-style: solid;
-  border-color: #527bbd;
-}
-
-table.tableblock.frame-topbot {
-  border-left-style: hidden;
-  border-right-style: hidden;
-}
-table.tableblock.frame-sides {
-  border-top-style: hidden;
-  border-bottom-style: hidden;
-}
-table.tableblock.frame-none {
-  border-style: hidden;
-}
-
-th.tableblock.halign-left, td.tableblock.halign-left {
-  text-align: left;
-}
-th.tableblock.halign-center, td.tableblock.halign-center {
-  text-align: center;
-}
-th.tableblock.halign-right, td.tableblock.halign-right {
-  text-align: right;
-}
-
-th.tableblock.valign-top, td.tableblock.valign-top {
-  vertical-align: top;
-}
-th.tableblock.valign-middle, td.tableblock.valign-middle {
-  vertical-align: middle;
-}
-th.tableblock.valign-bottom, td.tableblock.valign-bottom {
-  vertical-align: bottom;
-}
-
-
-/*
- * manpage specific
- *
- * */
-
-body.manpage h1 {
-  padding-top: 0.5em;
-  padding-bottom: 0.5em;
-  border-top: 2px solid silver;
-  border-bottom: 2px solid silver;
-}
-body.manpage h2 {
-  border-style: none;
-}
-body.manpage div.sectionbody {
-  margin-left: 3em;
-}
-
-@media print {
-  body.manpage div#toc { display: none; }
-}
-
-
-@media screen {
-  body {
-    max-width: 50em; /* approximately 80 characters wide */
-    margin-left: 16em;
-  }
-
-  #toc {
-    position: fixed;
-    top: 0;
-    left: 0;
-    bottom: 0;
-    width: 13em;
-    padding: 0.5em;
-    padding-bottom: 1.5em;
-    margin: 0;
-    overflow: auto;
-    border-right: 3px solid #f8f8f8;
-    background-color: white;
-  }
-
-  #toc .toclevel1 {
-    margin-top: 0.5em;
-  }
-
-  #toc .toclevel2 {
-    margin-top: 0.25em;
-    display: list-item;
-    color: #aaaaaa;
-  }
-
-  #toctitle {
-    margin-top: 0.5em;
-  }
-}
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-var asciidoc = {  // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
-  function getText(el) {
-    var text = "";
-    for (var i = el.firstChild; i != null; i = i.nextSibling) {
-      if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
-        text += i.data;
-      else if (i.firstChild != null)
-        text += getText(i);
-    }
-    return text;
-  }
-
-  function TocEntry(el, text, toclevel) {
-    this.element = el;
-    this.text = text;
-    this.toclevel = toclevel;
-  }
-
-  function tocEntries(el, toclevels) {
-    var result = new Array;
-    var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
-    // Function that scans the DOM tree for header elements (the DOM2
-    // nodeIterator API would be a better technique but not supported by all
-    // browsers).
-    var iterate = function (el) {
-      for (var i = el.firstChild; i != null; i = i.nextSibling) {
-        if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
-          var mo = re.exec(i.tagName);
-          if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
-            result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
-          }
-          iterate(i);
-        }
-      }
-    }
-    iterate(el);
-    return result;
-  }
-
-  var toc = document.getElementById("toc");
-  if (!toc) {
-    return;
-  }
-
-  // Delete existing TOC entries in case we're reloading the TOC.
-  var tocEntriesToRemove = [];
-  var i;
-  for (i = 0; i < toc.childNodes.length; i++) {
-    var entry = toc.childNodes[i];
-    if (entry.nodeName.toLowerCase() == 'div'
-     && entry.getAttribute("class")
-     && entry.getAttribute("class").match(/^toclevel/))
-      tocEntriesToRemove.push(entry);
-  }
-  for (i = 0; i < tocEntriesToRemove.length; i++) {
-    toc.removeChild(tocEntriesToRemove[i]);
-  }
-
-  // Rebuild TOC entries.
-  var entries = tocEntries(document.getElementById("content"), toclevels);
-  for (var i = 0; i < entries.length; ++i) {
-    var entry = entries[i];
-    if (entry.element.id == "")
-      entry.element.id = "_toc_" + i;
-    var a = document.createElement("a");
-    a.href = "#" + entry.element.id;
-    a.appendChild(document.createTextNode(entry.text));
-    var div = document.createElement("div");
-    div.appendChild(a);
-    div.className = "toclevel" + entry.toclevel;
-    toc.appendChild(div);
-  }
-  if (entries.length == 0)
-    toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
-  // Delete existing footnote entries in case we're reloading the footnodes.
-  var i;
-  var noteholder = document.getElementById("footnotes");
-  if (!noteholder) {
-    return;
-  }
-  var entriesToRemove = [];
-  for (i = 0; i < noteholder.childNodes.length; i++) {
-    var entry = noteholder.childNodes[i];
-    if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
-      entriesToRemove.push(entry);
-  }
-  for (i = 0; i < entriesToRemove.length; i++) {
-    noteholder.removeChild(entriesToRemove[i]);
-  }
-
-  // Rebuild footnote entries.
-  var cont = document.getElementById("content");
-  var spans = cont.getElementsByTagName("span");
-  var refs = {};
-  var n = 0;
-  for (i=0; i<spans.length; i++) {
-    if (spans[i].className == "footnote") {
-      n++;
-      var note = spans[i].getAttribute("data-note");
-      if (!note) {
-        // Use [\s\S] in place of . so multi-line matches work.
-        // Because JavaScript has no s (dotall) regex flag.
-        note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
-        spans[i].innerHTML =
-          "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
-          "' title='View footnote' class='footnote'>" + n + "</a>]";
-        spans[i].setAttribute("data-note", note);
-      }
-      noteholder.innerHTML +=
-        "<div class='footnote' id='_footnote_" + n + "'>" +
-        "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
-        n + "</a>. " + note + "</div>";
-      var id =spans[i].getAttribute("id");
-      if (id != null) refs["#"+id] = n;
-    }
-  }
-  if (n == 0)
-    noteholder.parentNode.removeChild(noteholder);
-  else {
-    // Process footnoterefs.
-    for (i=0; i<spans.length; i++) {
-      if (spans[i].className == "footnoteref") {
-        var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
-        href = href.match(/#.*/)[0];  // Because IE return full URL.
-        n = refs[href];
-        spans[i].innerHTML =
-          "[<a href='#_footnote_" + n +
-          "' title='View footnote' class='footnote'>" + n + "</a>]";
-      }
-    }
-  }
-},
-
-install: function(toclevels) {
-  var timerId;
-
-  function reinstall() {
-    asciidoc.footnotes();
-    if (toclevels) {
-      asciidoc.toc(toclevels);
-    }
-  }
-
-  function reinstallAndRemoveTimer() {
-    clearInterval(timerId);
-    reinstall();
-  }
-
-  timerId = setInterval(reinstall, 500);
-  if (document.addEventListener)
-    document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
-  else
-    window.onload = reinstallAndRemoveTimer;
-}
-
-}
-asciidoc.install(3);
-/*]]>*/
-</script>
-    <script type="text/x-mathjax-config">
-	MathJax.Hub.Config({
-	    MathML: { extensions: ["content-mathml.js"] },
-	    tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']] }
-	});
-    </script>
-    <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
-    </script>
-</head>
-<body class="book">
-<div id="header">
-<h1>The OpenCL C++ 1.0 Specification</h1>
-<span id="author">Khronos OpenCL Working Group</span><br>
-<div id="toc">
-  <div id="toctitle">Table of Contents</div>
-  <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
-</div>
-</div>
-<div id="content">
-<div id="preamble">
-<div class="sectionbody">
-<div class="paragraph"><p>Copyright 2008-2017 The Khronos Group.</p></div>
-<div class="paragraph"><p>This specification is protected by copyright laws and contains material proprietary
-to the Khronos Group, Inc. Except as described by these terms, it or any components
-may not be reproduced, republished, distributed, transmitted, displayed, broadcast
-or otherwise exploited in any manner without the express prior written permission
-of Khronos Group.</p></div>
-<div class="paragraph"><p>Khronos Group grants a conditional copyright license to use and reproduce the
-unmodified specification for any purpose, without fee or royalty, EXCEPT no licenses
-to any patent, trademark or other intellectual property rights are granted under
-these terms. Parties desiring to implement the specification and make use of
-Khronos trademarks in relation to that implementation, and receive reciprocal patent
-license protection under the Khronos IP Policy must become Adopters and confirm the
-implementation as conformant under the process defined by Khronos for this
-specification; see <a href="https://www.khronos.org/adopters">https://www.khronos.org/adopters</a>.</p></div>
-<div class="paragraph"><p>Khronos Group makes no, and expressly disclaims any, representations or warranties,
-express or implied, regarding this specification, including, without limitation:
-merchantability, fitness for a particular purpose, non-infringement of any
-intellectual property, correctness, accuracy, completeness, timeliness, and
-reliability. Under no circumstances will the Khronos Group, or any of its Promoters,
-Contributors or Members, or their respective partners, officers, directors,
-employees, agents or representatives be liable for any damages, whether direct,
-indirect, special or consequential damages for lost revenues, lost profits, or
-otherwise, arising from or in connection with these materials.</p></div>
-<div class="paragraph"><p>Vulkan is a registered trademark and Khronos, OpenXR, SPIR, SPIR-V, SYCL, WebGL,
-WebCL, OpenVX, OpenVG, EGL, COLLADA, glTF, NNEF, OpenKODE, OpenKCAM, StreamInput,
-OpenWF, OpenSL ES, OpenMAX, OpenMAX AL, OpenMAX IL, OpenMAX DL, OpenML and DevU are
-trademarks of the Khronos Group Inc. ASTC is a trademark of ARM Holdings PLC,
-OpenCL is a trademark of Apple Inc. and OpenGL and OpenML are registered trademarks
-and the OpenGL ES and OpenGL SC logos are trademarks of Silicon Graphics
-International used under license by Khronos. All other product names, trademarks,
-and/or company names are used solely for identification and belong to their
-respective owners.</p></div>
-<div style="page-break-after:always"></div>
-<h2 id="acknowledgements" class="float">Acknowledgements</h2>
-<div class="paragraph"><p>The OpenCL C++ specification is the result of the contributions of many people, representing a cross section of the desktop, hand-held, and embedded computer industry.
-Following is a partial list of the contributors, including the company that they represented at the time of their contribution:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Eric Berdahl, Adobe
-</p>
-</li>
-<li>
-<p>
-Aaftab Munshi, Apple
-</p>
-</li>
-<li>
-<p>
-Brian Sumner, AMD
-</p>
-</li>
-<li>
-<p>
-Andrew Richards, Codeplay
-</p>
-</li>
-<li>
-<p>
-Maria Rovatsou, Codeplay
-</p>
-</li>
-<li>
-<p>
-Adam Stański, Intel
-</p>
-</li>
-<li>
-<p>
-Alexey Bader, Intel
-</p>
-</li>
-<li>
-<p>
-Allen Hux, Intel
-</p>
-</li>
-<li>
-<p>
-Bartosz Sochacki, Intel
-</p>
-</li>
-<li>
-<p>
-Ben Ashbaugh, Intel
-</p>
-</li>
-<li>
-<p>
-Kevin Stevens, Intel
-</p>
-</li>
-<li>
-<p>
-Łukasz Dudziak, Intel
-</p>
-</li>
-<li>
-<p>
-Łukasz Towarek, Intel
-</p>
-</li>
-<li>
-<p>
-Marcin Walkowiak, Intel
-</p>
-</li>
-<li>
-<p>
-Michael Kinsner, Intel
-</p>
-</li>
-<li>
-<p>
-Raun Krisch, Intel
-</p>
-</li>
-<li>
-<p>
-Tomasz Fiechowski, Intel
-</p>
-</li>
-<li>
-<p>
-Kedar Patil, NVIDIA
-</p>
-</li>
-<li>
-<p>
-Yuan Lin, NVIDIA
-</p>
-</li>
-<li>
-<p>
-Alex Bourd, Qualcomm
-</p>
-</li>
-<li>
-<p>
-Lee Howes, Qualcomm
-</p>
-</li>
-<li>
-<p>
-Anton Gorenko, StreamComputing
-</p>
-</li>
-<li>
-<p>
-Jakub Szuppe, StreamComputing
-</p>
-</li>
-<li>
-<p>
-James Price, University of Bristol
-</p>
-</li>
-<li>
-<p>
-Paul Preney, University of Windsor
-</p>
-</li>
-<li>
-<p>
-Ronan Keryell, Xilinx
-</p>
-</li>
-<li>
-<p>
-AJ Guillon, YetiWare Inc.
-</p>
-</li>
-</ul></div>
-<div style="page-break-after:always"></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="generic-type-name-notation">1. Generic Type Name Notation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The generic type names are used when some entity has multiple overloads which differ only by argument(s).
-They can map to one or more built-in data types.
-The tables below describe these mappings in details.</p></div>
-<div class="paragraph"><p>Assuming that <span class="monospaced">gentype</span> maps to built-in types: <span class="monospaced">float</span>, <span class="monospaced">int</span> and <span class="monospaced">uint</span>, when coming across definition:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">function</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>reader should understand that such function has in fact three overloads:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">function</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> x<span style="color: #990000">);</span>
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">function</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">function</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that if a function signature has multiple usages of <span class="monospaced">gentype</span> they all should map to the same type.
-Following this rule such overloads are then invalid:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">function</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">function</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> x<span style="color: #990000">);</span>
-<span style="font-style: italic"><span style="color: #9A1900">// etc.</span></span></tt></pre></div></div>
-<div class="paragraph"><p>If a function is meant to have such overloads, respective gentypes in its signature should be postfixed with numbers to indicate they represent different types.
-Declaration like this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>cl<span style="color: #990000">::</span><span style="color: #008080">common_type_t&lt;gentype1, gentype2&gt;</span> <span style="font-weight: bold"><span style="color: #000000">greater</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype1</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype2</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>would match following overloads:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>cl<span style="color: #990000">::</span><span style="color: #008080">common_type_t&lt;float, float&gt;</span> <span style="font-weight: bold"><span style="color: #000000">greater</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> x<span style="color: #990000">,</span> <span style="color: #009900">float</span> y<span style="color: #990000">);</span>
-cl<span style="color: #990000">::</span><span style="color: #008080">common_type_t&lt;float, int&gt;</span> <span style="font-weight: bold"><span style="color: #000000">greater</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> x<span style="color: #990000">,</span> <span style="color: #009900">int</span> y<span style="color: #990000">);</span>
-cl<span style="color: #990000">::</span><span style="color: #008080">common_type_t&lt;float, uint&gt;</span> <span style="font-weight: bold"><span style="color: #000000">greater</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> x<span style="color: #990000">,</span> <span style="color: #008080">uint</span> y<span style="color: #990000">);</span>
-cl<span style="color: #990000">::</span><span style="color: #008080">common_type_t&lt;int, float&gt;</span> <span style="font-weight: bold"><span style="color: #000000">greater</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> x<span style="color: #990000">,</span> <span style="color: #009900">float</span> y<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// etc.</span></span></tt></pre></div></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 1. generic types</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><div class="paragraph"><p><strong>generic type</strong></p></div></th>
-<th class="tableblock halign-left valign-top" ><div class="paragraph"><p><strong>corresponding built-in types</strong></p></div></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">typen</span></p></div></div></td>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p>scalar and all vector types of type</p></div>
-<div class="paragraph"><p>Example:</p></div>
-<div class="paragraph"><p><span class="monospaced">floatn</span> matches: <span class="monospaced">float</span>, <span class="monospaced">float2</span>, <span class="monospaced">float3</span>, <span class="monospaced">float4</span>, <span class="monospaced">float8</span> and <span class="monospaced">float16</span></p></div>
-<div class="paragraph"><p><span class="monospaced">floatn</span> doesn&#8217;t match: <span class="monospaced">half</span>, <span class="monospaced">int2</span></p></div></div></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">gentype</span></p></div></div></td>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p>unspecified in global context, should be defined whenever used</p></div></div></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">sgentype</span></p></div></div></td>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p>subset of scalar types from types matched by <span class="monospaced">gentype</span></p></div></div></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">ugentype</span></p></div></div></td>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p>subset of unsigned integer types from types matched by <span class="monospaced">gentype</span></p></div></div></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">gentypeh</span></p></div></div></td>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">half</span>, <span class="monospaced">half2</span>, <span class="monospaced">half3</span>, <span class="monospaced">half4</span>, <span class="monospaced">half8</span> or <span class="monospaced">half16</span></p></div></div></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">gentypef</span></p></div></div></td>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">float</span>, <span class="monospaced">float2</span>, <span class="monospaced">float3</span>, <span class="monospaced">float4</span>, <span class="monospaced">float8</span> or <span class="monospaced">float16</span></p></div></div></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">gentyped</span></p></div></div></td>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">double</span>, <span class="monospaced">double2</span>, <span class="monospaced">double3</span>, <span class="monospaced">double4</span>, <span class="monospaced">double8</span> or <span class="monospaced">double16</span></p></div></div></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect1">
-<h2 id="openclcpp-programming-language">2. OpenCL C++ Programming Language</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This section describes the OpenCL C++ programming language used to create kernels that are executed on OpenCL device(s).
-The OpenCL C++ programming language is based on the ISO/IEC JTC1 SC22 WG21 N 3690 language specification (a.k.a. C++14 specification) with specific restrictions (<em><a href="#opencl_cxx_restrictions">OpenCL C++ restrictions</a> section</em>).
-Please refer to this specification for a detailed description of the language grammar.
-This section describes restrictions to the C++14 specification supported in OpenCL C++.</p></div>
-<div class="sect2">
-<h3 id="supported-builtin-data-types">2.1. Supported Built-in Data Types</h3>
-<div class="paragraph"><p>The following data types are supported.</p></div>
-<div class="sect3">
-<h4 id="builtin-scalar-data-types">2.1.1. Built-in Scalar Data Types</h4>
-<table class="tableblock frame-all grid-all" id="device_builtin_scalar_data_types"
-style="
-width:100%;
-">
-<caption class="title">Table 2. Device Built-in scalar data types</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Type</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">bool</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A data type which is either <span class="monospaced">true</span> or <span class="monospaced">false</span>. (<em>See [ISO/IEC 14882:2014: lex.bool, &sect;2.14.6; basic.fundamental, &sect;3.9.1].</em>)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">char</span>, <span class="monospaced">signed char</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A signed two&#8217;s complement 8-bit integer.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">unsigned char</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">An unsigned 8-bit integer.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">short</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A signed two&#8217;s complement 16-bit integer.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">unsigned short</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">An unsigned 16-bit integer.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">int</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A signed two&#8217;s complement 32-bit integer.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">unsigned int</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">An unsigned 32-bit integer.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">long</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A signed two&#8217;s complement 64-bit integer.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">unsigned long</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">An unsigned 64-bit integer.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">float</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 32-bit floating-point.
-The float data type must conform to the IEEE 754 single precision storage format.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">double</span> <a href="#ftn2">[2</a>]</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 64-bit floating-point.
-The double data type must conform to the IEEE 754 double precision storage format.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">half</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 16-bit floating-point.
-The half data type must conform to the IEEE 754-2008 half precision storage format.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">void</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">The <span class="monospaced">void</span> type comprises an empty set of values; it is an incomplete type that cannot be completed.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>Most built-in scalar data types are also declared as appropriate types in the OpenCL API (and header files) that can be used by an application.
-The following table describes the built-in scalar data type in the OpenCL C++ programming language and the corresponding data type available to the application:</p></div>
-<table class="tableblock frame-all grid-all" id="host_scalar_builtin_data_types"
-style="
-width:100%;
-">
-<caption class="title">Table 3. Host Scalar Built-in Data Types</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Type in OpenCL Language</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>API type for application</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">bool</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">n/a, i.e., there is no corresponding <span class="monospaced">cl_bool</span> type.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">char</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_char</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">unsigned char</span>, <span class="monospaced">uchar</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_uchar</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">short</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_short</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">unsigned short</span>, <span class="monospaced">ushort</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_ushort</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">int</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_int</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">unsigned int</span>, <span class="monospaced">uint</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_uint</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">long</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_long</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">unsigned long</span>, <span class="monospaced">ulong</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_ulong</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">float</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_float</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">double</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_double</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">half</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_half</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">void</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">void</span></p></td>
-</tr>
-</tbody>
-</table>
-<div class="sect4">
-<h5 id="builtin-half-data-type">Built-in Half Data Type</h5>
-<div class="paragraph"><p>The <span class="monospaced">half</span> data type must be IEEE 754-2008 compliant.
-<span class="monospaced">half</span> numbers have 1 sign bit, 5 exponent bits, and 10 mantissa bits.
-The interpretation of the sign, exponent and mantissa is analogous to IEEE 754 floating-point numbers.</p></div>
-<div class="paragraph"><p>The exponent bias is 15.
-The <span class="monospaced">half</span> data type must represent finite and normal numbers, denormalized numbers, infinities and NaN.
-Denormalized numbers for the <span class="monospaced">half</span> data type which may be generated when converting a <span class="monospaced">float</span> to a <span class="monospaced">half</span> using <span class="monospaced">vstore_half</span> and converting a <span class="monospaced">half</span> to a <span class="monospaced">float</span> using <span class="monospaced">vload_half</span> cannot be flushed to zero.</p></div>
-<div class="paragraph"><p>Conversions from <span class="monospaced">float</span> to <span class="monospaced">half</span> correctly round the mantissa to 11 bits of precision.</p></div>
-<div class="paragraph"><p>Conversions from <span class="monospaced">half</span> to <span class="monospaced">float</span> are lossless; all <span class="monospaced">half</span> numbers are exactly representable as <span class="monospaced">float</span> values.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">half</span> data type can only be used to declare a pointer to a buffer that contains <span class="monospaced">half</span> values.
-All other operations are not allowed if the <em>cl_khr_fp16</em> extension is not supported.</p></div>
-<div class="paragraph"><p>A few valid examples are given below:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_def&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_vector_load_store&gt;</span>
-
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">bar</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> <span style="color: #990000">*</span>a<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> cl<span style="color: #990000">::</span>vload_half<span style="color: #990000">&lt;</span> <span style="color: #993399">1</span> <span style="color: #990000">&gt;(</span><span style="color: #993399">0</span><span style="color: #990000">,</span> a<span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span>cl<span style="color: #990000">::</span><span style="color: #008080">global_ptr&lt;half&gt;</span> pg<span style="color: #990000">)</span> <span style="color: #FF0000">{</span> <span style="font-style: italic"><span style="color: #9A1900">//ok: a global pointer</span></span>
-                                           <span style="font-style: italic"><span style="color: #9A1900">// passed from the host</span></span>
-    <span style="color: #009900">int</span> offset <span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">;</span>
-
-    <span style="color: #008080">half</span> <span style="color: #990000">*</span>ptr <span style="color: #990000">=</span> pg<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="color: #990000">+</span> offset<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">//ok: half pointer arithmetic</span></span>
-    <span style="color: #009900">float</span> b <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">bar</span></span><span style="color: #990000">(</span>ptr<span style="color: #990000">);</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span>b <span style="color: #990000">&lt;</span> <span style="color: #990000">*</span>ptr<span style="color: #990000">)</span> <span style="color: #FF0000">{</span> <span style="font-style: italic"><span style="color: #9A1900">//not allowed: it is only supported if cl_khr_fp16</span></span>
-                   <span style="font-style: italic"><span style="color: #9A1900">// extension is enabled</span></span>
-      <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>The <span class="monospaced">half</span> scalar data type is required to be supported as a data storage format.
-Vector data load and store functions (described in <em><a href="#vector-data-load-and-store-functions">Vector Data Load and Store Functions</a> section</em>) must be supported.</p></div>
-</div>
-<div class="sect4">
-<h5 id="cl_khr_fp16-extension">cl_khr_fp16 extension</h5>
-<div class="paragraph"><p>This extension adds support for <span class="monospaced">half</span> scalar and vector types as built-in types that can be used for arithmetic operations, conversions etc.
-An application that wants to use <span class="monospaced">half</span> and <span class="monospaced">halfn</span> types will need to specify <em>-cl-fp16-enable</em> compiler option (<em><a href="#fp16_and_fp64_options">Double and half-precision floating-point options</a> section</em>).</p></div>
-<div class="paragraph"><p>The OpenCL compiler accepts an h and H suffix on floating point literals, indicating the literal is typed as a <span class="monospaced">half</span></p></div>
-<div class="paragraph"><p>A few valid examples:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_def&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">bar</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> a<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">half</span> b <span style="color: #990000">=</span> a<span style="color: #990000">;</span>
-    b <span style="color: #990000">+=</span> <span style="color: #993399">10</span><span style="color: #990000">.</span>0h<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">//ok: cl_khr_fp16 extension is enabled. All arithmetic</span></span>
-                <span style="font-style: italic"><span style="color: #9A1900">// operations on half built-in type are available</span></span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> b<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span>cl<span style="color: #990000">::</span><span style="color: #008080">global_ptr&lt;half&gt;</span> pg<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="color: #009900">int</span> offset <span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">;</span>
-
-    <span style="color: #008080">half</span> <span style="color: #990000">*</span>ptr <span style="color: #990000">=</span> pg<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="color: #990000">+</span> offset<span style="color: #990000">;</span>
-    <span style="color: #008080">half</span> b <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">bar</span></span><span style="color: #990000">(*</span>ptr<span style="color: #990000">);</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span>b <span style="color: #990000">&lt;</span> <span style="color: #990000">*</span>ptr<span style="color: #990000">)</span> <span style="color: #FF0000">{</span> <span style="font-style: italic"><span style="color: #9A1900">//ok: cl_khr_fp16 extension is enabled.</span></span>
-                   <span style="font-style: italic"><span style="color: #9A1900">// All comparision operations are available</span></span>
-      <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="hexadecimal-floating-point-literals">Hexadecimal floating point literals</h5>
-<div class="paragraph"><p>Hexadecimal floating point literals are supported in OpenCL C++.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">float</span> f <span style="color: #990000">=</span> <span style="color: #993399">0x1</span><span style="color: #990000">.</span>fffffep127f
-<span style="color: #009900">double</span> d <span style="color: #990000">=</span> <span style="color: #993399">0x1</span><span style="color: #990000">.</span>fffffffffffffp1023<span style="color: #990000">;</span>
-<span style="color: #008080">half</span> h <span style="color: #990000">=</span> <span style="color: #993399">0x1</span><span style="color: #990000">.</span>ffcp15h<span style="color: #990000">;</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="builtin-vector-data-types">2.1.2. Built-in Vector Data Types</h4>
-<div class="sect4">
-<h5 id="supported-vector-data-types">Supported Vector Data Types</h5>
-<div class="paragraph"><p>The <span class="monospaced">bool</span>, <span class="monospaced">char</span>, <span class="monospaced">unsigned char</span>, <span class="monospaced">short</span>, <span class="monospaced">unsigned short</span>, <span class="monospaced">int</span>, <span class="monospaced">unsigned int</span>, <span class="monospaced">long</span>, <span class="monospaced">unsigned long</span>, <span class="monospaced">half</span>, <span class="monospaced">float</span> and <span class="monospaced">double</span> vector data types are supported.
-The vector data type is defined with the type name i.e. <span class="monospaced">bool</span>, <span class="monospaced">char</span>, <span class="monospaced">uchar</span>, <span class="monospaced">short</span>, <span class="monospaced">ushort</span>, <span class="monospaced">int</span>, <span class="monospaced">uint</span>, <span class="monospaced">long</span>, <span class="monospaced">ulong</span>, <span class="monospaced">half</span>, <span class="monospaced">float</span> or <span class="monospaced">double</span> followed by a literal value <em>n</em> that defines the number of elements in the vector.
-Supported values of <em>n</em> are 2, 3, 4, 8, and 16 for all vector data types.</p></div>
-<table class="tableblock frame-all grid-all" id="device_builtin_vector_data_types"
-style="
-width:100%;
-">
-<caption class="title">Table 4. Device Built-in Vector Data Types</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Type</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">bool</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A vector of <em>n</em> boolean values.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">char</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A vector of <em>n</em> 8-bit signed two&#8217;s complement integer values.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">uchar</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A vector of <em>n</em> 8-bit unsigned integer values.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">short</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">vector of <em>n</em> 16-bit signed two&#8217;s complement integer values.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">ushort</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A vector of <em>n</em> 16-bit unsigned integer values.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">int</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A vector of <em>n</em> 32-bit signed two&#8217;s complement integer values.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">uint</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A vector of <em>n</em> 32-bit unsigned integer values.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">long</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A vector of <em>n</em> 64-bit signed two&#8217;s complement integer values.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">ulong</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A vector of <em>n</em> 64-bit unsigned integer values.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">half</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A vector of <em>n</em> 16-bit floating-point values.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">float</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A vector of <em>n</em> 32-bit floating-point values.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">double</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A vector of <em>n</em> 64-bit floating-point values.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>The built-in vector data types are also declared as appropriate types in the OpenCL API (and header files) that can be used by an application.
-The following table describes the built-in vector data type in the OpenCL C++ programming language and the corresponding data type available to the application:</p></div>
-<table class="tableblock frame-all grid-all" id="host_builtin_vector_data_types"
-style="
-width:100%;
-">
-<caption class="title">Table 5. Host Built-in Vector Data Types</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Type in OpenCL Language</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>API type for application</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">bool</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">n/a, i.e., there is no corresponding <span class="monospaced">cl_bool</span><em>n</em> type.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">char</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_char</span><em>n</em></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">uchar</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_uchar</span><em>n</em></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">short</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_short</span><em>n</em></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">ushort</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_ushort</span><em>n</em></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">int</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_int</span><em>n</em></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">uint</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_uint</span><em>n</em></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">long</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_long</span><em>n</em></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">ulong</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_ulong</span><em>n</em></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">half</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_half</span><em>n</em></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">float</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_float</span><em>n</em></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">double</span><em>n</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_double</span><em>n</em></p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>The <span class="monospaced">half</span><em>n</em> vector data type is required to be supported as a data storage format.
-Vector data load and store functions (described in <em><a href="#vector-data-load-and-store-functions">Vector Data Load and Store Functions</a> section</em>) must be supported.</p></div>
-<div class="paragraph"><p>Support for the <span class="monospaced">double</span><em>n</em> vector data type is optional.</p></div>
-</div>
-<div class="sect4">
-<h5 id="vector-changes-to-cpp14-standard">Vector Changes to C++14 standard</h5>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-Vector types are classified as fundamental (<em>[ISO/IEC 14882:2014: basic.fundamental, ch. 3.9.1]</em>) and literal types
-</p>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">A vector type behave similarly to a trivially destructible class with all data members of literal type and all of its constructors defined as constexpr constructors</td>
-</tr></table>
-</div>
-</li>
-<li>
-<p>
-Abbreviating vector type as Tn, T is called the component type of a vector.
-The numerical value n specifies number of components in a vector.
-<a href="#device_builtin_vector_data_types">Device built-in vector data types</a> table specifies supported vector types.
-</p>
-<div class="paragraph"><p>A vector type which component type is <em>integral type</em> is called <em>integral vector type</em>.
-A vector type which component is <em>floating-point type</em> is called <em>floating-point vector type</em>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">float8</span> a<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// component type: float, number of components: 8</span></span>
-<span style="color: #008080">uint16</span> b<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// component type: uint, number of components: 16</span></span></tt></pre></div></div>
-</li>
-<li>
-<p>
-An <em>integral vector type</em> can be used as type of value of non-type template-parameter.
-The change is introduced by following changes in C++ specification:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-<em>[ISO/IEC 14882:2014: temp.param, ch. 14.1 (4, 4.1)]</em> Template parameters: A non-type template-parameter shall have one of the following (optionally cv-qualified) types:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-integral, integral vector or enumeration type,
-</p>
-</li>
-<li>
-<p>
-integral, integral vector or enumeration type,
-</p>
-</li>
-<li>
-<p>
-[ &#8230; ]
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<em>[ISO/IEC 14882:2014: temp.param, ch. 14.1 (7)]</em> Template parameters: A non-type <em>template-parameter</em> shall not be declared to have floating point, floating-point vector, class, or void type.
-</p>
-</li>
-<li>
-<p>
-<em>[ISO/IEC 14882:2014: temp.type, ch. 14.4 (1, 1.3)]</em> Type equivalence: Two <em>template-ids</em> refer to the same class, function, or variable if
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-[ &#8230; ]
-</p>
-</li>
-<li>
-<p>
-their corresponding non-type template arguments of integral, integral vector or enumeration type have identical values and
-</p>
-</li>
-<li>
-<p>
-[ &#8230; ]
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<em>[ISO/IEC 14882:2014: temp.res, ch. 14.6 (8, 8.3, 8.3.1)]</em> Name resolution: [&#8230;] If the interpretation of such a construct in the hypothetical instantiation is different from the interpretation of the corresponding construct
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-integral, integral vector or enumeration type, in any actual instantiation of the template, the program is ill-formed; no diagnostic is required.
-  This can happen in situations including the following:
-</p>
-</li>
-<li>
-<p>
-[ &#8230; ]
-</p>
-</li>
-<li>
-<p>
-constant expression evaluation (5.20) within the template instantiation uses
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-the value of a const object of integral, integral vector or unscoped enumeration type or
-</p>
-</li>
-<li>
-<p>
-[ &#8230; ]
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-[ &#8230; ]
-</p>
-</li>
-</ul></div>
-</li>
-</ul></div>
-</li>
-</ol></div>
-</div>
-<div class="sect4">
-<h5 id="vector-component-access">Vector Component Access</h5>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-The components of vector type can be accessed using swizzle expression.
-The syntax of a swizzle expression is similar to syntax used in class member access expression <em>[ISO/IEC 14882:2014: expr.ref, ch. 5.2.5]</em>:
-The swizzle expression is a postfix expression formed with a postfix expression followed by a dot <span class="monospaced">.</span> or an arrow <span class="monospaced">-&gt;</span> and then followed by an <em>vector-swizzle-selector</em>. The postfix expression before the dot or arrow is evaluated. The result of that evaluation, together with the <em>vector-swizzle-selector</em>, determines the result of the entire postfix expression.
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">float4</span> v1 <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">2</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">3</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">4</span><span style="color: #990000">.</span>0f<span style="color: #990000">);</span>
-<span style="color: #008080">float4</span> <span style="color: #990000">*</span>pv1 <span style="color: #990000">=</span> <span style="color: #990000">&amp;</span>v1<span style="color: #990000">;</span>
-
-<span style="color: #008080">float2</span> v2 <span style="color: #990000">=</span> v1<span style="color: #990000">.</span>xz<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// v1.xz is a swizzle expression</span></span>
-<span style="color: #008080">float3</span> v3 <span style="color: #990000">=</span> pv1<span style="color: #990000">-&gt;</span>s321<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// pv1-&gt;s321 is a swizzle expression</span></span>
-                       <span style="font-style: italic"><span style="color: #9A1900">// equivalent to (*pv1).s321</span></span>
-<span style="color: #990000">(*</span>pv1<span style="color: #990000">).</span>rgb <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">float3</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">0</span><span style="color: #990000">.</span>5f<span style="color: #990000">,</span> <span style="color: #993399">1</span><span style="color: #990000">.</span>0f<span style="color: #990000">);</span> <span style="font-style: italic"><span style="color: #9A1900">// (*pv1).rgb is a swizzle expression</span></span>
-pv1<span style="color: #990000">-&gt;</span>lo<span style="color: #990000">.</span>hi <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">.</span>0f<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// pv1-&gt;lo and pv1-&gt;lo.hi are swizzle</span></span>
-                   <span style="font-style: italic"><span style="color: #9A1900">// expressions</span></span></tt></pre></div></div>
-</li>
-<li>
-<p>
-For the first option (dot) the first expression shall have vector type or be a swizzle expression which results in vector-swizzle of vector type.
-For the second option (arrow) the first expression shall have pointer to vector type.
-The expression <span class="monospaced">E1-&gt;E2</span> is converted to the equivalent form <span class="monospaced">(*(E1)).E2</span>; the remainder of <a href="#vector-component-access">Vector Component Access</a> will address only the first option (dot).
-</p>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content"><span class="monospaced">(*(E1))</span> is lvalue. In either case, the <em>vector-swizzle-selector</em> shall name a vector component selection of a swizzle.</td>
-</tr></table>
-</div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">uint8</span> v1 <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">uint8</span></span><span style="color: #990000">(</span><span style="color: #993399">10</span><span style="color: #990000">,</span> <span style="color: #993399">11</span><span style="color: #990000">,</span> <span style="color: #993399">12</span><span style="color: #990000">,</span> <span style="color: #993399">13</span><span style="color: #990000">,</span> <span style="color: #993399">14</span><span style="color: #990000">,</span> <span style="color: #993399">15</span><span style="color: #990000">,</span> <span style="color: #993399">16</span><span style="color: #990000">,</span> <span style="color: #993399">17</span><span style="color: #990000">);</span>
-
-<span style="color: #008080">uint4</span> v2 <span style="color: #990000">=</span> v1<span style="color: #990000">.</span>s7301<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// correct</span></span>
-<span style="color: #008080">uint3</span> v3 <span style="color: #990000">=</span> <span style="color: #990000">(&amp;</span>v1<span style="color: #990000">)-&gt;</span>s246<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// correct</span></span>
-<span style="color: #008080">uint4</span> v4 <span style="color: #990000">=</span> v1<span style="color: #990000">-&gt;</span>s0123<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: v1 is not a pointer to</span></span>
-                      <span style="font-style: italic"><span style="color: #9A1900">//             vector type</span></span>
-
-<span style="color: #008080">uint8</span> <span style="color: #990000">*</span>pv1 <span style="color: #990000">=</span> <span style="color: #990000">&amp;</span>v1<span style="color: #990000">;</span>
-
-<span style="color: #008080">uint2</span> v5 <span style="color: #990000">=</span> pv1<span style="color: #990000">-&gt;</span>S13<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// correct</span></span>
-<span style="color: #008080">uint2</span> v6 <span style="color: #990000">=</span> <span style="color: #990000">(*</span>pv1<span style="color: #990000">).</span>s0745<span style="color: #990000">.</span>even<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// correct</span></span>
-<span style="color: #008080">uint4</span> v7 <span style="color: #990000">=</span> pv1<span style="color: #990000">.</span>odd<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: pv1 is not vector or</span></span>
-                    <span style="font-style: italic"><span style="color: #9A1900">// vector-swizzle</span></span></tt></pre></div></div>
-</li>
-<li>
-<p>
-Abbreviating <em>postfix-expression.vector-swizzle-selector</em> as <span class="monospaced">E1.E2</span>, <span class="monospaced">E1</span> is called the vector expression.
-The type and value category of <span class="monospaced">E1.E2</span> are determined as follows.
-In the remainder of <a href="#vector-component-access">Vector Component Access</a>, <em>cq</em> represents either <span class="monospaced">const</span> or the absence of <span class="monospaced">const</span> and <em>vq</em> represents either <span class="monospaced">volatile</span> or the absence of <span class="monospaced">volatile</span>.
-cv represents an arbitrary set of cv-qualifiers, as defined in <em>[ISO/IEC 14882:2014: basic.type.qualifier, ch. 3.9.3]</em> .
-</p>
-</li>
-<li>
-<p>
-<em>vector-swizzle-selector</em> is subset of <em>identifier</em> with following syntax:
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p><em>vector-swizzle-selector</em>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<em>vector-swizzle-xyzw-selector</em>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-<em>vector-swizzle-xyzw-selector-value</em>
-</p>
-</li>
-<li>
-<p>
-<em>vector-swizzle-xyzw-selector vector-swizzle-xyzw-selector-value</em>
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<em>vector-swizzle-rgba-selector</em>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-<em>vector-swizzle-rgba-selector-value</em>
-</p>
-</li>
-<li>
-<p>
-<em>vector-swizzle-rgba-selector vector-swizzle-rgba-selector-value</em>
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<em>vector-swizzle-special-selector</em>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">hi</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">lo</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">even</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">odd</span>
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<em>vector-swizzle-num-selector</em>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">s</span> <em>vector-swizzle-num-selector-values</em>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">S</span> <em>vector-swizzle-num-selector-values</em>
-</p>
-</li>
-</ul></div>
-</li>
-</ul></div>
-</div></div>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p><em>vector-swizzle-num-selector-values</em>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<em>vector-swizzle-num-selector-value</em>
-</p>
-</li>
-<li>
-<p>
-<em>vector-swizzle-num-selector-values vector-swizzle-num-selector-value</em>
-</p>
-</li>
-</ul></div>
-</div></div>
-<div class="paragraph"><p><em>vector-swizzle-xyzw-selector-value</em>: one of <span class="monospaced">x y z w</span></p></div>
-<div class="paragraph"><p><em>vector-swizzle-rgba-selector-value</em>: one of <span class="monospaced">r g b a</span></p></div>
-<div class="paragraph"><p><em>vector-swizzle-num-selector-value</em>: one of <span class="monospaced">0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F</span></p></div>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>with following restrictions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<em>vector-swizzle-selector</em> in a form of <em>vector-swizzle-special-selector</em> shall only be used with vector expression with at least 2 components.
-</p>
-</li>
-<li>
-<p>
-<em>vector-swizzle-selector</em> shall not select components beyond those available in vector expression.
-</p>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content"><a href="#selector_values_and_their_corresponding_components_in_swizzle">Selector values and their corresponding components in swizzle</a> table describes relation between selector value and components.</td>
-</tr></table>
-</div>
-</li>
-<li>
-<p>
-<em>vector-swizzle-selector</em> shall have swizzle size of 1, 2, 3, 4, 8 or 16.
-</p>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">Result from the swizzle expression shall be either of scalar or of valid vector type.</td>
-</tr></table>
-</div>
-</li>
-</ul></div>
-</div></div>
-<div class="paragraph"><p>If <em>vector-swizzle-selector</em> does not meet requirements, the swizzle expression is ill-formed.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">int2</span> v2<span style="color: #990000">;</span>
-<span style="color: #008080">int3</span> v3<span style="color: #990000">;</span>
-<span style="color: #008080">int4</span> v4<span style="color: #990000">;</span>
-<span style="color: #008080">int8</span> v8<span style="color: #990000">;</span>
-<span style="color: #008080">int16</span> v16<span style="color: #990000">;</span>
-
-v4<span style="color: #990000">.</span>xyz <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">int3</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">,</span> <span style="color: #993399">2</span><span style="color: #990000">,</span> <span style="color: #993399">3</span><span style="color: #990000">);</span> <span style="font-style: italic"><span style="color: #9A1900">// correct: xyz selector</span></span>
-v4<span style="color: #990000">.</span>baS01 <span style="color: #990000">=</span> v8<span style="color: #990000">.</span>lo<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: baS01 is mix of rgba</span></span>
-                  <span style="font-style: italic"><span style="color: #9A1900">// and numerical selectors</span></span>
-v3<span style="color: #990000">.</span>rx <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">int2</span></span><span style="color: #990000">(</span><span style="color: #993399">20</span><span style="color: #990000">,</span> <span style="color: #993399">7</span><span style="color: #990000">);</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: mix of rgba and</span></span>
-                     <span style="font-style: italic"><span style="color: #9A1900">// xyzw selectors</span></span>
-
-<span style="color: #009900">int</span> v2c1 <span style="color: #990000">=</span> v2<span style="color: #990000">.</span>z<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// correct: xyzw selector</span></span>
-<span style="color: #009900">int</span> v3c1 <span style="color: #990000">=</span> v3<span style="color: #990000">.</span>b<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// correct: rgba selector</span></span>
-<span style="color: #008080">int2</span> v4c1 <span style="color: #990000">=</span> v4<span style="color: #990000">.</span>ww<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// correct: xyzw selector</span></span>
-<span style="color: #008080">int3</span> v8c1 <span style="color: #990000">=</span> v8<span style="color: #990000">.</span>xyz<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: xyzw and rgba selectors</span></span>
-                    <span style="font-style: italic"><span style="color: #9A1900">// are not allowed on vector expressions</span></span>
-                    <span style="font-style: italic"><span style="color: #9A1900">// with more than 4 components</span></span>
-<span style="color: #008080">int2</span> v8c2 <span style="color: #990000">=</span> v8<span style="color: #990000">.</span>hi<span style="color: #990000">.</span>xyz<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// correct: xyzw selector on vector</span></span>
-                       <span style="font-style: italic"><span style="color: #9A1900">// expression v8.hi (vector-swizzle</span></span>
-                       <span style="font-style: italic"><span style="color: #9A1900">// of int4 type)</span></span>
-
-<span style="color: #008080">int2</span> v3c2 <span style="color: #990000">=</span> v3<span style="color: #990000">.</span>odd<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// correct: special selector</span></span>
-<span style="color: #008080">int2</span> v3c2 <span style="color: #990000">=</span> v3<span style="color: #990000">.</span>x<span style="color: #990000">.</span>even<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: #1 vector expression</span></span>
-                       <span style="font-style: italic"><span style="color: #9A1900">// is invalid (vector swizzle of</span></span>
-                       <span style="font-style: italic"><span style="color: #9A1900">// scalar type)</span></span>
-                       <span style="font-style: italic"><span style="color: #9A1900">// #2 special selector cannot be</span></span>
-                       <span style="font-style: italic"><span style="color: #9A1900">// used with less than 2 components</span></span>
-
-v3<span style="color: #990000">.</span>x <span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// correct: xyzw selector</span></span>
-v3<span style="color: #990000">.</span>w <span style="color: #990000">=</span> <span style="color: #993399">2</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: there is no "w" component in int3</span></span>
-v2<span style="color: #990000">.</span>gb <span style="color: #990000">=</span> v4<span style="color: #990000">.</span>hi<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: there is no "b" component in int2</span></span>
-v8<span style="color: #990000">.</span>S7890 <span style="color: #990000">=</span> v4<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: int8 allows numerical selector</span></span>
-               <span style="font-style: italic"><span style="color: #9A1900">// in range 0-7</span></span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> v16c1 <span style="color: #990000">=</span> v16<span style="color: #990000">.</span>s012<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// correct: numerical selector</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> v16c2 <span style="color: #990000">=</span> v16<span style="color: #990000">.</span>s467899<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: swizzle expression</span></span>
-                          <span style="font-style: italic"><span style="color: #9A1900">// has not allowed size</span></span>
-                          <span style="font-style: italic"><span style="color: #9A1900">// (there is no int6 type)</span></span>
-
-<span style="color: #008080">int16</span> vv1 <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">int16</span></span><span style="color: #990000">(</span>v16<span style="color: #990000">.</span>S98aabb01<span style="color: #990000">,</span> v2<span style="color: #990000">,</span> v2<span style="color: #990000">.</span>gr<span style="color: #990000">,</span> v3<span style="color: #990000">.</span>xxxx<span style="color: #990000">);</span> <span style="font-style: italic"><span style="color: #9A1900">// correct</span></span>
-<span style="color: #008080">int16</span> vv2 <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">int16</span></span><span style="color: #990000">(</span>v16<span style="color: #990000">.</span>S98aabb0123<span style="color: #990000">,</span> v2<span style="color: #990000">.</span>gr<span style="color: #990000">,</span> v3<span style="color: #990000">.</span>xxxx<span style="color: #990000">);</span>
-                           <span style="font-style: italic"><span style="color: #9A1900">// ill-formed:</span></span>
-                           <span style="font-style: italic"><span style="color: #9A1900">// although it sums up to 16</span></span>
-                           <span style="font-style: italic"><span style="color: #9A1900">// components the</span></span>
-                           <span style="font-style: italic"><span style="color: #9A1900">// S98aabb0123 selector has invalid</span></span>
-                           <span style="font-style: italic"><span style="color: #9A1900">// swizzle size (there is no int10)</span></span>
-</tt></pre></div></div>
-</li>
-<li>
-<p>
-<em>vector-swizzle-selector</em>, in a form of <em>vector-swizzle-xyzw-selector</em>, <em>vector-swizzle-rgba-selector</em> or <em>vector-swizzle-num-selector</em> can specify multiple values.
-Each value selects single component.
-Values in a selector can be repeated and specified in any order.
-A number of values in a selector including repeated values is called the swizzle size.
-</p>
-<table class="tableblock frame-all grid-all" id="selector_values_and_their_corresponding_components_in_swizzle"
-style="
-width:100%;
-">
-<caption class="title">Table 6. Selector values and their corresponding components in swizzle</caption>
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Selector</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Selector value</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Selected component</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Required number of components in vector expression</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-xyzw-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">x</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">1<sup>st</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2, 3 or 4</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-xyzw-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">y</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2<sup>nd</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2, 3 or 4</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-xyzw-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">z</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">3<sup>rd</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">3 or 4</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-xyzw-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">w</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-rgba-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">r</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">1<sup>st</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2, 3 or 4</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-rgba-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">g</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2<sup>nd</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2, 3 or 4</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-rgba-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">b</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">3<sup>rd</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">3 or 4</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-rgba-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">a</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">0</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">1<sup>st</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2, 3, 4, 8 or 16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">1</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2<sup>nd</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2, 3, 4, 8 or 16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">2</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">3<sup>rd</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">3, 4, 8 or 16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">3</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4, 8 or 16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">4</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">5<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">8 or 16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">5</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">6<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">8 or 16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">6</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">7<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">8 or 16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">7</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">8<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">8 or 16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">8</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">9<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">9</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">10<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">a</span> or <span class="monospaced">A</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">11<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">b</span> or <span class="monospaced">B</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">12<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">c</span> or <span class="monospaced">C</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">13<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">d</span> or <span class="monospaced">D</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">14<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">e</span> or <span class="monospaced">E</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">15<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>vector-swizzle-num-selector</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">f</span> or <span class="monospaced">F</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">16<sup>th</sup></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">16</p></td>
-</tr>
-</tbody>
-</table>
-</li>
-<li>
-<p>
-<em>vector-swizzle-selector</em> in a form of <em>vector-swizzle-special-selector</em> shall select:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-if number of components in vector expression is 3, the same components as if number of components of the vector expression was 4 and the 4-th component was undefined.
-</p>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">If 4-th component is read, the returned value is undefined; all writes to 4-th component shall be discarded.</td>
-</tr></table>
-</div>
-</li>
-<li>
-<p>
-otherwise, half of components of <em>vector expression</em> with
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">hi</span> - highest numerical selector values in ascending order (higher half of the vector)
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">lo</span> - lowest numerical selector values in ascending order (lower half of the vector)
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">even</span> - even numerical selector values in ascending order
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">odd</span> - odd numerical selector values in ascending order
-</p>
-</li>
-</ul></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content"><a href="#special_selector_values">Special selector values</a> table describes special selector values and their numerical equivalents.</td>
-</tr></table>
-</div>
-<table class="tableblock frame-all grid-all" id="special_selector_values"
-style="
-width:100%;
-">
-<caption class="title">Table 7. Special selector values</caption>
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Number of components in vector expression</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Selector value</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Equivalent numerical selector</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Number of components in result vector swizzle (swizzle size)</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">hi</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s1</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">1</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">3</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">hi</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s2?</span> <a id="_ftnref3"></a> <a href="#ftn3">[3</a>]</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">hi</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s23</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">8</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">hi</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s4567</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">16</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">hi</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s89abcdef</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">lo</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s0</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">1</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">3</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">lo</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s01</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">lo</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s01</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">8</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">lo</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s0123</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">16</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">lo</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s01234567</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">even</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s0</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">1</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">3</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">even</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s02</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">even</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s02</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">8</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">even</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s0246</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">16</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">even</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s02468ace</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">odd</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s1</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">1</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">3</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">odd</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s1?</span> <a href="#ftn3">[3</a>]</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">odd</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s13</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">8</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">odd</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s1357</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">16</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">odd</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">s13579bdf</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">8</p></td>
-</tr>
-</tbody>
-</table>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">float8</span> v <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">float8</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">2</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">3</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">4</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">5</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">6</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">7</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">8</span><span style="color: #990000">.</span>0f<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> vv1 <span style="color: #990000">=</span> v<span style="color: #990000">.</span>hi<span style="color: #990000">;</span>   <span style="font-style: italic"><span style="color: #9A1900">// vv1 = float4(5, 6, 7, 8)</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> vv2 <span style="color: #990000">=</span> v<span style="color: #990000">.</span>lo<span style="color: #990000">;</span>  <span style="font-style: italic"><span style="color: #9A1900">// vv2 = float4(1, 2, 3, 4)</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> vv3 <span style="color: #990000">=</span> v<span style="color: #990000">.</span>even<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// equivalent of v.s0246; vv3 = float4(1, 3, 5, 7)</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> vv4 <span style="color: #990000">=</span> v<span style="color: #990000">.</span>odd<span style="color: #990000">;</span>  <span style="font-style: italic"><span style="color: #9A1900">// equivalent of v.s1357; vv4 = float4(2, 4, 6, 8)</span></span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> vv5 <span style="color: #990000">=</span> v<span style="color: #990000">.</span>odd<span style="color: #990000">.</span>even<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// vv5 = float2(2, 6)</span></span>
-
-<span style="color: #008080">int3</span> sv <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">int3</span></span><span style="color: #990000">(</span><span style="color: #993399">10</span><span style="color: #990000">,</span> <span style="color: #993399">20</span><span style="color: #990000">,</span> <span style="color: #993399">30</span><span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// ? means undefined value</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> svv1 <span style="color: #990000">=</span> sv<span style="color: #990000">.</span>hi<span style="color: #990000">;</span>  <span style="font-style: italic"><span style="color: #9A1900">// svv1 = int2(30, ?)</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> svv2 <span style="color: #990000">=</span> sv<span style="color: #990000">.</span>odd<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// svv2 = int2(20, ?)</span></span>
-
-sv<span style="color: #990000">.</span>hi <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">int2</span></span><span style="color: #990000">(-</span><span style="color: #993399">123</span><span style="color: #990000">,</span> <span style="color: #993399">456</span><span style="color: #990000">);</span> <span style="font-style: italic"><span style="color: #9A1900">// write to 4-th channel in sv is discarded;</span></span>
-                         <span style="font-style: italic"><span style="color: #9A1900">// equivalent of sv.s2 = int2(-123, 456).s0</span></span></tt></pre></div></div>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-The value of a swizzle expression <span class="monospaced">E1.E2</span> is <em>vector-swizzle</em>.
-The expression designates group of components of the object designated by expression <span class="monospaced">E1</span>.
-Selector <span class="monospaced">E2</span> specifies which components are designated, how many times and in which order.
-</p>
-<div class="paragraph"><p>Assuming that in the type of a vector expression <span class="monospaced">E1</span> is <span class="monospaced">cv Tn</span> where <span class="monospaced">T</span> denotes type of components and <span class="monospaced">n</span> their number in vector type, the resulting <em>vector-swizzle</em> shall have:</p></div>
-<div class="openblock">
-<div class="content">
-<div class="ulist"><ul>
-<li>
-<p>
-scalar type <span class="monospaced">cv T</span> if it is result of a swizzle expression with swizzle size of one or
-</p>
-</li>
-<li>
-<p>
-vector type <span class="monospaced">cv Tm</span> if it is result of a swizzle expression with swizzle size of two or more.
-</p>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content"><span class="monospaced">m</span> is a swizzle size.</td>
-</tr></table>
-</div>
-</li>
-</ul></div>
-</div></div>
-<div class="paragraph"><p>If <span class="monospaced">E1</span> is an lvalue, then <span class="monospaced">E1.E2</span> is an lvalue; if <span class="monospaced">E1</span> is an xvalue, then <span class="monospaced">E1.E2</span> is an xvalue; otherwise, it is a prvalue.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">long2</span> v<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">long2</span>  pv <span style="color: #990000">=</span> <span style="color: #990000">&amp;</span>v<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> vc1 <span style="color: #990000">=</span> pv<span style="color: #990000">-&gt;</span>x<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// pv-&gt;x is lvalue vector-swizzle of</span></span>
-                  <span style="font-style: italic"><span style="color: #9A1900">// scalar type: const long</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> vc2 <span style="color: #990000">=</span> pv<span style="color: #990000">-&gt;</span>rg<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// pv-&gt;rg is lvalue vector-swizzle of</span></span>
-                   <span style="font-style: italic"><span style="color: #9A1900">// vector type: const long2</span></span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span>  vc3 <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">uchar4</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">).</span>xxy<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// uchar4(1).xxy is prvalue</span></span>
-                           <span style="font-style: italic"><span style="color: #9A1900">// vector-swizzle</span></span>
-                           <span style="font-style: italic"><span style="color: #9A1900">// of vector type: uchar3</span></span>
-
-v<span style="color: #990000">.</span>x <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">long2</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">,</span> <span style="color: #993399">2</span><span style="color: #990000">);</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: cannot assign prvalue of long2</span></span>
-                   <span style="font-style: italic"><span style="color: #9A1900">// to lvalue vector-swizzle of</span></span>
-                   <span style="font-style: italic"><span style="color: #9A1900">// scalar type: long - types do not</span></span>
-                   <span style="font-style: italic"><span style="color: #9A1900">// match</span></span>
-</tt></pre></div></div>
-</li>
-<li>
-<p>
-A <em>vector-swizzle</em> with vector type <span class="monospaced">T</span> shall have the same number of components as number of components of <span class="monospaced">T</span>.
-Each component of the vector-swizzle refers to component from <span class="monospaced">E1</span> designated by corresponding value specified in selector <span class="monospaced">E2</span>, assuming that <span class="monospaced">E1.E2</span> is swizzle expression used to create the <em>vector-swizzle</em>.
-</p>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">First component refers to component from <span class="monospaced">E1</span> selected by first value in selector <span class="monospaced">E2</span>, second - by second value and so on.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>A <em>vector-swizzle</em> with scalar type <span class="monospaced">T</span> shall behave as value of <span class="monospaced">T</span> and refer to component from <span class="monospaced">E1</span> designated by <span class="monospaced">E2</span>'s value, assuming <span class="monospaced">E1.E2</span> is swizzle expression used to create the <em>vector-swizzle</em>.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">It is similar to reference bounded to value of selected component from <span class="monospaced">E1</span>.</td>
-</tr></table>
-</div>
-</li>
-<li>
-<p>
-A <em>vector-swizzle</em> shall have scalar or vector type.
-The address-of operator <span class="monospaced">&amp;</span> shall not be applied to <em>vector-swizzle</em>, so there are no pointers to <em>vector-swizzles</em>.
-A non-const reference shall not be bound to <em>vector-swizzle</em>.
-</p>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">If the initializer for a reference of type <span class="monospaced">const T&amp;</span> is lvalue that refers to vector-swizzle, the reference is bound to a temporary initialized to hold the value of the vector-swizzle; the reference is not bound to the vector-swizzle directly.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>There is no declarator for <em>vector-swizzle</em>.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">Any variable, member or type declaration shall not involve vector-swizzle; vector-swizzle cannot be stored.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>An <em>alignment-specifier</em> shall not be applied to <em>vector-swizzle</em>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">float4</span> v<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> pv1 <span style="color: #990000">=</span> <span style="color: #990000">&amp;</span>v<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// correct: pv1 points to v</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> pv2 <span style="color: #990000">=</span> <span style="color: #990000">&amp;</span>v<span style="color: #990000">.</span>xy<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: address-of operator &amp; is not</span></span>
-                  <span style="font-style: italic"><span style="color: #9A1900">// allowed on vector-swizzle</span></span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="color: #990000">&amp;</span>rv1 <span style="color: #990000">=</span> v<span style="color: #990000">.</span>xx<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// correct: refers to temporary value of</span></span>
-                        <span style="font-style: italic"><span style="color: #9A1900">// float2 type initialized with</span></span>
-                        <span style="font-style: italic"><span style="color: #9A1900">// value of vector-swizzle</span></span>
-<span style="color: #008080">float2</span> <span style="color: #990000">&amp;</span>rv2 <span style="color: #990000">=</span> v<span style="color: #990000">.</span>xy<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: binding to non-const reference</span></span>
-                    <span style="font-style: italic"><span style="color: #9A1900">// is not allowed</span></span></tt></pre></div></div>
-</li>
-<li>
-<p>
-A result <em>vector-swizzle</em> from swizzle expression <span class="monospaced">E1.E2</span> is modifiable if:
-</p>
-<div class="openblock">
-<div class="content">
-<div class="ulist"><ul>
-<li>
-<p>
-Vector expression <span class="monospaced">E1</span> is modifiable lvalue and
-</p>
-</li>
-<li>
-<p>
-Each component selected by <em>vector-swizzle-selector</em> <span class="monospaced">E2</span> is selected at most once.
-</p>
-</li>
-</ul></div>
-</div></div>
-<div class="paragraph"><p>Expression which modifies unmodifiable <em>vector-swizzle</em> is ill-formed.</p></div>
-<div class="paragraph"><p>Changes applied to modifiable <em>vector-swizzle</em> are applied to components of <span class="monospaced">E1</span> referred by the <em>vector-swizzle</em> or by its components.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">char4</span> v<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">char4</span>  cv<span style="color: #990000">;</span>
-
-v<span style="color: #990000">.</span>yx <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">char2</span></span><span style="color: #990000">(</span><span style="color: #993399">33</span><span style="color: #990000">,</span> <span style="color: #993399">45</span><span style="color: #990000">);</span> <span style="font-style: italic"><span style="color: #9A1900">// correct</span></span>
-v<span style="color: #990000">.</span>zzwx <span style="color: #990000">=</span> cv<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: v.zzwx is not modifiable</span></span>
-             <span style="font-style: italic"><span style="color: #9A1900">// (repeated components)</span></span>
-cv<span style="color: #990000">.</span>zxy <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">char3</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">);</span> <span style="font-style: italic"><span style="color: #9A1900">// ill-formed: cv.zxy is not modifiable</span></span>
-                   <span style="font-style: italic"><span style="color: #9A1900">// (cv is const)</span></span></tt></pre></div></div>
-</li>
-<li>
-<p>
-A prvalue for <em>vector-swizzle</em> of <span class="monospaced">T</span> type can be converted to a prvalue of <span class="monospaced">T</span> type.
-</p>
-<div class="paragraph"><p>This conversion is called <em>swizzle-to-vector</em> conversion.
-<em>swizzle-to-vector</em> conversion shall be applied if necessary in all contexts where lvalue-to-rvalue conversions are allowed.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">swizzle-to-vector conversion shall be applied after lvalue-to-rvalue conversions and before any arithmetic conversions.</td>
-</tr></table>
-</div>
-</li>
-<li>
-<p>
-A glvalue <em>vector-swizzle</em> of scalar or vector type <span class="monospaced">T</span> can be used in all expressions where glvalue of type <span class="monospaced">T</span> can be used except those which do not meet requirements and restrictions for <em>vector-swizzle</em>.
-</p>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">For example the address-of operator <span class="monospaced">&amp;</span> and binding to non-const reference are one of them.</td>
-</tr></table>
-</div>
-</li>
-<li>
-<p>
-A swizzle expression <span class="monospaced">E1.E2</span> where <span class="monospaced">E2</span> selects all components of vector expression <span class="monospaced">E1</span> in order of their numerical selector values is called identity swizzle.
-</p>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">Components selected in <span class="monospaced">E2</span> are not repeated.</td>
-</tr></table>
-</div>
-</li>
-<li>
-<p>
-Additional changes to C++ specification:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-<em>[ISO/IEC 14882:2014: expr.static.cast, ch. 5.2.9 (3)]</em> static_cast: If value is not a bit-field or a <em>vector-swizzle</em>, [&#8230;]; if value is a <em>vector-swizzle</em>, the <em>lvalue-to-rvalue</em> conversion and <em>swizzle-to-vector</em> conversion are applied to the <em>vector-swizzle</em> and the resulting prvalue is used as the expression of the <span class="monospaced">static_cast</span> for the remainder of this section; otherwise, [&#8230;]
-</p>
-</li>
-<li>
-<p>
-<em>[ISO/IEC 14882:2014: expr.unary.op, ch. 5.3.1 (5)]</em> Unary operators: [&#8230;] The operand of <span class="monospaced">&amp;</span> shall not be a bit-field or a <em>vector-swizzle</em>.
-</p>
-</li>
-<li>
-<p>
-<em>[ISO/IEC 14882:2014: expr.pre.incr, ch. 5.3.2 (1)]</em> Increment and decrement: The result is the updated operand; it is an lvalue, and it is a bit-field or a <em>vector-swizzle</em> if the operand is respectively a bit-field or a <em>vector-swizzle</em>.
-</p>
-</li>
-<li>
-<p>
-<em>[ISO/IEC 14882:2014: expr.sizeof, ch. 5.3.3 (2)]</em> Sizeof: [&#8230;] When applied to a <em>vector-swizzle</em> which has type <span class="monospaced">T</span>, the result is the same as result from <span class="monospaced">sizeof(T)</span>.
-</p>
-</li>
-<li>
-<p>
-<em>[ISO/IEC 14882:2014: expr.cond, ch. 5.16 (2.1)]</em> Conditional operator: - [&#8230;] The conditional-expression is a bit-field or a <em>vector-swizzle</em> if that operand is respectively a bit-field or a <em>vector-swizzle</em>.
-</p>
-</li>
-<li>
-<p>
-<em>[ISO/IEC 14882:2014: expr.cond, ch. 5.16 (4)]</em> Conditional operator: If the second and third operands are glvalues of the same value category and have the same type, the result is of that type and value category and it is a bit-field if the second or the third operand is a bit-field, or if both are bit-fields.
-  The result is also a <em>vector-swizzle</em> if the second or the third operand is a <em>vector-swizzle</em>, or if both are <em>vector-swizzles</em>.
-</p>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">An operand is converted to vector-swizzle if required by applying identity swizzle expression to it.</td>
-</tr></table>
-</div>
-</li>
-<li>
-<p>
-<em>[ISO/IEC 14882:2014: expr.ass, ch. 5.18 (1)]</em> Assignment and compound assignment operators: The result in all cases is a bit-field or a <em>vector-swizzle</em> if the left operand is respectively a bit-field or a <em>vector-swizzle</em>.
-</p>
-</li>
-<li>
-<p>
-<em>[ISO/IEC 14882:2014: expr.comma, ch. 5.19 (1)]</em> Comma operator: The type and value of the result are the type and value of the right operand; the result is of the same value category as its right operand, and is a bit-field if its right operand is a glvalue and a bit-field, and is a <em>vector-swizzle</em> its right operand is a glvalue and a <em>vector-swizzle</em>.
-</p>
-</li>
-<li>
-<p>
-<em>[ISO/IEC 14882:2014: dcl.type.simple, ch. 7.1.6.2 (4, 4.1)]</em> Simple type specifiers: For an expression e, the type denoted by decltype(e) is defined as follows:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-if e is an unparenthesized id-expression or an unparenthesized class member access (5.2.5) or unparenthesized swizzle expression, <span class="monospaced">decltype(e)</span> is the type of the entity named by e. If there is no such entity, or if e names a set of overloaded functions, the program is ill-formed.
-</p>
-</li>
-</ul></div>
-</li>
-</ul></div>
-</li>
-</ol></div>
-</div>
-<div class="sect4">
-<h5 id="vector-constructors">Vector Constructors</h5>
-<div class="paragraph"><p>Vector constructors are defined to initialize a vector data type from a list of scalar or vectors.
-The forms of the constructors that are available is the set of possible argument lists for which all arguments have the same element type as the result vector, and the total number of elements is equal to the number of elements in the result vector.
-In addition, a form with a single scalar of the same type as the element type of the vector is available.</p></div>
-<div class="paragraph"><p>For example, the following forms are available for <span class="monospaced">float4</span>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> <span style="color: #009900">float</span> <span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span> float2<span style="color: #990000">,</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> <span style="color: #009900">float</span> <span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> float2<span style="color: #990000">,</span> <span style="color: #009900">float</span> <span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> float2 <span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span> float2<span style="color: #990000">,</span> float2 <span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span> float3<span style="color: #990000">,</span> <span style="color: #009900">float</span> <span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> float3 <span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span> <span style="color: #009900">float</span> <span style="color: #990000">)</span>
-
-float4<span style="color: #FF0000">{</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> <span style="color: #009900">float</span> <span style="color: #FF0000">}</span>
-float4<span style="color: #FF0000">{</span> float2<span style="color: #990000">,</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> <span style="color: #009900">float</span> <span style="color: #FF0000">}</span>
-float4<span style="color: #FF0000">{</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> float2<span style="color: #990000">,</span> <span style="color: #009900">float</span> <span style="color: #FF0000">}</span>
-float4<span style="color: #FF0000">{</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> float2 <span style="color: #FF0000">}</span>
-float4<span style="color: #FF0000">{</span> float2<span style="color: #990000">,</span> float2 <span style="color: #FF0000">}</span>
-float4<span style="color: #FF0000">{</span> float3<span style="color: #990000">,</span> <span style="color: #009900">float</span> <span style="color: #FF0000">}</span>
-float4<span style="color: #FF0000">{</span> <span style="color: #009900">float</span><span style="color: #990000">,</span> float3 <span style="color: #FF0000">}</span>
-float4<span style="color: #FF0000">{</span> <span style="color: #009900">float</span> <span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>Operands are evaluated by standard rules for function evaluation, except that implicit scalar-to-vector conversion shall not occur.
-The order in which the operands are evaluated is undefined.
-The operands are assigned to their respective positions in the result vector as they appear in memory order.
-That is, the first element of the first operand is assigned to result.x, the second element of the first operand (or the first element of the second operand if the first operand was a scalar) is assigned to result.y, etc.
-In the case of the form that has a single scalar operand, the operand is replicated across all lanes of the vector.</p></div>
-<div class="paragraph"><p>Examples:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">float4</span> f <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">2</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">3</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">4</span><span style="color: #990000">.</span>0f<span style="color: #990000">);</span>
-
-<span style="color: #008080">uint4</span>  u <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">uint4</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">);</span> <span style="font-style: italic"><span style="color: #9A1900">// u will be (1, 1, 1, 1).</span></span>
-
-<span style="color: #008080">float4</span> f <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">float2</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">2</span><span style="color: #990000">.</span>0f<span style="color: #990000">),</span>
-                  <span style="font-weight: bold"><span style="color: #000000">float2</span></span><span style="color: #990000">(</span><span style="color: #993399">3</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">4</span><span style="color: #990000">.</span>0f<span style="color: #990000">));</span>
-
-<span style="color: #008080">float4</span> f <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #000000">float2</span></span><span style="color: #990000">(</span><span style="color: #993399">2</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">3</span><span style="color: #990000">.</span>0f<span style="color: #990000">),</span> <span style="color: #993399">4</span><span style="color: #990000">.</span>0f<span style="color: #990000">);</span>
-
-<span style="color: #008080">float4</span> f <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">2</span><span style="color: #990000">.</span>0f<span style="color: #990000">);</span> <span style="font-style: italic"><span style="color: #9A1900">// error</span></span>
-
-<span style="color: #008080">int4</span> i <span style="color: #990000">=</span> <span style="color: #990000">(</span>int4<span style="color: #990000">)(</span><span style="color: #993399">1</span><span style="color: #990000">,</span> <span style="color: #993399">2</span><span style="color: #990000">,</span> <span style="color: #993399">3</span><span style="color: #990000">,</span> <span style="color: #993399">4</span><span style="color: #990000">);</span> <span style="font-style: italic"><span style="color: #9A1900">// warning, vector literals (from OpenCL C) are</span></span>
-                             <span style="font-style: italic"><span style="color: #9A1900">// not part of OpenCL C++,</span></span>
-                             <span style="font-style: italic"><span style="color: #9A1900">// this expression will be evaluated to (int4)4,</span></span>
-                             <span style="font-style: italic"><span style="color: #9A1900">// and i will be (4, 4, 4, 4)</span></span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="vector-types-and-usual-arithmetic-conversions">Vector Types and Usual Arithmetic Conversions</h5>
-<div class="paragraph"><p>Many operators that expect operands of arithmetic type cause conversions and yield result types in a similar way.
-The purpose is to determine a common real type for the operands and result.
-For the specified operands, each operand is converted, without change of type domain, to a type whose corresponding real type is the common real type.
-For this purpose, all vector types shall be considered to have higher conversion ranks than scalars.
-Unless explicitly stated otherwise, the common real type is also the corresponding real type of the result, whose type domain is the type domain of the operands if they are the same, and complex otherwise.
-This pattern is called the usual arithmetic conversions.
-If the operands are of more than one vector type, then an error shall occur.
-Implicit conversions between vector types are not permitted, per <em><a href="#implicit-type-conversions">Implicit Type Conversions</a> section</em>.</p></div>
-<div class="paragraph"><p>Otherwise, if there is only a single vector type, and all other operands are scalar types, the scalar types are converted to the type of the vector element, then widened into a new vector containing the same number of elements as the vector, by duplication of the scalar value across the width of the new vector.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="alignment-of-types">2.1.3. Alignment of Types</h4>
-<div class="paragraph"><p>A data item declared to be a data type in memory is always aligned to the size of the data type in bytes.
-For example, a <span class="monospaced">float4</span> variable will be aligned to a 16-byte boundary, a <span class="monospaced">char2</span> variable will be aligned to a 2-byte boundary.</p></div>
-<div class="paragraph"><p>For 3-component vector data types, the size of the data type is <span class="monospaced">4 * sizeof(component)</span>.
-This means that a 3-component vector data type will be aligned to a <span class="monospaced">4 * sizeof(component)</span> boundary.
-The <span class="monospaced">vload3</span> and <span class="monospaced">vstore3</span> built-in functions can be used to read and write, respectively, 3-component vector data types from an array of packed scalar data type.</p></div>
-<div class="paragraph"><p>A built-in data type that is not a power of two bytes in size must be aligned to the next larger power of two.
-This rule applies to built-in types only, not structs or unions.</p></div>
-<div class="paragraph"><p>The OpenCL C++ compiler is responsible for aligning data items to the appropriate alignment as required by the data type.
-For arguments to a kernel function declared to be a pointer to a data type, the OpenCL compiler can assume that the pointee is always appropriately aligned as required by the data type.
-The behavior of an unaligned load or store is undefined, except for the <span class="monospaced">vload</span><em>n</em>, <span class="monospaced">vload_half</span><em>n</em>, <span class="monospaced">vstore</span><em>n</em>, and <span class="monospaced">vstore_half</span><em>n</em> functions defined in <em><a href="#vector-data-load-and-store-functions">Vector Data Load and Store Functions</a> section</em>.
-The vector load functions can read a vector from an address aligned to the element type of the vector.
-The vector store functions can write a vector to an address aligned to the element type of the vector.</p></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="keywords">2.2. Keywords</h3>
-<div class="paragraph"><p>The following names are reserved for use as keywords in OpenCL C++ and shall not be used otherwise.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Names reserved as keywords by C++14.
-</p>
-</li>
-<li>
-<p>
-OpenCL C++ data types defined in <a href="#device_builtin_scalar_data_types">Device built-in scalar data types</a> and <a href="#device_builtin_vector_data_types">Device built-in vector data types</a> tables.
-</p>
-</li>
-<li>
-<p>
-Function qualifiers: <span class="monospaced">__kernel</span> and <span class="monospaced">kernel</span>.
-</p>
-</li>
-<li>
-<p>
-Access qualifiers: <span class="monospaced">__read_only</span>, <span class="monospaced">read_only</span>, <span class="monospaced">__write_only</span>, <span class="monospaced">write_only</span>, <span class="monospaced">__read_write</span> and <span class="monospaced">read_write</span>.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect2">
-<h3 id="implicit-type-conversions">2.3. Implicit Type Conversions</h3>
-<div class="paragraph"><p>Implicit conversions between scalar built-in types defined in <a href="#device_builtin_scalar_data_types">Device built-in scalar data types</a> table (except <span class="monospaced">void</span>) are supported.
-When an implicit conversion is done, it is not just a re-interpretation of the expression&#8217;s value, but a conversion of that value to an equivalent value in the new type.
-For example, the integer value 5 will be converted to the floating-point value 5.0.</p></div>
-<div class="paragraph"><p>Implicit conversions from a scalar type to a vector type are allowed.
-In this case, the scalar may be subject to the usual arithmetic conversion to the element type used by the vector.
-The scalar type is then widened to the vector.
-If conversion from a scalar type to the element type used by the vector result in truncation or precision loss, the program is ill-formed, with the exception that:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-if scalar value is prvalue of literal type and the value is representable as the element type, the conversion should take place without error (warnings may be generated in this case).
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Implicit conversions between built-in vector data types are disallowed.
-Explicit conversions described in <em><a href="#conversions-library">Conversions Library</a> section</em> must be used instead.</p></div>
-<div class="paragraph"><p>Implicit conversions for pointer types follow the rules described in the C++14 specification.</p></div>
-</div>
-<div class="sect2">
-<h3 id="expressions">2.4. Expressions</h3>
-<div class="paragraph"><p>All expressions behave as described in <em>[ISO/IEC 14882:2014: expr, ch. 5]</em> with the the restrictions described in <em><a href="#opencl_cxx_restrictions">OpenCL C++ Restrictions</a> section</em> and the following changes:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-All built-in operators have their vector counterparts.
-</p>
-</li>
-<li>
-<p>
-All built-in vector operations, apart from conditional operator, are performed component-wise.
-</p>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">Conditional operator logical-or-expression cannot be of vector type.</td>
-</tr></table>
-</div>
-</li>
-<li>
-<p>
-Built in operators taking two vectors require that vectors have the same number of components, otherwise expression is ill-formed.
-</p>
-</li>
-<li>
-<p>
-Vector swizzle operations meet extra requirements and restrictions described in <em><a href="#vector-component-access">Vector Component Access</a> section</em>.
-</p>
-</li>
-<li>
-<p>
-Implicit and explicit casts between vector types are not legal.
-The conversion between vector types can be done only using <span class="monospaced">convert_cast</span> from <em><a href="#conversions-library">Conversions Library</a> section</em>.
-</p>
-<div class="paragraph"><p>Examples:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">int4</span>   i<span style="color: #990000">;</span>
-<span style="color: #008080">uint4</span>  u <span style="color: #990000">=</span> <span style="color: #990000">(</span>uint4<span style="color: #990000">)</span> i<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// not allowed</span></span>
-
-<span style="color: #008080">float4</span> f<span style="color: #990000">;</span>
-<span style="color: #008080">int4</span>   i <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">static_cast</span></span><span style="color: #990000">&lt;</span>int4<span style="color: #990000">&gt;(</span>f<span style="color: #990000">);</span> <span style="font-style: italic"><span style="color: #9A1900">// not allowed</span></span>
-
-<span style="color: #008080">float4</span> f<span style="color: #990000">;</span>
-<span style="color: #008080">int8</span>   i <span style="color: #990000">=</span> <span style="color: #990000">(</span>int8<span style="color: #990000">)</span> f<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// not allowed</span></span></tt></pre></div></div>
-</li>
-<li>
-<p>
-Implicit and explicit casts from scalar to vector types are supported.
-</p>
-</li>
-<li>
-<p>
-All built-in arithmetic operators return result of the same built-in type (integer or floating-point) as the type of the operands, after operand type conversion.
-After conversion, the following cases are valid:
-</p>
-<div class="olist loweralpha"><ol class="loweralpha">
-<li>
-<p>
-The two operands are scalars.  In this case, the operation is applied, resulting in a scalar.
-</p>
-</li>
-<li>
-<p>
-One operand is a scalar, and the other is a vector.
-In this case, the scalar may be subject to the usual arithmetic conversion to the element type used by the vector operand.
-The scalar type is then widened to a vector that has the same number of components as the vector operand.
-The operation is done component-wise resulting in the same size vector.
-</p>
-</li>
-<li>
-<p>
-The two operands are vectors of the same type.
-In this case, the operation is done component-wise resulting in the same size vector.
-</p>
-</li>
-</ol></div>
-</li>
-<li>
-<p>
-The built-in relational and equality operators equal (<span class="monospaced">==</span>), not equal (<span class="monospaced">!=</span>), greater than (<span class="monospaced">&gt;</span>), greater than or equal (<span class="monospaced">&gt;=</span>), less than (<span class="monospaced">&lt;</span>), and less than or equal (<span class="monospaced">&lt;=</span>) operate on scalar and vector types.
-All relational and equality operators result in a boolean (scalar or vector) type.
-After operand type conversion, the following cases are valid:
-</p>
-<div class="olist loweralpha"><ol class="loweralpha">
-<li>
-<p>
-The two operands are scalars.
-In this case, the operation is applied, resulting in a boolean scalar.
-</p>
-</li>
-<li>
-<p>
-One operand is a scalar, and the other is a vector.
-In this case, the scalar may be subject to the usual arithmetic conversion to the element type used by the vector operand.
-The scalar type is then widened to a vector that has the same number of components as the vector operand.
-The operation is done component-wise resulting in the same size boolean vector.
-</p>
-</li>
-<li>
-<p>
-The two operands are vectors of the same type.
-In this case, the operation is done component-wise resulting in the same size boolean vector.
-</p>
-</li>
-</ol></div>
-</li>
-<li>
-<p>
-The built-in bitwise operators and (<span class="monospaced">&amp;</span>), or (<span class="monospaced">|</span>), exclusive or (<span class="monospaced">^</span>), not (<span class="monospaced">~</span>) operate on all scalar and vector built-in types except the built-in scalar and vector float types.
-For vector built-in types, the operators are applied component-wise.
-If one operand is a scalar and the other is a vector, the scalar may be subject to the usual arithmetic conversion to the element type used by the vector operand.
-The scalar type is then widened to a vector that has the same number of components as the vector operand.
-The operation is done component-wise resulting in the same size vector.
-</p>
-</li>
-<li>
-<p>
-The built-in logical operators and (<span class="monospaced">&amp;&amp;</span>), or (<span class="monospaced">||</span>) operate on all scalar and vector built-in types.
-For scalar built-in types the logical operator and (&amp;&amp;) will only evaluate the right hand operand if the left hand operand compares unequal to <span class="monospaced">false</span>.
-For scalar built-in types the logical operator or (<span class="monospaced">||</span>) will only evaluate the right hand operand if the left hand operand compares equal to <span class="monospaced">false</span>.
-For built-in vector types, both operands are evaluated and the operators are applied component-wise.
-If one operand is a scalar and the other is a vector, the scalar may be subject to the usual arithmetic conversion to the element type used by the vector operand.
-The scalar type is then widened to a vector that has the same number of components as the vector operand.
-The operation is done component-wise resulting in the same size vector.
-</p>
-<div class="paragraph"><p>The result is a scalar or vector boolean.</p></div>
-</li>
-<li>
-<p>
-The built-in logical unary operator not (<span class="monospaced">!</span>) operates on all scalar and vector built-in types.
-For built-in vector types, the operators are applied component-wise.
-</p>
-<div class="paragraph"><p>The result is a scalar or vector boolean.</p></div>
-</li>
-<li>
-<p>
-The built-in conditional operator (?: described in <em>[ISO/IEC 14882:2014: expr, ch. 5.2]</em> operates on three expressions (<span class="monospaced">exp1 ? exp2 : exp3</span>).
-This operator evaluates the first expression <span class="monospaced">exp1</span>, which must be a scalar boolean result.
-If the result is <em>true</em> it selects to evaluate the second expression, otherwise it selects to evaluate the third expression.
-The second and third expressions can be any type, as long their types match, or there is a conversion in <em><a href="#implicit-type-conversions">Implicit Type Conversions</a> section</em> that can be applied to one of the expressions to make their types match, or one is a vector and the other is a scalar and the scalar may be subject to the usual arithmetic conversion to the element type used by the vector operand and widened to the same type as the vector type.
-</p>
-<div class="paragraph"><p>This resulting matching type is the type of the entire expression.</p></div>
-</li>
-<li>
-<p>
-The built-in shift operators are supported for built-in vector types except the built-in scalar and vector float types.
-For built-in vector types, the operators are applied component-wise.
-For the right-shift (<span class="monospaced">&gt;&gt;</span>), left-shift (<span class="monospaced">&lt;&lt;</span>) operators, the rightmost operand must be a scalar if the first operand is a scalar, and the rightmost operand can be a vector or scalar if the first operand is a vector.
-The result of <span class="monospaced">E1 &lt;&lt; E2</span> is <span class="monospaced">E1</span> left-shifted by <span class="monospaced">log2(N)</span> least significant bits in <span class="monospaced">E2</span> viewed as an unsigned integer value, where <span class="monospaced">N</span> is the number of bits used to represent the data type of <span class="monospaced">E1</span> after integer promotion, if <span class="monospaced">E1</span> is a scalar, or the number of bits used to represent the type of <span class="monospaced">E1</span> elements, if <span class="monospaced">E1</span> is a vector.
-The vacated bits are filled with zeros.
-The result of <span class="monospaced">E1 &gt;&gt; E2</span> is <span class="monospaced">E1</span> right-shifted by <span class="monospaced">log2(N)</span> least significant bits in <span class="monospaced">E2</span> viewed as an unsigned integer value, where <span class="monospaced">N</span> is the number of bits used to represent the data type of <span class="monospaced">E1</span> after integer promotion, if <span class="monospaced">E1</span> is a scalar, or the number of bits used to represent the type of <span class="monospaced">E1</span> elements, if <span class="monospaced">E1</span> is a vector.
-</p>
-<div class="paragraph"><p>If <span class="monospaced">E1</span> has an unsigned type or if <span class="monospaced">E1</span> has a signed type and a nonnegative value, the vacated bits are filled with zeros.</p></div>
-<div class="paragraph"><p>If <span class="monospaced">E1</span> has a signed type and a negative value, the vacated bits are filled with ones.</p></div>
-</li>
-</ol></div>
-</div>
-<div class="sect2">
-<h3 id="address-spaces">2.5. Address Spaces</h3>
-<div class="paragraph"><p>The OpenCL C++ kernel language doesn&#8217;t introduce any explicit named address spaces, but they are implemented as part of the standard library described in <em><a href="#address-spaces-library">Address Spaces Library</a> section</em>.
-There are 4 types of memory supported by all OpenCL devices: global, local, private and constant.
-The developers should be aware of them and know their limitations.</p></div>
-<div class="sect3">
-<h4 id="implicit-storage-classes">2.5.1. Implicit Storage Classes</h4>
-<div class="paragraph"><p>The OpenCL C++ compiler can deduce an address space based on the scope where an object is declared:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-If a variable is declared in program scope, with <span class="monospaced">static</span> or <span class="monospaced">extern</span> specifier and the standard library storage class (<em><a href="#address-spaces-library">Address Spaces Library</a> section</em>) is not used, the variable is allocated in the global memory of a device.
-</p>
-</li>
-<li>
-<p>
-If a variable is declared in function scope, without <span class="monospaced">static</span> specifier and the standard library storage class (<em><a href="#address-spaces-library">Address Spaces Library</a> section</em>) is not used, the variable is allocated in the private memory of a device.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="memory-pools">2.5.2. Memory Pools</h4>
-<div class="sect4">
-<h5 id="global">Global</h5>
-<div class="paragraph"><p>The variables are allocated from the global memory pool if they meet the criteria described in <em><a href="#implicit-storage-classes">Implicit Storage Classes</a> section</em> for the implicit global storage class or they are declared using explicit global storage class from the standard library (<em><a href="#global-class">global class</a> section</em>).</p></div>
-<div class="paragraph"><p>The global memory objects can be:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Passed by pointer or reference to a kernel from the host.
-In such case the host manages their visibility, lifetime and a type of allocation.
-</p>
-</li>
-<li>
-<p>
-Declared in the program source (<span class="monospaced">static</span>, <span class="monospaced">extern</span> and program scope global variables).
-In such case they are:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-the coarse-grained SVM allocations that can be usable by multiple kernels on the same device safely
-</p>
-</li>
-<li>
-<p>
-not shared across devices
-</p>
-</li>
-<li>
-<p>
-not accessible from the host
-</p>
-</li>
-<li>
-<p>
-their lifetime is the same as a program
-</p>
-</li>
-</ul></div>
-</li>
-</ul></div>
-<div class="paragraph"><p>The non-trivial constructors and destructors are supported with limitations described in <em><a href="#memory-initialization">Memory initialization</a> section</em>.</p></div>
-<div class="paragraph"><p>The constructors of objects in global memory are executed before the first kernel execution in the program.
-The destructors executed at program release time.</p></div>
-<div class="paragraph"><p>The additional restrictions may apply if the explicit global storage class is used.
-Please refer to <em><a href="#restrictions-2">Restrictions</a> section</em> for more details.</p></div>
-</div>
-<div class="sect4">
-<h5 id="local">Local</h5>
-<div class="paragraph"><p>The local variables can be only allocated in a program using the explicit local storage class from the standard library (<em><a href="#local-class">local class</a> section</em>).
-This type of memory is allocated for each work-group executing the kernel and exist only for the lifetime of the work-group executing the kernel.</p></div>
-<div class="paragraph"><p>The non-trivial constructors and destructors are supported with limitations described in <em><a href="#memory-initialization">Memory initialization</a> section</em>.</p></div>
-<div class="paragraph"><p>The constructors of objects in local memory are executed by one work-item before the kernel body execution.
-The destructors are executed by one work-item after the kernel body execution.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">initialization of local variables can cause performance degradation.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>The additional restrictions may apply if the explicit local storage class is used.
-Please refer to <em><a href="#restrictions-2">Restrictions</a> section</em> for more details.</p></div>
-</div>
-<div class="sect4">
-<h5 id="private">Private</h5>
-<div class="paragraph"><p>The variables are allocated from the private memory pool if they meet the criteria described in <a href="#implicit-storage-classes">Implicit Storage Classes</a> for the implicit private storage class or they were declared using explicit private storage class from the standard library (<em><a href="#priv-class">priv class</a> section</em>).</p></div>
-<div class="paragraph"><p>The non-trivial constructors and destructors are supported.</p></div>
-<div class="paragraph"><p>The additional restrictions may apply if the explicit priv storage class is used.
-Please refer to <em><a href="#restrictions-2">Restrictions</a> section</em> for more details.</p></div>
-</div>
-<div class="sect4">
-<h5 id="constant">Constant</h5>
-<div class="paragraph"><p>The constant variables can be only allocated in a program using the explicit constant storage class from the standard library (<em><a href="#constant-class">constant class</a> section</em>).
-The variables declared using the <span class="monospaced">constant&lt;T&gt;</span> class refer to memory objects allocated from the global memory pool and which are accessed inside a kernel(s) as read-only variables.
-These read-only variables can be accessed by all (global) work-items of the kernel during its execution.</p></div>
-<div class="paragraph"><p>The constant objects must be constructible at compile time, they cannot have any user defined constructors, destructors, methods and operators.
-Otherwise behavior is undefined.</p></div>
-<div class="paragraph"><p>The additional restrictions may apply if the explicit constant storage class is used.
-Please refer to <em><a href="#restrictions-2">Restrictions</a> section</em> for more details.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="pointers-and-references">2.5.3. Pointers and references</h4>
-<div class="paragraph"><p>All C++ pointers and references point to an object in the unnamed/generic address space if the explicit address space pointer classes are not used.
-The explicit address space pointer classes are implemented as a part of the standard library and they are described in <em><a href="#explicit-address-space-pointer-classes">Explicit address space pointer classes</a> section</em>.</p></div>
-</div>
-<div class="sect3">
-<h4 id="memory-initialization">2.5.4. Memory initialization</h4>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 8. Supported memory initializers</caption>
-<col style="width:13%;">
-<col style="width:12%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Storage memory (address space)</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Scope type</strong></th>
-<th class="tableblock halign-left valign-top" colspan="3" ><strong>Initialization type</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">uninitialized (no constructor or trivial default constructor)</p>
-<p class="tableblock"><strong>AND</strong></p>
-<p class="tableblock">trivial destructor</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">initialized by constant expression</p>
-<p class="tableblock"><strong>AND</strong></p>
-<p class="tableblock">trivial destructor</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">custom initializer</p>
-<p class="tableblock"><strong>OR</strong></p>
-<p class="tableblock">custom destructor</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" rowspan="4" ><p class="tableblock">local</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">program</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported (not zero-pre-init)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">not supported</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">not supported</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">kernel</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p>
-<p class="tableblock">Variables are not zero-pre-initialized.</p>
-<p class="tableblock">Optional zero-pre-initialization possible using switch: -cl-zero-init-local-mem-vars</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p>
-<p class="tableblock">Variables are not zero-pre-initialized.</p>
-<p class="tableblock">Materialize temporary expressions are not supported.</p>
-<p class="tableblock">Optional zero-pre-initialization possible using switch: -cl-zero-init-local-mem-vars</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p>
-<p class="tableblock">Variables are not zero-pre-initialized.</p>
-<p class="tableblock">Materialize temporary expressions are not supported.</p>
-<p class="tableblock">Optional zero-pre-initialization possible using switch: -cl-zero-init-local-mem-vars</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">local (non-kernel)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">not supported</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">not supported</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">not supported</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">class (static data member)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p>
-<p class="tableblock">Variables are not zero-pre-initialized.</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">not supported</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">not supported</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" rowspan="3" ><p class="tableblock">global</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">program</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p>
-<p class="tableblock">Variables are zero-pre-initialized.</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p>
-<p class="tableblock">Variables are zero or constexpr-pre-initialized.</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">kernel / local</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p>
-<p class="tableblock">Variables are zero-pre-initialized.</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p>
-<p class="tableblock">Variables are zero or constexpr-pre-initialized.</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">not supported</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">class (static data member)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p>
-<p class="tableblock">Variables are zero-pre-initialized.</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p>
-<p class="tableblock">Variables are zero or constexpr-pre-initialized.</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">not supported</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">constant</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">(any)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p>
-<p class="tableblock">Variables are zero-pre-initialized.</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p>
-<p class="tableblock">Variables are zero or constexpr-pre-initialized.</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">not supported</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">private</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">(any)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">supported</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect2">
-<h3 id="kernel-functions">2.6. Kernel Functions</h3>
-<div class="sect3">
-<h4 id="function-qualifiers">2.6.1. Function Qualifiers</h4>
-<div class="paragraph"><p>The <span class="monospaced">kernel</span> (or <span class="monospaced">__kernel</span>) qualifier declares a function to be a kernel that can be executed by an application on an OpenCL device(s).
-The following rules apply to functions that are declared with this qualifier:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-It can be executed on the device only.
-</p>
-</li>
-<li>
-<p>
-It can be enqueued by the host or on the device.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The <span class="monospaced">kernel</span> and <span class="monospaced">__kernel</span> names are reserved for use as functions qualifiers and shall not be used otherwise.</p></div>
-</div>
-<div class="sect3">
-<h4 id="restrictions">2.6.2. Restrictions</h4>
-<div class="sect4">
-<h5 id="kernel-function-restrictions">Kernel Function Restrictions</h5>
-<div class="ulist"><ul>
-<li>
-<p>
-A kernel functions are by implicitly declared as <span class="monospaced">extern "C"</span>.
-</p>
-</li>
-<li>
-<p>
-A kernel function cannot be overloaded.
-</p>
-</li>
-<li>
-<p>
-A kernel function cannot be template functions.
-</p>
-</li>
-<li>
-<p>
-A kernel function cannot be called by another kernel function.
-</p>
-</li>
-<li>
-<p>
-A kernel function cannot have parameters specified with default values.
-</p>
-</li>
-<li>
-<p>
-A kernel function must have the return type <span class="monospaced">void</span>.
-</p>
-</li>
-<li>
-<p>
-A kernel function cannot be called <span class="monospaced">main</span>.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="kernel-parameter-restrictions">Kernel Parameter Restrictions</h5>
-<div class="paragraph"><p>The OpenCL host compiler and the OpenCL C++ kernel language device compiler can have different requirements for i.e. type sizes, data packing and alignment, etc., therefore the kernel parameters must meet the following requirements:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Types passed by pointer or reference must be standard layout types.
-</p>
-</li>
-<li>
-<p>
-Types passed by value must be POD types.
-</p>
-</li>
-<li>
-<p>
-Types cannot be declared with the built-in bool scalar type, vector type or a class that contain bool scalar or vector type fields.
-</p>
-</li>
-<li>
-<p>
-Types cannot be structures and classes with bit field members.
-</p>
-</li>
-<li>
-<p>
-Marker types must be passed by value (<em><a href="#marker-types">Marker Types</a> section</em>).
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">global</span>, <span class="monospaced">constant</span>, <span class="monospaced">local</span> storage classes can be passed only by reference or pointer. More details in <em><a href="#explicit-address-space-storage-classes">Explicit address space storage classes</a> section</em>.
-</p>
-</li>
-<li>
-<p>
-Pointers and references must point to one of the following address spaces: global, local or constant.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="preprocessor-directives-and-macros">2.7. Preprocessor Directives and Macros</h3>
-<div class="paragraph"><p>The preprocessing directives defined by the C++14  specification (<em>section 16</em>) are supported.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">#pragma</span> directive is described as:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#pragma</span></span> pp<span style="color: #990000">-</span><span style="color: #008080">tokensopt</span> <span style="font-weight: bold"><span style="color: #0000FF">new</span></span><span style="color: #990000">-</span>line</tt></pre></div></div>
-<div class="paragraph"><p>A <span class="monospaced">#pragma</span> directive where the preprocessing token <span class="monospaced">OPENCL</span> (used instead of <span class="monospaced">STDC</span>) does not immediately follow pragma in the directive (prior to any macro replacement) causes the implementation to behave in an implementation-defined manner.
-The behavior might cause translation to fail or cause the translator or the resulting program to behave in a non-conforming manner.
-Any such pragma that is not recognized by the implementation is ignored.
-If the preprocessing token <span class="monospaced">OPENCL</span> does immediately follow pragma in the directive (prior to any macro replacement), then no macro replacement is performed on the directive, and the directive shall have one of the following forms whose meanings are described elsewhere:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#pragma</span></span> <span style="color: #008080">OPENCL</span> <span style="color: #008080">FP_CONTRACT</span> on<span style="color: #990000">-</span>off<span style="color: #990000">-</span><span style="font-weight: bold"><span style="color: #0000FF">switch</span></span> <span style="font-style: italic"><span style="color: #9A1900">// on-off-switch: one of ON OFF DEFAULT</span></span>
-
-<span style="font-weight: bold"><span style="color: #000080">#pragma</span></span> OPENCL <span style="color: #008080">EXTENSION</span> extensionname <span style="color: #990000">:</span> behavior
-<span style="font-weight: bold"><span style="color: #000080">#pragma</span></span> OPENCL <span style="color: #008080">EXTENSION</span> all <span style="color: #990000">:</span> behavior</tt></pre></div></div>
-<div class="paragraph"><p>The following predefined macro names are available.</p></div>
-<div class="paragraph"><p><span class="monospaced">__FILE__</span> The presumed name of the current source file (a character string literal).</p></div>
-<div class="paragraph"><p><span class="monospaced">__LINE__</span> The presumed line number (within the current source file) of the current source line (an integer constant).</p></div>
-<div class="paragraph"><p><span class="monospaced">__OPENCL_CPP_VERSION__</span> substitutes an integer reflecting the OpenCL C++ version specified when compiling the OpenCL C++ program.
-The version of OpenCL C++ described in this document will have <span class="monospaced">__OPENCL_CPP_VERSION__</span> substitute the integer <span class="monospaced">100</span>.</p></div>
-<div class="paragraph"><p>The macro names defined by the C++14 specification in <em>section 16</em> but not currently supported by OpenCL are reserved for future use.</p></div>
-<div class="paragraph"><p>The predefined identifier <span class="monospaced">__func__</span> is available.</p></div>
-</div>
-<div class="sect2">
-<h3 id="attribute-qualifiers">2.8. Attribute Qualifiers</h3>
-<div class="paragraph"><p>The <span class="monospaced">[[ ]]</span> attribute qualifier syntax allows additional attributes to be attached to types, variables, kernel functions, kernel parameters, or loops.</p></div>
-<div class="paragraph"><p>Some attributes change the semantics of the program and are required for program correctness.
-Other attributes are optional hints that may be ignored without affecting program correctness.
-Nevertheless, frontend compilers that compile to an intermediate representation are required to faithfully pass optional attribute hints with an intermediate representation to device compilers for further processing.</p></div>
-<div class="sect3">
-<h4 id="optional-type-attributes">2.8.1. Optional Type Attributes</h4>
-<div class="paragraph"><p><span class="monospaced">[[ ]]</span> attribute syntax can be used to specify special attributes of enum, class and union types when you define such types.
-Two attributes are currently defined for types: <span class="monospaced">aligned</span>, and <span class="monospaced">packed</span>.</p></div>
-<div class="paragraph"><p>You may specify type attributes in an enum, class or union type declaration or definition, or for other types in a typedef declaration.</p></div>
-<div class="paragraph"><p>For an enum, class or union type, you may specify attributes either between the enum, class or union tag and the name of the type, or just past the closing curly brace of the definition.
-The former syntax is preferred.</p></div>
-<div class="sect4">
-<h5 id="claligned-alignment">cl::aligned (alignment)</h5>
-<div class="paragraph"><p>This attribute specifies a minimum alignment (in bytes) for variables of the specified type.
-For example, the declarations:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">S</span> <span style="color: #FF0000">{</span> <span style="color: #009900">short</span> f<span style="color: #990000">[</span><span style="color: #993399">3</span><span style="color: #990000">];</span> <span style="color: #FF0000">}</span> <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">8</span><span style="color: #990000">)]];</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #009900">int</span> more_aligned_int <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">8</span><span style="color: #990000">)]];</span></tt></pre></div></div>
-<div class="paragraph"><p>force the compiler to insure (as far as it can) that each variable whose type is struct S or <span class="monospaced">more_aligned_int</span> will be allocated and aligned <em>at least</em> on a 8-byte boundary.</p></div>
-<div class="paragraph"><p>Note that the alignment of any given struct or union type is required by the C++ standard to be at least a perfect multiple of the lowest common multiple of the alignments of all of the members of the struct or union in question and must also be a power of two.
-This means that you <em>can</em> effectively adjust the alignment of a class or union type by attaching an aligned attribute to any one of the members of such a type, but the notation illustrated in the example above is a more obvious, intuitive, and readable way to request the compiler to adjust the alignment of an entire class or union type.</p></div>
-<div class="paragraph"><p>As in the preceding example, you can explicitly specify the alignment (in bytes) that you wish the compiler to use for a given class or union type.
-Alternatively, you can leave out the alignment factor and just ask the compiler to align a type to the maximum useful alignment for the target machine you are compiling for.
-For example, you could write:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">S</span> <span style="color: #FF0000">{</span> <span style="color: #009900">short</span> f<span style="color: #990000">[</span><span style="color: #993399">3</span><span style="color: #990000">];</span> <span style="color: #FF0000">}</span> <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span>aligned<span style="color: #990000">]];</span></tt></pre></div></div>
-<div class="paragraph"><p>Whenever you leave out the alignment factor in an aligned attribute specification, the compiler automatically sets the alignment for the type to the largest alignment which is ever used for any data type on the target machine you are compiling for.
-In the example above, the size of each short is 2 bytes, and therefore the size of the entire struct S type is 6 bytes.
-The smallest power of two which is greater than or equal to that is 8, so the compiler sets the alignment for the entire struct S type to 8 bytes.</p></div>
-<div class="paragraph"><p>Note that the effectiveness of aligned attributes may be limited by inherent limitations of the OpenCL device and compiler.
-For some devices, the OpenCL compiler may only be able to arrange for variables to be aligned up to a certain maximum alignment.
-If the OpenCL compiler is only able to align variables up to a maximum of 8 byte alignment, then specifying <span class="monospaced">aligned(16)</span> will still only provide you with 8 byte alignment.
-See your platform-specific documentation for further information.</p></div>
-<div class="paragraph"><p>The aligned attribute can only increase the alignment; but you can decrease it by specifying packed as well.
-See below.</p></div>
-</div>
-<div class="sect4">
-<h5 id="clpacked">cl::packed</h5>
-<div class="paragraph"><p>This attribute, attached to class or union type definition, specifies that each member of the structure or union is placed to minimize the memory required.
-When attached to an enum definition, it indicates that the smallest integral type should be used.</p></div>
-<div class="paragraph"><p>Specifying this attribute for class and union types is equivalent to specifying the packed attribute on each of the structure or union members.</p></div>
-<div class="paragraph"><p>In the following example struct my_packed_struct&#8217;s members are packed closely together, but the internal layout of its s member is not packed.
-To do that, struct <span class="monospaced">my_unpacked_struct</span> would need to be packed, too.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">my_unpacked_struct</span>
-<span style="color: #FF0000">{</span>
-  <span style="color: #009900">char</span> c<span style="color: #990000">;</span>
-  <span style="color: #009900">int</span> i<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span>packed<span style="color: #990000">]]</span> my_packed_struct
-<span style="color: #FF0000">{</span>
-  <span style="color: #009900">char</span> c<span style="color: #990000">;</span>
-  <span style="color: #009900">int</span>  i<span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">my_unpacked_struct</span> s<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>You may only specify this attribute on the definition of an enum, class or union, not on a typedef which does not also define the enumerated type, structure or union.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="optional-variable-attributes">2.8.2. Optional Variable Attributes</h4>
-<div class="paragraph"><p>[[ ]] syntax allows you to specify special attributes of variables or structure fields.
-The following attribute qualifiers are currently defined:</p></div>
-<div class="sect4">
-<h5 id="claligned">cl::aligned</h5>
-<div class="paragraph"><p>This attribute specifies a minimum alignment for the variable or class field, measured in bytes.
-For example, the declaration:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> x <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">16</span><span style="color: #990000">)]]</span> <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>causes the compiler to allocate the global variable <span class="monospaced">x</span> on a 16-byte boundary.
-The alignment value specified must be a power of two.</p></div>
-<div class="paragraph"><p>You can also specify the alignment of structure fields.
-For example, to create double-word aligned int pair, you could write:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">foo</span> <span style="color: #FF0000">{</span> <span style="color: #009900">int</span> x<span style="color: #990000">[</span><span style="color: #993399">2</span><span style="color: #990000">]</span> <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">8</span><span style="color: #990000">)]];</span> <span style="color: #FF0000">}</span><span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>This is an alternative to creating a union with a double member that forces the union to be double-word aligned.</p></div>
-<div class="paragraph"><p>As in the preceding examples, you can explicitly specify the alignment (in bytes) that you wish the compiler to use for a given variable or structure field.
-Alternatively, you can leave out the alignment factor and just ask the compiler to align a variable or field to the maximum useful alignment for the target machine you are compiling for.
-For example, you could write:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">short</span> array<span style="color: #990000">[</span><span style="color: #993399">3</span><span style="color: #990000">]</span> <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span>aligned<span style="color: #990000">]];</span></tt></pre></div></div>
-<div class="paragraph"><p>Whenever you leave out the alignment factor in an aligned attribute specification, the OpenCL compiler automatically sets the alignment for the declared variable or field to the largest alignment which is ever used for any data type on the target device you are compiling for.</p></div>
-<div class="paragraph"><p>When used on a class, or class member, the aligned attribute can only increase the alignment; in order to decrease it, the packed attribute must be specified as well.
-When used as part of a typedef, the aligned attribute can both increase and decrease alignment, and specifying the packed attribute will generate a warning.</p></div>
-<div class="paragraph"><p>Note that the effectiveness of aligned attributes may be limited by inherent limitations of the OpenCL device and compiler.
-For some devices, the OpenCL compiler may only be able to arrange for variables to be aligned up to a certain maximum alignment.
-If the OpenCL
-compiler is only able to align variables up to a maximum of 8 byte alignment, then specifying <span class="monospaced">aligned(16)</span> will still only provide you with 8 byte alignment.
-See your platform-specific documentation for further information.</p></div>
-</div>
-<div class="sect4">
-<h5 id="clpacked-1">cl::packed</h5>
-<div class="paragraph"><p>The <span class="monospaced">packed</span> attribute specifies that a variable or class field should have the smallest possible alignment - one byte for a variable, unless you specify a larger value with the aligned attribute.</p></div>
-<div class="paragraph"><p>Here is a structure in which the field <span class="monospaced">x</span> is packed, so that it immediately follows a:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">foo</span>
-<span style="color: #FF0000">{</span>
-  <span style="color: #009900">char</span> a<span style="color: #990000">;</span>
-  <span style="color: #009900">int</span> x<span style="color: #990000">[</span><span style="color: #993399">2</span><span style="color: #990000">]</span> <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span>packed<span style="color: #990000">]];</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>An attribute list placed at the beginning of a user-defined type applies to the variable of that type and not the type, while attributes following the type body apply to the type.</p></div>
-<div class="paragraph"><p>For example:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-style: italic"><span style="color: #9A1900">/* a has alignment of 128 */</span></span>
-<span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">128</span><span style="color: #990000">)]]</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">A</span> <span style="color: #FF0000">{</span> <span style="color: #009900">int</span> i<span style="color: #990000">;</span> <span style="color: #FF0000">}</span> a<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">/* b has alignment of 16 */</span></span>
-<span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">16</span><span style="color: #990000">)]]</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">B</span> <span style="color: #FF0000">{</span> <span style="color: #009900">double</span> d<span style="color: #990000">;</span> <span style="color: #FF0000">}</span> <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">32</span><span style="color: #990000">)]]</span> b<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">A</span> a1<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">/* a1 has alignment of 4 */</span></span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">B</span> b1<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">/* b1 has alignment of 32 */</span></span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="optional-kernel-function-attributes">2.8.3. Optional Kernel Function Attributes</h4>
-<div class="paragraph"><p>The kernel qualifier can be used with the <span class="monospaced">[[ ]]</span> attribute syntax to declare additional information about the kernel function.
-The kernel function attributes must appear immediately before the kernel function to be affected.</p></div>
-<div class="paragraph"><p>The following attributes are supported:</p></div>
-<div class="sect4">
-<h5 id="clwork_group_size_hint">cl::work_group_size_hint</h5>
-<div class="paragraph"><p>The optional <span class="monospaced">[[cl::work_group_size_hint(X, Y, Z)]]</span> is a hint to the compiler and is intended to specify the work-group size that may be used i.e. value most likely to be specified by the <span class="monospaced">local_work_size</span> argument to <span class="monospaced">clEnqueueNDRangeKernel</span>.
-For example the <span class="monospaced">[[cl::work_group_size_hint(1, 1, 1)]]</span> is a hint to the compiler that the kernel will most likely be executed with a work-group size of 1.</p></div>
-<div class="paragraph"><p>The specialization constants (<em><a href="#specialization-constants-library">Specialization Constants</a> section</em>) can be used as arguments of <span class="monospaced">cl::work_group_size_hint</span> attribute.</p></div>
-</div>
-<div class="sect4">
-<h5 id="clrequired_work_group_size">cl::required_work_group_size</h5>
-<div class="paragraph"><p>The optional <span class="monospaced">[[cl::required_work_group_size(X, Y, Z)]]</span> is the work-group size that must be used as the <span class="monospaced">local_work_size</span> argument to <span class="monospaced">clEnqueueNDRangeKernel</span>.
-This allows the compiler to optimize the generated code appropriately for this kernel.</p></div>
-<div class="paragraph"><p>If <span class="monospaced">Z</span> is one, the <span class="monospaced">work_dim</span> argument to <span class="monospaced">clEnqueueNDRangeKernel</span> can be 2 or 3.
-If <span class="monospaced">Y</span> and <span class="monospaced">Z</span> are one, the <span class="monospaced">work_dim</span> argument to <span class="monospaced">clEnqueueNDRangeKernel</span> can be 1, 2 or 3.</p></div>
-<div class="paragraph"><p>The specialization constants (<em><a href="#specialization-constants-library">Specialization Constants</a> section</em>) can be used as arguments of <span class="monospaced">cl::required_work_group_size(X, Y, Z)</span> attribute.</p></div>
-</div>
-<div class="sect4">
-<h5 id="clrequired_num_sub_groups">cl::required_num_sub_groups</h5>
-<div class="paragraph"><p>The optional <span class="monospaced">[[cl::required_num_sub_groups(X)]]</span> is the number of sub-groups that must be generated by a kernel launch.
-To ensure that this number is created the queries mapping number of sub-groups to local size may be used.
-This allows the compiler to optimize the kernel based on the sub-group count and in addition allows the API to enforce correctness of kernel use to the user when concurrency of sub-groups is a requirement.</p></div>
-<div class="paragraph"><p>The specialization constants (<em><a href="#specialization-constants-library">Specialization Constants</a> section</em>) can be used as argument of <span class="monospaced">cl::required_num_sub_groups</span> attribute.</p></div>
-</div>
-<div class="sect4">
-<h5 id="clvec_type_hint">cl::vec_type_hint</h5>
-<div class="paragraph"><p>The optional <span class="monospaced">[[cl::vec_type_hint(&lt;type&gt;)]]</span> is a hint to the compiler and is intended to be a representation of the computational <em>width</em> of the kernel, and should serve as the basis for calculating processor bandwidth utilization when the compiler is looking to autovectorize the code.
-In the <span class="monospaced">[[cl::vec_type_hint(&lt;type&gt;)]]</span> qualifier <span class="monospaced">&lt;type&gt;</span> is one of the built-in vector types listed in <a href="#device_builtin_vector_data_types">Device built-in vector data types</a> table or the constituent scalar element types.
-If <span class="monospaced">cl::vec_type_hint(&lt;type&gt;)</span> is not specified, the kernel is assumed to have the <span class="monospaced">[[cl::vec_type_hint(int)]]</span> qualifier.</p></div>
-<div class="paragraph"><p>For example, where the developer specified a width of <span class="monospaced">float4</span>, the compiler should assume that the computation usually uses up to 4 lanes of a float vector, and would decide to merge work-items or possibly even separate one work-item into many threads to better match the hardware capabilities.
-A conforming implementation is not required to autovectorize code, but shall support the hint.
-A compiler may autovectorize, even if no hint is provided.
-If an implementation merges N work-items into one thread, it is responsible for correctly handling cases where the number of global or local work-items in any dimension modulo N is not zero.</p></div>
-<div class="paragraph"><p>Examples:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-style: italic"><span style="color: #9A1900">// autovectorize assuming float4 as the</span></span>
-<span style="font-style: italic"><span style="color: #9A1900">// basic computation width</span></span>
-<span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">vec_type_hint</span></span><span style="color: #990000">(</span>float4<span style="color: #990000">)]]</span> kernel
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span>cl<span style="color: #990000">::</span><span style="color: #008080">global_ptr&lt;float4&gt;</span> p<span style="color: #990000">)</span> <span style="color: #FF0000">{</span> <span style="color: #990000">...</span> <span style="color: #FF0000">}</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// autovectorize assuming double as the</span></span>
-<span style="font-style: italic"><span style="color: #9A1900">// basic computation width</span></span>
-<span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">vec_type_hint</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span><span style="color: #990000">)]]</span> kernel
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span>cl<span style="color: #990000">::</span><span style="color: #008080">global_ptr&lt;float4&gt;</span> p<span style="color: #990000">)</span> <span style="color: #FF0000">{</span> <span style="color: #990000">...</span> <span style="color: #FF0000">}</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// autovectorize assuming int (default)</span></span>
-<span style="font-style: italic"><span style="color: #9A1900">// as the basic computation width</span></span>
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span>cl<span style="color: #990000">::</span><span style="color: #008080">global_ptr&lt;float4&gt;</span> p<span style="color: #990000">)</span> <span style="color: #FF0000">{</span> <span style="color: #990000">...</span> <span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="optional-kernel-parameter-attributes">2.8.4. Optional Kernel Parameter Attributes</h4>
-<div class="paragraph"><p>The kernel parameter can be used with the <span class="monospaced">[[ ]]</span> attribute syntax to declare additional information about an argument passed to the kernel.
-The kernel parameter attributes must appear immediately before or after the kernel parameter declaration to be affected.</p></div>
-<div class="paragraph"><p>The following attributes are supported:</p></div>
-<div class="sect4">
-<h5 id="clmax_size">cl::max_size</h5>
-<div class="paragraph"><p>This attribute can be provided with a kernel argument of type <span class="monospaced">constant_ptr&lt;T&gt;</span>, <span class="monospaced">constant&lt;T&gt;*</span>, <span class="monospaced">constant&lt;T&gt;&amp;</span>, <span class="monospaced">local_ptr&lt;T&gt;</span>, <span class="monospaced">local&lt;T&gt;*</span>, <span class="monospaced">local&lt;T&gt;&amp;</span>.
-The value of the attribute specifies the maximum size in bytes of the corresponding memory object.
-This size cannot exceed the limits supported by the device:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE</span> for the kernel arguments in constant memory
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">CL_DEVICE_LOCAL_MEM_SIZE</span> for the kernel arguments in local memory
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The specialization constants (<em><a href="#specialization-constants-library">Specialization Constants</a> section</em>) can be used as argument of <span class="monospaced">cl::max_size</span> attribute.</p></div>
-<div class="paragraph"><p>Examples:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">([[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">max_size</span></span><span style="color: #990000">(</span><span style="color: #993399">65536</span><span style="color: #990000">)]]</span> cl<span style="color: #990000">::</span><span style="color: #008080">constant_ptr&lt;int&gt;</span> arg<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-  <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="optional-loop-attributes">2.8.5. Optional Loop Attributes</h4>
-<div class="sect4">
-<h5 id="clunroll_hint">cl::unroll_hint</h5>
-<div class="paragraph"><p>The <span class="monospaced">[[cl::unroll_hint]]</span> and <span class="monospaced">[[cl::unroll_hint(n)]]</span> attribute qualifiers can be used to specify that a loop (<span class="monospaced">for</span>, <span class="monospaced">while</span> and <span class="monospaced">do</span> loops) can be unrolled.
-This attribute qualifier can be used to specify full unrolling or partial unrolling by a specified amount.
-This is a compiler hint and the compiler may ignore this directive.</p></div>
-<div class="paragraph"><p><span class="monospaced">n</span> is the loop unrolling factor and must be a positive integral compile time constant expression.
-An unroll factor of 1 disables unrolling.
-If <span class="monospaced">n</span> is not specified, the compiler determines the unrolling factor for the loop.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">The <span class="monospaced">[[cl::unroll_hint(n)]]</span> attribute qualifier must appear immediately before the loop to be affected.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>Examples:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">unroll_hint</span></span><span style="color: #990000">(</span><span style="color: #993399">2</span><span style="color: #990000">)]]</span>
-<span style="font-weight: bold"><span style="color: #0000FF">while</span></span> <span style="color: #990000">(*</span>s <span style="color: #990000">!=</span> <span style="color: #993399">0</span><span style="color: #990000">)</span>
-    <span style="color: #990000">*</span>p<span style="color: #990000">++</span> <span style="color: #990000">=</span> <span style="color: #990000">*</span>s<span style="color: #990000">++;</span></tt></pre></div></div>
-<div class="paragraph"><p>This tells the compiler to unroll the above while loop by a factor of 2.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #990000">[[</span>cl<span style="color: #990000">::</span>unroll_hint<span style="color: #990000">]]</span>
-<span style="font-weight: bold"><span style="color: #0000FF">for</span></span> <span style="color: #990000">(</span><span style="color: #009900">int</span> i<span style="color: #990000">=</span><span style="color: #993399">0</span><span style="color: #990000">;</span> i<span style="color: #990000">&lt;</span><span style="color: #993399">2</span><span style="color: #990000">;</span> i<span style="color: #990000">++)</span> <span style="color: #FF0000">{</span>
-   <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>In the example above, the compiler will determine how much to unroll the loop.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">unroll_hint</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">)]]</span>
-<span style="font-weight: bold"><span style="color: #0000FF">for</span></span> <span style="color: #990000">(</span><span style="color: #009900">int</span> i<span style="color: #990000">=</span><span style="color: #993399">0</span><span style="color: #990000">;</span> i<span style="color: #990000">&lt;</span><span style="color: #993399">32</span><span style="color: #990000">;</span> i<span style="color: #990000">++)</span> <span style="color: #FF0000">{</span>
-  <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>The above is an example where the loop should not be unrolled.</p></div>
-<div class="paragraph"><p>Below are some examples of invalid usage of <span class="monospaced">[[cl::unroll_hint(n)]]</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">unroll_hint</span></span><span style="color: #990000">(-</span><span style="color: #993399">1</span><span style="color: #990000">)]]</span>
-<span style="font-weight: bold"><span style="color: #0000FF">while</span></span> <span style="color: #990000">(</span><span style="font-style: italic"><span style="color: #9A1900">/* ... */</span></span><span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-  <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>The above example is an invalid usage of the loop unroll factor as the loop unroll factor is negative.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #990000">[[</span>cl<span style="color: #990000">::</span>unroll_hint<span style="color: #990000">]]</span>
-<span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span><span style="font-style: italic"><span style="color: #9A1900">/* ... */</span></span><span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-  <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>The above example is invalid because the <span class="monospaced">unroll_hint</span> attribute qualifier is used on a non-loop construct.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">my_kernel</span></span><span style="color: #990000">(</span><span style="font-style: italic"><span style="color: #9A1900">/* ... */</span></span><span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-  <span style="color: #009900">int</span> x<span style="color: #990000">;</span>
-  <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">unroll_hint</span></span><span style="color: #990000">(</span>x<span style="color: #990000">)]]</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> <span style="color: #990000">(</span><span style="color: #009900">int</span> i<span style="color: #990000">=</span><span style="color: #993399">0</span><span style="color: #990000">;</span> i<span style="color: #990000">&lt;</span>x<span style="color: #990000">;</span> i<span style="color: #990000">++)</span> <span style="color: #FF0000">{</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-  <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>The above example is invalid because the loop unroll factor is not a compile-time constant expression.</p></div>
-</div>
-<div class="sect4">
-<h5 id="clivdep">cl::ivdep</h5>
-<div class="paragraph"><p>The <span class="monospaced">[[cl::ivdep]]</span> (ignore vector dependencies) attribute qualifier is a hint to the compiler and may appear in loops to indicate that the compiler may assume there are no memory dependencies across loop iterations in order to autovectorize consecutive iterations of the loop.
-This attribute qualifier may appear in one of the following
-forms:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #990000">[[</span>cl<span style="color: #990000">::</span>ivdep<span style="color: #990000">]]</span>
-<span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">ivdep</span></span><span style="color: #990000">(</span>len<span style="color: #990000">)]]</span></tt></pre></div></div>
-<div class="paragraph"><p>If the parameter <span class="monospaced">len</span> is specified, it is used to specify the maximum number of consecutive iterations without loop-carried dependencies.
-<span class="monospaced">len</span> is a lower bound on the distance of any loop-carried dependence, and it applies to arbitrary alignment.
-For example, any 4 consecutive iterations can be vectorized with <span class="monospaced">cl::ivdep(4)</span>.
-The <span class="monospaced">len</span> parameter must be a positive integer.
-The final decision whether to autovectorize the complete loop may be subject to other compiler heuristics as well as flags e.g., <em>-cl-fast-relaxed-math</em> to ignore non-associated operations.</p></div>
-<div class="paragraph"><p>Examples:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #990000">[[</span>cl<span style="color: #990000">::</span>ivdep<span style="color: #990000">]]</span>
-<span style="font-weight: bold"><span style="color: #0000FF">for</span></span> <span style="color: #990000">(</span><span style="color: #009900">int</span> i<span style="color: #990000">=</span><span style="color: #993399">0</span><span style="color: #990000">;</span> i<span style="color: #990000">&lt;</span>N<span style="color: #990000">;</span> i<span style="color: #990000">++)</span> <span style="color: #FF0000">{</span>
-    C<span style="color: #990000">[</span>i<span style="color: #990000">+</span>offset<span style="color: #990000">]</span> <span style="color: #990000">=</span> A<span style="color: #990000">[</span>i<span style="color: #990000">+</span>offset<span style="color: #990000">]</span> <span style="color: #990000">*</span> B<span style="color: #990000">[</span>i<span style="color: #990000">+</span>offset<span style="color: #990000">];</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>In the example above, assuming that <span class="monospaced">A</span> and <span class="monospaced">B</span> are not restricted pointers, it is unknown if <span class="monospaced">C</span> aliases <span class="monospaced">A</span> or <span class="monospaced">B</span>.
-Placing the <span class="monospaced">[[cl::ivdep]]</span> attribute before the loop lets the compiler assume there are no memory dependencies across the loop iterations.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #990000">[[</span>c<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">ivdep</span></span><span style="color: #990000">(</span><span style="color: #993399">8</span><span style="color: #990000">)]]</span>
-<span style="font-weight: bold"><span style="color: #0000FF">for</span></span> <span style="color: #990000">(</span><span style="color: #009900">int</span> i<span style="color: #990000">=</span><span style="color: #993399">0</span><span style="color: #990000">;</span> i<span style="color: #990000">&lt;</span>N<span style="color: #990000">;</span> i<span style="color: #990000">++)</span> <span style="color: #FF0000">{</span>
-    A<span style="color: #990000">[</span>i<span style="color: #990000">+</span>K<span style="color: #990000">]</span> <span style="color: #990000">=</span> A<span style="color: #990000">[</span>i<span style="color: #990000">]</span> <span style="color: #990000">*</span> B<span style="color: #990000">[</span>i<span style="color: #990000">];</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>In the example above, buffer <span class="monospaced">A</span> is read from and written to in the loop iterations.
-In each iteration, the read and write to <span class="monospaced">A</span> are to different indices.
-In this case it is not safe to vectorize the loop to a vector length greater than <span class="monospaced">K</span>, so the <span class="monospaced">len</span> parameter is specified with a value that is known to be not greater than any value that <span class="monospaced">K</span> may take during the execution of loop.
-In this example we are guaranteed (by <span class="monospaced">len</span>) that <span class="monospaced">K</span> will always be greater than or equal to 8.</p></div>
-<div class="paragraph"><p>Below is an example of invalid usage of <span class="monospaced">[[cl::ivdep]]</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">ivdep</span></span><span style="color: #990000">(-</span><span style="color: #993399">1</span><span style="color: #990000">)]]</span>
-<span style="font-weight: bold"><span style="color: #0000FF">for</span></span> <span style="color: #990000">(</span><span style="color: #009900">int</span> i<span style="color: #990000">=</span><span style="color: #993399">0</span><span style="color: #990000">;</span> i<span style="color: #990000">&lt;</span>N<span style="color: #990000">;</span> i<span style="color: #990000">++)</span> <span style="color: #FF0000">{</span>
-    C<span style="color: #990000">[</span>i<span style="color: #990000">+</span>offset<span style="color: #990000">]</span> <span style="color: #990000">=</span> A<span style="color: #990000">[</span>i<span style="color: #990000">+</span>offset<span style="color: #990000">]</span> <span style="color: #990000">*</span> B<span style="color: #990000">[</span>i<span style="color: #990000">+</span>offset<span style="color: #990000">];</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>The above example is an invalid usage of the attribute qualifier as <span class="monospaced">len</span> is negative.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="extending-attribute-qualifiers">2.8.6. Extending Attribute Qualifiers</h4>
-<div class="paragraph"><p>The attribute syntax can be extended for standard language extensions and vendor specific extensions.
-Any extensions should follow the naming conventions outlined in the introduction to <em>section 9</em> in the OpenCL 2.2 Extension Specification.</p></div>
-<div class="paragraph"><p>Attributes are intended as useful hints to the compiler.
-It is our intention that a particular implementation of OpenCL be free to ignore all attributes and the resulting executable binary will produce the same result.
-This does not preclude an implementation from making use of the additional information provided by attributes and performing optimizations or other transformations as it sees fit.
-In this case it is the programmer&#8217;s responsibility to guarantee that the information provided is in some sense correct.</p></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="opencl_cxx_restrictions">2.9. Restrictions</h3>
-<div class="paragraph"><p>The following C++14 features are not supported by OpenCL C++:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-the <span class="monospaced">dynamic_cast</span> operator (<em>ISO C++ Section 5.2.7</em>)
-</p>
-</li>
-<li>
-<p>
-type identification (<em>ISO C++ Section 5.2.8</em>)
-</p>
-</li>
-<li>
-<p>
-recursive function calls (<em>ISO C++ Section 5.2.2, item 9</em>) unless they are a compile-time constant expression
-</p>
-</li>
-<li>
-<p>
-non-placement <span class="monospaced">new</span> and <span class="monospaced">delete</span> operators (<em>ISO C++ Sections 5.3.4 and 5.3.5</em>)
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">goto</span> statement (<em>ISO C++ Section 6.6</em>)
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">register</span> and <span class="monospaced">thread_local</span> storage qualifiers (<em>ISO C++ Section 7.1.1</em>)
-</p>
-</li>
-<li>
-<p>
-virtual function qualifier (<em>ISO C++ Section 7.1.2</em>)
-</p>
-</li>
-<li>
-<p>
-function pointers (<em>ISO C++ Sections 8.3.5 and 8.5.3</em>) unless they are a compile-time  constant expression
-</p>
-</li>
-<li>
-<p>
-virtual functions and abstract classes (<em>ISO C++ Sections 10.3 and 10.4</em>)
-</p>
-</li>
-<li>
-<p>
-exception handling (<em>ISO C++ Section 15</em>)
-</p>
-</li>
-<li>
-<p>
-the C++ standard library (<em>ISO C++ Sections 17 &#8230; 30</em>)
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">asm</span> declaration (<em>ISO C++ Section 7.4</em>)
-</p>
-</li>
-<li>
-<p>
-no implicit lambda to function pointer conversion (<em>ISO C++ Section 5.1.2, item 6</em>)
-</p>
-</li>
-<li>
-<p>
-variadic functions (<em>ISO C99 Section 7.15, Variable arguments &lt;stdarg.h&gt;</em>)
-</p>
-</li>
-<li>
-<p>
-and, like C++, OpenCL C++ does not support variable length arrays (<em>ISO C99, Section 6.7.5</em>).
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>To avoid potential confusion with the above, please note the following features <em>are</em> supported in OpenCL C++:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-All variadic templates (<em>ISO C++ Section 14.5.3</em>) including variadic function templates are supported.
-</p>
-</li>
-</ul></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">This page refers to <em>ISO C99</em> instead of <em>ISO C11</em> since the <em>ISO C++14</em> document refers to <em>ISO C99</em> in <em>ISO C++ Section 1.2 and Annex C</em>.</td>
-</tr></table>
-</div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="opencl-c-standard-library">3. OpenCL C++ Standard Library</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>OpenCL C++ does not support the C++14 standard library, but instead implements its own standard library.
-No OpenCL types and functions are auto-included.</p></div>
-<div class="sect2">
-<h3 id="opencl-definitions">3.1. OpenCL Definitions</h3>
-<div class="paragraph"><p>Header <em>&lt;opencl_def&gt;</em> defines OpenCL scalar, vector types and macros.
-<span class="monospaced">cl_</span>* types are guaranteed to have exactly the same size as their host counterparts defined in <em>cl_platform.h</em> file.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_def-synopsis">3.1.1. Header &lt;opencl_def&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#define</span></span> __OPENCL_CPP_VERSION__ <span style="color: #993399">100</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">__SIZE_TYPE__</span>     size_t<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">__PTRDIFF_TYPE__</span>  ptrdiff_t<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>nullptr<span style="color: #990000">)</span> nullptr_t<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> NULL              nullptr
-
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">__INT8_TYPE__</span>     int8_t     <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">)]];</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">__UINT8_TYPE__</span>    uint8_t    <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">)]];</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">__INT16_TYPE__</span>    int16_t    <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">2</span><span style="color: #990000">)]];</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">__UINT16_TYPE__</span>   uint16_t   <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">2</span><span style="color: #990000">)]];</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">__INT32_TYPE__</span>    int32_t    <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">4</span><span style="color: #990000">)]];</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">__UINT32_TYPE__</span>   uint32_t   <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">4</span><span style="color: #990000">)]];</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">__INT64_TYPE__</span>    int64_t    <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">8</span><span style="color: #990000">)]];</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">__UINT64_TYPE__</span>   uint64_t   <span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">8</span><span style="color: #990000">)]];</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span>   __INTPTR_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">32</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">int32_t</span>           intptr_t<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uint32_t</span>          uintptr_t<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#elif</span></span> __INTPTR_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">64</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">int64_t</span>           intptr_t<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uint64_t</span>          uintptr_t<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="color: #990000">::</span>intptr_t<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="color: #990000">::</span>uintptr_t<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="color: #990000">::</span>ptrdiff_t<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="color: #990000">::</span>nullptr_t<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="color: #990000">::</span>size_t<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">int8_t</span>            cl_char<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uint8_t</span>           cl_uchar<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">int16_t</span>           cl_short
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uint16_t</span>          cl_ushort<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">int32_t</span>           cl_int<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uint32_t</span>          cl_uint<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">int64_t</span>           cl_long<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uint64_t</span>          cl_ulong<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">half</span>              cl_half   <span style="color: #990000">[[</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">2</span><span style="color: #990000">)]];</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #009900">float</span>             cl_float  <span style="color: #990000">[[</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">4</span><span style="color: #990000">)]];</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #009900">double</span>            cl_double <span style="color: #990000">[[</span><span style="font-weight: bold"><span style="color: #000000">aligned</span></span><span style="color: #990000">(</span><span style="color: #993399">8</span><span style="color: #990000">)]];</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> bool2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> bool3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> bool4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> bool8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> bool16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> char2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> char3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> char4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> char8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> char16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> uchar2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> uchar3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> uchar4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> uchar8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> uchar16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> short2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> short3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> short4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> short8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> short16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> ushort2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> ushort3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> ushort4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> ushort8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> ushort16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> int2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> int3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> int4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> int8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> int16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> uint2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> uint3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> uint4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> uint8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> uint16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> long2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> long3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> long4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> long8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> long16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> ulong2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> ulong3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> ulong4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> ulong8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> ulong16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> float2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> float3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> float4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> float8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> float16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> half2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> half3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> half4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> half8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> half16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> double2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> double3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> double4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> double8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> double16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">bool2</span>    cl_bool2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">bool3</span>    cl_bool3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">bool4</span>    cl_bool4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">bool8</span>    cl_bool8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">bool16</span>   cl_bool16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">char2</span>    cl_char2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">char3</span>    cl_char3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">char4</span>    cl_char4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">char8</span>    cl_char8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">char16</span>   cl_char16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uchar2</span>   cl_uchar2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uchar3</span>   cl_uchar3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uchar4</span>   cl_uchar4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uchar8</span>   cl_uchar8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uchar16</span>  cl_uchar16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">short2</span>   cl_short2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">short3</span>   cl_short3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">short4</span>   cl_short4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">short8</span>   cl_short8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">short16</span>  cl_short16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ushort2</span>  cl_ushort2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ushort3</span>  cl_ushort3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ushort4</span>  cl_ushort4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ushort8</span>  cl_ushort8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ushort16</span> cl_ushort16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">int2</span>     cl_int2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">int3</span>     cl_int3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">int4</span>     cl_int4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">int8</span>     cl_int8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">int16</span>    cl_int16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uint2</span>    cl_uint2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uint3</span>    cl_uint3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uint4</span>    cl_uint4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uint8</span>    cl_uint8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">uint16</span>   cl_uint16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">long2</span>    cl_long2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">long3</span>    cl_long3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">long4</span>    cl_long4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">long8</span>    cl_long8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">long16</span>   cl_long16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ulong2</span>   cl_ulong2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ulong3</span>   cl_ulong3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ulong4</span>   cl_ulong4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ulong8</span>   cl_ulong8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ulong16</span>  cl_ulong16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">float2</span>   cl_float2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">float3</span>   cl_float3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">float4</span>   cl_float4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">float8</span>   cl_float8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">float16</span>  cl_float16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">half2</span>    cl_half2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">half3</span>    cl_half3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">half4</span>    cl_half4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">half8</span>    cl_half8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">half16</span>   cl_half16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">double2</span>  cl_double2<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">double3</span>  cl_double3<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">double4</span>  cl_double4<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">double8</span>  cl_double8<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">double16</span> cl_double16<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="conversions-library">3.2. Conversions Library</h3>
-<div class="paragraph"><p>This section describes the explicit conversion cast functions.
-These functions provide a full set of type conversions between supported scalar and vector data types (see <em><a href="#builtin-scalar-data-types">Built-in Scalar Data Types</a></em> and <em><a href="#builtin-vector-data-types">Built-in Vector Data Types</a> sections</em>) except for the following types: <span class="monospaced">size_t</span>, <span class="monospaced">ptrdiff_t</span>, <span class="monospaced">intptr_t</span>, <span class="monospaced">uintptr_t</span>, and <span class="monospaced">void</span>.</p></div>
-<div class="paragraph"><p>The behavior of the conversion may be modified by one or two optional modifiers that specify saturation for out-of-range inputs and rounding behavior.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">convert_cast</span> type conversion operator that specifies a rounding mode and saturation is also provided.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_convert-synopsis">3.2.1. Header &lt;opencl_convert&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">rounding_mode</span> <span style="color: #FF0000">{</span> rte<span style="color: #990000">,</span> rtz<span style="color: #990000">,</span> rtp<span style="color: #990000">,</span> rtn <span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">saturate</span> <span style="color: #FF0000">{</span> off<span style="color: #990000">,</span> on <span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">convert_cast</span></span><span style="color: #990000">(</span><span style="color: #008080">U</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> arg<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">convert_cast</span></span><span style="color: #990000">(</span><span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> arg<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">rounding_mode</span> rmode<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">convert_cast</span></span><span style="color: #990000">(</span><span style="color: #008080">U</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> arg<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">rounding_mode</span> rmode<span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">convert_cast</span></span><span style="color: #990000">(</span><span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> arg<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">saturate</span> smode<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">convert_cast</span></span><span style="color: #990000">(</span><span style="color: #008080">U</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> arg<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">saturate</span> smode<span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">convert_cast</span></span><span style="color: #990000">(</span><span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> arg<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">rounding_mode</span> rmode<span style="color: #990000">,</span> <span style="color: #008080">saturate</span> smode<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">convert_cast</span></span><span style="color: #990000">(</span><span style="color: #008080">U</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> arg<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">rounding_mode</span> rmode<span style="color: #990000">,</span> <span style="color: #008080">saturate</span> smode<span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">convert_cast</span></span><span style="color: #990000">(</span><span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> arg<span style="color: #990000">);</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="data-types">3.2.2. Data Types</h4>
-<div class="paragraph"><p>Conversions are available for the following scalar types: <span class="monospaced">bool</span>, <span class="monospaced">char</span>, <span class="monospaced">uchar</span>, <span class="monospaced">short</span>, <span class="monospaced">ushort</span>, <span class="monospaced">int</span>, <span class="monospaced">uint</span>, <span class="monospaced">long</span>, <span class="monospaced">ulong</span>, <span class="monospaced">half</span> <a href="#ftn4">[4</a>], <span class="monospaced">float</span>, <span class="monospaced">double</span>, and built-in vector types derived therefrom.
-The operand and result type must have the same number of elements.
-The operand and result type may be the same type in which case the conversion has no effect on the type or value of an expression.</p></div>
-<div class="paragraph"><p>Conversions between integer types follow the conversion rules specified in the C++14 specification except for out-of-range behavior and saturated conversions which are described in <em><a href="#out-of-range-behavior-and-saturated-conversions">Out-of-Range Behavior and Saturated Conversions</a> section</em> below.</p></div>
-</div>
-<div class="sect3">
-<h4 id="rounding-modes">3.2.3. Rounding Modes</h4>
-<div class="paragraph"><p>Conversions to and from floating-point type shall conform to IEEE-754 rounding rules.
-Conversions may have an optional rounding mode specified as described in the table belows.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 9. Rounding Modes</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><div class="paragraph"><p><strong>Rounding Mode</strong></p></div></th>
-<th class="tableblock halign-left valign-top" ><div class="paragraph"><p><strong>Description</strong></p></div></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">rte</span></p></div></div></td>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p>Round to nearest even</p></div></div></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">rtz</span></p></div></div></td>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p>Round toward zero</p></div></div></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">rtp</span></p></div></div></td>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p>Round toward positive infinity</p></div></div></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">rtn</span></p></div></div></td>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p>Round toward negative infinity</p></div></div></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>If a rounding mode is not specified, conversions to integer type use the <span class="monospaced">rtz</span> (round toward zero) rounding mode and conversions to floating-point type <a href="#ftn5">[5</a>] uses the <span class="monospaced">rte</span> rounding mode.</p></div>
-</div>
-<div class="sect3">
-<h4 id="out-of-range-behavior-and-saturated-conversions">3.2.4. Out-of-Range Behavior and Saturated Conversions</h4>
-<div class="paragraph"><p>When the conversion operand is either greater than the greatest representable destination value or less than the least representable destination value, it is said to be out-of-range.
-The result of out-of-range conversion is determined by the conversion rules specified by the C++14 specification in <em>chapter 4.9</em>.
-When converting from a floating-point type to integer type, the behavior is implementation-defined.</p></div>
-<div class="paragraph"><p>Conversions to integer type may opt to convert using the optional saturation mode.
-When in saturated mode, values that are outside the representable range shall clamp to the nearest representable value in the destination format.
-(NaN should be converted to 0).</p></div>
-<div class="paragraph"><p>Conversions to floating-point type shall conform to IEEE-754 rounding rules. The <span class="monospaced">convert_cast</span> operator with a saturate argument may not be used for conversions to floating-point formats.</p></div>
-</div>
-<div class="sect3">
-<h4 id="examples-1">3.2.5. Examples</h4>
-<div class="sect4">
-<h5 id="example-1-1">Example 1</h5>
-<div class="paragraph"><p>Examples of casting between two vector types with saturation.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_convert&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">Foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-<span style="color: #008080">short4</span> s<span style="color: #990000">;</span>
-        <span style="font-style: italic"><span style="color: #9A1900">// negative values clamped to 0</span></span>
-        <span style="color: #008080">ushort4</span> u <span style="color: #990000">=</span> convert_cast<span style="color: #990000">&lt;</span>ushort4<span style="color: #990000">,</span>saturate<span style="color: #990000">::</span>on<span style="color: #990000">&gt;(</span>s<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// values &gt; CHAR_MAX converted to CHAR_MAX</span></span>
-        <span style="font-style: italic"><span style="color: #9A1900">// values &lt; CHAR_MIN converted to CHAR_MIN</span></span>
-        <span style="color: #008080">char4</span> c <span style="color: #990000">=</span> convert_cast<span style="color: #990000">&lt;</span>char4<span style="color: #990000">,</span> saturate<span style="color: #990000">::</span>on<span style="color: #990000">&gt;(</span>s<span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-2-1">Example 2</h5>
-<div class="paragraph"><p>Examples of casting from float to integer vector type with saturation and rounding mode specified.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_convert&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">Foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-        <span style="color: #008080">float4</span>  f<span style="color: #990000">;</span>
-
-        <span style="font-style: italic"><span style="color: #9A1900">// values implementation defined for</span></span>
-        <span style="font-style: italic"><span style="color: #9A1900">// f &gt; INT_MAX, f &lt; INT_MIN or NaN</span></span>
-        <span style="color: #008080">int4</span>    i1 <span style="color: #990000">=</span> convert_cast<span style="color: #990000">&lt;</span>int4<span style="color: #990000">&gt;(</span>f<span style="color: #990000">);</span>
-
-        <span style="font-style: italic"><span style="color: #9A1900">// values &gt; INT_MAX clamp to INT_MAX, values &lt; INT_MIN clamp</span></span>
-        <span style="font-style: italic"><span style="color: #9A1900">// to INT_MIN. NaN should produce 0.</span></span>
-        <span style="font-style: italic"><span style="color: #9A1900">// The rtz rounding mode is used to produce the integer</span></span>
-        <span style="font-style: italic"><span style="color: #9A1900">// values.</span></span>
-        <span style="color: #008080">int4</span>    i2 <span style="color: #990000">=</span> convert_cast<span style="color: #990000">&lt;</span>int4<span style="color: #990000">,</span>saturate<span style="color: #990000">::</span>on<span style="color: #990000">&gt;(</span>f<span style="color: #990000">);</span>
-
-        <span style="font-style: italic"><span style="color: #9A1900">// similar to convert_cast&lt;int4&gt;, except that floating-point</span></span>
-        <span style="font-style: italic"><span style="color: #9A1900">// values are rounded to the nearest integer instead of</span></span>
-        <span style="font-style: italic"><span style="color: #9A1900">// truncated</span></span>
-        <span style="color: #008080">int4</span>    i3 <span style="color: #990000">=</span> convert_cast<span style="color: #990000">&lt;</span>int4<span style="color: #990000">,</span> rounding_mode<span style="color: #990000">::</span>rte<span style="color: #990000">&gt;(</span>f<span style="color: #990000">);</span>
-
-        <span style="font-style: italic"><span style="color: #9A1900">// similar to convert_cast&lt;int4, saturate::on&gt;, except that</span></span>
-        <span style="font-style: italic"><span style="color: #9A1900">// floating-point values are rounded to the nearest integer</span></span>
-        <span style="font-style: italic"><span style="color: #9A1900">// instead of truncated</span></span>
-        <span style="color: #008080">int4</span>    i4 <span style="color: #990000">=</span> convert_cast<span style="color: #990000">&lt;</span>int4<span style="color: #990000">,</span> rounding_mode<span style="color: #990000">::</span>rte<span style="color: #990000">,</span>
-        saturate<span style="color: #990000">::</span>on<span style="color: #990000">&gt;(</span>f<span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-3">Example 3</h5>
-<div class="paragraph"><p>Examples of casting from integer to float vector type.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_convert&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">Foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-        <span style="color: #008080">int4</span>    i<span style="color: #990000">;</span>
-
-        <span style="font-style: italic"><span style="color: #9A1900">// convert ints to floats using the default rounding mode.</span></span>
-        <span style="color: #008080">float4</span>  f1 <span style="color: #990000">=</span> convert_cast<span style="color: #990000">&lt;</span>float4<span style="color: #990000">&gt;(</span>i<span style="color: #990000">);</span>
-
-        <span style="font-style: italic"><span style="color: #9A1900">// convert ints to floats. integer values that cannot</span></span>
-        <span style="font-style: italic"><span style="color: #9A1900">// be exactly represented as floats should round up to the</span></span>
-        <span style="font-style: italic"><span style="color: #9A1900">// next representable float.</span></span>
-        <span style="color: #008080">float4</span>  f2 <span style="color: #990000">=</span> convert_cast<span style="color: #990000">&lt;</span>float4<span style="color: #990000">,</span> rounding_mode<span style="color: #990000">::</span>rtp<span style="color: #990000">&gt;(</span>i<span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="reinterpreting-data-library">3.3. Reinterpreting Data Library</h3>
-<div class="paragraph"><p>It is frequently necessary to reinterpret bits in a data type as another data type in OpenCL C++.
-This is typically required when direct access to the bits in a floating-point type is needed, for example to mask off the sign bit or make use of the result of a vector relational operator on floating-point data.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_reinterpret-synopsis">3.3.1. Header &lt;opencl_reinterpret&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">as_type</span></span><span style="color: #990000">(</span><span style="color: #008080">U</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> arg<span style="color: #990000">);</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="reinterpreting-types">3.3.2. Reinterpreting Types</h4>
-<div class="paragraph"><p>All data types described in <a href="#device_builtin_scalar_data_types">Device built-in scalar data types</a> and <a href="#device_builtin_vector_data_types">Device built-in vector data types</a> tables (except <span class="monospaced">bool</span> and <span class="monospaced">void</span>) may be also reinterpreted as another data type of the same size using the <span class="monospaced">as_type()</span> <a href="#ftn6">[6</a>] function for scalar and vector data types.
-When the operand and result type contain the same number of elements, the bits in the operand shall be returned directly without modification as the new type.
-The usual type promotion for function arguments shall not be performed.</p></div>
-<div class="paragraph"><p>For example, <span class="monospaced">as_type&lt;float&gt;(0x3f800000)</span> returns <span class="monospaced">1.0f</span>, which is the value that the bit pattern <span class="monospaced">0x3f800000</span> has if viewed as an IEEE-754 single precision value.</p></div>
-<div class="paragraph"><p>When the operand and result type contain a different number of elements, the result shall be implementation-defined except if the operand is a 4-component vector and the result is a 3-component vector.
-In this case, the bits in the operand shall be returned directly without modification as the new type.
-That is, a conforming implementation shall explicitly define a behavior, but two conforming implementations need not have the same behavior when the number of elements in the result and operand types does not match.
-The implementation may define the result to contain all, some or none of the original bits in whatever order it chooses.
-It is an error to use the <span class="monospaced">as_type&lt;T&gt;</span> operator to reinterpret data to a type of a different number of bytes.</p></div>
-</div>
-<div class="sect3">
-<h4 id="examples-2">3.3.3. Examples</h4>
-<div class="sect4">
-<h5 id="example-1-2">Example 1</h5>
-<div class="paragraph"><p>Examples of reinterpreting data types using <span class="monospaced">as_type&lt;&gt;</span> function.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_reinterpret&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">Foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-        <span style="color: #009900">float</span> f <span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">.</span>0f<span style="color: #990000">;</span>
-        <span style="color: #008080">uint</span> u <span style="color: #990000">=</span> as_type<span style="color: #990000">&lt;</span>uint<span style="color: #990000">&gt;(</span>f<span style="color: #990000">);</span>      <span style="font-style: italic"><span style="color: #9A1900">// Legal. Contains:  0x3f800000</span></span>
-
-        <span style="color: #008080">float4</span> f <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">2</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">3</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">4</span><span style="color: #990000">.</span>0f<span style="color: #990000">);</span>
-        <span style="font-style: italic"><span style="color: #9A1900">// Legal. Contains:</span></span>
-        <span style="font-style: italic"><span style="color: #9A1900">// int4(0x3f800000, 0x40000000, 0x40400000, 0x40800000)</span></span>
-        <span style="color: #008080">int4</span> i <span style="color: #990000">=</span> as_type<span style="color: #990000">&lt;</span>int4<span style="color: #990000">&gt;(</span>f<span style="color: #990000">);</span>
-
-        <span style="color: #009900">int</span> i<span style="color: #990000">;</span>
-        <span style="font-style: italic"><span style="color: #9A1900">// Legal. Result is implementation-defined.</span></span>
-        <span style="color: #008080">short2</span> j <span style="color: #990000">=</span> as_type<span style="color: #990000">&lt;</span>short2<span style="color: #990000">&gt;(</span>i<span style="color: #990000">);</span>
-
-        <span style="color: #008080">int4</span> i<span style="color: #990000">;</span>
-        <span style="font-style: italic"><span style="color: #9A1900">// Legal. Result is implementation-defined.</span></span>
-        <span style="color: #008080">short8</span> j <span style="color: #990000">=</span> as_type<span style="color: #990000">&lt;</span>short8<span style="color: #990000">&gt;(</span>i<span style="color: #990000">);</span>
-
-        <span style="color: #008080">float4</span> f<span style="color: #990000">;</span>
-        <span style="font-style: italic"><span style="color: #9A1900">// Error.  Result and operand have different sizes</span></span>
-        <span style="color: #008080">double4</span> g <span style="color: #990000">=</span> as_type<span style="color: #990000">&lt;</span>double4<span style="color: #990000">&gt;(</span>f<span style="color: #990000">);</span>
-
-        <span style="color: #008080">float4</span> f<span style="color: #990000">;</span>
-        <span style="font-style: italic"><span style="color: #9A1900">// Legal. g.xyz will have same values as f.xyz.  g.w is</span></span>
-        <span style="font-style: italic"><span style="color: #9A1900">// undefined</span></span>
-        <span style="color: #008080">float3</span> g <span style="color: #990000">=</span> as_type<span style="color: #990000">&lt;</span>float3<span style="color: #990000">&gt;(</span>f<span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="address-spaces-library">3.4. Address Spaces Library</h3>
-<div class="paragraph"><p>Unlike OpenCL C, OpenCL C++ does not require the address space qualifiers to allocate storage from global, local and constant memory pool.
-The same functionality is provided using the storage and pointer classes.
-These new types are designed to avoid many programming issues and it is recommended to use them for the static and program scope variables even if it is not required.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_memory-synopsis">3.4.1. Header &lt;opencl_memory&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">mem_fence</span>
-<span style="color: #FF0000">{</span>
-    local<span style="color: #990000">,</span>
-    global<span style="color: #990000">,</span>
-    image
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">inline</span></span> <span style="color: #008080">mem_fence</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">~(</span><span style="color: #008080">mem_fence</span> flags<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">inline</span></span> <span style="color: #008080">mem_fence</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">&amp;(</span><span style="color: #008080">mem_fence</span> LHS<span style="color: #990000">,</span> <span style="color: #008080">mem_fence</span> RHS<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">inline</span></span> <span style="color: #008080">mem_fence</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">|(</span><span style="color: #008080">mem_fence</span> LHS<span style="color: #990000">,</span> <span style="color: #008080">mem_fence</span> RHS<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">inline</span></span> <span style="color: #008080">mem_fence</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">^(</span><span style="color: #008080">mem_fence</span> LHS<span style="color: #990000">,</span> <span style="color: #008080">mem_fence</span> RHS<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// address space pointer classes</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">global_ptr</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">local_ptr</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">private_ptr</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">constant_ptr</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> global <span style="color: #990000">=</span> see <span style="color: #FF0000">'global class'</span> section<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> local <span style="color: #990000">=</span> see <span style="color: #FF0000">'local class'</span> section<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> priv <span style="color: #990000">=</span> see <span style="color: #FF0000">'priv class'</span> section<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> constant <span style="color: #990000">=</span> see <span style="color: #FF0000">'constant class'</span> section<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// address space query functions</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">mem_fence</span> <span style="font-weight: bold"><span style="color: #000000">get_mem_fence</span></span><span style="color: #990000">(</span><span style="color: #008080">T</span> <span style="color: #990000">*</span>ptr<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// address space cast functions</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">dynamic_asptr_cast</span></span><span style="color: #990000">(</span><span style="color: #008080">T</span> <span style="color: #990000">*</span>ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">local_ptr&lt;T&gt; static_asptr_cast(local_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">global_ptr&lt;T&gt; static_asptr_cast(global_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">constant_ptr&lt;T&gt; static_asptr_cast(constant_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">private_ptr&lt;T&gt; static_asptr_cast(private_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">local_ptr&lt;T&gt; reinterpret_asptr_cast(local_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">global_ptr&lt;T&gt; reinterpret_asptr_cast(global_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">constant_ptr&lt;T&gt; reinterpret_asptr_cast(constant_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">private_ptr&lt;T&gt; reinterpret_asptr_cast(private_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">addressof</span></span><span style="color: #990000">(</span>T<span style="color: #990000">&amp;</span> t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="explicit-address-space-storage-classes">3.4.2. Explicit address space storage classes</h4>
-<div class="paragraph"><p>The explicit address space storage classes described in this section are designed to allocate memory in one of the named address spaces: global, local, constant or private.</p></div>
-<div class="sect4">
-<h5 id="global-class">global class</h5>
-<div class="paragraph"><p>The variables declared using <span class="monospaced">global&lt;T&gt;</span> class refer to memory objects allocated from the global memory pool (<em><a href="#global">Global Memory Pool</a> section</em>).
-The global storage class can only be used to declare variables at program, function and class scope.
-The variables at function and class scope must be declared with <span class="monospaced">static</span> specifier.</p></div>
-<div class="paragraph"><p>If <span class="monospaced">T</span> is a fundamental or an array type, the <span class="monospaced">global</span> class should meet the following requirements:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-no user provide default constructor
-</p>
-</li>
-<li>
-<p>
-default copy and move constructors
-</p>
-</li>
-<li>
-<p>
-default copy and move assignment operators
-</p>
-</li>
-<li>
-<p>
-address-of operators that return a generic <span class="monospaced">T</span> pointer (<span class="monospaced">T*</span>)
-</p>
-</li>
-<li>
-<p>
-conversion operators to a generic <span class="monospaced">T</span> lvalue reference type (<span class="monospaced">T&amp;</span>)
-</p>
-</li>
-<li>
-<p>
-assignment <span class="monospaced">const T&amp;</span> operator
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">ptr()</span> methods that return a <span class="monospaced">global_ptr&lt;T&gt;</span> pointer class
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <span class="monospaced">T</span> is a class type, the <span class="monospaced">global</span> class should provide the following interface:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-the same public interface as <span class="monospaced">T</span> type including constructors and assignment operators address-of operators that return a generic <span class="monospaced">T</span> pointer (<span class="monospaced">T*</span>)
-</p>
-</li>
-<li>
-<p>
-conversion operators to a generic <span class="monospaced">T</span> lvalue reference type (<span class="monospaced">T&amp;</span>)
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">ptr()</span> methods that return a <span class="monospaced">global_ptr&lt;T&gt;</span> pointer class
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="local-class">local class</h5>
-<div class="paragraph"><p>The variables declared using <span class="monospaced">local&lt;T&gt;</span> class refer to memory objects allocated from the local memory pool (<em><a href="#local">Local Memory Pool</a> section</em>).
-The local storage class can only be used to declare variables at program, kernel and class scope.
-The variables at class scope must be declared with <span class="monospaced">static</span> specifier.</p></div>
-<div class="paragraph"><p>If <span class="monospaced">T</span> is a fundamental or an array type, the <span class="monospaced">local</span> class should meet the following requirements:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-no user provide default constructor
-</p>
-</li>
-<li>
-<p>
-default copy and move constructors
-</p>
-</li>
-<li>
-<p>
-default copy and move assignment operators
-</p>
-</li>
-<li>
-<p>
-address-of operators that return a generic <span class="monospaced">T</span> pointer (<span class="monospaced">T*</span>)
-</p>
-</li>
-<li>
-<p>
-conversion operators to a generic <span class="monospaced">T</span> lvalue reference type (<span class="monospaced">T&amp;</span>)
-</p>
-</li>
-<li>
-<p>
-assignment <span class="monospaced">const T&amp;</span> operator
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">ptr()</span> methods that return a <span class="monospaced">local_ptr&lt;T&gt;</span> pointer class
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <span class="monospaced">T</span> is a class type, the <span class="monospaced">local</span> class should provide the following interface:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-the same public interface as <span class="monospaced">T</span> type including constructors
-and assignment operators
-</p>
-</li>
-<li>
-<p>
-address-of operators that return a generic <span class="monospaced">T</span> pointer (<span class="monospaced">T*</span>)
-</p>
-</li>
-<li>
-<p>
-conversion operators to a generic <span class="monospaced">T</span> lvalue reference type (<span class="monospaced">T&amp;</span>)
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">ptr()</span> methods that return a <span class="monospaced">local_ptr&lt;T&gt;</span> pointer class
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="priv-class">priv class</h5>
-<div class="paragraph"><p>The variables declared using the <span class="monospaced">priv&lt;T&gt;</span> class refer to memory objects allocated from the private memory pool.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">priv</span> storage class cannot be used to declare variables in the program scope, with <span class="monospaced">static</span> specifier or <span class="monospaced">extern</span> specifier.</p></div>
-<div class="paragraph"><p>If <span class="monospaced">T</span> is a fundamental or an array type, the <span class="monospaced">priv</span> class should meet the following requirements:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-no user provide default constructor
-</p>
-</li>
-<li>
-<p>
-default copy and move constructors
-</p>
-</li>
-<li>
-<p>
-default copy and move assignment operators
-</p>
-</li>
-<li>
-<p>
-address-of operators that return a generic <span class="monospaced">T</span> pointer (<span class="monospaced">T*</span>)
-</p>
-</li>
-<li>
-<p>
-conversion operators to a generic <span class="monospaced">T</span> lvalue reference type (<span class="monospaced">T&amp;</span>)
-</p>
-</li>
-<li>
-<p>
-assignment const <span class="monospaced">T&amp;</span> operator
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">ptr()</span> methods that return a <span class="monospaced">private_ptr&lt;T&gt;</span> pointer class
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <span class="monospaced">T</span> is a class type, the <span class="monospaced">priv</span> class should provide the following interface:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-the same public interface as <span class="monospaced">T</span> type including constructors and assignment operators
-</p>
-</li>
-<li>
-<p>
-address-of operators that return a generic <span class="monospaced">T</span> pointer (<span class="monospaced">T*</span>)
-</p>
-</li>
-<li>
-<p>
-conversion operators to a generic <span class="monospaced">T</span> lvalue reference type (<span class="monospaced">T&amp;</span>)
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">ptr()</span> methods that return a <span class="monospaced">private_ptr&lt;T&gt;</span> pointer class
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="constant-class">constant class</h5>
-<div class="paragraph"><p>The variables declared using the <span class="monospaced">constant&lt;T&gt;</span> class refer to memory objects allocated from the global memory pool and which are accessed inside a kernel(s) as read-only variables.
-The constant storage class can only be used to declare variables at program, kernel and class scope.
-The variables at class scope must be declared with <span class="monospaced">static</span> specifier.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">T</span> type must meet the following requirements:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">T</span> must be constructible at compile time
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">T</span> cannot have any user defined constructors, destructors, methods and operators
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <span class="monospaced">T</span> is a fundamental, array or class type, the <span class="monospaced">constant</span> class should meet the following requirements:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-no user provide default constructor
-</p>
-</li>
-<li>
-<p>
-default copy and move constructors
-</p>
-</li>
-<li>
-<p>
-copy and move assignment operators deleted
-</p>
-</li>
-<li>
-<p>
-address-of operators that return a <span class="monospaced">constant_ptr&lt;T&gt;</span> pointer class
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">ptr()</span> methods that return a <span class="monospaced">constant_ptr&lt;T&gt;</span> pointer class
-</p>
-</li>
-<li>
-<p>
-conversion operators to a constant <span class="monospaced">T</span> lvalue reference type (<span class="monospaced">add_constant_t&lt;T&gt;&amp;</span>)
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="explicit-address-space-pointer-classes">3.4.3. Explicit address space pointer classes</h4>
-<div class="paragraph"><p>The explicit address space pointer classes are just like pointers: they can be converted to and from pointers with compatible address spaces, qualifiers and types.
-Assignment or casting between explicit pointer types of incompatible address spaces is illegal.</p></div>
-<div class="paragraph"><p>All named address spaces are incompatible with all other address spaces, but local, global and private pointers can be converted to standard C++ pointers.</p></div>
-<div class="sect4">
-<h5 id="global_ptr-class">global_ptr class</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">global_ptr</span>
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">public</span></span><span style="color: #990000">:</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//types:</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">T</span> element_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ptrdiff_t</span> difference_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_global_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_global_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> const_reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_global_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> pointer<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_global_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> const_pointer<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//constructors:</span></span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//assignment:</span></span>
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">pointer</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//observers:</span></span>
-    <span style="color: #008080">add_lvalue_reference_t&lt;add_global_t&lt;T&gt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-&gt;()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//modifiers:</span></span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">release</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">pointer</span></span><span style="color: #990000">())</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>global_ptr<span style="color: #990000">&amp;</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">global_ptr</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">[]&gt;</span>
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">public</span></span><span style="color: #990000">:</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//types:</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">T</span> element_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ptrdiff_t</span> difference_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_global_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_global_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> const_reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_global_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> pointer<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_global_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> const_pointer<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//constructors:</span></span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//assignment:</span></span>
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">pointer</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//observers:</span></span>
-    <span style="color: #008080">reference</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">[](</span><span style="color: #008080">size_t</span> pos<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//modifiers:</span></span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">release</span></span><span style="color: #990000">()</span>noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">nullptr_t</span> p <span style="color: #990000">=</span> nullptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>global_ptr<span style="color: #990000">&amp;</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">global_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt; &amp;a, const global_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt; &amp;a, const global_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt; &amp;a, const global_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt; &amp;a, const global_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt; &amp;a, const global_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt; &amp;a, const global_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>global_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> a<span style="color: #990000">,</span> global_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="local_ptr-class">local_ptr class</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">local_ptr</span>
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">public</span></span><span style="color: #990000">:</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">size_type</span>
-    <span style="color: #FF0000">{</span>
-        <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">size_type</span></span><span style="color: #990000">(</span><span style="color: #008080">size_t</span> size<span style="color: #990000">);</span>
-        <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #000000">size_t</span></span><span style="color: #990000">();</span>
-    <span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//types:</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">T</span> element_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ptrdiff_t</span> difference_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_local_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_local_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> const_reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_local_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> pointer<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_local_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> const_pointer<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//constructors:</span></span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//assignment:</span></span>
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">pointer</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//observers:</span></span>
-    <span style="color: #008080">add_lvalue_reference_t&lt;add_local_t&lt;T&gt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-&gt;()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//modifiers:</span></span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">release</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">pointer</span></span><span style="color: #990000">())</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>local_ptr<span style="color: #990000">&amp;</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">local_ptr</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">[]&gt;</span>
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">public</span></span><span style="color: #990000">:</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//types:</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">T</span> element_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ptrdiff_t</span> difference_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_local_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_local_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> const_reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_local_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> pointer<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_local_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> const_pointer<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//constructors:</span></span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//assignment:</span></span>
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">pointer</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//observers:</span></span>
-    <span style="color: #008080">reference</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">[](</span><span style="color: #008080">size_t</span> pos<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//modifiers:</span></span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">release</span></span><span style="color: #990000">()</span>noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">nullptr_t</span> p <span style="color: #990000">=</span> nullptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>local_ptr<span style="color: #990000">&amp;</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">local_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt; &amp;a, const local_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt; &amp;a, const local_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt; &amp;a, const local_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt; &amp;a, const local_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt; &amp;a, const local_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt; &amp;a, const local_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>local_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> a<span style="color: #990000">,</span> local_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="private_ptr-class">private_ptr class</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">private_ptr</span>
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">public</span></span><span style="color: #990000">:</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//types:</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">T</span> element_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ptrdiff_t</span> difference_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_private_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_private_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> const_reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_private_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> pointer<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_private_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> const_pointer<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//constructors:</span></span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//assignment:</span></span>
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">pointer</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//observers:</span></span>
-    <span style="color: #008080">add_lvalue_reference_t&lt;add_private_t&lt;T&gt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-&gt;()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//modifiers:</span></span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">release</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">pointer</span></span><span style="color: #990000">())</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>private_ptr<span style="color: #990000">&amp;</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">private_ptr</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">[]&gt;</span> <span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">public</span></span><span style="color: #990000">:</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//types:</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">T</span> element_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ptrdiff_t</span> difference_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_private_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_private_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> const_reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_private_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> pointer<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_private_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> const_pointer<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//constructors:</span></span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//assignment:</span></span>
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">pointer</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//observers:</span></span>
-    <span style="color: #008080">reference</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">[](</span><span style="color: #008080">size_t</span> pos<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//modifiers:</span></span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">release</span></span><span style="color: #990000">()</span>noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">nullptr_t</span> p <span style="color: #990000">=</span> nullptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>private_ptr<span style="color: #990000">&amp;</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">private_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt; &amp;a, const private_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt; &amp;a, const private_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt; &amp;a, const private_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt; &amp;a, const private_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt; &amp;a, const private_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt; &amp;a, const private_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>private_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> a<span style="color: #990000">,</span> private_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="constant_ptr-class">constant_ptr class</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">constant_ptr</span>
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">public</span></span><span style="color: #990000">:</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//types:</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">T</span> element_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ptrdiff_t</span> difference_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_constant_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_constant_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> const_reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_constant_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> pointer<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_constant_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> const_pointer<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//constructors:</span></span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//assignment:</span></span>
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">pointer</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//observers:</span></span>
-    <span style="color: #008080">add_lvalue_reference_t&lt;add_constant_t&lt;T&gt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-&gt;()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//modifiers:</span></span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">release</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">pointer</span></span><span style="color: #990000">())</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>constant_ptr<span style="color: #990000">&amp;</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">constant_ptr</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">[]&gt;</span>
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">public</span></span><span style="color: #990000">:</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//types:</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">T</span> element_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ptrdiff_t</span> difference_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_constant_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_constant_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> const_reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> add_constant_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> pointer<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> add_constant_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> const_pointer<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//constructors:</span></span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//assignment:</span></span>
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">pointer</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//observers:</span></span>
-    <span style="color: #008080">reference</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">[](</span><span style="color: #008080">size_t</span> pos<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">//modifiers:</span></span>
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">release</span></span><span style="color: #990000">()</span>noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">nullptr_t</span> p <span style="color: #990000">=</span> nullptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>constant_ptr<span style="color: #990000">&amp;</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constant_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt; &amp;a, const constant_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt; &amp;a, const constant_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt; &amp;a, const constant_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt; &amp;a, const constant_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt; &amp;a, const constant_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt; &amp;a, const constant_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>constant_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> a<span style="color: #990000">,</span> constant_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="constructors">Constructors</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Constructs an object which points to nothing.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Constructs an object which points to <span class="monospaced">p</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> global_ptr <span style="color: #990000">&amp;)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> local_ptr <span style="color: #990000">&amp;)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> private_ptr <span style="color: #990000">&amp;)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> constant_ptr <span style="color: #990000">&amp;)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Copy constructor.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">(</span><span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Move constructor.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">global_ptr</span></span><span style="color: #990000">(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">local_ptr</span></span><span style="color: #990000">(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">private_ptr</span></span><span style="color: #990000">(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">constant_ptr</span></span><span style="color: #990000">(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Constructs an object initialized with <span class="monospaced">nullptr</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="assignment-operators">Assignment operators</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Copy assignment operator</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Move assignment operator</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">pointer</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">pointer</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">pointer</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">pointer</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Assigns <span class="monospaced">r</span> pointer to the stored pointer</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Assigns <span class="monospaced">nullptr</span> to the stored pointer</p></div>
-</div>
-<div class="sect4">
-<h5 id="observers">Observers</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">add_lvalue_reference_t&lt;add_global_t&lt;T&gt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">add_lvalue_reference_t&lt;add_local_t&lt;T&gt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">add_lvalue_reference_t&lt;add_private_t&lt;T&gt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">add_lvalue_reference_t&lt;add_constant_t&lt;T&gt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">*get()</span>. It is only defined in single object version of the explicit address space pointer class.
-The result of this operator is undefined if <span class="monospaced">get() == nullptr</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-&gt;()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">get()</span>. It is only defined in single object version of the explicit address space pointer class.
-The result of this operator is undefined if <span class="monospaced">get() == nullptr</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">reference</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">[](</span><span style="color: #008080">size_t</span> pos<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">get()[pos]</span>. The subscript operator is only defined in specialized <span class="monospaced">global_ptr&lt;T[]&gt;</span>, <span class="monospaced">local_ptr&lt;T[]&gt;</span>, <span class="monospaced">private_ptr&lt;T[]&gt;</span> and <span class="monospaced">constant_ptr&lt;T[]&gt;</span> version for array types.
-The result of this operator is undefined if <span class="monospaced">pos &gt;=</span> the number of elements in the array to which the stored pointer points.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the stored pointer.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">get() != nullptr</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="modifiers">Modifiers</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">release</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Assigns <span class="monospaced">nullptr</span> to the stored pointer and returns the value <span class="monospaced">get()</span> had at the start of the call to release.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">pointer</span></span><span style="color: #990000">())</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Assigned <span class="monospaced">p</span> to the stored pointer.
-It is only defined in single object version of the explicit address space pointer class</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">pointer</span> p<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Assigned <span class="monospaced">p</span> to the stored pointer.
-It is only defined in specialized <span class="monospaced">global_ptr&lt;T[]&gt;</span>, <span class="monospaced">local_ptr&lt;T[]&gt;</span>, <span class="monospaced">private_ptr&lt;T[]&gt;</span> and <span class="monospaced">constant_ptr&lt;T[]&gt;</span> version for array types.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">reset</span></span><span style="color: #990000">(</span><span style="color: #008080">nullptr_t</span> p <span style="color: #990000">=</span> nullptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Equivalent to <span class="monospaced">reset(pointer())</span>.
-It is only defined in specialized <span class="monospaced">global_ptr&lt;T[]&gt;</span>, <span class="monospaced">local_ptr&lt;T[]&gt;</span>, <span class="monospaced">private_ptr&lt;T[]&gt;</span> and <span class="monospaced">constant_ptr&lt;T[]&gt;</span> version for array types.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>global_ptr<span style="color: #990000">&amp;</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>local_ptr<span style="color: #990000">&amp;</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>private_ptr<span style="color: #990000">&amp;</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>constant_ptr<span style="color: #990000">&amp;</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Invokes swap on the stored pointers.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Prefix increment operator.
-Increments the stored pointer by one.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">global_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">local_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">private_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constant_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Postfix increment operator.
-Increments the stored pointer by one.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Prefix decrement operator.
-Decrements the stored pointer by one.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">global_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">local_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">private_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constant_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Postfix decrement operator.
-Decrements the stored pointer by one.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Adds <span class="monospaced">r</span> to the stored pointer and returns <span class="monospaced">*this</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">global_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">local_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">private_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constant_ptr</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Subtracts <span class="monospaced">r</span> to the stored pointer and returns <span class="monospaced">*this</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">global_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">local_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">private_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constant_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Adds <span class="monospaced">r</span> to the stored pointer and returns the value <span class="monospaced">*this</span> has at the start of <span class="monospaced">operator</span>+.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">global_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">local_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">private_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">constant_ptr</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="color: #008080">difference_type</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Subtracts <span class="monospaced">r</span> to the stored pointer and returns the value <span class="monospaced">*this</span> has at the start of <span class="monospaced">operator-</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="non-member-functions">Non-member functions</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt; &amp;a, const global_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt; &amp;a, const local_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt; &amp;a, const private_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt; &amp;a, const constant_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison <span class="monospaced">operator==</span> for the explicit address space pointer classes.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison <span class="monospaced">operator==</span> for the explicit address space pointer classes with a <span class="monospaced">nullptr_t</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt; &amp;a, const global_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt; &amp;a, const local_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt; &amp;a, const private_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt; &amp;a, const constant_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison <span class="monospaced">operator!=</span> for the explicit address space pointer classes.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison <span class="monospaced">operator!=</span> for the explicit address space pointer classes with a <span class="monospaced">nullptr_t</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt; &amp;a, const global_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt; &amp;a, const local_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt; &amp;a, const private_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt; &amp;a, const constant_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison <span class="monospaced">operator&lt;</span> for the explicit address space pointer classes.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison <span class="monospaced">operator&lt;</span> for the explicit address space pointer classes with a <span class="monospaced">nullptr_t</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt; &amp;a, const global_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt; &amp;a, const local_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt; &amp;a, const private_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt; &amp;a, const constant_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison <span class="monospaced">operator&gt;</span> for the explicit address space pointer classes.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison <span class="monospaced">operator&gt;</span> for the explicit address space pointer classes with a <span class="monospaced">nullptr_t</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt; &amp;a, const global_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt; &amp;a, const local_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt; &amp;a, const private_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt; &amp;a, const constant_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison <span class="monospaced">operator&lt;=</span> for the explicit address space pointer classes.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison <span class="monospaced">operator&lt;=</span> for the explicit address space pointer classes with a <span class="monospaced">nullptr_t</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt; &amp;a, const global_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt; &amp;a, const local_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt; &amp;a, const private_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt; &amp;a, const constant_ptr&lt;U&gt;</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison <span class="monospaced">operator&gt;=</span> for the explicit address space pointer classes.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">global_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">local_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">private_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span>nullptr_t<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">constant_ptr&lt;T&gt;</span> <span style="color: #990000">&amp;</span>x<span style="color: #990000">,</span> nullptr_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison <span class="monospaced">operator&gt;=</span> for the explicit address space pointer classes with a <span class="monospaced">nullptr_t</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>global_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> a<span style="color: #990000">,</span> global_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>local_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> a<span style="color: #990000">,</span> local_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>private_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> a<span style="color: #990000">,</span> private_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">swap</span></span><span style="color: #990000">(</span>constant_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> a<span style="color: #990000">,</span> constant_ptr<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;&amp;</span> b<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Calls <span class="monospaced">a.swap(b)</span></p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="other-functions">3.4.4. Other functions</h4>
-<div class="paragraph"><p>The OpenCL C++ address space library implements the address space query and cast functions.
-The cast function that allows to explicitly convert from a pointer in the generic address space to a pointer in the global, local and private address space.</p></div>
-<div class="sect4">
-<h5 id="get_mem_fence">get_mem_fence</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">mem_fence</span> <span style="font-weight: bold"><span style="color: #000000">get_mem_fence</span></span> <span style="color: #990000">(</span><span style="color: #008080">T</span> <span style="color: #990000">*</span>ptr<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the <span class="monospaced">mem_fence</span> value for <span class="monospaced">ptr</span>.
-<span class="monospaced">ptr</span> must be the generic pointer and it cannot be the explicit address space pointer (<span class="monospaced">global_ptr&lt;&gt;</span>, <span class="monospaced">local_ptr&lt;&gt;</span>, <span class="monospaced">private_ptr&lt;&gt;</span> and <span class="monospaced">constant_ptr&lt;&gt;</span>) or pointer to address space storage class (<span class="monospaced">global&lt;&gt;*</span>, <span class="monospaced">local&lt;&gt;*</span>, <span class="monospaced">priv&lt;&gt;*</span> and <span class="monospaced">constant&lt;&gt;*</span>).</p></div>
-</div>
-<div class="sect4">
-<h5 id="dynamic_asptr_cast">dynamic_asptr_cast</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">dynamic_asptr_cast</span></span><span style="color: #990000">(</span><span style="color: #008080">U</span> <span style="color: #990000">*</span>ptr<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns a pointer that points to a region in the address space pointer class specified in <span class="monospaced">T</span> if <span class="monospaced">dynamic_asptr_cast</span> can cast <span class="monospaced">ptr</span> to the specified address space.
-Otherwise it returns <span class="monospaced">nullptr</span>.
-Only <span class="monospaced">global_ptr&lt;U&gt;</span>, <span class="monospaced">local_ptr&lt;U&gt;</span> and <span class="monospaced">private_ptr&lt;U&gt;</span> are valid <span class="monospaced">T</span> template arguments.
-<span class="monospaced">ptr</span> must be the generic pointer and it cannot be the explicit address space pointer (<span class="monospaced">global_ptr&lt;&gt;</span>, <span class="monospaced">local_ptr&lt;&gt;</span>, <span class="monospaced">private_ptr&lt;&gt;</span> and <span class="monospaced">constant_ptr&lt;&gt;</span>) or pointer to address space storage class (<span class="monospaced">global&lt;&gt;*</span>, <span class="monospaced">local&lt;&gt;*</span>, <span class="monospaced">priv&lt;&gt;*</span> and <span class="monospaced">constant&lt;&gt;*</span>).</p></div>
-</div>
-<div class="sect4">
-<h5 id="static_asptr_cast">static_asptr_cast</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">local_ptr&lt;T&gt; static_asptr_cast(local_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">global_ptr&lt;T&gt; static_asptr_cast(global_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">constant_ptr&lt;T&gt; static_asptr_cast(constant_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">private_ptr&lt;T&gt; static_asptr_cast(private_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>The expression <span class="monospaced">static_cast(r.get())</span> shall be well formed.</p></div>
-</div>
-<div class="sect4">
-<h5 id="reinterpret_asptr_cast">reinterpret_asptr_cast</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">local_ptr&lt;T&gt; reinterpret_asptr_cast(local_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">global_ptr&lt;T&gt; reinterpret_asptr_cast(global_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">constant_ptr&lt;T&gt; reinterpret_asptr_cast(constant_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">U</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">private_ptr&lt;T&gt; reinterpret_asptr_cast(private_ptr&lt;U&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">&amp;</span> ptr<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>The expression <span class="monospaced">reinterpret_cast(r.get())</span> shall be well formed.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="restrictions-2">3.4.5. Restrictions</h4>
-<div class="paragraph"><p>1.
-The objects allocated using <span class="monospaced">global</span>, <span class="monospaced">local</span> and <span class="monospaced">constant</span> storage classes can be passed to a function only by reference or pointer</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_array&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #008080">global&lt;array&lt;int, 5&gt;&gt;</span> val<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="font-style: italic"><span style="color: #9A1900">// Error: variable in the global</span></span>
-    <span style="font-style: italic"><span style="color: #9A1900">//        address space passed by value</span></span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-<span style="color: #FF0000">}</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">bar</span></span><span style="color: #990000">(</span><span style="color: #008080">global&lt;array&lt;int, 5&gt;&gt;</span> <span style="color: #990000">&amp;</span>val<span style="color: #990000">)</span> <span style="color: #FF0000">{</span> <span style="font-style: italic"><span style="color: #9A1900">// OK</span></span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-<span style="color: #FF0000">}</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foobar</span></span><span style="color: #990000">(</span><span style="color: #008080">global_ptr&lt;int&gt;</span> val<span style="color: #990000">)</span> <span style="color: #FF0000">{</span> <span style="font-style: italic"><span style="color: #9A1900">// OK</span></span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-<span style="color: #FF0000">}</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">barfoo</span></span><span style="color: #990000">(</span><span style="color: #008080">global_ptr&lt;int[]&gt;</span> val<span style="color: #990000">)</span> <span style="color: #FF0000">{</span> <span style="font-style: italic"><span style="color: #9A1900">// OK</span></span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>2.
-The <span class="monospaced">global</span>, <span class="monospaced">local</span>, <span class="monospaced">priv</span> and <span class="monospaced">constant</span> storage classes cannot be used as a return type of function</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_array&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="color: #008080">global&lt;array&lt;int, 5&gt;&gt;</span> programVar<span style="color: #990000">;</span>
-
-<span style="color: #008080">global&lt;array&lt;int, 5&gt;&gt;</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span> <span style="font-style: italic"><span style="color: #9A1900">// error: variable in the global</span></span>
-                             <span style="font-style: italic"><span style="color: #9A1900">// address space returned by value</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> programVar<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span>
-
-<span style="color: #008080">global&lt;array&lt;int, 5&gt;&gt;</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #000000">bar</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span> <span style="font-style: italic"><span style="color: #9A1900">// OK</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> programVar<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>3.
-The <span class="monospaced">global</span>, <span class="monospaced">local</span> and <span class="monospaced">constant</span> storage classes cannot be used to declare class members unless <span class="monospaced">static</span> keyword is used</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_array&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">Foo</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">global&lt;int&gt;</span> a<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// error: class members cannot be qualified</span></span>
-                   <span style="font-style: italic"><span style="color: #9A1900">// with address space</span></span>
-    <span style="color: #008080">local&lt;array&lt;int, 5&gt;&gt;</span> b<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// error: class members cannot be</span></span>
-                           <span style="font-style: italic"><span style="color: #9A1900">// qualified with address space</span></span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">global&lt;int&gt;</span> c<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">local&lt;array&lt;int, 5&gt;&gt;</span> d<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK</span></span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>4.
-The <span class="monospaced">global</span> storage class cannot be used to declare variables at function scope unless <span class="monospaced">static</span> keyword is used</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">global&lt;int&gt;</span> b<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// error</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">global&lt;int&gt;</span> b<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>5.
-The <span class="monospaced">local</span> variables can be declared only at kernel function scope, program scope and with <span class="monospaced">static</span> keyword</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_array&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// An array of 5 ints allocated in</span></span>
-<span style="font-style: italic"><span style="color: #9A1900">// local address space.</span></span>
-<span style="color: #008080">local&lt;array&lt;int, 5&gt;&gt;</span> a <span style="color: #990000">=</span> <span style="color: #FF0000">{</span> <span style="color: #993399">10</span> <span style="color: #FF0000">}</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK: program scope local</span></span>
-                                 <span style="font-style: italic"><span style="color: #9A1900">// variable</span></span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="font-style: italic"><span style="color: #9A1900">// A single int allocated in</span></span>
-    <span style="font-style: italic"><span style="color: #9A1900">// local address space</span></span>
-    <span style="color: #008080">local&lt;int&gt;</span> b<span style="color: #FF0000">{</span><span style="color: #993399">1</span><span style="color: #FF0000">}</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">local&lt;int&gt;</span> d<span style="color: #FF0000">{</span><span style="color: #993399">1</span><span style="color: #FF0000">}</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK</span></span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">)</span> <span style="color: #990000">==</span> <span style="color: #993399">0</span><span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-        <span style="font-style: italic"><span style="color: #9A1900">// example of variable in local address space</span></span>
-        <span style="font-style: italic"><span style="color: #9A1900">// but not declared at __kernel function scope.</span></span>
-        <span style="color: #008080">local&lt;int&gt;</span> c<span style="color: #FF0000">{</span><span style="color: #993399">2</span><span style="color: #FF0000">}</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// not allowed</span></span>
-  <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>6.
-The objects allocated using <span class="monospaced">global</span> storage class must be initialized with the constant expression arguments</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="color: #009900">int</span> a <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">);</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">global&lt;int&gt;</span> b<span style="color: #FF0000">{</span>a<span style="color: #FF0000">}</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// undefined behavior</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">global&lt;int&gt;</span> c<span style="color: #FF0000">{</span><span style="color: #993399">0</span><span style="color: #FF0000">}</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>7.
-The constructors of objects allocated using <span class="monospaced">constant</span> storage class must be constant expression</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="color: #008080">constant&lt;int&gt;</span> b<span style="color: #FF0000">{</span><span style="color: #993399">0</span><span style="color: #FF0000">}</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK</span></span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="color: #009900">int</span> a <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">);</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">constant&lt;int&gt;</span> b<span style="color: #FF0000">{</span>a<span style="color: #FF0000">}</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// undefined behavior</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>8.
-Constant variables must be initialized</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="color: #008080">constant&lt;int&gt;</span> a<span style="color: #FF0000">{</span><span style="color: #993399">0</span><span style="color: #FF0000">}</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK</span></span>
-<span style="color: #008080">constant&lt;int&gt;</span> b<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// error: constant variable must be initialized</span></span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">constant&lt;int&gt;</span> c<span style="color: #FF0000">{</span><span style="color: #993399">0</span><span style="color: #FF0000">}</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">constant&lt;int&gt;</span> d<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// error: constant variable must be initialized</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>9.
-The <span class="monospaced">priv</span> storage class cannot be used to declare variables in the program scope or with <span class="monospaced">static</span> specifier.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="color: #008080">priv&lt;int&gt;</span> a<span style="color: #FF0000">{</span><span style="color: #993399">0</span><span style="color: #FF0000">}</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// error: priv variable in program scope</span></span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">priv&lt;int&gt;</span> c<span style="color: #FF0000">{</span><span style="color: #993399">0</span><span style="color: #FF0000">}</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// error: priv variable with static specifier</span></span>
-    <span style="color: #008080">priv&lt;int&gt;</span> d<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>10.
-<span class="monospaced">T</span> type used in <span class="monospaced">constant</span> storage class cannot have any user defined constructors, destructors, operators and methods</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">bar</span> <span style="color: #FF0000">{</span>
-    <span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span> <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="color: #993399">10</span><span style="color: #990000">;</span> <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">constant&lt;bar&gt;</span> a<span style="color: #990000">;</span>
-    <span style="color: #009900">int</span> b <span style="color: #990000">=</span> a<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="font-style: italic"><span style="color: #9A1900">// undefined behavior</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>11.
-<span class="monospaced">T</span> type used in <span class="monospaced">global</span>, <span class="monospaced">local</span>, <span class="monospaced">priv</span> and <span class="monospaced">constant</span> storage class cannot be sealed class</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">bar</span> final <span style="color: #FF0000">{</span> <span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">local&lt;bar&gt;</span> a<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// error: bar is marked as final</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>12.
-Using work-group barriers or relying on a specific work-item to be executed in constructors and destructors of global and local objects can result in undefined behavior</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_synchronization&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">Foo</span> <span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #000000">Foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-        <span style="font-weight: bold"><span style="color: #000000">work_group_barrier</span></span><span style="color: #990000">(</span>mem_fence<span style="color: #990000">::</span>local<span style="color: #990000">);</span> <span style="font-style: italic"><span style="color: #9A1900">// not allowed</span></span>
-    <span style="color: #FF0000">}</span>
-
-    <span style="color: #990000">~</span><span style="font-weight: bold"><span style="color: #000000">Foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-        <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">)</span> <span style="color: #990000">!=</span> <span style="color: #993399">5</span><span style="color: #990000">)</span> <span style="color: #FF0000">{</span> <span style="font-style: italic"><span style="color: #9A1900">// not allowed</span></span>
-            <span style="font-weight: bold"><span style="color: #0000FF">while</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">)</span> <span style="color: #FF0000">{}</span>
-        <span style="color: #FF0000">}</span>
-    <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">bar</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">local&lt;Foo&gt;</span> a<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>13.
-All local (address-space) variable declarations in kernel-scope shall be declared before any explicit return statement.
-Declaring local variable after return statement may cause undefined behavior.
-Implementation is encouraged to generate at least a warning in such cases.</p></div>
-</div>
-<div class="sect3">
-<h4 id="examples-3">3.4.6. Examples</h4>
-<div class="sect4">
-<h5 id="example-1-3">Example 1</h5>
-<div class="paragraph"><p>Example of passing an explicit address space storage object to a kernel.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #008080">global&lt;int&gt;</span> <span style="color: #990000">*</span>arg<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-2-2">Example 2</h5>
-<div class="paragraph"><p>Example of passing an explicit address space pointer object to a kernel.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #008080">global_ptr&lt;int&gt;</span> arg<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-3-1">Example 3</h5>
-<div class="paragraph"><p>Example of casting a generic pointer to an explicit address space pointer object.
-This is the runtime operation and the <span class="monospaced">dynamic_asptr_cast</span> can fail.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #008080">global_ptr&lt;int&gt;</span> arg<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="color: #009900">int</span> <span style="color: #990000">*</span>ptr <span style="color: #990000">=</span> arg<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> globalPtr <span style="color: #990000">=</span> dynamic_asptr_cast<span style="color: #990000">&lt;</span>global_ptr<span style="color: #990000">&lt;</span><span style="color: #009900">int</span><span style="color: #990000">&gt;&gt;(</span>ptr<span style="color: #990000">);</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span>globalPtr<span style="color: #990000">)</span>
-    <span style="color: #FF0000">{</span>
-        <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-4">Example 4</h5>
-<div class="paragraph"><p>Example of using an array with an explicit address space storage class.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_array&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">local&lt;array&lt;int, 2&gt;&gt;</span> localArray<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">)</span> <span style="color: #990000">==</span> <span style="color: #993399">0</span><span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-        <span style="font-weight: bold"><span style="color: #0000FF">for</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> it <span style="color: #990000">=</span> localArray<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">begin</span></span><span style="color: #990000">();</span> it <span style="color: #990000">!=</span> localArray<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">end</span></span><span style="color: #990000">();</span> <span style="color: #990000">++</span>it<span style="color: #990000">)</span>
-            <span style="color: #990000">*</span>it <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
-    <span style="color: #FF0000">}</span>
-    <span style="font-weight: bold"><span style="color: #000000">work_group_barrier</span></span><span style="color: #990000">(</span>mem_fence<span style="color: #990000">::</span>local<span style="color: #990000">);</span>
-    localArray<span style="color: #990000">[</span><span style="color: #993399">0</span><span style="color: #990000">]</span> <span style="color: #990000">+=</span> <span style="color: #993399">1</span><span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-5">Example 5</h5>
-<div class="paragraph"><p>Example of using a fundamental type with an explicit address space storage class.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">local&lt;int&gt;</span> a<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">)</span> <span style="color: #990000">==</span> <span style="color: #993399">0</span><span style="color: #990000">)</span>
-        a <span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #000000">work_group_barrier</span></span><span style="color: #990000">(</span>mem_fence<span style="color: #990000">::</span>local<span style="color: #990000">);</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">)</span> <span style="color: #990000">==</span> <span style="color: #993399">1</span><span style="color: #990000">)</span>
-        a <span style="color: #990000">+=</span> <span style="color: #993399">1</span><span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="specialization-constants-library">3.5. Specialization Constants Library</h3>
-<div class="paragraph"><p>The specialization constants are objects that will not have known constant values until after initial generation of a SPIR-V module.
-Such objects are called specialization constants.
-Application might provide values for the specialization constants that will be used when SPIR-V program is built.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_spec_constant-synopsis">3.5.1. Header &lt;opencl_spec_constant&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #009900">unsigned</span> <span style="color: #009900">int</span> ID<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">spec_constant</span>
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #000000">spec_constant</span></span><span style="color: #990000">()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">spec_constant</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> spec_constant <span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">spec_constant</span></span><span style="color: #990000">(</span>spec_constant<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">spec_constant</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&amp;</span> value<span style="color: #990000">);</span>
-
-    spec_constant<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> spec_constant<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    spec_constant<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>spec_constant<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&amp;()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #009900">unsigned</span> <span style="color: #009900">int</span> ID<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">spec_constant&lt;T, ID&gt;</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="spec_constant-class-methods-and-get-function">3.5.2. spec_constant class methods and get function</h4>
-<div class="sect4">
-<h5 id="spec_constantspec_constant">spec_constant::spec_constant</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">spec_constant</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&amp;</span> value<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Constructor of spec_constant class.
-The value parameter  is a default value of the specialization constant that will be used if a value is not set by the host API.
-It must be a literal value.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get">get</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&amp;()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #009900">unsigned</span> <span style="color: #009900">int</span> ID<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">spec_constant&lt;T, ID&gt;</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Return a value of specialization constant.
-If an object is not specialized from the host, the default value will be returned.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="requirements-2">3.5.3. Requirements</h4>
-<div class="paragraph"><p>Specialization constant variables cannot be defined <span class="monospaced">constexpr</span>.</p></div>
-<div class="sect4">
-<h5 id="data-1">Data</h5>
-<div class="paragraph"><p>Template parameter <span class="monospaced">T</span> in spec_constant class template denotes the data type of specialization constant.
-The type <span class="monospaced">T</span> must be integral or floating point type.</p></div>
-</div>
-<div class="sect4">
-<h5 id="id">ID</h5>
-<div class="paragraph"><p>Template parameter <span class="monospaced">ID</span> in spec_constant class template denotes an unique ID of the specialization constant that can be used to set a value from the host API.
-The value of <span class="monospaced">ID</span> must be unique within this compilation unit and across any other SPIR-V modules that it is linked with.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="examples-9">3.5.4. Examples</h4>
-<div class="sect4">
-<h5 id="example-1-9">Example 1</h5>
-<div class="paragraph"><p>Example of using the specialization constant in the kernel.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_spec_constant&gt;</span>
-cl<span style="color: #990000">::</span><span style="color: #008080">spec_constant&lt;int, 1&gt;</span> spec1<span style="color: #FF0000">{</span> <span style="color: #993399">255</span> <span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-<span style="color: #008080">constexpr</span> cl<span style="color: #990000">::</span><span style="color: #008080">spec_constant&lt;int, 2&gt;</span> spec2<span style="color: #FF0000">{</span> <span style="color: #993399">255</span> <span style="color: #FF0000">}</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// error, constexpr specialization</span></span>
-                                                  <span style="font-style: italic"><span style="color: #9A1900">// constant variables are not allowed</span></span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">myKernel</span></span><span style="color: #990000">()</span>
-<span style="color: #FF0000">{</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">(</span>spec1<span style="color: #990000">)</span> <span style="color: #990000">==</span> <span style="color: #993399">255</span><span style="color: #990000">)</span>
-  <span style="color: #FF0000">{</span>
-        <span style="font-style: italic"><span style="color: #9A1900">// do something if a default value is used</span></span>
-  <span style="color: #FF0000">}</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">else</span></span>
-  <span style="color: #FF0000">{</span>
-    <span style="font-style: italic"><span style="color: #9A1900">// do something if the spec constant was specialized by the host</span></span>
-  <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-2-7">Example 2</h5>
-<div class="paragraph"><p>Example of specializing one of the dimensions in <span class="monospaced">cl::required_work_group_size</span> attribute.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_spec_constant&gt;</span>
-cl<span style="color: #990000">::</span><span style="color: #008080">spec_constant&lt;int, 1&gt;</span> spec1<span style="color: #FF0000">{</span> <span style="color: #993399">512</span> <span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="color: #990000">[[</span>cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">required_work_group_size</span></span><span style="color: #990000">(</span>spec1<span style="color: #990000">,</span> <span style="color: #993399">1</span><span style="color: #990000">,</span> <span style="color: #993399">1</span><span style="color: #990000">)]]</span>
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">myKernel</span></span><span style="color: #990000">()</span>
-<span style="color: #FF0000">{</span>
-   <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="half-wrapper-library">3.6. Half Wrapper Library</h3>
-<div class="paragraph"><p>The OpenCL C++ programming language implements a wrapper class for the built-in half data type (<a href="#builtin-half-data-type">Built-in Half Data Type</a> section).
-The class methods perform implicit <span class="monospaced">vload_half</span> and <span class="monospaced">vstore_half</span> operations from <em><a href="#vector-data-load-and-store-functions">Vector Data Load and Store Functions</a> section</em>.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_half-synopsis">3.6.1. Header &lt;opencl_half&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl <span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">fp16</span>
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #000000">fp16</span></span><span style="color: #990000">()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">fp16</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16 <span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">fp16</span></span><span style="color: #990000">(</span>fp16 <span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16 <span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>fp16 <span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-    <span style="font-weight: bold"><span style="color: #000000">fp16</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">half</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #000000">half</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-    <span style="font-weight: bold"><span style="color: #000000">fp16</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #009900">float</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">float</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-    <span style="font-weight: bold"><span style="color: #000000">fp16</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #009900">double</span> r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">double</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-    <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">fp16</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">fp16</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">/=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;</span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;</span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">fp16</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">fp16</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">fp16</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">fp16</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">/(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="constructors-1">3.6.2. Constructors</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000000">fp16</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">half</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Constructs an object with a half built-in type.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000000">fp16</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #009900">float</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Constructs an object with a float built-in type.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vstore_half</span> built-in function is called with the default rounding mode.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000000">fp16</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #009900">double</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Constructs an object with a double built-in type.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vstore_half</span> built-in function is called with the default rounding mode.
-The constructor is only present if the double precision support is enabled.</p></div>
-</div>
-<div class="sect3">
-<h4 id="assignment-operators-1">3.6.3. Assignment operators</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">half</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Assigns r to the stored half type.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #009900">float</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Assigns r to the stored half type.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vstore_half</span> built-in function is called with the default rounding mode.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #009900">double</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Assigns r to the stored half type.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vstore_half</span> built-in function is called with the default rounding mode.
-The operator is only present if the double precision support is enabled.</p></div>
-</div>
-<div class="sect3">
-<h4 id="conversion-operators">3.6.4. Conversion operators</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">m != 0.0h</span>.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> built-in function is called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #000000">half</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Conversion operator to the built-in half type.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">float</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Conversion operator.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> built-in function is called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">double</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Conversion operator.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> built-in function is called.
-The operator is only present if the double precision support is enabled.</p></div>
-</div>
-<div class="sect3">
-<h4 id="arithmetic-operations">3.6.5. Arithmetic operations</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Pre-increment operator.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> and <span class="monospaced">vstore_half</span> built-in functions are called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Post-increment operator.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> and <span class="monospaced">vstore_half</span> built-in functions are called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Pre-decrement operator.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> and <span class="monospaced">vstore_half</span> built-in functions are called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Pre-decrement operator.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> and <span class="monospaced">vstore_half</span> built-in functions are called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Addition operator.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> and <span class="monospaced">vstore_half</span> built-in functions are called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Subtract operator.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> and <span class="monospaced">vstore_half</span> built-in functions are called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Multiplication operator.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> and <span class="monospaced">vstore_half</span> built-in functions are called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">/=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">fp16</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Division operator.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> and <span class="monospaced">vstore_half</span> built-in functions are called.</p></div>
-</div>
-<div class="sect3">
-<h4 id="non-member-functions-1">3.6.6. Non-member functions</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison operator ==.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> built-in function is called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison operator !=.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> built-in function is called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;</span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison operator &lt;.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> built-in function is called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;</span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison operator &gt;.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> built-in function is called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison operator &#8656;.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> built-in function is called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Comparison operator &gt;=.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> built-in function is called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Addition operator.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> and <span class="monospaced">vstore_half</span> built-in functions are called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Subtract operator.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> and <span class="monospaced">vstore_half</span> built-in functions are called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Multiplication operator.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> and <span class="monospaced">vstore_half</span> built-in functions are called.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">fp16</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">/(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> fp16<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Division operator.
-If the <em>cl_khr_fp16</em> extension is not supported, <span class="monospaced">vload_half</span> and <span class="monospaced">vstore_half</span> built-in functions are called.</p></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="vector-wrapper-library">3.7. Vector Wrapper Library</h3>
-<div class="paragraph"><p>The OpenCL C++ programming language implements a vector wrapper type that works efficiently on the OpenCL devices.
-The vector class supports methods that allow construction of a new vector from a swizzled set of component elements or from a built-in vector type.
-The vector class can be converted to a corresponding built-in vector type.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">Size</span> parameter can be one of: 2, 3, 4, 8 or 16.
-Any other value should produce a compilation failure.
-The element type parameter <span class="monospaced">T</span>, must be one of the basic scalar types defined in <a href="#device_builtin_scalar_data_types">Device built-in scalar data types</a> table except void type.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_vec-synopsis">3.7.1. Header &lt;opencl_vec&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl <span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">constexpr</span> <span style="color: #008080">size_t</span> undef_channel <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">static_cast</span></span><span style="color: #990000">&lt;</span>size_t<span style="color: #990000">&gt;(-</span><span style="color: #993399">1</span><span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">channel</span> <span style="color: #990000">:</span> size_t <span style="color: #FF0000">{</span> r <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">,</span> g <span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">,</span> b <span style="color: #990000">=</span> <span style="color: #993399">2</span><span style="color: #990000">,</span> a <span style="color: #990000">=</span> <span style="color: #993399">3</span><span style="color: #990000">,</span> x <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">,</span> y <span style="color: #990000">=</span> <span style="color: #993399">1</span><span style="color: #990000">,</span> z <span style="color: #990000">=</span> <span style="color: #993399">2</span><span style="color: #990000">,</span> w <span style="color: #990000">=</span> <span style="color: #993399">3</span><span style="color: #990000">,</span> undef <span style="color: #990000">=</span> undef_channel <span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">vec</span>
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">using</span></span> element_type <span style="color: #990000">=</span> T<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">using</span></span> vector_type <span style="color: #990000">=</span> make_vector_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> Size<span style="color: #990000">&gt;;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">constexpr</span> <span style="color: #008080">size_t</span> size <span style="color: #990000">=</span> Size<span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #000000">vec</span></span><span style="color: #990000">(</span> <span style="color: #990000">)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">vec</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vec <span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">vec</span></span><span style="color: #990000">(</span>vec <span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #000000">vec</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vector_type</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">vec</span></span><span style="color: #990000">(</span><span style="color: #008080">vector_type</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Params<span style="color: #990000">&gt;</span>
-    <span style="font-weight: bold"><span style="color: #000000">vec</span></span><span style="color: #990000">(</span>Params<span style="color: #990000">...</span> params<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vec <span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>vec <span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vector_type</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">vector_type</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #000000">vector_type</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">element_type</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">element_type</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">element_type</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">/=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">/=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">element_type</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">%=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">%=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">element_type</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span>size_t<span style="color: #990000">...</span> Sizes<span style="color: #990000">&gt;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">swizzle</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span>size_t<span style="color: #990000">...</span> Sizes<span style="color: #990000">&gt;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">swizzle</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> SIMPLE_SWIZZLES
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">x</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #990000">...</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">xyzw</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #990000">...</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">zzzz</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span>size_t<span style="color: #990000">...</span> Swizzle<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Vec</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">swizzle</span></span><span style="color: #990000">(</span>Vec<span style="color: #990000">&amp;</span> v<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span>channel<span style="color: #990000">...</span> Swizzle<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Vec</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">swizzle</span></span><span style="color: #990000">(</span>Vec<span style="color: #990000">&amp;</span> v<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;bool, Size&gt; operator==(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;bool, Size&gt; operator!=(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;bool, Size&gt; operator&lt;(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                                    <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;bool, Size&gt; operator&gt;(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                                    <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;bool, Size&gt; operator&lt;=(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;bool, Size&gt; operator&gt;=(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator+(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator+(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">T</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator+(const T &amp;lhs, const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator-(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator-(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">T</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator-(const T &amp;lhs, const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator*(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator*(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">T</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator*(const T &amp;lhs, const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator/(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator/(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">T</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator/(const T &amp;lhs, const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="constructors-2">3.7.2. Constructors</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000000">vec</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vector_type</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Copy constructor.
-Constructs an object with the corresponding built-in vector type.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000000">vec</span></span><span style="color: #990000">(</span><span style="color: #008080">vector_type</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Move constructor.
-Constructs an object with the corresponding built-in vector type.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Params<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #000000">vec</span></span><span style="color: #990000">(</span>Params<span style="color: #990000">...</span> params<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Constructs a vector object from a swizzled set of component elements.</p></div>
-</div>
-<div class="sect3">
-<h4 id="assignment-operators-2">3.7.3. Assignment operators</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vector_type</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Copy assignment operator.
-The operator assigns a corresponding built-in vector type.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">vector_type</span> <span style="color: #990000">&amp;&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Move assignment operator.
-The operator assigns a corresponding built-in vector type.</p></div>
-</div>
-<div class="sect3">
-<h4 id="conversion-operators-1">3.7.4. Conversion operators</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #000000">vector_type</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Conversion operator.
-The operator converts from the vector wrapper class to a corresponding built-in vector type.</p></div>
-</div>
-<div class="sect3">
-<h4 id="arithmetic-operations-1">3.7.5. Arithmetic operations</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Pre-increment operator.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Post-increment operator.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Pre-decrement operator.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Post-decrement operator.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">element_type</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Add each element of <span class="monospaced">r</span> to the respective element of the current vector in-place.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">element_type</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Subtract each element of <span class="monospaced">r</span> from the respective element of the current vector in-place.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">element_type</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Multiply each element of <span class="monospaced">r</span> by the respective element of the current vector in-place.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">/=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">/=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">element_type</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Divide each element of the current vector in-place by the respective element of <span class="monospaced">r</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">%=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-vec<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">%=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">element_type</span> <span style="color: #990000">&amp;</span>r<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Remainder of each element of the current vector in-place by the respective element of <span class="monospaced">r</span>.</p></div>
-</div>
-<div class="sect3">
-<h4 id="swizzle-methods">3.7.6. Swizzle methods</h4>
-<div class="paragraph"><p>All swizzle methods return a temporary object representing a swizzled set of the original vector&#8217;s member elements.
-The swizzled vector may be used as a source (rvalue) and destination (lvalue).
-In order to enable the r-value and lvalue swizzling to work, this returns an intermediate swizzled-vector class, which can be implicitly converted to a vector (rvalue evaluation) or assigned to.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span>size_t<span style="color: #990000">...</span> Sizes<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">swizzle</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span>size_t<span style="color: #990000">...</span> Sizes<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">swizzle</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns a vector swizzle.
-The number of template parameters specified in <span class="monospaced">Sizes</span> must be from <span class="monospaced">1</span> to <span class="monospaced">Size</span>.
-<span class="monospaced">Sizes</span> parameters must be channel values: <span class="monospaced">channel::r</span>, <span class="monospaced">channel::b</span>, <span class="monospaced">&#8230;</span>.
-Swizzle letters may be repeated or re-ordered.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">x</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #990000">...</span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">xyzw</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #990000">...</span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">zzzz</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns a swizzle.
-These swizzle methods are only generated if the user defined the <span class="monospaced">SIMPLE_SWIZZLES</span> macro before including <em>opencl_vec</em> header.</p></div>
-</div>
-<div class="sect3">
-<h4 id="non-member-functions-2">3.7.7. Non-member functions</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span>size_t<span style="color: #990000">...</span> Swizzle<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Vec</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">swizzle</span></span><span style="color: #990000">(</span>Vec<span style="color: #990000">&amp;</span> v<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span>channel<span style="color: #990000">...</span> Swizzle<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Vec</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">swizzle</span></span><span style="color: #990000">(</span>Vec<span style="color: #990000">&amp;</span> v<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns a vector swizzle.
-The number of template parameters specified in <span class="monospaced">Sizes</span> must be from <span class="monospaced">1</span> to <span class="monospaced">Size</span>.
-<span class="monospaced">Sizes</span> parameters must be channel values: <span class="monospaced">channel::r</span>, <span class="monospaced">channel::b</span>, <span class="monospaced">&#8230;</span> .
-Swizzle letters may be repeated or re-ordered.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;bool, Size&gt; operator==(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Return <span class="monospaced">true</span> if all elements of <span class="monospaced">rhs</span> compare equal to the respective element of <span class="monospaced">lhs</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;bool, Size&gt; operator!=(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Return <span class="monospaced">true</span> if any one element of <span class="monospaced">rhs</span> does not compare equal to the respective element of <span class="monospaced">lhs</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;bool, Size&gt; operator&lt;(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                                    <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Return <span class="monospaced">true</span> if all elements of <span class="monospaced">lhs</span> are less than the respective element of <span class="monospaced">rhs</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;bool, Size&gt; operator&gt;(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                                    <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Return <span class="monospaced">true</span> if all elements of <span class="monospaced">lhs</span> are greater than the respective element of <span class="monospaced">rhs</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;bool, Size&gt; operator&lt;=(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Return <span class="monospaced">true</span> if all elements of <span class="monospaced">lhs</span> are less than or equal to the respective element of <span class="monospaced">rhs</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;bool, Size&gt; operator&gt;=(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Return <span class="monospaced">true</span> if all elements of <span class="monospaced">lhs</span> are greater than or equal to the respective element of <span class="monospaced">rhs</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator+(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator+(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">T</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator+(const T &amp;lhs, const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Add each element of <span class="monospaced">rhs</span> to the respective element of <span class="monospaced">lhs</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator-(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator-(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">T</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator-(const T &amp;lhs, const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Subtract each element of <span class="monospaced">rhs</span> from the respective element of <span class="monospaced">lhs</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator*(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator*(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">T</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator*(const T &amp;lhs, const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Multiply each element of <span class="monospaced">rhs</span> by the respective element of <span class="monospaced">lhs</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator/(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span>
-                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator/(const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>lhs<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">T</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> Size<span style="color: #990000">&gt;</span>
-<span style="color: #008080">vec&lt;T, Size&gt; operator/(const T &amp;lhs, const vec&lt;T, Size&gt;</span> <span style="color: #990000">&amp;</span>rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Divide each element of <span class="monospaced">lhs</span> by the respective element of the <span class="monospaced">rhs</span>.</p></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="range-library">3.8. Range Library</h3>
-<div class="paragraph"><p>OpenCL C++ implements small library that contains useful utilities to manipulate iterator ranges.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_range-synopsis">3.8.1. Header &lt;opencl_range&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">It</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">range_type</span>
-<span style="color: #FF0000">{</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">range_type</span></span><span style="color: #990000">(</span>It<span style="color: #990000">&amp;</span> it<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">range_type</span></span><span style="color: #990000">(</span>It<span style="color: #990000">&amp;</span> it<span style="color: #990000">,</span> <span style="color: #008080">difference_type</span> end<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">range_type</span></span><span style="color: #990000">(</span>It<span style="color: #990000">&amp;</span> it<span style="color: #990000">,</span> <span style="color: #008080">difference_type</span> begin<span style="color: #990000">,</span>
-                         <span style="color: #008080">difference_type</span> end<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    constexpr <span style="color: #008080">auto</span> <span style="font-weight: bold"><span style="color: #000000">begin</span></span><span style="color: #990000">(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="color: #008080">auto</span> <span style="font-weight: bold"><span style="color: #000000">end</span></span><span style="color: #990000">(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">It</span><span style="color: #990000">&gt;</span>
-constexpr <span style="color: #008080">auto</span> <span style="font-weight: bold"><span style="color: #000000">range</span></span><span style="color: #990000">(</span>It<span style="color: #990000">&amp;</span> it<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">It</span><span style="color: #990000">&gt;</span>
-constexpr <span style="color: #008080">auto</span> <span style="font-weight: bold"><span style="color: #000000">range</span></span><span style="color: #990000">(</span>It<span style="color: #990000">&amp;</span> it<span style="color: #990000">,</span> <span style="color: #008080">difference_type</span> end<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">It</span><span style="color: #990000">&gt;</span>
-constexpr <span style="color: #008080">auto</span> <span style="font-weight: bold"><span style="color: #000000">range</span></span><span style="color: #990000">(</span>It<span style="color: #990000">&amp;</span> it<span style="color: #990000">,</span> <span style="color: #008080">difference_type</span> begin<span style="color: #990000">,</span>
-                     <span style="color: #008080">difference_type</span> end<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// difference_type is It::difference_type if present ptrdiff_t otherwise.</span></span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="range-type">3.8.2. Range type</h4>
-<div class="paragraph"><p>Range type represents a given range over iterable type.
-Depending on constructor used:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">range_type</span></span><span style="color: #990000">(</span>It<span style="color: #990000">&amp;</span> it<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Represents range from <span class="monospaced">begin(it)</span> to <span class="monospaced">end(it)</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">range_type</span></span><span style="color: #990000">(</span>It<span style="color: #990000">&amp;</span> it<span style="color: #990000">,</span> <span style="color: #008080">difference_type</span> end<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Represents range from <span class="monospaced">begin(it)</span> to <span class="monospaced">begin(it)+end</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">range_type</span></span><span style="color: #990000">(</span>It<span style="color: #990000">&amp;</span> it<span style="color: #990000">,</span> <span style="color: #008080">difference_type</span> begin<span style="color: #990000">,</span>
-                     <span style="color: #008080">difference_type</span> end<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Represents range from <span class="monospaced">begin(it)+begin</span> to <span class="monospaced">begin(it)+end</span>.</p></div>
-</div>
-<div class="sect3">
-<h4 id="range-function">3.8.3. Range function</h4>
-<div class="paragraph"><p>range function is present in three overloads matching <span class="monospaced">range_type</span> constructors.
-It is a factory function building <span class="monospaced">range_type</span>.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">This function main purpose is enabling the use of range based for loops on built-in vectors.</td>
-</tr></table>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="vector-utilities-library">3.9. Vector Utilities Library</h3>
-<div class="paragraph"><p>OpenCL C++ implements vector utilities library that contains multiple helper classes to help working with built-in vectors.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_vector_utility-synopsis">3.9.1. Header &lt;opencl_vector_utility&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> Channel<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Vec</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">constexpr</span> <span style="color: #008080">remove_attrs_t&lt;vector_element_t&lt;Vec&gt;&gt;</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">(</span>Vec <span style="color: #990000">&amp;</span> vector<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> Channel<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Vec</span><span style="color: #990000">&gt;</span>
-constexpr <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">set</span></span><span style="color: #990000">(</span>Vec <span style="color: #990000">&amp;</span> vector<span style="color: #990000">,</span>
-                   <span style="color: #008080">remove_attrs_t&lt;vector_element_t&lt;Vec&gt;&gt;</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Vec</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">channel_ref</span>
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">using</span></span> type <span style="color: #990000">=</span> remove_attrs_t<span style="color: #990000">&lt;</span>vector_element_t<span style="color: #990000">&lt;</span>Vec<span style="color: #990000">&gt;&gt;;</span>
-
-    constexpr <span style="color: #008080">operator</span> <span style="font-weight: bold"><span style="color: #000000">type</span></span><span style="color: #990000">(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">+=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">+(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">-=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">-(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">*=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">*(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">/=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">/(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">%=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">%(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">^=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">^(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">&amp;=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">&amp;(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">|=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">|(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="color: #008080">channel_ref</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="color: #008080">channel_ref</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">channel_ref</span><span style="color: #990000">&lt;</span>floating_point_vector<span style="color: #990000">&gt;</span>
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">using</span></span> type <span style="color: #990000">=</span> remove_attrs_t<span style="color: #990000">&lt;</span>vector_element_t<span style="color: #990000">&lt;</span>Vec<span style="color: #990000">&gt;&gt;;</span>
-
-    constexpr <span style="color: #008080">operator</span> <span style="font-weight: bold"><span style="color: #000000">type</span></span><span style="color: #990000">(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">+=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">+(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">-=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">-(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">*=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">*(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">/=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">/(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">channel_ref</span><span style="color: #990000">&lt;</span>boolean_vector<span style="color: #990000">&gt;</span>
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">using</span></span> type <span style="color: #990000">=</span> remove_attrs_t<span style="color: #990000">&lt;</span>vector_element_t<span style="color: #990000">&lt;</span>Vec<span style="color: #990000">&gt;&gt;;</span>
-
-    constexpr <span style="color: #008080">operator</span> <span style="font-weight: bold"><span style="color: #000000">type</span></span><span style="color: #990000">(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">+=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">+(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">-=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">-(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">*=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">*(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">/=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">/(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">%=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">%(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">^=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">^(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">&amp;=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">&amp;(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">|=(</span><span style="color: #008080">type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> <span style="color: #008080">type</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">|(</span><span style="color: #008080">channel_ref</span> lhs<span style="color: #990000">,</span> <span style="color: #008080">type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Vec</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">channel_ptr</span>
-<span style="color: #FF0000">{</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">channel_ptr</span></span><span style="color: #990000">(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">channel_ptr</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> channel_ref<span style="color: #990000">&lt;</span>Vec<span style="color: #990000">&gt;&amp;</span> ref<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">channel_ptr</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> channel_ptr<span style="color: #990000">&amp;)</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">channel_ptr</span></span><span style="color: #990000">(</span>channel_ptr<span style="color: #990000">&amp;&amp;)</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ptr<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> channel_ptr<span style="color: #990000">&amp;)</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> channel_ptr<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>channel_ptr<span style="color: #990000">&amp;&amp;)</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">using</span></span> type <span style="color: #990000">=</span> remove_attrs_t<span style="color: #990000">&lt;</span>vector_element_t<span style="color: #990000">&lt;</span>Vec<span style="color: #990000">&gt;&gt;;</span>
-
-    <span style="color: #008080">constexpr</span> channel_ref<span style="color: #990000">&lt;</span>Vec<span style="color: #990000">&gt;&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Vec</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">vector_iterator</span> <span style="color: #990000">:</span> iterator<span style="color: #990000">&lt;</span>random_access_iterator_tag<span style="color: #990000">,</span>
-                          remove_attrs_t<span style="color: #990000">&lt;</span>vector_element_t<span style="color: #990000">&lt;</span>remove_attrs_t<span style="color: #990000">&lt;</span>Vec<span style="color: #990000">&gt;&gt;&gt;,</span>
-                          ptrdiff_t<span style="color: #990000">,</span>
-                          channel_ptr<span style="color: #990000">&lt;</span>remove_attrs_t<span style="color: #990000">&lt;</span>Vec<span style="color: #990000">&gt;&gt;,</span>
-                          channel_ref<span style="color: #990000">&lt;</span>remove_attrs_t<span style="color: #990000">&lt;</span>Vec<span style="color: #990000">&gt;&gt;&gt;</span>
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">using</span></span> type <span style="color: #990000">=</span> remove_attrs_t<span style="color: #990000">&lt;</span>Vec<span style="color: #990000">&gt;;</span>
-
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">vector_iterator</span></span><span style="color: #990000">(</span>type <span style="color: #990000">&amp;</span> vector<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> offset<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">vector_iterator</span></span><span style="color: #990000">(</span> <span style="color: #990000">)</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">vector_iterator</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;)</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">vector_iterator</span></span><span style="color: #990000">(</span>vector_iterator<span style="color: #990000">&amp;&amp;)</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> vector_iterator<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;)</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> vector_iterator<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>vector_iterator<span style="color: #990000">&amp;&amp;)</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    <span style="color: #008080">constexpr</span> vector_iterator<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span><span style="color: #008080">difference_type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="color: #008080">friend</span> <span style="color: #008080">vector_iterator</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span>
-                                               <span style="color: #008080">difference_type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="color: #008080">friend</span> <span style="color: #008080">vector_iterator</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+(</span><span style="color: #008080">difference_type</span> lhs<span style="color: #990000">,</span>
-                                           <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> vector_iterator<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span><span style="color: #008080">difference_type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="color: #008080">friend</span> <span style="color: #008080">vector_iterator</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span>
-                                                  <span style="color: #008080">difference_type</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #008080">constexpr</span> <span style="color: #008080">vector_iterator</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> vector_iterator<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="color: #008080">vector_iterator</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> vector_iterator<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> constexpr <span style="color: #008080">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">==(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span>
-                                      <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> constexpr <span style="color: #008080">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">!=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span>
-                                      <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> constexpr <span style="color: #008080">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">&lt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> constexpr <span style="color: #008080">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">&lt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span>
-                                      <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> constexpr <span style="color: #008080">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">&gt;(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">friend</span></span> constexpr <span style="color: #008080">bool</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">&gt;=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> lhs<span style="color: #990000">,</span>
-                                      <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> vector_iterator<span style="color: #990000">&amp;</span> rhs<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    constexpr <span style="color: #008080">reference</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">[</span> <span style="color: #990000">](</span><span style="color: #008080">difference_type</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="color: #008080">reference</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">*(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    constexpr <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-&gt;(</span> <span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Vec</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #990000">=</span> enable_if_t<span style="color: #990000">&lt;</span>is_vector_type<span style="color: #990000">&lt;</span>Vec<span style="color: #990000">&gt;::</span>value<span style="color: #990000">,</span> <span style="color: #009900">void</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #008080">constexpr</span> <span style="color: #008080">channel_ref&lt;Vec&gt;</span> <span style="font-weight: bold"><span style="color: #000000">index</span></span><span style="color: #990000">(</span>Vec<span style="color: #990000">&amp;</span> vector<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> channel<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Vec</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #990000">=</span> enable_if_t<span style="color: #990000">&lt;</span>is_vector_type<span style="color: #990000">&lt;</span>Vec<span style="color: #990000">&gt;::</span>value<span style="color: #990000">,</span> <span style="color: #009900">void</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #008080">constexpr</span> <span style="color: #008080">vector_iterator&lt;Vec&gt;</span> <span style="font-weight: bold"><span style="color: #000000">begin</span></span><span style="color: #990000">(</span>Vec <span style="color: #990000">&amp;</span> vector<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Vec</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #990000">=</span> enable_if_t<span style="color: #990000">&lt;</span>is_vector_type<span style="color: #990000">&lt;</span>Vec<span style="color: #990000">&gt;::</span>value<span style="color: #990000">,</span> <span style="color: #009900">void</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #008080">constexpr</span> <span style="color: #008080">vector_iterator&lt;Vec&gt;</span> <span style="font-weight: bold"><span style="color: #000000">end</span></span><span style="color: #990000">(</span>Vec <span style="color: #990000">&amp;</span> vector<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="vector-iterator">3.9.2. Vector iterator</h4>
-<div class="paragraph"><p>Vector iterator is a random access iterator that allows runtime iteration over vector channels.
-Meets all the requirements for random access iterator.
-Iterating outside of vector bounds is an undefined behavior.</p></div>
-<div class="paragraph"><p>The library also exposes non member begin and end functions for vectors.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">Due to the usage of argument-dependent lookup in range based for loops this functions are not available, and the new range adapter has to be used</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>There is also an <span class="monospaced">index</span> function present in the library that allows runtime numerical indexing of channels.
-It returns a channel reference to a given channel number.
-Indexing out of vector bounds results in undefined behavior.</p></div>
-<div class="paragraph"><p>The following example will present simple template function computing sum of channels of a given vector:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">V</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> <span style="font-weight: bold"><span style="color: #000000">sum</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> V<span style="color: #990000">&amp;</span> v<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">vector_element_t&lt;V&gt;</span> temp <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">for</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> e <span style="color: #990000">:</span> <span style="font-weight: bold"><span style="color: #000000">range</span></span><span style="color: #990000">(</span>v<span style="color: #990000">))</span> <span style="color: #FF0000">{</span>
-        temp <span style="color: #990000">+=</span> e<span style="color: #990000">;</span>
-    <span style="color: #FF0000">}</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> temp<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="channel-reference-and-channel-pointer">3.9.3. Channel reference and channel pointer</h4>
-<div class="paragraph"><p><span class="monospaced">channel_ref</span> and <span class="monospaced">channel_ptr</span> classes provide lightweight reference and pointer wrappers for vector channels.
-This is required due to the fact that vector channels can be moved across memory during execution so direct physical addressing is impossible.
-Reference wrapper provides a set of binary operators (depending on vector channel type).</p></div>
-<div class="paragraph"><p>The following example will present a simple usage of channel reference to set first channel of given vector to 0:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">V</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">fun</span></span><span style="color: #990000">(</span>V<span style="color: #990000">&amp;</span> v<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">channel_ref&lt;V&gt;</span> r <span style="color: #990000">=</span> <span style="color: #990000">*</span><span style="font-weight: bold"><span style="color: #000000">begin</span></span><span style="color: #990000">(</span>v<span style="color: #990000">);</span>
-    r <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="get-and-set-functions">3.9.4. Get and set functions</h4>
-<div class="paragraph"><p>Get and set functions allow compile time numerical indexing of channels to substitute for normal swizzling.
-Indexing out of vector range generates a compile error.
-Get function returns a copy of channel value.</p></div>
-<div class="paragraph"><p>The following example will present how get and set functions can be used to duplicate the value of the first channel of given vector:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">V</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">fun</span></span><span style="color: #990000">(</span>V<span style="color: #990000">&amp;</span> v<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> c <span style="color: #990000">=</span> get<span style="color: #990000">&lt;</span> <span style="color: #993399">0</span> <span style="color: #990000">&gt;(</span>v<span style="color: #990000">);</span>
-    set<span style="color: #990000">&lt;</span> <span style="color: #993399">0</span> <span style="color: #990000">&gt;(</span>v<span style="color: #990000">,</span> <span style="color: #993399">2</span><span style="color: #990000">*</span>c<span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="examples-8">3.9.5. Examples</h4>
-<div class="sect4">
-<h5 id="example-1-8">Example 1</h5>
-<div class="paragraph"><p>Example of using built-in vector iterators.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_vector_utility&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_range&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">int8</span> v_i8<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> iter_begin <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">begin</span></span><span style="color: #990000">(</span>v_i8<span style="color: #990000">);</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> iter_end <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">end</span></span><span style="color: #990000">(</span>v_i8<span style="color: #990000">);</span>
-
-    iter_begin <span style="color: #990000">=</span> iter_end<span style="color: #990000">;</span>
-
-    <span style="color: #009900">int</span> a <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
-    a <span style="color: #990000">=</span> <span style="color: #990000">*</span>iter_begin<span style="color: #990000">;</span>
-    a <span style="color: #990000">=</span> iter_begin<span style="color: #990000">[</span><span style="color: #993399">0</span><span style="color: #990000">];</span>
-
-    iter_begin<span style="color: #990000">++;</span>
-    iter_begin<span style="color: #990000">+=</span><span style="color: #993399">1</span><span style="color: #990000">;</span>
-    iter_begin <span style="color: #990000">=</span> iter_begin <span style="color: #990000">+</span> <span style="color: #993399">1</span><span style="color: #990000">;</span>
-
-    iter_begin<span style="color: #990000">--;</span>
-    iter_begin<span style="color: #990000">-=</span><span style="color: #993399">1</span><span style="color: #990000">;</span>
-    iter_begin <span style="color: #990000">=</span> iter_begin <span style="color: #990000">-</span> <span style="color: #993399">1</span><span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-2-6">Example 2</h5>
-<div class="paragraph"><p>Example of iterating though built-in vector channels and using range library.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_vector_utility&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_range&gt;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">int16</span> a<span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> it <span style="color: #990000">=</span> cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">begin</span></span><span style="color: #990000">(</span>a<span style="color: #990000">);</span> it <span style="color: #990000">!=</span> cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">end</span></span><span style="color: #990000">(</span>a<span style="color: #990000">);</span> it<span style="color: #990000">++)</span> <span style="color: #FF0000">{</span>
-        <span style="color: #009900">int</span> b <span style="color: #990000">=</span> <span style="color: #990000">*</span>it<span style="color: #990000">;</span>
-        <span style="color: #990000">*</span>it <span style="color: #990000">=</span> <span style="color: #993399">2</span><span style="color: #990000">;</span>
-    <span style="color: #FF0000">}</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> c <span style="color: #990000">:</span> cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">range</span></span><span style="color: #990000">(</span>a<span style="color: #990000">,</span><span style="color: #993399">3</span><span style="color: #990000">,</span><span style="color: #993399">6</span><span style="color: #990000">))</span> <span style="color: #FF0000">{</span>
-        <span style="color: #009900">int</span> b <span style="color: #990000">=</span> c<span style="color: #990000">;</span>
-        c <span style="color: #990000">=</span> <span style="color: #993399">2</span><span style="color: #990000">;</span>
-    <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="marker-types">3.10. Marker Types</h3>
-<div class="paragraph"><p>Some types in OpenCL C++ are considered marker types.
-These types are special in the manner that their usages need to be tracked by the compiler.
-This results in the following set of restrictions that marker types have to follow:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Marker types have the default constructor deleted.
-</p>
-</li>
-<li>
-<p>
-Marker types have all default copy and move assignment operators deleted.
-</p>
-</li>
-<li>
-<p>
-Marker types have address-of operator deleted.
-</p>
-</li>
-<li>
-<p>
-Marker types cannot be used in divergent control flow. It can result in undefined behavior.
-</p>
-</li>
-<li>
-<p>
-Size of marker types is undefined.
-</p>
-</li>
-</ul></div>
-<div class="sect3">
-<h4 id="header-opencl_marker-synopsis">3.10.1. Header &lt;opencl_marker&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">marker_type</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">is_marker_type</span><span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="marker_type-class">3.10.2. marker_type class</h4>
-<div class="paragraph"><p>All special OpenCL C++ types must use the <span class="monospaced">marker_type</span> class as a base class.</p></div>
-</div>
-<div class="sect3">
-<h4 id="is_marker_type-type-trait">3.10.3. is_marker_type type trait</h4>
-<div class="paragraph"><p><span class="monospaced">is_marker_type</span> type trait provides compile-time check if the base of a class is <span class="monospaced">marker_type</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">is_marker_type</span> <span style="color: #990000">:</span> integral_constant <span style="color: #990000">&lt;</span><span style="color: #009900">bool</span><span style="color: #990000">,</span> is_base_of<span style="color: #990000">&lt;</span>marker_type<span style="color: #990000">,</span> T<span style="color: #990000">&gt;::</span>value<span style="color: #990000">&gt;</span> <span style="color: #FF0000">{</span> <span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="examples">3.10.4. Examples</h4>
-<div class="sect4">
-<h5 id="example-1">Example 1</h5>
-<div class="paragraph"><p>The examples of invalid use of <span class="monospaced">marker types</span>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_image&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="color: #008080">float4</span> <span style="font-weight: bold"><span style="color: #000000">bar</span></span><span style="color: #990000">(</span><span style="color: #008080">image1d&lt;float4&gt;</span> img<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> img<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span><span style="color: #FF0000">{</span><span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">),</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">)</span><span style="color: #FF0000">}</span><span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #008080">image1d&lt;float4&gt; img1, image1d&lt;float4&gt;</span> img2<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">image1d&lt;float4&gt;</span> img3<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">//error: marker type cannot be declared</span></span>
-                          <span style="font-style: italic"><span style="color: #9A1900">//       in the kernel</span></span>
-    img1 <span style="color: #990000">=</span> img2<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">//error: marker type cannot be assigned</span></span>
-    <span style="color: #008080">image1d&lt;float4&gt;</span> <span style="color: #990000">*</span>imgPtr <span style="color: #990000">=</span> <span style="color: #990000">&amp;</span>img1<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">//error: taking address of</span></span>
-                                     <span style="font-style: italic"><span style="color: #9A1900">//       marker type</span></span>
-
-    <span style="color: #008080">size_t</span> s <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">sizeof</span></span><span style="color: #990000">(</span>img1<span style="color: #990000">);</span> <span style="font-style: italic"><span style="color: #9A1900">//undefined behavior: size of marker</span></span>
-                             <span style="font-style: italic"><span style="color: #9A1900">//               type is not defined</span></span>
-
-    <span style="color: #008080">float4</span> val <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">bar</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">)</span> <span style="color: #990000">?</span> img1<span style="color: #990000">:</span> img2<span style="color: #990000">);</span>
-                          <span style="font-style: italic"><span style="color: #9A1900">//undefined behavior: divergent control flow</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-2">Example 2</h5>
-<div class="paragraph"><p>The examples of how to use <span class="monospaced">is_marker_type</span> trait.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_image&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #008080">image1d&lt;float4&gt;</span> img<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-  <span style="font-weight: bold"><span style="color: #000000">static_assert</span></span><span style="color: #990000">(</span>is_marker_type<span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>img<span style="color: #990000">)&gt;(),</span> <span style="color: #FF0000">""</span><span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="images-and-samplers-library">3.11. Images and Samplers Library</h3>
-<div class="paragraph"><p>This section describes the image and sampler types and functions that can be used to read from and/or write to an image.
-<span class="monospaced">image1d</span>, <span class="monospaced">image1d_buffer</span>, <span class="monospaced">image1d_array</span>, <span class="monospaced">image2d</span>, <span class="monospaced">image2d_array</span>, <span class="monospaced">image3d</span>, <span class="monospaced">image2d_depth</span>, <span class="monospaced">image2d_array_depth</span>, <span class="monospaced">image2d_ms</span>, <span class="monospaced">image2d_array_ms</span>, <span class="monospaced">image2d_depth_ms</span>, <span class="monospaced">image2d_array_depth_ms</span> <a href="#ftn13">[13</a>] and <span class="monospaced">sampler</span> follow the rules for marker types (<em><a href="#marker-types">Marker Types</a> section</em>).
-The image and sampler types can only be used if the device support images i.e. <span class="monospaced">CL_DEVICE_IMAGE_SUPPORT</span> as described in table 4.3 in OpenCL 2.2 specification is <span class="monospaced">CL_TRUE</span>.</p></div>
-<div class="sect3">
-<h4 id="image-and-sampler-host-types">3.11.1. Image and Sampler Host Types</h4>
-<div class="paragraph"><p>The below table describes the OpenCL image and sampler data types and the corresponding data type available to the application:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 10. Host image and sampler types</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Type in OpenCL C++</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>API type for application</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl::image1d</span>,</p>
-<p class="tableblock"><span class="monospaced">cl::image1d_buffer</span>,</p>
-<p class="tableblock"><span class="monospaced">cl::image1d_array</span>,</p>
-<p class="tableblock"><span class="monospaced">cl::image2d</span>,</p>
-<p class="tableblock"><span class="monospaced">cl::image2d_array</span>,</p>
-<p class="tableblock"><span class="monospaced">cl::image3d</span>,</p>
-<p class="tableblock"><span class="monospaced">cl::image2d_depth</span>,</p>
-<p class="tableblock"><span class="monospaced">cl::image2d_array_depth</span>,</p>
-<p class="tableblock"><span class="monospaced">cl::image2d_ms</span>,</p>
-<p class="tableblock"><span class="monospaced">cl::image2d_array_ms</span>,</p>
-<p class="tableblock"><span class="monospaced">cl::image2d_depth_ms</span>,</p>
-<p class="tableblock"><span class="monospaced">cl::image2d_array_depth_ms</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_image</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl::sampler</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_sampler</span></p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="header-opencl_image-synopsis">3.11.2. Header &lt;opencl_image&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">image_access</span><span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">image_channel_type</span><span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">image_channel_order</span><span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">addressing_mode</span><span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">normalized_coordinates</span><span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">filtering_mode</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">sampler</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">addressing_mode</span> A<span style="color: #990000">,</span> <span style="color: #008080">normalized_coordinates</span> C<span style="color: #990000">,</span> <span style="color: #008080">filtering_mode</span> F<span style="color: #990000">&gt;</span>
-constexpr <span style="color: #008080">sampler</span> <span style="font-weight: bold"><span style="color: #000000">make_sampler</span></span><span style="color: #990000">();</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">image_access</span> A<span style="color: #990000">,</span> <span style="color: #008080">image_dim</span> Dim<span style="color: #990000">,</span> <span style="color: #009900">bool</span> Depth<span style="color: #990000">,</span> <span style="color: #009900">bool</span> Array<span style="color: #990000">,</span>
-          <span style="color: #009900">bool</span> MS<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">image</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">image_access</span> A <span style="color: #990000">=</span> image_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> image1d <span style="color: #990000">=</span> image<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> A<span style="color: #990000">,</span> image_dim<span style="color: #990000">::</span>image_1d<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">image_access</span> A <span style="color: #990000">=</span> image_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> image1d_buffer <span style="color: #990000">=</span> image<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> A<span style="color: #990000">,</span> image_dim<span style="color: #990000">::</span>image_buffer<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span>
-                             <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">image_access</span> A <span style="color: #990000">=</span> image_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> image1d_array <span style="color: #990000">=</span> image<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> A<span style="color: #990000">,</span> image_dim<span style="color: #990000">::</span>image_1d<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">image_access</span> A <span style="color: #990000">=</span> image_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> image2d <span style="color: #990000">=</span> image<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> A<span style="color: #990000">,</span> image_dim<span style="color: #990000">::</span>image_2d<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">image_access</span> A <span style="color: #990000">=</span> image_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> image2d_depth <span style="color: #990000">=</span> image<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> A<span style="color: #990000">,</span> image_dim<span style="color: #990000">::</span>image_2d<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">image_access</span> A <span style="color: #990000">=</span> image_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> image2d_array <span style="color: #990000">=</span> image<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> A<span style="color: #990000">,</span> image_dim<span style="color: #990000">::</span>image_2d<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">image_access</span> A <span style="color: #990000">=</span> image_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> image3d <span style="color: #990000">=</span> image<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> A<span style="color: #990000">,</span> image_dim<span style="color: #990000">::</span>image_3d<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">image_access</span> A <span style="color: #990000">=</span> image_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> image2d_array_depth <span style="color: #990000">=</span> image<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> A<span style="color: #990000">,</span> image_dim<span style="color: #990000">::</span> image_2d<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">,</span>
-                                  <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span> <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_gl_msaa_sharing<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span> <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_gl_depth_images<span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">image_access</span> A <span style="color: #990000">=</span> image_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> image2d_ms <span style="color: #990000">=</span> image<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> A<span style="color: #990000">,</span> image_dim<span style="color: #990000">::</span>image_2d<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">image_access</span> A <span style="color: #990000">=</span> image_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> image2d_array_ms <span style="color: #990000">=</span> image<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> A<span style="color: #990000">,</span> image_dim<span style="color: #990000">::</span>image_2d<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">image_access</span> A <span style="color: #990000">=</span> image_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> image2d_depth_ms <span style="color: #990000">=</span> image<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> A<span style="color: #990000">,</span> image_dim<span style="color: #990000">::</span>image_2d<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">image_access</span> A <span style="color: #990000">=</span> image_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> image2d_array_depth_ms <span style="color: #990000">=</span> image<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> A<span style="color: #990000">,</span> image_dim<span style="color: #990000">::</span>image_2d<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">true</span></span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>Where <span class="monospaced">T</span> is the type of value returned when reading or sampling from given image or the type of color used to write to image.</p></div>
-</div>
-<div class="sect3">
-<h4 id="image-class">3.11.3. image class</h4>
-<div class="paragraph"><p>Every image type has the following set of publicly available members and typedefs:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">image_access</span> A<span style="color: #990000">,</span> <span style="color: #008080">image_dim</span> Dim<span style="color: #990000">,</span> <span style="color: #009900">bool</span> Depth<span style="color: #990000">,</span> <span style="color: #009900">bool</span> Array<span style="color: #990000">,</span>
-          <span style="color: #009900">bool</span> MS<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">image</span><span style="color: #990000">:</span> marker_type
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">constexpr</span> <span style="color: #008080">image_dim</span> dimension <span style="color: #990000">=</span> Dim<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">constexpr</span> <span style="color: #008080">size_t</span> dimension_num <span style="color: #990000">=</span> image_dim_num<span style="color: #990000">&lt;</span>Dim<span style="color: #990000">&gt;::</span>value<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">constexpr</span> <span style="color: #008080">size_t</span> image_size <span style="color: #990000">=</span> dimension_num <span style="color: #990000">+</span> <span style="color: #990000">(</span>Array<span style="color: #990000">?</span> <span style="color: #993399">1</span><span style="color: #990000">:</span> <span style="color: #993399">0</span><span style="color: #990000">);</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">constexpr</span> <span style="color: #008080">image_access</span> access <span style="color: #990000">=</span> A<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> is_array <span style="color: #990000">=</span> Array<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> is_depth <span style="color: #990000">=</span> Depth<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span> <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_gl_msaa_sharing<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span> <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_gl_depth_images<span style="color: #990000">)</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> is_ms <span style="color: #990000">=</span> MS<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#else</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> is_ms <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">element_type</span> T<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">integer_coord</span> make_vector_t<span style="color: #990000">&lt;</span><span style="color: #009900">int</span><span style="color: #990000">,</span> image_size<span style="color: #990000">&gt;;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">float_coord</span> make_vector_t<span style="color: #990000">&lt;</span><span style="color: #009900">float</span><span style="color: #990000">,</span> image_size<span style="color: #990000">&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_mipmap_image
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">gradient_coord</span> make_vector_t<span style="color: #990000">&lt;</span><span style="color: #009900">float</span><span style="color: #990000">,</span> dimension_num<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">pixel</span><span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #000000">image</span></span><span style="color: #990000">()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">image</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> image<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">image</span></span><span style="color: #990000">(</span>image<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    image<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> image<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    image<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>image<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    image<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&amp;()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="image-element-types">3.11.4. Image element types</h4>
-<div class="paragraph"><p>We can classify images into four categories: depth images which have the <span class="monospaced">Depth</span> template parameter set to <span class="monospaced">true</span>, multi-sample depth images which have the <span class="monospaced">Depth</span> and <span class="monospaced">MS</span> template parameters set to <span class="monospaced">true</span>, multi-sample which have the <span class="monospaced">MS</span> template parameter set to <span class="monospaced">true</span>, and the normal images which have the <span class="monospaced">Depth</span> and <span class="monospaced">MS</span> template parameters set to <span class="monospaced">false</span>.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-For non-multisample depth images the only valid element types are: <span class="monospaced">float</span> and <span class="monospaced">half</span> <a href="#ftn4">[4</a>]
-</p>
-</li>
-<li>
-<p>
-For normal images the only valid element types are: <span class="monospaced">float4</span>, <span class="monospaced">half4</span> <a href="#ftn4">[4</a>], <span class="monospaced">int4</span> and <span class="monospaced">uint4</span>
-</p>
-</li>
-<li>
-<p>
-For multi-sample 2D and multi-sample 2D array images the only valid element types are: <span class="monospaced">float4</span>, <span class="monospaced">int4</span> and <span class="monospaced">uint4</span>
-</p>
-</li>
-<li>
-<p>
-For multi-sample 2D depth and multi-sample 2D array depth images the only valid element type is: <span class="monospaced">float</span>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Image type with invalid pixel type is ill formed.</p></div>
-</div>
-<div class="sect3">
-<h4 id="image-dimension">3.11.5. Image dimension</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">image_dim</span>
-<span style="color: #FF0000">{</span>
-    image_1d<span style="color: #990000">,</span>
-    image_2d<span style="color: #990000">,</span>
-    image_3d<span style="color: #990000">,</span>
-    image_buffer
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">image_dim</span> Dim<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">image_dim_num</span><span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>Image types present different set of methods depending on their dimensionality and arrayness.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Images of dimension 1 (<span class="monospaced">image_dim::image_1d</span> and <span class="monospaced">image_dim::buffer</span>) have method:
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">width</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-<li>
-<p>
-Images of dimension 2 (<span class="monospaced">image_dim::image_2d</span>)  have all methods of 1 dimensional images and
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">height</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-<li>
-<p>
-Images of dimension 3 (<span class="monospaced">image_dim::image_3d</span>) have all methods of 2 dimensional images and
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">depth</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-<li>
-<p>
-Arrayed images have additional method
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">array_size</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <em>cl_khr_mipmap_image</em> or <em>cl_khr_mipmap_image_writes</em> extension is enabled then the following methods are also present:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Images of dimension 1 (<span class="monospaced">image_dim::image_1d</span> and <span class="monospaced">image_dim::buffer</span>) have method:
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">width</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> lod<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-<li>
-<p>
-Images of dimension 2 (<span class="monospaced">image_dim::image_2d</span>) have all methods of 1 dimensional images and
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">height</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> lod<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-<li>
-<p>
-Images of dimension 3 (<span class="monospaced">image_dim::image_3d</span>) have all methods of 2 dimensional images and
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">depth</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> lod<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-<li>
-<p>
-Arrayed images have additional method
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">array_size</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> lod<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <em>cl_khr_gl_msaa_sharing</em> and <em>cl_khr_gl_depth_images</em> extensions are enabled then the following methods are also present:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Images of dimension 2D (<span class="monospaced">image_dim::image_2d</span>) have method:
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">num_samples</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following table describes the <span class="monospaced">image_dim_num</span> trait that return a number of dimensions based on <span class="monospaced">image_dim</span> parameter.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 11. Image_dim_num trait</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Template</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Value</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">template &lt;image_dim Dim&gt;
-struct image_dim_num;</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">If <span class="monospaced">Dim</span> is <span class="monospaced">image_dim::image_1d</span> or <span class="monospaced">image_dim::image_buffer</span>, image dimension is 1.</p>
-<p class="tableblock">If <span class="monospaced">Dim</span> is <span class="monospaced">image_dim::image_2d</span>, image dimension is 2.</p>
-<p class="tableblock">If <span class="monospaced">Dim</span> is <span class="monospaced">image_dim::image_3d</span>, image dimension is 3.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="image-access">3.11.6. Image access</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">image_access</span>
-<span style="color: #FF0000">{</span>
-    sample<span style="color: #990000">,</span>
-    read<span style="color: #990000">,</span>
-    write<span style="color: #990000">,</span>
-    read_write
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>The non-multisample image template class specializations present different set of methods based on their access parameter.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Images specified with <span class="monospaced">image_access::read</span> provide additional methods:
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">element_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #008080">pixel</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">[](</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #008080">element_type</span> image<span style="color: #990000">::</span>pixel<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #000000">element_type</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-<li>
-<p>
-Images specified with <span class="monospaced">image_access::write</span> provide additional method:
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">write</span></span><span style="color: #990000">(</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">,</span> <span style="color: #008080">element_type</span> color<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-image<span style="color: #990000">::</span><span style="color: #008080">pixel</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">[](</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-image<span style="color: #990000">::</span>pixel <span style="color: #990000">&amp;</span> image<span style="color: #990000">::</span>pixel<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">element_type</span> color<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-<li>
-<p>
-Images specified with <span class="monospaced">image_access::read_write</span> provide additional methods:
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">element_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #009900">void</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">write</span></span><span style="color: #990000">(</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">,</span> <span style="color: #008080">element_type</span> color<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-image<span style="color: #990000">::</span><span style="color: #008080">pixel</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">[](</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #008080">element_type</span> image<span style="color: #990000">::</span>pixel<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #000000">element_type</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-image<span style="color: #990000">::</span>pixel <span style="color: #990000">&amp;</span> image<span style="color: #990000">::</span>pixel<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">element_type</span> color<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-<li>
-<p>
-Images specified with <span class="monospaced">image_access::sample</span> provide additional methods:
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">element_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #008080">element_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">sample</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">sampler</span> <span style="color: #990000">&amp;</span>s<span style="color: #990000">,</span>
-                           <span style="color: #008080">integer_coord</span> coord<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #008080">element_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">sample</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">sampler</span> <span style="color: #990000">&amp;</span>s<span style="color: #990000">,</span> <span style="color: #008080">float_coord</span> coord<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-image<span style="color: #990000">::</span><span style="color: #008080">pixel</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">[](</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #008080">element_type</span> image<span style="color: #990000">::</span>pixel<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #000000">element_type</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <em>cl_khr_mipmap_image</em> extension is enabled the following methods are added to the non-multisample image types:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Images specified with <span class="monospaced">image_access::sample</span> provide additional methods:
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">element_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">sample</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">sampler</span> <span style="color: #990000">&amp;</span>s<span style="color: #990000">,</span> <span style="color: #008080">float_coord</span> coord<span style="color: #990000">,</span>
-                           <span style="color: #009900">float</span> lod<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #008080">element_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">sample</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">sampler</span> <span style="color: #990000">&amp;</span>s<span style="color: #990000">,</span> <span style="color: #008080">float_coord</span> coord<span style="color: #990000">,</span>
-                           <span style="color: #008080">gradient_coord</span> gradient_x<span style="color: #990000">,</span>
-                           <span style="color: #008080">gradient_coord</span> gradient_y<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <em>cl_khr_mipmap_image_writes</em> extension is enabled the following methods are added to the non-multisample image types:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Images specified with <span class="monospaced">image_access::write</span> provide additional method:
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">write</span></span><span style="color: #990000">(</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">,</span> <span style="color: #008080">element_type</span> color<span style="color: #990000">,</span> <span style="color: #009900">int</span> lod<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <em>cl_khr_gl_msaa_sharing</em> and <em>cl_khr_gl_depth_images</em> extensions are enabled and the multisample image type is used, the following method is available:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The multisample images specified with <span class="monospaced">image_access::read</span> provide method:
-</p>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">element_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">,</span> <span style="color: #009900">int</span> sample<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="common-image-methods">3.11.7. Common image methods</h4>
-<div class="paragraph"><p>Each image type implements a set of common methods:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">image_channel_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">data_type</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">image_channel_order</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">order</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>If <em>cl_khr_mipmap_image</em> or <em>cl_khr_mipmap_image_writes</em> extension is enabled then the following method is also present in the non-multisample image types:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">miplevels</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>where <span class="monospaced">image_channel_type</span> and <span class="monospaced">image_channel_order</span> are defined as follows:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">image_channel_type</span>
-<span style="color: #FF0000">{</span>
-    snorm_int8<span style="color: #990000">,</span>
-    snorm_int16<span style="color: #990000">,</span>
-    unorm_int8<span style="color: #990000">,</span>
-    unorm_int16<span style="color: #990000">,</span>
-    unorm_int24<span style="color: #990000">,</span>
-    unorm_short_565<span style="color: #990000">,</span>
-    unorm_short_555<span style="color: #990000">,</span>
-    unorm_int_101010<span style="color: #990000">,</span>
-    unorm_int_101010_2<span style="color: #990000">,</span>
-    signed_int8<span style="color: #990000">,</span>
-    signed_int16<span style="color: #990000">,</span>
-    signed_int32<span style="color: #990000">,</span>
-    unsigned_int8<span style="color: #990000">,</span>
-    unsigned_int16<span style="color: #990000">,</span>
-    unsigned_int32<span style="color: #990000">,</span>
-    fp16<span style="color: #990000">,</span>
-    fp32
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">image_channel_order</span>
-<span style="color: #FF0000">{</span>
-    a<span style="color: #990000">,</span>
-    r<span style="color: #990000">,</span>
-    rx<span style="color: #990000">,</span>
-    rg<span style="color: #990000">,</span>
-    rgx<span style="color: #990000">,</span>
-    ra<span style="color: #990000">,</span>
-    rgb<span style="color: #990000">,</span>
-    rgbx<span style="color: #990000">,</span>
-    rgba<span style="color: #990000">,</span>
-    argb<span style="color: #990000">,</span>
-    bgra<span style="color: #990000">,</span>
-    intensity<span style="color: #990000">,</span>
-    luminance<span style="color: #990000">,</span>
-    abgr<span style="color: #990000">,</span>
-    depth<span style="color: #990000">,</span>
-    depth_stencil<span style="color: #990000">,</span>
-    srgb<span style="color: #990000">,</span>
-    srgbx<span style="color: #990000">,</span>
-    srgba<span style="color: #990000">,</span>
-    sbgra
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="other-image-methods">3.11.8. Other image methods</h4>
-<div class="sect4">
-<h5 id="imagesample">image::sample</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">element_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">sample</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">sampler</span> <span style="color: #990000">&amp;</span>s<span style="color: #990000">,</span> <span style="color: #008080">float_coord</span> coord<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Reads a color value from the non-multisample image using sampler and floating point coordinates.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">element_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">sample</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">sampler</span> <span style="color: #990000">&amp;</span>s<span style="color: #990000">,</span> <span style="color: #008080">integer_coord</span> coord<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Reads a color value from non-multisample image using sampler and integer coordinates.</p></div>
-<div class="paragraph"><p>A sampler must use filter mode set to <span class="monospaced">filtering_mode::nearest</span>, normalized coordinates and addressing mode set to <span class="monospaced">addressing_mode::clamp_to_edge</span>, <span class="monospaced">addressing_mode::clamp</span>, <span class="monospaced">addressing_mode::none</span>, otherwise the values returned are undefined.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">element_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">sample</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">sampler</span> <span style="color: #990000">&amp;</span>s<span style="color: #990000">,</span> <span style="color: #008080">float_coord</span> coord<span style="color: #990000">,</span> <span style="color: #009900">float</span> lod<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Reads a color value from non-multisample image using sampler and floating point coordinates in the mip-level specified by <span class="monospaced">lod</span>.</p></div>
-<div class="paragraph"><p>Method is present for non-multisample images if <em>cl_khr_mipmap_image</em> extension is enabled.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">element_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">sample</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">sampler</span> <span style="color: #990000">&amp;</span>s<span style="color: #990000">,</span> <span style="color: #008080">float_coord</span> coord<span style="color: #990000">,</span>
-                           <span style="color: #008080">gradient_coord</span> gradient_x<span style="color: #990000">,</span>
-                           <span style="color: #008080">gradient_coord</span> gradient_y<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Use the gradients to compute the lod and coordinate <span class="monospaced">coord</span> to do an element lookup in the mip-level specified by the computed lod.</p></div>
-<div class="paragraph"><p>Method is present if <em>cl_khr_mipmap_image</em> extension is enabled.</p></div>
-<div class="paragraph"><p>Based on the parameters with which image was created on host side the
-function will return different ranges of values</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-returns floating-point values in the range [0.0 &#8230; 1.0] for image objects created with <span class="monospaced">image_channel_type</span> set to one of the pre-defined packed formats or <span class="monospaced">image_channel_type::unorm_int8</span> or <span class="monospaced">image_channel_type::unorm_int16</span>.
-</p>
-</li>
-<li>
-<p>
-returns floating-point values in the range [-1.0 &#8230; 1.0] for image objects created with <span class="monospaced">image_channel_type::snorm_int8</span> or <span class="monospaced">image_channel_type::snorm_int16</span>.
-</p>
-</li>
-<li>
-<p>
-returns floating-point values for image objects created with <span class="monospaced">image_channel_type::float16</span> or <span class="monospaced">image_channel_type::float32</span>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Values returned by <span class="monospaced">image::sample</span> where <span class="monospaced">T</span> is a floating-point type for image objects with <span class="monospaced">image_channel_type</span> values not specified in the description above are undefined.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">image::sample</span> functions that take an image object where <span class="monospaced">T</span> is a signed integer type can only be used with image objects created with:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">image_channel_type::sint8</span>,
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::sint16</span> and
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::sint32</span>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If the <span class="monospaced">image_channel_type</span> is not one of the above values, the values returned by <span class="monospaced">image::sample</span> are undefined.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">image::sample</span> functions that take an image object where <span class="monospaced">T</span> is an unsigned integer type can only be used with image objects created with:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">image_channel_type::uint8</span>,
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::uint16</span> and
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::uint32</span>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If the <span class="monospaced">image_channel_type</span> is not one of the above values, the values returned by <span class="monospaced">image::sample</span> are undefined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="imageread">image::read</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">element_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Reads a color value from non-multisample image without sampler and integral coordinates.
-If <em>cl_khr_mipmap_image</em> extension is present may perform reads also from mipmap layer 0.</p></div>
-<div class="paragraph"><p>Based on the parameters with which image was created on host side the function will return different ranges of values</p></div>
-<div class="paragraph"><p>Read function behaves exactly as the corresponding image sample function with sampler that has filter mode set to <span class="monospaced">filtering_mode::nearest</span>, normalized coordinates set to <span class="monospaced">normalized_coordinates::unnormalized</span> and addressing mode to <span class="monospaced">addressing_mode::none</span>.
-The coordinates must be between 0 and image size in that dimension non inclusive.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-returns floating-point values in the range [0.0 &#8230; 1.0] for image objects created with <span class="monospaced">image_channel_type</span> set to one of the pre-defined packed formats or <span class="monospaced">image_channel_type::unorm_int8</span> or <span class="monospaced">image_channel_type::unorm_int16</span>.
-</p>
-</li>
-<li>
-<p>
-returns floating-point values in the range [-1.0 &#8230; 1.0] for image objects created with <span class="monospaced">image_channel_type::snorm_int8</span> or <span class="monospaced">image_channel_type::snorm_int16</span>.
-</p>
-</li>
-<li>
-<p>
-returns floating-point values for image objects created with <span class="monospaced">image_channel_type::float16</span> or <span class="monospaced">image_channel_type::float32</span>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Values returned by <span class="monospaced">image::read</span> where <span class="monospaced">T</span> is a floating-point type for image objects with <span class="monospaced">image_channel_type</span> values not specified in the description above are undefined.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">image::read</span> functions that take an image object where <span class="monospaced">T</span> is a signed integer type can only be used with image objects created with:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">image_channel_type::sint8</span>,
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::sint16</span> and
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::sint32</span>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If the <span class="monospaced">image_channel_type</span> is not one of the above values, the values returned by <span class="monospaced">image::read</span> are undefined.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">image::read</span> functions that take an image object where <span class="monospaced">T</span> is an unsigned integer type can only be used with image objects created with <span class="monospaced">image_channel_type</span> set to one of the following values:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">image_channel_type::uint8</span>,
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::uint16</span> and
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::uint32</span>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If the <span class="monospaced">image_channel_type</span> is not one of the above values, the values returned by <span class="monospaced">image::read</span> are undefined.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">element_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">,</span> <span style="color: #009900">int</span> sample<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Use the coordinate and sample to do an element lookup in the image object.
-Method is only available in the MSAA image types and if <em>cl_khr_gl_msaa_sharing</em> and <em>cl_khr_gl_depth_images</em> extension are supported.</p></div>
-<div class="paragraph"><p>When a multisample image is accessed in a kernel, the access takes one vector of integers describing which pixel to fetch and an integer corresponding to the sample numbers describing which sample within the pixel to fetch.
-<span class="monospaced">sample</span> identifies the sample position in the multi-sample image.</p></div>
-<div class="paragraph"><p>For best performance, we recommend that sample be a literal value so it is known at compile time and the OpenCL compiler can perform appropriate optimizations for multisample reads on the device.</p></div>
-<div class="paragraph"><p>No standard sampling instructions are allowed on the multisample image.
-Accessing a coordinate outside the image and/or a sample that is outside the number of samples associated with each pixel in the image is undefined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="imagewrite">image::write</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">write</span></span><span style="color: #990000">(</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">,</span> <span style="color: #008080">element_type</span> color<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Writes a color value to location specified by coordinates from non-multisample image.
-If <em>cl_khr_mipmap_image_writes</em> extension is present may perform writes also to the mipmap layer 0.
-The coordinates must be between 0 and image size in that dimension non inclusive.</p></div>
-<div class="paragraph"><p>Based on the parameters with which image was created on host side the function will perform appropriate data format conversions before writing a color value.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">write</span></span><span style="color: #990000">(</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">,</span> <span style="color: #008080">element_type</span> color<span style="color: #990000">,</span> <span style="color: #009900">int</span> lod<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Writes a color value to location specified by coordinates and lod from mipmap image.
-The coordinates must be between 0 and image size in that dimension non inclusive.</p></div>
-<div class="paragraph"><p>Method is present if <em>cl_khr_mipmap_image</em> extension is enabled.</p></div>
-<div class="paragraph"><p>Based on the parameters with which image was created on host side the function will perform appropriate data format conversions before writing a color value.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">image::write</span> functions that take an image object where <span class="monospaced">T</span> is a floating-point type can only be used with image objects created with <span class="monospaced">image_channel_type</span> set to one of the pre-defined packed formats or set to:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">image_channel_type::snorm_int8</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::unorm_int8</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::snorm_int16</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::unorm_int16</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::float16</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::float32</span>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The <span class="monospaced">image::write</span> functions that take an image object where <span class="monospaced">T</span> is a signed integer type can only be used with image objects created with:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">image_channel_type::sint8</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::sint16</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::sint32</span>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The <span class="monospaced">image::write</span> functions that take an image object where <span class="monospaced">T</span> is an unsigned integer type can only be used with image objects created with:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">image_channel_type::uint8</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::uint16</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">image_channel_type::uint32</span>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The behavior of <span class="monospaced">image::write</span> for image objects created with
-<span class="monospaced">image_channel_type</span> values not specified in the description above is undefined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="imageoperator">image::operator[]</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">pixel</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">[](</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #008080">pixel</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">[](</span><span style="color: #008080">integer_coord</span> coord<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Creates a pixel which can be used to read or/and write operation(s).
-It depends on image_access specified in the image.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">The pixel stores a reference to image and coordinates.
-This operation can consume more private memory than <span class="monospaced">image::read</span> and <span class="monospaced">image::write</span> methods.
-It can also negatively impact performance.</td>
-</tr></table>
-</div>
-</div>
-<div class="sect4">
-<h5 id="imagepixeloperator-element_type">image::pixel::operator element_type</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">element_type</span> pixel<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #000000">element_type</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Reads a color value from non-multisample image without sampler and integral coordinates specified in pixel.
-If <em>cl_khr_mipmap_image</em> extension is present may perform reads also from mipmap layer 0.</p></div>
-<div class="paragraph"><p>This function is similar to <span class="monospaced">image::read</span> method.
-Please refer to description of this method for more details.</p></div>
-</div>
-<div class="sect4">
-<h5 id="imagepixeloperator">image::pixel::operator=</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>pixel <span style="color: #990000">&amp;</span> pixel<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="color: #008080">element_type</span> color<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Writes a color value to location specified by coordinates in pixel from non-multisample image.
-If <em>cl_khr_mipmap_image_writes</em> extension is present may perform writes also to the mipmap layer 0.
-The coordinates specified in pixel must be between 0 and image size in that dimension non inclusive.</p></div>
-<div class="paragraph"><p>Based on the parameters with which image was created on host side the function will perform appropriate data format conversions before writing a color value.</p></div>
-<div class="paragraph"><p>This function is similar to <span class="monospaced">image::write</span> method.
-Please refer to description of this method for more details.</p></div>
-</div>
-<div class="sect4">
-<h5 id="imagewidth">image::width</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">width</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns width of the image.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">width</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> lod<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns width of the mip-level specified by <span class="monospaced">lod</span>.</p></div>
-<div class="paragraph"><p>Method is present in the non-multisample image types if <em>cl_khr_mipmap_image</em> extension is enabled.</p></div>
-</div>
-<div class="sect4">
-<h5 id="imageheight">image::height</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">height</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns height of the image.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">height</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> lod<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns height of the mip-level specified by <span class="monospaced">lod</span>.</p></div>
-<div class="paragraph"><p>Method is present in the non-multisample image types if <em>cl_khr_mipmap_image</em> extension is enabled.</p></div>
-</div>
-<div class="sect4">
-<h5 id="imagedepth">image::depth</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">depth</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns depth of the image.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">depth</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> lod<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns depth of the mip-level specified by <span class="monospaced">lod</span>.</p></div>
-<div class="paragraph"><p>Method is present in the non-multisample image types if <em>cl_khr_mipmap_image</em> extension is enabled.</p></div>
-</div>
-<div class="sect4">
-<h5 id="imagearray_size">image::array_size</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">array_size</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns size of the image array.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">array_size</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> lod<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns size of the image array specified by <span class="monospaced">lod</span>.</p></div>
-<div class="paragraph"><p>Method is present in the non-multisample image types if <em>cl_khr_mipmap_image</em> extension is enabled.</p></div>
-</div>
-<div class="sect4">
-<h5 id="imagesize">image::size</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">integer_coord</span> <span style="font-weight: bold"><span style="color: #000000">size</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns appropriately sized vector, or scalar for 1 dimensional images, containing all image dimensions followed by array size.</p></div>
-</div>
-<div class="sect4">
-<h5 id="imagedata_type">image::data_type</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">image_channel_type</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">data_type</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns format of the image as specified upon its creation on host side.</p></div>
-</div>
-<div class="sect4">
-<h5 id="imageorder">image::order</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">image_channel_order</span> image<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">order</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns channel order of the image as specified upon its creation on host side.</p></div>
-</div>
-<div class="sect4">
-<h5 id="imagemiplevels">image::miplevels</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">miplevels</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns number of mipmaps of image.
-Method is present if <em>cl_khr_mipmap_image</em> or <em>cl_khr_mipmap_image_writes</em> extension is enabled.</p></div>
-</div>
-<div class="sect4">
-<h5 id="imagenum_samples">image::num_samples</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">num_samples</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="sampler">3.11.9. Sampler</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">sampler</span><span style="color: #990000">:</span> marker_type
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #000000">sampler</span></span><span style="color: #990000">()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">sampler</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> sampler<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">sampler</span></span><span style="color: #990000">(</span>sampler<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    sampler<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> sampler<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    sampler<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>sampler<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    sampler<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&amp;()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">addressing_mode</span> A<span style="color: #990000">,</span> <span style="color: #008080">normalized_coordinates</span> C<span style="color: #990000">,</span> <span style="color: #008080">filtering_mode</span> F<span style="color: #990000">&gt;</span>
-constexpr <span style="color: #008080">sampler</span> <span style="font-weight: bold"><span style="color: #000000">make_sampler</span></span><span style="color: #990000">();</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>There are only two ways of acquiring a sampler inside of a kernel. One is to pass it as a kernel parameter from host using <span class="monospaced">clSetKernelArg</span>, the other one is to create one using make_sampler function in the kernel code. <span class="monospaced">make_sampler</span> function has three template parameters specifying behavior of sampler. Once acquired sampler can only be passed by reference as all other marker types. The sampler objects at non-program scope must be declared with static specifier.</p></div>
-<div class="paragraph"><p>The maximum number of samplers that can be declared in a kernel can be queried using the <span class="monospaced">CL_DEVICE_MAX_SAMPLERS</span> token in <span class="monospaced">clGetDeviceInfo</span>.</p></div>
-</div>
-<div class="sect3">
-<h4 id="sampler-modes">3.11.10. Sampler Modes</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">addressing_mode</span>
-<span style="color: #FF0000">{</span>
-    mirrored_repeat<span style="color: #990000">,</span>
-    repeat<span style="color: #990000">,</span>
-    clamp_to_edge<span style="color: #990000">,</span>
-    clamp<span style="color: #990000">,</span>
-    none
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">normalized_coordinates</span>
-<span style="color: #FF0000">{</span>
-    normalized<span style="color: #990000">,</span>
-    unnormalized
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">filtering_mode</span>
-<span style="color: #FF0000">{</span>
-    nearest<span style="color: #990000">,</span>
-    linear
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>The following tables describe the inline sampler parameters and their behavior.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 12. Addressing modes</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Addressing mode</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">mirrored_repeat</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Out of range coordinates will be flipped at every integer junction. This addressing mode can only be used with normalized coordinates. If normalized coordinates are not used, this addressing mode may generate image coordinates that are undefined.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">repeat</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Out of range image coordinates are wrapped to the valid range. This addressing mode can only be used with normalized coordinates. If normalized coordinates are not used, this addressing mode may generate image coordinates that are undefined.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">clamp_to_edge</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Out of range image coordinates are clamped to the extent.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">clamp</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Out of range image coordinates will return a border color.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">none</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For this addressing mode the programmer guarantees that the image coordinates used to sample elements of the image refer to a location inside the image; otherwise the results are undefined.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>For 1D and 2D image arrays, the addressing mode applies only to the <em>x</em> and (<em>x, y</em>) coordinates.  The addressing mode for the coordinate which specifies the array index is always clamp_to_edge.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 13. Normalized coordinates</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Normalized Coordinate Values</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">normalized</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Specifies whether the <em>x</em>, <em>y</em> and <em>z</em> coordinates are passed in as normalized values.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">unnormalized</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Specifies whether the <em>x</em>, <em>y</em> and <em>z</em> coordinates are passed in as unnormalized values.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>Sampling from an image with samplers that differ in specification of coordinates normalization result in undefined behavior.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 14. Coordinate filtering modes</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Filtering mode</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">nearest</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Chooses a color of nearest pixel.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">linear</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Performs a linear sampling of adjacent pixels.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>Refer to <em>section 4.2</em> in the OpenCL API specification for a description of these filter modes.</p></div>
-</div>
-<div class="sect3">
-<h4 id="determining-the-border-color-or-value">3.11.11. Determining the border color or value</h4>
-<div class="paragraph"><p>If <span class="monospaced">&lt;addressing mode&gt;</span> in sampler is clamp, then out-of-range image coordinates return the border color. The border color selected depends on the image channel order and can be one of the following values:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-If the image channel order is <span class="monospaced">image_channel_order::a</span>, <span class="monospaced">image_channel_order::intensity</span>, <span class="monospaced">image_channel_order::rx</span>, <span class="monospaced">image_channel_order::ra</span>, <span class="monospaced">image_channel_order::rgx</span>, <span class="monospaced">image_channel_order::rgbx</span>, <span class="monospaced">image_channel_order::srgbx</span>, <span class="monospaced">image_channel_order::argb</span>, <span class="monospaced">image_channel_order::bgra</span>, <span class="monospaced">image_channel_order::abgr</span>, <span class="monospaced">image_channel_order::rgba</span>, <span class="monospaced">image_channel_order::srgba</span> or <span class="monospaced">image_channel_order::sbgra</span>, the border color is (0.0f, 0.0f, 0.0f, 0.0f).
-</p>
-</li>
-<li>
-<p>
-If the image channel order is <span class="monospaced">image_channel_order::r</span>, <span class="monospaced">image_channel_order::rg</span>, <span class="monospaced">image_channel_order::rgb</span>, or <span class="monospaced">image_channel_order::luminance</span>, the border color is (0.0f, 0.0f, 0.0f, 1.0f).
-</p>
-</li>
-<li>
-<p>
-If the image channel order is <span class="monospaced">image_channel_order::depth</span>, the border value is 0.0f.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="srgb-images">3.11.12. sRGB Images</h4>
-<div class="paragraph"><p>The built-in image read functions perform sRGB to linear RGB conversions if the image is an sRGB image. Writes to sRGB images from a kernel is an optional extension. The <em>cl_khr_srgb_image_writes</em> extension will be reported in the <span class="monospaced">CL_DEVICE_EXTENSIONS</span> string if a device supports writing to sRGB images using <span class="monospaced">image::write</span>. <span class="monospaced">clGetSupportedImageFormats</span> will return the supported sRGB images if <span class="monospaced">CL_MEM_READ_WRITE</span> or <span class="monospaced">CL_MEM_WRITE_ONLY</span> is specified in <span class="monospaced">flags</span> argument and the device supports writing to an sRGB image. If the <em>cl_khr_srgb_image_writes</em> extension is supported and has been enabled, the built-in image write functions perform the linear to sRGB conversion.</p></div>
-<div class="paragraph"><p>Only the R, G and B components are converted from linear to sRGB and vice-versa. The alpha component is returned as is.</p></div>
-</div>
-<div class="sect3">
-<h4 id="reading-and-writing-to-the-same-image-in-a-kernel">3.11.13. Reading and writing to the same image in a kernel</h4>
-<div class="paragraph"><p>To read and write to the same image in a kernel, the image must be declared with the <span class="monospaced">image_access::read_write</span>. Only sampler-less reads and write functions can be called on an image declared with the <span class="monospaced">image_access::read_write</span> access qualifier. Calling the <span class="monospaced">image::sample</span> functions on an image declared with the <span class="monospaced">image_access::read_write</span> will result in a compilation error.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">atomic_fence</span> function from <em><a href="#fences">Atomic Fences</a> section</em> can be used to make sure that writes are visible to later reads by the same work-item. Without use of the <span class="monospaced">atomic_fence</span> function, write-read coherence on image objects is not guaranteed: if a work-item reads from an image to which it has previously written without an intervening atomic_fence, it is not guaranteed that those previous writes are visible to the work-item. Only a scope of <span class="monospaced">memory_order_acq_rel</span> is valid for <span class="monospaced">atomic_fence</span> when passed the <span class="monospaced">mem_fence::image</span> flag.  If multiple work-items are writing to and reading from multiple locations in an image, the <span class="monospaced">work_group_barrier</span> from <em><a href="#synchronization-functions">Synchronization Functions</a> section</em> should be used.</p></div>
-<div class="paragraph"><p>Consider the following example:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_atomic&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_image&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d&lt;float4, image_access::read_write&gt;</span> img<span style="color: #990000">,</span> <span style="color: #990000">...</span> <span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">int2</span> coord<span style="color: #990000">;</span>
-    coord<span style="color: #990000">.</span>x <span style="color: #990000">=</span> <span style="color: #990000">(</span><span style="color: #009900">int</span><span style="color: #990000">)</span><span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">);</span>
-    coord<span style="color: #990000">.</span>y <span style="color: #990000">=</span> <span style="color: #990000">(</span><span style="color: #009900">int</span><span style="color: #990000">)</span><span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">);</span>
-
-    <span style="color: #008080">float4</span> clr <span style="color: #990000">=</span> img<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span>coord<span style="color: #990000">);</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    img<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">write</span></span><span style="color: #990000">(</span>coord<span style="color: #990000">,</span> clr<span style="color: #990000">);</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">// required to ensure that following read from image at</span></span>
-    <span style="font-style: italic"><span style="color: #9A1900">// location coord returns the latest color value.</span></span>
-    <span style="font-weight: bold"><span style="color: #000000">atomic_fence</span></span><span style="color: #990000">(</span>mem_fence<span style="color: #990000">::</span>image<span style="color: #990000">,</span>
-     memory_order_acq_rel<span style="color: #990000">,</span>
-     memory_scope_work_item<span style="color: #990000">);</span>
-
-    <span style="color: #008080">float4</span> clr_new <span style="color: #990000">=</span> img<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span>coord<span style="color: #990000">);</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="mapping-image-channels-to-color-values-returned-by-imagesample-imageread-and-color-values-passed-to-imagewrite-to-image-channels">3.11.14. Mapping image channels to color values returned by image::sample, image::read and color values passed to image::write to image channels</h4>
-<div class="paragraph"><p>The following table describes the mapping of the number of channels of an image element to the appropriate components in the <span class="monospaced">float4</span>, <span class="monospaced">int4</span> or <span class="monospaced">uint4</span> vector data type for the color values returned by <span class="monospaced">image::sample</span>, <span class="monospaced">image::read</span> or supplied to <span class="monospaced">image::write</span>. The unmapped components will be set to 0.0 for red, green and blue channels and will be set to 1.0 for the alpha channel.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 15. Image channel mappings</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Image Channel Order</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>float4, int4 or uint4</strong>
-
-<strong>components of channel data</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">r, rx</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">(r, 0.0, 0.0, 1.0)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">a</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">(0.0, 0.0, 0.0, a)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">rg, rgx</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">(r, g, 0.0, 1.0)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">ra</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">(r, 0.0, 0.0, a)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">rgb, rgbx, srgb, srgbx</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">(r, g, b, 1.0)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">rgba, bgra, argb, abgr, srgba, sbgra</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">(r, g, b, a)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">intensity</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">(I, I, I, I)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">luminance</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">(L, L, L, 1.0)</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>For <span class="monospaced">image_channel_order::depth</span> images, a scalar value is returned by <span class="monospaced">image::sample</span>, <span class="monospaced">image::read</span> or supplied to <span class="monospaced">image::write</span>.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">A kernel that uses a sampler with the clamp addressing mode with multiple images may result in additional samplers being used internally by an implementation. If the same sampler is used with multiple images called via <span class="monospaced">image::sample</span>, then it is possible that an implementation may need to allocate an additional sampler to handle the different border color values that may be needed depending on the image formats being used.  The implementation allocated samplers will count against the maximum sampler values supported by the device and given by <span class="monospaced">CL_DEVICE_MAX_SAMPLERS</span>. Enqueuing a kernel that requires more samplers than the implementation can support will result in a <span class="monospaced">CL_OUT_OF_RESOURCES</span> error being returned.</td>
-</tr></table>
-</div>
-</div>
-<div class="sect3">
-<h4 id="restrictions-4">3.11.15. Restrictions</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-The image and sampler types cannot be used with variables declared inside a class or union field, a pointer type, an array, global variables declared at program scope or the return type of a function.
-</p>
-</li>
-<li>
-<p>
-The image and sampler types cannot be used with the <span class="monospaced">global</span>, <span class="monospaced">local</span>, <span class="monospaced">priv</span> and <span class="monospaced">constant</span> address space storage classes (<em><a href="#explicit-address-space-storage-classes">Explicit address space storage classes</a> section</em>).
-</p>
-</li>
-<li>
-<p>
-The values returned by applying the <span class="monospaced">sizeof</span> operator to the image and sampler types are implementation-defined.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="examples-5">3.11.16. Examples</h4>
-<div class="sect4">
-<h5 id="example-1-5">Example 1</h5>
-<div class="paragraph"><p>The example how to use an image object with sampler-less reads.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_image&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d&lt;float4, image_access::read&gt;</span> img<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">int2</span> coord<span style="color: #990000">;</span>
-    coord<span style="color: #990000">.</span>x <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">);</span>
-    coord<span style="color: #990000">.</span>y <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">);</span>
-
-    <span style="color: #008080">float4</span> val <span style="color: #990000">=</span> img<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span>coord<span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-2-3">Example 2</h5>
-<div class="paragraph"><p>The example how to use an image object with <span class="monospaced">image_access::read_write</span> access and <span class="monospaced">atomic_fence</span> function.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_image&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_atomic&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d&lt;float4, image_access::read_write&gt;</span> img<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">int2</span> coord<span style="color: #990000">;</span>
-    coord<span style="color: #990000">.</span>x <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">);</span>
-    coord<span style="color: #990000">.</span>y <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">);</span>
-
-    <span style="color: #008080">float4</span> val1<span style="color: #FF0000">{</span><span style="color: #993399">0</span><span style="color: #990000">.</span>5f<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-    img<span style="color: #990000">[</span>coord<span style="color: #990000">]</span> <span style="color: #990000">=</span> val1<span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #000000">atomic_fence</span></span><span style="color: #990000">(</span>mem_fence<span style="color: #990000">::</span>image<span style="color: #990000">,</span> memory_order_acq_rel<span style="color: #990000">,</span>
-                 memory_scope_work_item<span style="color: #990000">);</span>
-
-    <span style="color: #008080">float4</span> val2 <span style="color: #990000">=</span> img<span style="color: #990000">[</span>coord<span style="color: #990000">];</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-3-2">Example 3</h5>
-<div class="paragraph"><p>The example how to use an image object with sampler passed by a kernel argument.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_image&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d&lt;float4, image_access::sample&gt;</span> img<span style="color: #990000">,</span> <span style="color: #008080">sampler</span> s<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">int2</span> coord<span style="color: #990000">;</span>
-    coord<span style="color: #990000">.</span>x <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">);</span>
-    coord<span style="color: #990000">.</span>y <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">);</span>
-
-    <span style="color: #008080">float4</span> val <span style="color: #990000">=</span> img<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">sample</span></span><span style="color: #990000">(</span>s<span style="color: #990000">,</span> coord<span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-4-1">Example 4</h5>
-<div class="paragraph"><p>The example how to use an image object with sampler declared at program scope.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_image&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="color: #008080">sampler</span> s <span style="color: #990000">=</span> make_sampler<span style="color: #990000">&lt;</span>addressing_mode<span style="color: #990000">::</span>clamp<span style="color: #990000">,</span>
-                         normalized_coordinates<span style="color: #990000">::</span>unnormalized<span style="color: #990000">,</span>
-                         filtering_mode<span style="color: #990000">::</span>nearest<span style="color: #990000">&gt;();</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d&lt;float4, image_access::sample&gt;</span> img<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">int2</span> coord<span style="color: #990000">;</span>
-    coord<span style="color: #990000">.</span>x <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">);</span>
-    coord<span style="color: #990000">.</span>y <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">);</span>
-
-    <span style="color: #008080">float4</span> val <span style="color: #990000">=</span> img<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">sample</span></span><span style="color: #990000">(</span>s<span style="color: #990000">,</span> coord<span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-5-1">Example 5</h5>
-<div class="paragraph"><p>The example how to use an image object with sampler declared at non-program scope.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_image&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d&lt;float4, image_access::sample&gt;</span> img<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="color: #008080">int2</span> coord<span style="color: #990000">;</span>
-    coord<span style="color: #990000">.</span>x <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">);</span>
-    coord<span style="color: #990000">.</span>y <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">);</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">sampler</span> s <span style="color: #990000">=</span> make_sampler<span style="color: #990000">&lt;</span>addressing_mode<span style="color: #990000">::</span>clamp<span style="color: #990000">,</span>
-                                    normalized_coordinates<span style="color: #990000">::</span>unnormalized<span style="color: #990000">,</span>
-                                    filtering_mode<span style="color: #990000">::</span>nearest<span style="color: #990000">&gt;();</span>
-
-    <span style="color: #008080">float4</span> val <span style="color: #990000">=</span> img<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">sample</span></span><span style="color: #990000">(</span>s<span style="color: #990000">,</span> coord<span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="pipes-library">3.12. Pipes Library</h3>
-<div class="paragraph"><p>Header <em>&lt;opencl_pipe&gt;</em> defines <span class="monospaced">pipe</span> and <span class="monospaced">pipe_storage</span> template classes.
-<span class="monospaced">pipe</span> and <span class="monospaced">pipe_storage</span> can be used as a communication channel between kernels.
-<span class="monospaced">pipe</span>, <span class="monospaced">reservation</span> and <span class="monospaced">pipe_storage</span>  template classes follow all the rules for marker types as specified in <em><a href="#marker-types">Marker Types</a> section</em>.</p></div>
-<div class="sect3">
-<h4 id="pipe-host-type">3.12.1. Pipe Host Type</h4>
-<div class="paragraph"><p>The below describes the OpenCL pipe data type and the corresponding data type available to the application:</p></div>
-<table class="tableblock frame-all grid-all" id="host_pipe_type"
-style="
-width:100%;
-">
-<caption class="title">Table 16. Host pipe type</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Type in OpenCL C++</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>API type for application</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl::pipe</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_pipe</span></p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="header-opencl_pipe-synopsis">3.12.2. Header &lt;opencl_pipe&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">pipe_access</span> <span style="color: #FF0000">{</span> read<span style="color: #990000">,</span> write <span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">pipe_access</span> Access <span style="color: #990000">=</span> pipe_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">pipe</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">pipe_storage</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="color: #008080">pipe_access</span> Access <span style="color: #990000">=</span> pipe_access<span style="color: #990000">::</span>read<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="color: #008080">pipe&lt;T, Access&gt;</span> <span style="font-weight: bold"><span style="color: #000000">make_pipe</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> pipe_storage<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> N<span style="color: #990000">&gt;&amp;</span> ps<span style="color: #990000">);</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="pipe-class-specializations">3.12.3. pipe class specializations</h4>
-<div class="paragraph"><p><span class="monospaced">pipe</span> class has two distinct specializations depending on <span class="monospaced">pipe_access</span> parameter defined as follows:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">pipe_access</span> Access <span style="color: #990000">=</span> pipe_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">pipe</span><span style="color: #990000">:</span> marker_type
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">T</span> element_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">constexpr</span> <span style="color: #008080">pipe_access</span> access <span style="color: #990000">=</span> Access<span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="color: #008080">memory_scope</span> S<span style="color: #990000">&gt;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">reservation</span><span style="color: #990000">:</span> marker_type
-    <span style="color: #FF0000">{</span>
-        <span style="font-weight: bold"><span style="color: #000000">reservation</span></span><span style="color: #990000">()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-        <span style="font-weight: bold"><span style="color: #000000">reservation</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> reservation<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-        <span style="font-weight: bold"><span style="color: #000000">reservation</span></span><span style="color: #990000">(</span>reservation<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-        reservation<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> reservation<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-        reservation<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>reservation<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-        reservation<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&amp;()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-
-        <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">is_valid</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-        <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> index<span style="color: #990000">,</span> T<span style="color: #990000">&amp;</span> ref<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-        <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">commit</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-
-        <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #000000">pipe</span></span><span style="color: #990000">()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">pipe</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> pipe<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">pipe</span></span><span style="color: #990000">(</span>pipe<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    pipe<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> pipe<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    pipe<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>pipe<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    pipe<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&amp;()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span>T<span style="color: #990000">&amp;</span> ref<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">reservation&lt;memory_scope_work_item&gt;</span> <span style="font-weight: bold"><span style="color: #000000">reserve</span></span><span style="color: #990000">(</span>
-                                               <span style="color: #008080">uint</span> num_packets<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">reservation&lt;memory_scope_work_group&gt;</span> <span style="font-weight: bold"><span style="color: #000000">work_group_reserve</span></span><span style="color: #990000">(</span>
-                                               <span style="color: #008080">uint</span> num_packets<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">reservation&lt;memory_scope_sub_group&gt;</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_reserve</span></span><span style="color: #990000">(</span>
-                                               <span style="color: #008080">uint</span> num_packets<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">num_packets</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">max_packets</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">pipe</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> pipe_access<span style="color: #990000">::</span>write<span style="color: #990000">&gt;:</span> marker_type
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">T</span> element_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">constexpr</span> <span style="color: #008080">pipe_access</span> access <span style="color: #990000">=</span> pipe_access<span style="color: #990000">::</span>write<span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="color: #008080">memory_scope</span> S<span style="color: #990000">&gt;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">reservation</span><span style="color: #990000">:</span> marker_type
-    <span style="color: #FF0000">{</span>
-        <span style="font-weight: bold"><span style="color: #000000">reservation</span></span><span style="color: #990000">()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-        <span style="font-weight: bold"><span style="color: #000000">reservation</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> reservation <span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-        <span style="font-weight: bold"><span style="color: #000000">reservation</span></span><span style="color: #990000">(</span>reservation <span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-        reservation<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> reservation <span style="color: #990000">&amp;)</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-        reservation<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>reservation <span style="color: #990000">&amp;&amp;)</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-        reservation<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&amp;()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-
-        <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">is_valid</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-        <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">write</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> index<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&amp;</span> ref<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-        <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">commit</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-
-        <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #000000">pipe</span></span><span style="color: #990000">()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">pipe</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> pipe<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">pipe</span></span><span style="color: #990000">(</span>pipe<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    pipe<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> pipe<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    pipe<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>pipe<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    pipe<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&amp;()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">write</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&amp;</span> ref<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">reservation&lt;memory_scope_work_item&gt;</span> <span style="font-weight: bold"><span style="color: #000000">reserve</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> num_packets<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">reservation&lt;memory_scope_work_group&gt;</span> <span style="font-weight: bold"><span style="color: #000000">work_group_reserve</span></span><span style="color: #990000">(</span>
-                                                     <span style="color: #008080">uint</span> num_packets<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">reservation&lt;memory_scope_sub_group&gt;</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_reserve</span></span><span style="color: #990000">(</span>
-                                                     <span style="color: #008080">uint</span> num_packets<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">num_packets</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">max_packets</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="pipe-class-methods">3.12.4. pipe class methods</h4>
-<div class="sect4">
-<h5 id="piperead">pipe::read</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span>T<span style="color: #990000">&amp;</span> ref<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Read packet from pipe into <span class="monospaced">ref</span>.</p></div>
-<div class="paragraph"><p>Returns <span class="monospaced">true</span> if read is successful and <span class="monospaced">false</span> if the pipe is empty.</p></div>
-</div>
-<div class="sect4">
-<h5 id="pipewrite">pipe::write</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">write</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&amp;</span> ref<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Write packet specified by <span class="monospaced">ref</span> to pipe.
-Returns <span class="monospaced">true</span> if write is successful and <span class="monospaced">false</span> if the pipe is full.</p></div>
-</div>
-<div class="sect4">
-<h5 id="pipereserve">pipe::reserve</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">reservation</span> <span style="font-weight: bold"><span style="color: #000000">reserve</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> num_packets<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #008080">reservation</span> <span style="font-weight: bold"><span style="color: #000000">reserve</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> num_packets<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Reserve <span class="monospaced">num_packets</span> entries for reading/writing from/to pipe.
-Returns a valid reservation if the reservation is successful.</p></div>
-<div class="paragraph"><p>The reserved pipe entries are referred to by indices that go from <span class="monospaced">0 &#8230; num_packets - 1</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="pipework_group_reserve">pipe::work_group_reserve</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">reservation</span> <span style="font-weight: bold"><span style="color: #000000">work_group_reserve</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> num_packets<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #008080">reservation</span> <span style="font-weight: bold"><span style="color: #000000">work_group_reserve</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> num_packets<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Reserve <span class="monospaced">num_packets</span> entries for reading/writing from/to pipe.
-Returns a valid reservation if the reservation is successful.</p></div>
-<div class="paragraph"><p>The reserved pipe entries are referred to by indices that go from <span class="monospaced">0 &#8230; num_packets - 1</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="pipesub_group_reserve">pipe::sub_group_reserve</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">reservation</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_reserve</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> num_packets<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #008080">reservation</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_reserve</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> num_packets<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Reserve <span class="monospaced">num_packets</span> entries for reading/writing from/to pipe.
-Returns a valid reservation if the reservation is successful.</p></div>
-<div class="paragraph"><p>The reserved pipe entries are referred to by indices that go from <span class="monospaced">0 &#8230; num_packets - 1</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="pipenum_packets">pipe::num_packets</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">num_packets</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the current number of packets that have been written to the pipe, but have not yet been read from the pipe.
-The number of available entries in a pipe is a dynamic value.
-The value returned should be considered immediately stale.</p></div>
-</div>
-<div class="sect4">
-<h5 id="pipemax_packets">pipe::max_packets</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">max_packets</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the maximum number of packets specified when pipe was created.</p></div>
-</div>
-<div class="sect4">
-<h5 id="pipereservationread">pipe::reservation::read</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> pipe<span style="color: #990000">::</span>reservation<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> index<span style="color: #990000">,</span> T<span style="color: #990000">&amp;</span> ref<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Read packet from the reserved area of the pipe referred to by <span class="monospaced">index</span> into <span class="monospaced">ref</span>.</p></div>
-<div class="paragraph"><p>The reserved pipe entries are referred to by indices that go from <span class="monospaced">0 &#8230; num_packets - 1</span>.</p></div>
-<div class="paragraph"><p>Returns <span class="monospaced">true</span> if read is successful and <span class="monospaced">false</span> otherwise.</p></div>
-</div>
-<div class="sect4">
-<h5 id="pipereservationwrite">pipe::reservation::write</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> pipe<span style="color: #990000">::</span>reservation<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">write</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> index<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&amp;</span> ref<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Write packet specified by <span class="monospaced">ref</span> to the reserved area of the pipe referred to by <span class="monospaced">index</span>.</p></div>
-<div class="paragraph"><p>The reserved pipe entries are referred to by indices that go from <span class="monospaced">0 &#8230; num_packets - 1</span>.</p></div>
-<div class="paragraph"><p>Returns <span class="monospaced">true</span> if write is successful and <span class="monospaced">false</span> otherwise.</p></div>
-</div>
-<div class="sect4">
-<h5 id="pipereservationcommit">pipe::reservation::commit</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> pipe<span style="color: #990000">::</span>reservation<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">commit</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #009900">void</span> pipe<span style="color: #990000">::</span>reservation<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">commit</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Indicates that all reads/writes to <span class="monospaced">num_packets</span> associated with reservation are completed.</p></div>
-</div>
-<div class="sect4">
-<h5 id="pipereservationis_valid">pipe::reservation::is_valid</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> pipe<span style="color: #990000">::</span>reservation<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">is_valid</span></span><span style="color: #990000">();</span></tt></pre></div></div>
-<div class="paragraph"><p>Return <span class="monospaced">true</span> if reservation is a valid reservation and <span class="monospaced">false</span> otherwise.</p></div>
-</div>
-<div class="sect4">
-<h5 id="pipereservationoperator-bool">pipe::reservation::operator bool</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> pipe<span style="color: #990000">::</span>reservation<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Return <span class="monospaced">true</span> if reservation is a valid reservation and <span class="monospaced">false</span> otherwise.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="pipe_storage-class">3.12.5. pipe_storage class</h4>
-<div class="paragraph"><p>The lifetime of <span class="monospaced">pipe_storage</span> objects is the same as a program where they were declared.
-The variables of such type are not shared across devices.</p></div>
-<div class="paragraph"><p><span class="monospaced">N</span> in the <span class="monospaced">pipe_storage</span> template class specifies the maximum number of packets which can be held by an object.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">pipe_storage</span><span style="color: #990000">:</span> marker_type
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #000000">pipe_storage</span></span><span style="color: #990000">();</span>
-    <span style="font-weight: bold"><span style="color: #000000">pipe_storage</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> pipe_storage<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">pipe_storage</span></span><span style="color: #990000">(</span>pipe_storage<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    pipe_storage<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> pipe_storage<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    pipe_storage<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>pipe_storage<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    pipe_storage<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&amp;()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="color: #008080">pipe_access</span> Access <span style="color: #990000">=</span> pipe_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-    <span style="color: #008080">pipe&lt;T, Access&gt;</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="color: #008080">pipe_access</span> Access <span style="color: #990000">=</span> pipe_access<span style="color: #990000">::</span>read<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="color: #008080">pipe&lt;T, Access&gt;</span> <span style="font-weight: bold"><span style="color: #000000">make_pipe</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> pipe_storage<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> N<span style="color: #990000">&gt;&amp;</span> ps<span style="color: #990000">);</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="pipe_storage-class-methods-and-make_pipe-function">3.12.6. pipe_storage class methods and make_pipe function</h4>
-<div class="sect4">
-<h5 id="pipe_storageget">pipe_storage::get</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="color: #008080">pipe_access</span> Access <span style="color: #990000">=</span> pipe_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;</span>
-<span style="color: #008080">pipe&lt;T, Access&gt;</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Constructs a read only or write only pipe from <span class="monospaced">pipe_storage</span> object.
-One kernel can have only one pipe accessor associated with one <span class="monospaced">pipe_storage</span> object.</p></div>
-</div>
-<div class="sect4">
-<h5 id="make_pipe">make_pipe</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="color: #008080">pipe_access</span> Access <span style="color: #990000">=</span> pipe_access<span style="color: #990000">::</span>read<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="color: #008080">pipe&lt;T, Access&gt;</span> <span style="font-weight: bold"><span style="color: #000000">make_pipe</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> pipe_storage<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> N<span style="color: #990000">&gt;&amp;</span> ps<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Constructs a read only or write only pipe from <span class="monospaced">pipe_storage</span> object.
-One kernel can have only one pipe accessor associated with one <span class="monospaced">pipe_storage</span> object.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="operations-ordering-using-reservations">3.12.7. Operations ordering using reservations</h4>
-<div class="paragraph"><p>The <span class="monospaced">reservation::read</span> and <span class="monospaced">reservation::write</span> pipe functions can be used to read from or write to a packet index.
-These functions can be used to read from or write to a packet index one or multiple times.
-If a packet index that is reserved for writing is not written to using the <span class="monospaced">reservation::write</span> method, the contents of that packet in the pipe are undefined.
-<span class="monospaced">reservation::commit</span> remove the entries reserved for reading from the pipe.
-<span class="monospaced">reservation::commit</span> ensures that the entries reserved for writing are all added in-order as one contiguous set of packets to the pipe.</p></div>
-<div class="paragraph"><p>There can only be <span class="monospaced">CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS</span> (refer to <em>Table 4.3</em>) reservations active (i.e. reservations that have been reserved but not committed) per work-item or work-group for a pipe in a kernel executing on a device.</p></div>
-<div class="paragraph"><p>Work-item based reservations made by a work-item are ordered in the pipe as they are ordered in the program.
-Reservations made by different work-items that belong to the same work-group can be ordered using the work-group barrier function.
-The order of work-item based reservations that belong to different work-groups is implementation defined.</p></div>
-<div class="paragraph"><p>Work-group based reservations made by a work-group are ordered in the pipe as they are ordered in the program.
-The order of work-group based reservations by different work-groups is implementation defined.</p></div>
-</div>
-<div class="sect3">
-<h4 id="requirements">3.12.8. Requirements</h4>
-<div class="sect4">
-<h5 id="data">Data</h5>
-<div class="paragraph"><p>Template parameter <span class="monospaced">T</span> in <span class="monospaced">pipe</span> and <span class="monospaced">pipe_storage</span> class template denotes the data type stored in pipe.
-The type <span class="monospaced">T</span> must be a POD type i.e. satisfy <span class="monospaced">is_pod&lt;T&gt;::value == true</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="work-group-operations">Work-group operations</h5>
-<div class="paragraph"><p>All work-group specific functions must be encountered by all work items in a work-group executing the kernel with the same argument values, otherwise the behavior is undefined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="sub-group-operations">Sub-group operations</h5>
-<div class="paragraph"><p>All sub-group specific functions must be encountered by all work items in a sub-group executing the kernel with the same argument values, otherwise the behavior is undefined.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="restrictions-5">3.12.9. Restrictions</h4>
-<div class="sect4">
-<h5 id="pipe">pipe</h5>
-<div class="ulist"><ul>
-<li>
-<p>
-The <span class="monospaced">pipe</span> type cannot be used with variables declared inside a class or union field, a pointer type, an array, global variables declared at program scope or the return type of a function.
-</p>
-</li>
-<li>
-<p>
-A kernel cannot read from and write to the same pipe object.
-</p>
-</li>
-<li>
-<p>
-The <span class="monospaced">pipe</span> type cannot be used with the <span class="monospaced">global</span>, <span class="monospaced">local</span>, <span class="monospaced">priv</span> and <span class="monospaced">constant</span> address space storage classes (<em><a href="#explicit-address-space-storage-classes">Explicit address space storage classes</a> section</em>).
-</p>
-</li>
-<li>
-<p>
-The value returned by applying the <span class="monospaced">sizeof</span> operator to the <span class="monospaced">pipe</span> type is implementation-defined.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="reservation">reservation</h5>
-<div class="ulist"><ul>
-<li>
-<p>
-The <span class="monospaced">reservation</span> type cannot be used with variables declared inside a class or union field, a pointer type, an array, global variables declared at program scope or the return type of a function.
-</p>
-</li>
-<li>
-<p>
-The <span class="monospaced">reservation</span> type cannot be used with the <span class="monospaced">global</span>, <span class="monospaced">local</span>, <span class="monospaced">priv</span> and <span class="monospaced">constant</span> address space storage classes (<em><a href="#explicit-address-space-storage-classes">Explicit address space storage classes</a> section</em>).
-</p>
-</li>
-<li>
-<p>
-The value returned by applying the <span class="monospaced">sizeof</span> operator to the <span class="monospaced">reservation</span> type is implementation-defined.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following behavior is undefined:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A kernel calls <span class="monospaced">reservation::read</span> or <span class="monospaced">reservation::write</span> with a valid reservation but with an index that is not a value from <span class="monospaced">0 &#8230; num_packets - 1</span> specified to the corresponding call to <span class="monospaced">pipe::reserve</span>, <span class="monospaced">pipe::work_group_reserve</span> or <span class="monospaced">pipe::sub_group_reserve</span>.
-</p>
-</li>
-<li>
-<p>
-A kernel calls <span class="monospaced">reservation::read</span> or <span class="monospaced">reservation::write</span> with a reservation that has already been committed (i.e. a <span class="monospaced">reservation::commit</span> with this reservation has already been called).
-</p>
-</li>
-<li>
-<p>
-The contents of the reserved data packets in the pipe are undefined if the kernel does not call <span class="monospaced">reservation::write</span> for all entries that were reserved by the corresponding call to <span class="monospaced">pipe::reserve</span>, <span class="monospaced">pipe::work_group_reserve</span> or <span class="monospaced">pipe::sub_group_reserve</span>.
-</p>
-</li>
-<li>
-<p>
-Calls to <span class="monospaced">reservation::read</span> and <span class="monospaced">reservation::commit</span> or <span class="monospaced">reservation::write</span> and <span class="monospaced">reservation::commit</span> for a given reservation must be called by the same kernel that made the reservation using <span class="monospaced">pipe::reserve</span>, <span class="monospaced">pipe::work_group_reserve</span> or <span class="monospaced">pipe::sub_group_reserve</span>. The reservation cannot be passed to another kernel including child kernels.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="pipe_storage">pipe_storage</h5>
-<div class="ulist"><ul>
-<li>
-<p>
-Variables of type <span class="monospaced">pipe_storage</span> can only be declared at program scope or with the static specifier.
-</p>
-</li>
-<li>
-<p>
-The <span class="monospaced">pipe_storage</span> type cannot be used as a class or union field, a pointer type, an array or the return type of a function.
-</p>
-</li>
-<li>
-<p>
-The <span class="monospaced">pipe_storage</span> type cannot be used with the <span class="monospaced">global</span>, <span class="monospaced">local</span>, <span class="monospaced">priv</span> and <span class="monospaced">constant</span> address space storage classes (<em><a href="#explicit-address-space-storage-classes">Explicit address space storage classes</a> section</em>).
-</p>
-</li>
-<li>
-<p>
-The value returned by applying the <span class="monospaced">sizeof</span> operator to the <span class="monospaced">pipe_storage</span> type is implementation-defined.
-</p>
-</li>
-<li>
-<p>
-Variables of type <span class="monospaced">pipe</span> created from <span class="monospaced">pipe_storage</span> can only be declared inside a kernel function at kernel scope.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following behavior is undefined:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A kernel cannot contain more than one <span class="monospaced">pipe</span> accessor made from one <span class="monospaced">pipe_storage</span> object. Otherwise behavior is undefined.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="examples-6">3.12.10. Examples</h4>
-<div class="sect4">
-<h5 id="example-1-6">Example 1</h5>
-<div class="paragraph"><p>Example of reading from a pipe object.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_pipe&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">reader</span></span><span style="color: #990000">(</span><span style="color: #008080">pipe&lt;int&gt;</span> p<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="color: #009900">int</span> val<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span>p<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span>val<span style="color: #990000">))</span> <span style="color: #FF0000">{</span>
-        <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-2-4">Example 2</h5>
-<div class="paragraph"><p>Example of writing to a pipe object.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_pipe&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">writer</span></span><span style="color: #990000">(</span><span style="color: #008080">pipe&lt;int, pipe_access::write&gt;</span> p<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    <span style="color: #009900">int</span> val<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span>p<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">write</span></span><span style="color: #990000">(</span>val<span style="color: #990000">))</span> <span style="color: #FF0000">{</span>
-        <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-3-3">Example 3</h5>
-<div class="paragraph"><p>Example of reading from a pipe object using reservations.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_pipe&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">reader</span></span><span style="color: #990000">(</span><span style="color: #008080">pipe&lt;int, pipe_access::read&gt;</span> p<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="color: #009900">int</span> val<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> rid <span style="color: #990000">=</span> p<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">reserve</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">);</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span>rid<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">,</span> val<span style="color: #990000">))</span> <span style="color: #FF0000">{</span>
-        <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    <span style="color: #FF0000">}</span>
-    rid<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">commit</span></span><span style="color: #990000">();</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-4-2">Example 4</h5>
-<div class="paragraph"><p>Example of using a pipe_storage object and how to create the pipe objects/accessors from it.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_pipe&gt;</span>
-
-cl<span style="color: #990000">::</span>pipe_storage <span style="color: #990000">&lt;</span><span style="color: #009900">int</span><span style="color: #990000">,</span> <span style="color: #993399">100</span><span style="color: #990000">&gt;</span> myProgramPipe0<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">producer</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    cl<span style="color: #990000">::</span><span style="color: #008080">pipe&lt;int, cl::pipe_access::write&gt;</span> p <span style="color: #990000">=</span>
-   myProgramPipe0<span style="color: #990000">.</span>get<span style="color: #990000">&lt;</span>cl<span style="color: #990000">::</span>pipe_access<span style="color: #990000">::</span>write<span style="color: #990000">&gt;();</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    p<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">write</span></span><span style="color: #990000">(...);</span>
-<span style="color: #FF0000">}</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">consumer</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    cl<span style="color: #990000">::</span><span style="color: #008080">pipe&lt;int, cl::pipe_access::read&gt;</span> p <span style="color: #990000">=</span>
-  myProgramPipe0<span style="color: #990000">.</span>get<span style="color: #990000">&lt;</span>cl<span style="color: #990000">::</span>pipe_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;();</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span>p<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(...))</span> <span style="color: #FF0000">{</span>
-        <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-5-2">Example 5</h5>
-<div class="paragraph"><p>Example of using more than one pipe_storage object.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_pipe&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="color: #008080">pipe_storage&lt;int2, 20&gt;</span> myProgramPipe2<span style="color: #990000">;</span>
-<span style="color: #008080">pipe_storage&lt;float, 40&gt;</span> myProgramPipe3<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">input</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> p <span style="color: #990000">=</span> make_pipe<span style="color: #990000">&lt;</span>pipe_access<span style="color: #990000">::</span>write<span style="color: #990000">&gt;(</span>myProgramPipe2<span style="color: #990000">);</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    p<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">write</span></span><span style="color: #990000">(...);</span>
-<span style="color: #FF0000">}</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">processor</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> p_in <span style="color: #990000">=</span> make_pipe<span style="color: #990000">&lt;</span>pipe_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;(</span>myProgramPipe2<span style="color: #990000">);</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> p_out <span style="color: #990000">=</span> make_pipe<span style="color: #990000">&lt;</span>pipe_access<span style="color: #990000">::</span>write<span style="color: #990000">&gt;(</span>myProgramPipe3<span style="color: #990000">);</span>
-    <span style="color: #990000">...</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span>p_in<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(...))</span> <span style="color: #FF0000">{</span>
-        <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    <span style="color: #FF0000">}</span>
-    p_out<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">write</span></span><span style="color: #990000">(...);</span>
-<span style="color: #FF0000">}</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">output</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> p <span style="color: #990000">=</span> make_pipe<span style="color: #990000">&lt;</span>pipe_access<span style="color: #990000">::</span>read<span style="color: #990000">&gt;(</span>myProgramPipe3<span style="color: #990000">);</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span>p<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">read</span></span><span style="color: #990000">(...))</span> <span style="color: #FF0000">{</span>
-        <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="device-enqueue-library">3.13. Device Enqueue Library</h3>
-<div class="paragraph"><p>OpenCL C++ device enqueue functionality allows a kernel to enqueue the same device, without host interaction.
-A kernel may enqueue code represented by lambda syntax, and control execution order with event dependencies including user events and markers.
-<span class="monospaced">device_queue</span> follows all the rules for marker types as specified in <em><a href="#marker-types">Marker Types</a> section</em>.</p></div>
-<div class="sect3">
-<h4 id="queue-host-type">3.13.1. Queue Host Type</h4>
-<div class="paragraph"><p>The below table describes the OpenCL queue data type and the corresponding data type available to the application:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 17. Host queue type</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Type in OpenCL C++</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>API type for application</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl::device_queue</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">cl_queue</span></p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="header-opencl_device_queue-synopsis">3.13.2. Header &lt;opencl_device_queue&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">enqueue_status</span><span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">enqueue_policy</span><span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">event_status</span><span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">event_profiling_info</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">event</span>
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #000000">event</span></span><span style="color: #990000">();</span>
-    <span style="font-weight: bold"><span style="color: #000000">event</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> event<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">event</span></span><span style="color: #990000">(</span>event<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    event<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> event<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    event<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>event<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">is_valid</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">retain</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">release</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">set_status</span></span><span style="color: #990000">(</span><span style="color: #008080">event_status</span> status<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">profiling_info</span></span><span style="color: #990000">(</span><span style="color: #008080">event_profiling_info</span> name<span style="color: #990000">,</span>
-                        <span style="color: #008080">global_ptr&lt;long&gt;</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="color: #008080">event</span> <span style="font-weight: bold"><span style="color: #000000">make_user_event</span></span><span style="color: #990000">();</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">ndrange</span>
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #000000">ndrange</span></span><span style="color: #990000">(</span><span style="color: #008080">size_t</span> global_work_size<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">ndrange</span></span><span style="color: #990000">(</span><span style="color: #008080">size_t</span> global_work_size<span style="color: #990000">,</span>
-            <span style="color: #008080">size_t</span> local_work_size<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">ndrange</span></span><span style="color: #990000">(</span><span style="color: #008080">size_t</span> global_work_offset<span style="color: #990000">,</span>
-            <span style="color: #008080">size_t</span> global_work_size<span style="color: #990000">,</span>
-            <span style="color: #008080">size_t</span> local_work_size<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-    <span style="font-weight: bold"><span style="color: #000000">ndrange</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #000000">size_t</span></span> <span style="color: #990000">(&amp;</span>global_work_size<span style="color: #990000">)[</span>N<span style="color: #990000">])</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-    <span style="font-weight: bold"><span style="color: #000000">ndrange</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #000000">size_t</span></span> <span style="color: #990000">(&amp;</span>global_work_size<span style="color: #990000">)[</span>N<span style="color: #990000">],</span>
-            <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #000000">size_t</span></span> <span style="color: #990000">(&amp;</span>local_work_size<span style="color: #990000">)[</span>N<span style="color: #990000">])</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-    <span style="font-weight: bold"><span style="color: #000000">ndrange</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #000000">size_t</span></span> <span style="color: #990000">(&amp;</span>global_work_offset<span style="color: #990000">)[</span>N<span style="color: #990000">],</span>
-            <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #000000">size_t</span></span> <span style="color: #990000">(&amp;</span>global_work_size<span style="color: #990000">)[</span>N<span style="color: #990000">],</span>
-            <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #000000">size_t</span></span> <span style="color: #990000">(&amp;</span>local_work_size<span style="color: #990000">)[</span>N<span style="color: #990000">])</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">device_queue</span><span style="color: #990000">:</span> marker_type
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #000000">device_queue</span></span><span style="color: #990000">()</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">device_queue</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> device_queue<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">device_queue</span></span><span style="color: #990000">(</span>device_queue<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    device_queue<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> device_queue<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    device_queue<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>device_queue<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    device_queue<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&amp;()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-    <span style="color: #008080">enqueue_status</span> <span style="font-weight: bold"><span style="color: #000000">enqueue_kernel</span></span><span style="color: #990000">(</span><span style="color: #008080">enqueue_policy</span> flag<span style="color: #990000">,</span>
-                                  <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">ndrange</span> <span style="color: #990000">&amp;</span>ndrange<span style="color: #990000">,</span>
-                                  <span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span>
-                                  Args<span style="color: #990000">...</span> args<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-    <span style="color: #008080">enqueue_status</span> <span style="font-weight: bold"><span style="color: #000000">enqueue_kernel</span></span><span style="color: #990000">(</span><span style="color: #008080">enqueue_policy</span> flag<span style="color: #990000">,</span>
-                                  <span style="color: #008080">uint</span> num_events_in_wait_list<span style="color: #990000">,</span>
-                                  <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                  <span style="color: #008080">event</span> <span style="color: #990000">*</span>event_ret<span style="color: #990000">,</span>
-                                  <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">ndrange</span> <span style="color: #990000">&amp;</span>ndrange<span style="color: #990000">,</span>
-                                  <span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span>
-                                  Args<span style="color: #990000">...</span> args<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #008080">enqueue_status</span> <span style="font-weight: bold"><span style="color: #000000">enqueue_marker</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> num_events_in_wait_list<span style="color: #990000">,</span>
-                                  <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                  <span style="color: #008080">event</span> <span style="color: #990000">*</span>event_ret<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="color: #008080">device_queue</span> <span style="font-weight: bold"><span style="color: #000000">get_default_device_queue</span></span><span style="color: #990000">();</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">get_kernel_work_group_size</span></span><span style="color: #990000">(</span><span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span> Args<span style="color: #990000">...</span> args<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">get_kernel_preferred_work_group_size_multiple</span></span><span style="color: #990000">(</span><span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span>
-                                                   Args<span style="color: #990000">...</span> args<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">get_kernel_sub_group_count_for_ndrange</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">ndrange</span> <span style="color: #990000">&amp;</span>ndrange<span style="color: #990000">,</span>
-                                            <span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span>
-                                            Args<span style="color: #990000">...</span> args<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">get_kernel_max_sub_group_size_for_ndrange</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">ndrange</span> <span style="color: #990000">&amp;</span>ndrange<span style="color: #990000">,</span>
-                                               <span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span>
-                                               Args<span style="color: #990000">...</span> args<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">get_kernel_local_size_for_sub_group_count</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> num_sub_groups<span style="color: #990000">,</span>
-                                               <span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span>
-                                               Args<span style="color: #990000">...</span> args<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">get_kernel_max_num_sub_groups</span></span><span style="color: #990000">(</span><span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span> Args<span style="color: #990000">...</span> args<span style="color: #990000">);</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="device_queue-class-methods">3.13.3. device_queue class methods</h4>
-<div class="paragraph"><p><span class="monospaced">device_queue</span> object represents work queue of the device.
-Device queue meets all requirements of the marker types as in <em><a href="#marker-types">Marker Types</a> section</em>.</p></div>
-<div class="sect4">
-<h5 id="enqueue_kernel">device_queue::enqueue_kernel</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-<span style="color: #008080">enqueue_status</span> <span style="font-weight: bold"><span style="color: #000000">enqueue_kernel</span></span><span style="color: #990000">(</span><span style="color: #008080">enqueue_policy</span> policy<span style="color: #990000">,</span>
-                              <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">ndrange</span> <span style="color: #990000">&amp;</span>ndrange<span style="color: #990000">,</span>
-                              <span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span>
-                              Args<span style="color: #990000">...</span> args<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>This method allows to enqueue functor or lambda <span class="monospaced">fun</span> on the device with specified <span class="monospaced">policy</span> over the specified <span class="monospaced">ndrange</span>.</p></div>
-<div class="paragraph"><p><span class="monospaced">args</span> are the arguments that will be passed to <span class="monospaced">fun</span> when kernel will be enqueued with the exception for <span class="monospaced">local_ptr</span> parameters.
-For local pointers user must supply the size of local memory that will be allocated using <span class="monospaced">local_ptr&lt;T&gt;::size_type{num elements}</span>.
-Please see examples how to use <span class="monospaced">enqueue_kernel</span> are in <em><a href="#examples-7">Examples</a> section</em>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-<span style="color: #008080">enqueue_status</span> <span style="font-weight: bold"><span style="color: #000000">enqueue_kernel</span></span><span style="color: #990000">(</span><span style="color: #008080">enqueue_policy</span> policy<span style="color: #990000">,</span>
-                              <span style="color: #008080">uint</span> num_events_in_wait_list<span style="color: #990000">,</span>
-                              <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                              <span style="color: #008080">event</span> <span style="color: #990000">*</span>event_ret<span style="color: #990000">,</span>
-                              <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">ndrange</span> <span style="color: #990000">&amp;</span>ndrange<span style="color: #990000">,</span>
-                              <span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span>
-                              Args<span style="color: #990000">...</span> args<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>This method enqueues functor or lambda <span class="monospaced">fun</span> in the same way as the overload above with the exception for the passed event list.
-If an event is returned, <span class="monospaced">enqueue_kernel</span> performs an implicit retain on the returned event.</p></div>
-</div>
-<div class="sect4">
-<h5 id="enqueue_marker">device_queue::enqueue_marker</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">enqueue_status</span> <span style="font-weight: bold"><span style="color: #000000">enqueue_marker</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> num_events_in_wait_list<span style="color: #990000">,</span>
-                              <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                              <span style="color: #008080">event</span> <span style="color: #990000">*</span>event_ret<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>This method enqueues a marker to device queue.
-The marker command waits for a list of events specified by <span class="monospaced">event_wait_list</span> to complete before the marker completes.
-<span class="monospaced">event_ret</span> must not be <span class="monospaced">nullptr</span> as otherwise this is a no-op.</p></div>
-<div class="paragraph"><p>If an event is returned, <span class="monospaced">enqueue_marker</span> performs an implicit retain on the returned event.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="event-class-methods">3.13.4. event class methods</h4>
-<div class="sect4">
-<h5 id="is_valid">event::is_valid</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">is_valid</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">true</span> if event object is a valid event.
-Otherwise returns <span class="monospaced">false</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="operator-bool">event::operator bool</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">explicit</span></span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #009900">bool</span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">true</span> if event object is a valid event.
-Otherwise returns <span class="monospaced">false</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="retain">event::retain</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">retain</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Increments the event reference count.
-Event must be an event returned by <span class="monospaced">enqueue_kernel</span> or <span class="monospaced">enqueue_marker</span> or a user event.</p></div>
-</div>
-<div class="sect4">
-<h5 id="release">event::release</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">release</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Decrements the event reference count.
-The event object is deleted once the event reference count is zero, the specific command identified by this event has completed (or terminated) and there are no commands in any device command queue that require a wait for this event to complete.
-Event must be an event returned by <span class="monospaced">enqueue_kernel</span>, <span class="monospaced">enqueue_marker</span> or a user event.</p></div>
-</div>
-<div class="sect4">
-<h5 id="set_status">event::set_status</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">set_status</span></span><span style="color: #990000">(</span><span style="color: #008080">event_status</span> status<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Sets the execution status of a user event.
-Event must be a user event.
-<span class="monospaced">status</span> can be either <span class="monospaced">event_status::complete</span> or <span class="monospaced">event_status::error</span> value indicating an error.</p></div>
-</div>
-<div class="sect4">
-<h5 id="profiling_info">event::profiling_info</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">profiling_info</span></span><span style="color: #990000">(</span><span style="color: #008080">event_profiling_info</span> name<span style="color: #990000">,</span>
-                    <span style="color: #008080">global_ptr&lt;long&gt;</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Captures the profiling information for functions that are enqueued as commands.
-The specific function being referred to is: <span class="monospaced">enqueue_kernel</span>.
-These enqueued commands are identified by unique event objects.
-The profiling information will be available in <span class="monospaced">value</span> once the command identified by event has completed.
-Event must be an event returned by <span class="monospaced">enqueue_kernel</span>.</p></div>
-<div class="paragraph"><p><span class="monospaced">name</span> identifies which profiling information is to be queried and can be:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">event_profiling_info::exec_time</span>
-</p>
-<div class="paragraph"><p><span class="monospaced">value</span> is a pointer to two 64-bit values.</p></div>
-<div class="paragraph"><p>The first 64-bit value describes the elapsed time <span class="monospaced">CL_PROFILING_COMMAND_END - CL_PROFILING_COMMAND_START</span> for the command identified by event in nanoseconds.</p></div>
-<div class="paragraph"><p>The second 64-bit value describes the elapsed time <span class="monospaced">CL_PROFILING_COMMAND_COMPLETE - CL_PROFILING_COMMAND_START</span> for the command identified by event in nanoseconds.</p></div>
-</li>
-</ul></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content"><span class="monospaced">profiling_info</span> when called multiple times for the same event is undefined.</td>
-</tr></table>
-</div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="other-operations">3.13.5. Other operations</h4>
-<div class="sect4">
-<h5 id="get_default_device_queue">get_default_device_queue</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">device_queue</span> <span style="font-weight: bold"><span style="color: #000000">get_default_device_queue</span></span><span style="color: #990000">();</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the default device queue.
-If a default device queue has not been created, <span class="monospaced">device_queue::is_valid()</span> will return <span class="monospaced">false</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="make_user_event">make_user_event</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">event</span> <span style="font-weight: bold"><span style="color: #000000">make_user_event</span></span><span style="color: #990000">();</span></tt></pre></div></div>
-<div class="paragraph"><p>Creates a user event.
-Returns the user event.
-The execution status of the user event created is set to <span class="monospaced">event_status::submitted</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_kernel_work_group_size">get_kernel_work_group_size</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">get_kernel_work_group_size</span></span><span style="color: #990000">(</span><span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span> Args<span style="color: #990000">...</span> args<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>This provides a mechanism to query the maximum work-group size that can be used to execute a functor on the current device.</p></div>
-<div class="paragraph"><p><span class="monospaced">fun</span> specifies the functor representing the kernel code that would be enqueued.</p></div>
-<div class="paragraph"><p><span class="monospaced">args</span> are the arguments that will be passed to <span class="monospaced">fun</span> when kernel will be enqueued with the exception for <span class="monospaced">local_ptr</span> parameters.
-For local pointers user must supply the size of local memory that will be allocated.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_kernel_preferred_work_group_size_multiple">get_kernel_preferred_work_group_size_multiple</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">get_kernel_preferred_work_group_size_multiple</span></span><span style="color: #990000">(</span><span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span>
-                                                   Args<span style="color: #990000">...</span> args<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the preferred multiple of work-group size for launch.
-This is a performance hint.
-Specifying a work-group size that is not a multiple of the value returned by this query as the value of the local work size argument to enqueue will not fail to enqueue the functor for execution unless the work-group size specified is larger than the device maximum.</p></div>
-<div class="paragraph"><p><span class="monospaced">fun</span> specifies the functor representing the kernel code that would be enqueued.</p></div>
-<div class="paragraph"><p><span class="monospaced">args</span> are the arguments that will be passed to <span class="monospaced">fun</span> when kernel will be enqueued with the exception for <span class="monospaced">local_ptr</span> parameters.
-For local pointers user must supply the size of local memory that will be allocated.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_kernel_sub_group_count_for_ndrange">get_kernel_sub_group_count_for_ndrange</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">get_kernel_sub_group_count_for_ndrange</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">ndrange</span> <span style="color: #990000">&amp;</span>ndrange<span style="color: #990000">,</span>
-                                            <span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span>
-                                            Args<span style="color: #990000">...</span> args<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the number of sub-groups in each work-group of the dispatch (except for the last in cases where the global size does not divide cleanly into work-groups) given the combination of the passed ndrange and functor.</p></div>
-<div class="paragraph"><p><span class="monospaced">fun</span> specifies the functor representing the kernel code that would be enqueued.</p></div>
-<div class="paragraph"><p><span class="monospaced">args</span> are the arguments that will be passed to <span class="monospaced">fun</span> when kernel will be enqueued with the exception for <span class="monospaced">local_ptr</span> parameters.
-For local pointers user must supply the size of local memory that will be allocated.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_kernel_max_sub_group_size_for_ndrange">get_kernel_max_sub_group_size_for_ndrange</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">get_kernel_max_sub_group_size_for_ndrange</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">ndrange</span> <span style="color: #990000">&amp;</span>ndrange<span style="color: #990000">,</span>
-                                               <span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span>
-                                               Args<span style="color: #990000">...</span> args<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the maximum sub-group size for a functor.</p></div>
-<div class="paragraph"><p><span class="monospaced">fun</span> specifies the functor representing the kernel code that would be enqueued.</p></div>
-<div class="paragraph"><p><span class="monospaced">args</span> are the arguments that will be passed to <span class="monospaced">fun</span> when kernel will be enqueued with the exception for <span class="monospaced">local_ptr</span> parameters.
-For local pointers user must supply the size of local memory that will be allocated.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_kernel_local_size_for_sub_group_count">get_kernel_local_size_for_sub_group_count</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">get_kernel_local_size_for_sub_group_count</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> num_sub_groups<span style="color: #990000">,</span>
-                                               <span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span>
-                                               Args<span style="color: #990000">...</span> args<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns a valid local size that would produce the requested number of sub-groups such that each sub-group is complete with no partial sub-groups.</p></div>
-<div class="paragraph"><p><span class="monospaced">fun</span> specifies the functor representing the kernel code that would be enqueued.</p></div>
-<div class="paragraph"><p><span class="monospaced">args</span> are the arguments that will be passed to <span class="monospaced">fun</span> when kernel will be enqueued with the exception for <span class="monospaced">local_ptr</span> parameters.
-For local pointers user must supply the size of local memory that will be allocated.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_kernel_max_num_sub_groups">get_kernel_max_num_sub_groups</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Fun</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Args<span style="color: #990000">&gt;</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">get_kernel_max_num_sub_groups</span></span><span style="color: #990000">(</span><span style="color: #008080">Fun</span> fun<span style="color: #990000">,</span> Args<span style="color: #990000">...</span> args<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Provides a mechanism to query the maximum number of sub-groups that can be used to execute the passed functor on the current device.</p></div>
-<div class="paragraph"><p><span class="monospaced">fun</span> specifies the functor representing the kernel code that would be enqueued.</p></div>
-<div class="paragraph"><p><span class="monospaced">args</span> are the arguments that will be passed to <span class="monospaced">fun</span> when kernel will be enqueued with the exception for <span class="monospaced">local_ptr</span> parameters.
-For local pointers user must supply the size of local memory that will be allocated.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="ndrange">3.13.6. ndrange</h4>
-<div class="paragraph"><p><span class="monospaced">ndrange</span> type is used to represent the size of the enqueued workload.
-The dimension of the workload ranges from 1 to 3.
-User can specify global work size, local work size and global work offset.
-Unspecified parameters are defaulted to 0.</p></div>
-</div>
-<div class="sect3">
-<h4 id="enqueue-policy">3.13.7. Enqueue policy</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">enqueue_policy</span>
-<span style="color: #FF0000">{</span>
-    no_wait<span style="color: #990000">,</span>
-    wait_kernel<span style="color: #990000">,</span>
-    wait_work_group
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Enqueue policy enumerable is used to specify launch policy of enqueued kernel.
-It is defined as follows:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 18. Enqueue policy</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Policy</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">no_wait</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Indicates that the enqueued kernels do not need to wait for the parent kernel to finish execution before they begin execution.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">wait_kernel</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Indicates that all work-items of the parent kernel must finish executing and all immediate <a href="#ftn14">[14</a>] side effects committed before the enqueued child kernel may begin execution.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">wait_work_group</span> <a href="#ftn15">[15</a>]</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Indicates that the enqueued kernels wait only for the work-group that enqueued the kernels to finish before they begin execution.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="enqueue-status">3.13.8. Enqueue status</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">enqueue_status</span>
-<span style="color: #FF0000">{</span>
-    success<span style="color: #990000">,</span>
-    failure<span style="color: #990000">,</span>
-    invalid_queue<span style="color: #990000">,</span>
-    invalid_ndrange<span style="color: #990000">,</span>
-    invalid_event_wait_list<span style="color: #990000">,</span>
-    queue_full<span style="color: #990000">,</span>
-    invalid_arg_size<span style="color: #990000">,</span>
-    event_allocation_failure<span style="color: #990000">,</span>
-    out_of_resources
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>The <span class="monospaced">enqueue_kernel</span> and <span class="monospaced">enqueue_marker</span> methods return <span class="monospaced">enqueue_status::success</span> if the command is enqueued successfully and return <span class="monospaced">enqueue_status::failure</span> otherwise.
-If the <em>-g</em> compile option is specified in compiler options passed to <span class="monospaced">clBuildProgram</span>, the other errors may be returned instead of <span class="monospaced">enqueue_status::failure</span> to indicate why <span class="monospaced">enqueue_kernel</span> or <span class="monospaced">enqueue_marker</span> failed.
-Enqueue status is defined as follows:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 19. Enqueue status</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Status</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">success</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">failure</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">invalid_queue</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>queue</em> is not a valid device queue.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">invalid_ndrange</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">If <span class="monospaced">ndrange</span> is not a valid ND-range descriptor or if the program was compiled with <em>-cl-uniform-work-group-size</em> and the local work size is specified in <span class="monospaced">ndrange</span> but the global work size specified in <span class="monospaced">ndrange</span> is not a multiple of the local work size.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">invalid_event_wait_list</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">If <span class="monospaced">event_wait_list</span> is <span class="monospaced">nullptr</span> and <span class="monospaced">num_events_in_wait_list</span> &gt; 0, or if <span class="monospaced">event_wait_list</span> is not <span class="monospaced">nullptr</span> and <span class="monospaced">num_events_in_wait_list</span> is 0, or if <span class="monospaced">event</span> objects in <span class="monospaced">event_wait_list</span> are not valid events.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">queue_full</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">If <em>queue</em> is full.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">invalid_arg_size</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">If size of local memory arguments is 0.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">event_allocation_failure</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">If <span class="monospaced">event_ret</span> is not <span class="monospaced">nullptr</span> and an event could not be allocated.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">out_of_resources</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">If there is a failure to queue the kernel in <em>queue</em> because of insufficient resources needed to execute the kernel.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="event-status">3.13.9. Event status</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">event_status</span>
-<span style="color: #FF0000">{</span>
-    submitted<span style="color: #990000">,</span>
-    complete<span style="color: #990000">,</span>
-    error<span style="color: #990000">,</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Event status enumerable is used to set a user event status.
-It is defined as follows:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 20. Event status</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Status</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">submitted</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Initial status of a user event</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">complete</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">error</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Status indicating an error</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="determining-when-a-parent-kernel-has-finished-execution">3.13.10. Determining when a parent kernel has finished execution</h4>
-<div class="paragraph"><p>A parent kernel&#8217;s execution status is considered to be complete when it and all its child kernels have finished execution.
-The execution status of a parent kernel will be <span class="monospaced">event_status::complete</span> if this kernel and all its child kernels finish execution successfully.
-The execution status of the kernel will be <span class="monospaced">event_status::error</span> if it or any of its child kernels encounter an error, or are abnormally terminated.</p></div>
-<div class="paragraph"><p>For example, assume that the host enqueues a kernel <span class="monospaced">k</span> for execution on a device.
-Kernel <span class="monospaced">k</span> when executing on the device enqueues kernels <span class="monospaced">A</span> and <span class="monospaced">B</span> to a device queue(s).
-The <span class="monospaced">enqueue_kernel</span> call to enqueue kernel <span class="monospaced">B</span> specifies the event associated with kernel <span class="monospaced">A</span> in the <span class="monospaced">event_wait_list</span> argument i.e. wait for kernel <span class="monospaced">A</span> to finish execution before kernel <span class="monospaced">B</span> can begin execution.
-Let&#8217;s assume kernel <span class="monospaced">A</span> enqueues kernels <span class="monospaced">X</span>, <span class="monospaced">Y</span> and <span class="monospaced">Z</span>.
-Kernel <span class="monospaced">A</span> is considered to have finished execution i.e. its execution status is <span class="monospaced">event_status::complete</span> only after <span class="monospaced">A</span> and the kernels <span class="monospaced">A</span> enqueued (and any kernels these enqueued kernels enqueue and so on) have finished execution.</p></div>
-</div>
-<div class="sect3">
-<h4 id="event-profiling-info">3.13.11. Event profiling info</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">event_profiling_info</span>
-<span style="color: #FF0000">{</span>
-    exec_time<span style="color: #990000">,</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Event profiling info enumerable is used to determine the outcome of <span class="monospaced">event::profiling_info</span> function.
-It is defined as follows:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 21. Event profiling info</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Status</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">exec_time</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Identifies profiling information to be queried.
-If specified, the two 64-bit values are returned</p>
-<p class="tableblock">The first 64-bit value describes the elapsed time: <span class="monospaced">CL_PROFILING_COMMAND_END - CL_PROFILING_COMMAND_START</span> for the command identified by event in nanoseconds.</p>
-<p class="tableblock">The second 64-bit value describes the elapsed time <span class="monospaced">CL_PROFILING_COMMAND_COMPLETE - CL_PROFILING_COMMAND_START</span> for the command identified by event in nanoseconds.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="requirements-1">3.13.12. Requirements</h4>
-<div class="paragraph"><p>Functor and lambda objects passed to <span class="monospaced">enqueue_kernel</span> method of device queue has to follow specific restrictions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-It has to be trivially copyable.
-</p>
-</li>
-<li>
-<p>
-It has to be trivially copy constructible.
-</p>
-</li>
-<li>
-<p>
-It has to be trivially destructible.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Code enqueuing function objects that do not meet this criteria is ill-formed.</p></div>
-<div class="sect4">
-<h5 id="pointers-references-and-marker-types">Pointers, references and marker types</h5>
-<div class="paragraph"><p>Functors that are enqueued cannot have any reference and pointer fields, nor can have fields of marker types.
-If object containing such fields is enqueued the behavior is undefined.</p></div>
-<div class="paragraph"><p>The same restrictions apply to <em>capture-list</em> variables in lambda.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">This requirements are caused by the fact that kernel may be enqueued after parent kernel terminated all pointers and references will be invalidated by then.</td>
-</tr></table>
-</div>
-</div>
-<div class="sect4">
-<h5 id="events">Events</h5>
-<div class="paragraph"><p>Events can be used to identify commands enqueued to a command-queue from the host.
-These events created by the OpenCL runtime can only be used on the host i.e. as events passed in <span class="monospaced">event_wait_list</span> argument to various <span class="monospaced">clEnqueue</span>* APIs or runtime APIs that take events as arguments such as <span class="monospaced">clRetainEvent</span>, <span class="monospaced">clReleaseEvent</span>, <span class="monospaced">clGetEventProfilingInfo</span>.</p></div>
-<div class="paragraph"><p>Similarly, events can be used to identify commands enqueued to a device queue (from a kernel).
-These event objects cannot be passed to the host or used by OpenCL runtime APIs such as the <span class="monospaced">clEnqueue</span>* APIs or runtime APIs that take event arguments.</p></div>
-<div class="paragraph"><p><span class="monospaced">clRetainEvent</span> and <span class="monospaced">clReleaseEvent</span> will return <span class="monospaced">CL_INVALID_OPERATION</span> if event specified is an event that refers to any kernel enqueued to a device queue using <span class="monospaced">enqueue_kernel</span> or <span class="monospaced">enqueue_marker</span> or is a user event created by <span class="monospaced">make_user_event</span>.</p></div>
-<div class="paragraph"><p>Similarly, <span class="monospaced">clSetUserEventStatus</span> can only be used to set the execution status of events created using <span class="monospaced">clCreateUserEvent</span>.
-User events created on the device can be set using <span class="monospaced">event::set_status</span> method.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="restrictions-6">3.13.13. Restrictions</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-The <span class="monospaced">device_queue</span> type cannot be used with variables declared inside a class or union field, a pointer type, an array, global variables declared at program scope or the return type of a function.
-</p>
-</li>
-<li>
-<p>
-The <span class="monospaced">event</span> type cannot be used with variables declared inside a class or union field, global variables declared at program scope or the return type of a function.
-</p>
-</li>
-<li>
-<p>
-The <span class="monospaced">event</span> and <span class="monospaced">device_queue</span> type cannot be used with the <span class="monospaced">global</span>, <span class="monospaced">local</span>, <span class="monospaced">priv</span> and <span class="monospaced">constant</span> address space storage classes (<em><a href="#explicit-address-space-storage-classes">Explicit address space storage classes</a> section</em>).
-</p>
-</li>
-<li>
-<p>
-The values returned by applying the <span class="monospaced">sizeof</span> operator to the <span class="monospaced">device_queue</span> and <span class="monospaced">event</span> types is implementation-defined.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="examples-7">3.13.14. Examples</h4>
-<div class="sect4">
-<h5 id="example-1-7">Example 1</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_device_queue&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> q <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_default_device_queue</span></span><span style="color: #990000">();</span>
-    q<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">enqueue_kernel</span></span><span style="color: #990000">(</span>enqueue_policy<span style="color: #990000">::</span>no_wait<span style="color: #990000">,</span>
-                     <span style="font-weight: bold"><span style="color: #000000">ndrange</span></span><span style="color: #990000">(</span> <span style="color: #993399">1</span> <span style="color: #990000">),</span>
-                     <span style="color: #990000">[]()</span><span style="color: #FF0000">{</span> <span style="color: #008080">uint</span> tid <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">);</span> <span style="color: #FF0000">}</span> <span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-2-5">Example 2</h5>
-<div class="paragraph"><p>Example of using the explicit local pointer class with <span class="monospaced">enqueue_kernel</span> method.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_device_queue&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #008080">device_queue</span> q<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> lambda <span style="color: #990000">=</span> <span style="color: #990000">[](</span><span style="color: #008080">local_ptr&lt;ushort16&gt;</span> p<span style="color: #990000">)</span> <span style="color: #FF0000">{</span> <span style="color: #008080">uint</span> tid <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">);</span> <span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-    q<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">enqueue_kernel</span></span><span style="color: #990000">(</span>enqueue_policy<span style="color: #990000">::</span>no_wait<span style="color: #990000">,</span>
-                     ndrange<span style="color: #FF0000">{</span><span style="color: #993399">1</span><span style="color: #FF0000">}</span><span style="color: #990000">,</span>
-                     lambda<span style="color: #990000">,</span>
-                     local_ptr<span style="color: #990000">&lt;</span>ushort16<span style="color: #990000">&gt;::</span>size_type<span style="color: #FF0000">{</span><span style="color: #993399">1</span><span style="color: #FF0000">}</span><span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="example-3-4">Example 3</h5>
-<div class="paragraph"><p>Example of enqueuing a functor to a <span class="monospaced">device_queue</span> object.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_device_queue&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">Lambda</span> <span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="color: #990000">()(</span><span style="color: #008080">T</span> t<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #FF0000">{</span> <span style="color: #008080">uint</span> tid <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">);</span> <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #008080">device_queue</span> q<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">auto</span></span> lambda <span style="color: #990000">=</span> Lambda<span style="color: #FF0000">{}</span><span style="color: #990000">;</span>
-    q<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">enqueue_kernel</span></span><span style="color: #990000">(</span>enqueue_policy<span style="color: #990000">::</span>no_wait<span style="color: #990000">,</span>
-                     ndrange<span style="color: #FF0000">{</span><span style="color: #993399">1</span><span style="color: #FF0000">}</span><span style="color: #990000">,</span>
-                     lambda<span style="color: #990000">,</span>
-                     local_ptr<span style="color: #990000">&lt;</span>ushort16<span style="color: #990000">&gt;::</span>size_type<span style="color: #FF0000">{</span><span style="color: #993399">1</span><span style="color: #FF0000">}</span><span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="work-item-functions">3.14. Work-Item Functions</h3>
-<div class="paragraph"><p>This section describes the library of work-item functions that can be used to query the number of dimensions, the global and local work size specified to <span class="monospaced">clEnqueueNDRangeKernel</span>, and the global and local identifier of each work-item when this kernel is being executed on a device.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_work_item-synopsis">3.14.1. Header &lt;opencl_work_item&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">get_work_dim</span></span><span style="color: #990000">();</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_global_size</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">);</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">);</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_local_size</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">);</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_enqueued_local_size</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">);</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">);</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_num_groups</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">);</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_group_id</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">);</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_global_offset</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">);</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_global_linear_id</span></span><span style="color: #990000">();</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_local_linear_id</span></span><span style="color: #990000">();</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_sub_group_size</span></span><span style="color: #990000">();</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_max_sub_group_size</span></span><span style="color: #990000">();</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_num_sub_groups</span></span><span style="color: #990000">();</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_enqueued_num_sub_groups</span></span><span style="color: #990000">();</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_sub_group_id</span></span><span style="color: #990000">();</span>
-<span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_sub_group_local_id</span></span><span style="color: #990000">();</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="work-item-operations">3.14.2. Work item operations</h4>
-<div class="sect4">
-<h5 id="get_work_dim">get_work_dim</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">get_work_dim</span></span><span style="color: #990000">()</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the number of dimensions in use.
-This is the value given to the <span class="monospaced">work_dim</span> argument specified in <span class="monospaced">clEnqueueNDRangeKernel</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_global_size">get_global_size</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_global_size</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the number of global work-items specified for dimension identified by <span class="monospaced">dimindx</span>.
-This value is given by the <span class="monospaced">global_work_size</span> argument to <span class="monospaced">clEnqueueNDRangeKernel</span>.
-Valid values of dimindx are <span class="monospaced">0</span> to <span class="monospaced">get_work_dim()-1</span>.
-For other values of <span class="monospaced">dimindx</span>, <span class="monospaced">get_global_size()</span> returns <span class="monospaced">1</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_global_id">get_global_id</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_global_id</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the unique global work-item ID value for dimension identified by <span class="monospaced">dimindx</span>.
-The global work-item ID specifies the work-item ID based on the number of global work-items specified to execute the kernel.
-Valid values of <span class="monospaced">dimindx</span> are <span class="monospaced">0</span> to <span class="monospaced">get_work_dim()-1</span>.
-For other values of <span class="monospaced">dimindx</span>, <span class="monospaced">get_global_id()</span> returns <span class="monospaced">0</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_local_size">get_local_size</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_local_size</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the number of local work-items specified in dimension identified by <span class="monospaced">dimindx</span>.
-This value is at most the value given by the <span class="monospaced">local_work_size</span> argument to <span class="monospaced">clEnqueueNDRangeKernel</span> if <span class="monospaced">local_work_size</span> is not <span class="monospaced">NULL</span>; otherwise the OpenCL implementation chooses an appropriate <span class="monospaced">local_work_size</span> value which is returned by this function.
-If the kernel is executed with a non-uniform work-group size <a href="#ftn19">[19</a>], calls to this built-in from some work-groups may return different values than calls to this built-in from other work-groups.</p></div>
-<div class="paragraph"><p>Valid values of <span class="monospaced">dimindx</span> are <span class="monospaced">0</span> to <span class="monospaced">get_work_dim()-1</span>.
-For other values of <span class="monospaced">dimindx</span>, <span class="monospaced">get_local_size()</span> returns <span class="monospaced">1</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_enqueued_local_size">get_enqueued_local_size</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_enqueued_local_size</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the same value as that returned by <span class="monospaced">get_local_size(dimindx)</span> if the kernel is executed with a uniform work-group size.</p></div>
-<div class="paragraph"><p>If the kernel is executed with a non-uniform work-group size, returns the number of local work-items in each of the work-groups that make up the uniform region of the global range in the dimension identified by <span class="monospaced">dimindx</span>.
-If the <span class="monospaced">local_work_size</span> argument to <span class="monospaced">clEnqueueNDRangeKernel</span> is not <span class="monospaced">NULL</span>, this value will match the value specified in <span class="monospaced">local_work_size[dimindx]</span>.
-If <span class="monospaced">local_work_size</span> is <span class="monospaced">NULL</span>, this value will match the local size that the implementation determined would be most efficient at implementing the uniform region of the global range.</p></div>
-<div class="paragraph"><p>Valid values of <span class="monospaced">dimindx</span> are <span class="monospaced">0</span> to <span class="monospaced">get_work_dim()-1</span>.
-For other values of <span class="monospaced">dimindx</span>, <span class="monospaced">get_enqueued_local_size()</span> returns <span class="monospaced">1</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_local_id">get_local_id</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the unique local work-item ID i.e. a work-item within a specific work-group for dimension identified by <span class="monospaced">dimindx</span>.
-Valid values of <span class="monospaced">dimindx</span> are <span class="monospaced">0</span> to <span class="monospaced">get_work_dim()-1</span>.
-For other values of <span class="monospaced">dimindx</span>, <span class="monospaced">get_local_id()</span> returns <span class="monospaced">0</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_num_groups">get_num_groups</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_num_groups</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the number of work-groups that will execute a kernel for dimension identified by <span class="monospaced">dimindx</span>.
-Valid values of <span class="monospaced">dimindx</span> are <span class="monospaced">0</span> to <span class="monospaced">get_work_dim()-1</span>.
-For other values of <span class="monospaced">dimindx</span>, <span class="monospaced">get_num_groups()</span> returns <span class="monospaced">1</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_group_id">get_group_id</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_group_id</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p><span class="monospaced">get_group_id</span> returns the work-group ID which is a number from <span class="monospaced">0 &#8230; get_num_groups(dimindx)-1</span>.
-Valid values of <span class="monospaced">dimindx</span> are <span class="monospaced">0</span> to <span class="monospaced">get_work_dim()-1</span>.
-For other values, <span class="monospaced">get_group_id()</span> returns <span class="monospaced">0</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_global_offset">get_global_offset</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_global_offset</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> dimindx<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p><span class="monospaced">get_global_offset</span> returns the offset values specified in <span class="monospaced">global_work_offset</span> argument to <span class="monospaced">clEnqueueNDRangeKernel</span>.
-Valid values of <span class="monospaced">dimindx</span> are <span class="monospaced">0</span> to <span class="monospaced">get_work_dim()-1</span>.
-For other values, <span class="monospaced">get_global_offset()</span> returns <span class="monospaced">0</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_global_linear_id">get_global_linear_id</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_global_linear_id</span></span><span style="color: #990000">()</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the work-items 1-dimensional global ID.</p></div>
-<div class="paragraph"><p>For 1D work-groups, it is computed as:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">get_global_id(0) - get_global_offset(0)</span>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For 2D work-groups, it is computed as:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">( get_global_id(1) - get_global_offset(1)) * get_global_size(0) + (get_global_id(0) - get_global_offset(0) )</span>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For 3D work-groups, it is computed as:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">( (get_global_id(2) - get_global_offset(2) ) * get_global_size(1) * get_global_size(0)) + ( (get_global_id(1) - get_global_offset(1) ) * get_global_size (0) ) + ( get_global_id(0) - get_global_offset(0) )</span>.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="get_local_linear_id">get_local_linear_id</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_local_linear_id</span></span><span style="color: #990000">()</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the work-items 1-dimensional local ID.</p></div>
-<div class="paragraph"><p>For 1D work-groups, it is the same value as:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">get_local_id(0)</span>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For 2D work-groups, it is computed as:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">get_local_id(1) * get_local_size(0) + get_local_id(0)</span>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For 3D work-groups, it is computed as:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">(get_local_id(2) * get_local_size(1) * get_local_size(0)) + (get_local_id(1) * get_local_size(0)) + get_local_id(0)</span>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="get_sub_group_size">get_sub_group_size</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_sub_group_size</span></span><span style="color: #990000">()</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the number of work-items in the sub-group.
-This value is no more than the maximum sub-group size and is implementation-defined based on a combination of the compiled kernel and the dispatch dimensions.
-This will be a constant value for the lifetime of the sub-group.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_max_sub_group_size">get_max_sub_group_size</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_max_sub_group_size</span></span><span style="color: #990000">()</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the maximum size of a sub-group within the dispatch.
-This value will be invariant for a given set of dispatch dimensions and a kernel object compiled for a given device.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_num_sub_groups">get_num_sub_groups</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_num_sub_groups</span></span><span style="color: #990000">()</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the number of sub-groups that the current work-group is divided into.</p></div>
-<div class="paragraph"><p>This number will be constant for the duration of a work-group&#8217;s execution.
-If the kernel is executed with a non-uniform work-group size <a href="#ftn17">[17</a>] values for any dimension, calls to this built-in from some work-groups may return different values than calls to this built-in from other work-groups.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_enqueued_num_sub_groups">get_enqueued_num_sub_groups</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_enqueued_num_sub_groups</span></span><span style="color: #990000">()</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the same value as that returned by <span class="monospaced">get_num_sub_groups()</span> if the kernel is executed with a uniform work-group size.</p></div>
-<div class="paragraph"><p>If the kernel is executed with a non-uniform work-group size, returns the number of sub groups in each of the work groups that make up the uniform region of the global range.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_sub_group_id">get_sub_group_id</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_sub_group_id</span></span><span style="color: #990000">()</span></tt></pre></div></div>
-<div class="paragraph"><p><span class="monospaced">get_sub_group_id()</span> returns the sub-group ID which is a number from <span class="monospaced">0 &#8230; get_num_sub_groups()-1</span>.</p></div>
-<div class="paragraph"><p>For <span class="monospaced">clEnqueueTask</span>, this returns <span class="monospaced">0</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="get_sub_group_local_id">get_sub_group_local_id</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_sub_group_local_id</span></span><span style="color: #990000">()</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the unique work-item ID within the current sub-group.
-The mapping from <span class="monospaced">get_local_id(dimindx)</span> to <span class="monospaced">get_sub_group_local_id()</span> will be invariant for the lifetime of the work-group.</p></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="work-group-functions">3.15. Work-group Functions</h3>
-<div class="paragraph"><p>The OpenCL C++ library implements the following functions that operate on a work-group level.
-These built-in functions must be encountered by all work-items in a work-group executing the kernel.</p></div>
-<div class="paragraph"><p>Here <span class="monospaced">gentype</span> matches: <span class="monospaced">int</span>, <span class="monospaced">uint</span>, <span class="monospaced">long</span>, <span class="monospaced">ulong</span>, <span class="monospaced">float</span>, <span class="monospaced">half</span> <a href="#ftn4">[4</a>] or <span class="monospaced">double</span> <a href="#ftn18">[18</a>].</p></div>
-<div class="sect3">
-<h4 id="header-opencl_work_group-synopsis">3.15.1. Header &lt;opencl_work_group&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">work_group_op</span> <span style="color: #FF0000">{</span> add<span style="color: #990000">,</span> min<span style="color: #990000">,</span> max <span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//logical operations</span></span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">work_group_all</span></span><span style="color: #990000">(</span><span style="color: #009900">bool</span> predicate<span style="color: #990000">);</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">work_group_any</span></span><span style="color: #990000">(</span><span style="color: #009900">bool</span> predicate<span style="color: #990000">);</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_all</span></span><span style="color: #990000">(</span><span style="color: #009900">bool</span> predicate<span style="color: #990000">);</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_any</span></span><span style="color: #990000">(</span><span style="color: #009900">bool</span> predicate<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//broadcast functions</span></span>
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id<span style="color: #990000">);</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id<span style="color: #990000">);</span>
-<span style="color: #009900">long</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">long</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id<span style="color: #990000">);</span>
-<span style="color: #008080">ulong</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">ulong</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">);</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">);</span>
-<span style="color: #009900">long</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">long</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">);</span>
-<span style="color: #008080">ulong</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">ulong</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">,</span>
-                         <span style="color: #008080">size_t</span> local_id_z<span style="color: #990000">);</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">,</span>
-                          <span style="color: #008080">size_t</span> local_id_z<span style="color: #990000">);</span>
-<span style="color: #009900">long</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">long</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">,</span>
-                          <span style="color: #008080">size_t</span> local_id_z<span style="color: #990000">);</span>
-<span style="color: #008080">ulong</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">ulong</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">,</span>
-                           <span style="color: #008080">size_t</span> local_id_z<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">,</span>
-                           <span style="color: #008080">size_t</span> local_id_z<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">,</span>
-                          <span style="color: #008080">size_t</span> local_id_z<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">,</span>
-                            <span style="color: #008080">size_t</span> local_id_z<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> sub_group_local_id<span style="color: #990000">);</span>
-<span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> sub_group_local_id<span style="color: #990000">);</span>
-<span style="color: #009900">long</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">long</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> sub_group_local_id<span style="color: #990000">);</span>
-<span style="color: #008080">ulong</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">ulong</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> sub_group_local_id<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> sub_group_local_id<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> sub_group_local_id<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> a<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> sub_group_local_id<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//numeric operations</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">work_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">work_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">long</span> <span style="font-weight: bold"><span style="color: #000000">work_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #009900">long</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">ulong</span> <span style="font-weight: bold"><span style="color: #000000">work_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #008080">ulong</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">work_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">work_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">work_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">long</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">long</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">ulong</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">ulong</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">long</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">long</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">ulong</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">ulong</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">long</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #009900">long</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">ulong</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #008080">ulong</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">long</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">long</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">ulong</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">ulong</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">uint</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">long</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">long</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">ulong</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">ulong</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span> <span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> x<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="logical-operations">3.15.2. Logical operations</h4>
-<div class="sect4">
-<h5 id="work_group_all">work_group_all</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">work_group_all</span></span><span style="color: #990000">(</span><span style="color: #009900">bool</span> predicate<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Evaluates <span class="monospaced">predicate</span> for all work-items in the work-group and returns <span class="monospaced">true</span> if <span class="monospaced">predicate</span> evaluates to <span class="monospaced">true</span> for all work-items in the work-group.</p></div>
-</div>
-<div class="sect4">
-<h5 id="work_group_any">work_group_any</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">work_group_any</span></span><span style="color: #990000">(</span><span style="color: #009900">bool</span> predicate<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Evaluates <span class="monospaced">predicate</span> for all work-items in the work-group and returns <span class="monospaced">true</span> if <span class="monospaced">predicate</span> evaluates to <span class="monospaced">true</span> for any work-items in the work-group.</p></div>
-</div>
-<div class="sect4">
-<h5 id="sub_group_all">sub_group_all</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_all</span></span><span style="color: #990000">(</span><span style="color: #009900">bool</span> predicate<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Evaluates <span class="monospaced">predicate</span> for all work-items in the sub-group and returns <span class="monospaced">true</span> value if <span class="monospaced">predicate</span> evaluates to <span class="monospaced">true</span> for all work-items in the sub-group.</p></div>
-</div>
-<div class="sect4">
-<h5 id="sub_group_any">sub_group_any</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_any</span></span><span style="color: #990000">(</span><span style="color: #009900">bool</span> predicate<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Evaluates <span class="monospaced">predicate</span> for all work-items in the sub-group and returns <span class="monospaced">true</span> value if <span class="monospaced">predicate</span> evaluates to <span class="monospaced">true</span> for any work-items in the sub-group.</p></div>
-<div class="paragraph"><p>Example:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_group&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> <span style="color: #990000">*</span>p<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    <span style="color: #009900">bool</span> check <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">work_group_all</span></span><span style="color: #990000">(</span>p<span style="color: #990000">[</span><span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">)]</span> <span style="color: #990000">==</span> <span style="color: #993399">0</span><span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>In this case <span class="monospaced">work_group_all</span> would return <span class="monospaced">true</span> for all work-items in work-group if all elements in <span class="monospaced">p</span>, in range specified by work-group&#8217;s size, are <span class="monospaced">true</span>.</p></div>
-<div class="paragraph"><p>One could achieve similar result by using analogical call to <span class="monospaced">work_group_any</span>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_group&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> <span style="color: #990000">*</span>p<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    <span style="color: #009900">bool</span> check <span style="color: #990000">=</span> <span style="color: #990000">!</span><span style="font-weight: bold"><span style="color: #000000">work_group_any</span></span><span style="color: #990000">(</span>p<span style="color: #990000">[</span><span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">)]</span> <span style="color: #990000">!=</span> <span style="color: #993399">0</span><span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="broadcast-functions">3.15.3. Broadcast functions</h4>
-<div class="sect4">
-<h5 id="work_group_broadcast">work_group_broadcast</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span>
-                             <span style="color: #008080">size_t</span> local_id<span style="color: #990000">);</span>
-
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span>
-                             <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span>
-                             <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">);</span>
-
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span>
-                                             <span style="color: #008080">size_t</span> local_id_x<span style="color: #990000">,</span>
-                                             <span style="color: #008080">size_t</span> local_id_y<span style="color: #990000">,</span>
-                                             <span style="color: #008080">size_t</span> local_id_z<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Broadcast the value of <span class="monospaced">a</span> for work-item identified by <span class="monospaced">local_id</span> to all work-items in the work-group.</p></div>
-<div class="paragraph"><p><span class="monospaced">local_id</span> must be the same value for all work-items in the work-group.</p></div>
-</div>
-<div class="sect4">
-<h5 id="sub_group_broadcast">sub_group_broadcast</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_broadcast</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span>
-                                            <span style="color: #008080">size_t</span> sub_group_local_id<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Broadcast the value of <span class="monospaced">a</span> for work-item identified by <span class="monospaced">sub_group_local_id</span> (value returned by <span class="monospaced">get_sub_group_local_id</span>) to all work-items in the sub-group.</p></div>
-<div class="paragraph"><p><span class="monospaced">sub_group_local_id</span> must be the same value for all work-items in the sub-group.</p></div>
-<div class="paragraph"><p>Example:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_group&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> <span style="color: #990000">*</span>p<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-   <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-   <span style="color: #009900">int</span> broadcasted_value <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span>p<span style="color: #990000">[</span><span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">)],</span> <span style="color: #993399">0</span><span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>Here we are broadcasting value passed to <span class="monospaced">work_group_broadcast</span> function by work-item with <span class="monospaced">local_id = 0</span> (which is <span class="monospaced">p[0]</span>).
-This function will return <span class="monospaced">p[0]</span> for all callers.
-Please note that <span class="monospaced">local_id</span> must be the same for all work-items, therefore something like this is invalid:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_group&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> <span style="color: #990000">*</span>p<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//...</span></span>
-    <span style="color: #009900">int</span> broadcasted_value <span style="color: #990000">=</span>
-      <span style="font-weight: bold"><span style="color: #000000">work_group_broadcast</span></span><span style="color: #990000">(</span>p<span style="color: #990000">[</span><span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">)],</span> <span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">));</span>
-                    <span style="font-style: italic"><span style="color: #9A1900">//invalid: second argument has different value</span></span>
-                    <span style="font-style: italic"><span style="color: #9A1900">// for different work-items in work-group</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="numeric-operations">3.15.4. Numeric operations</h4>
-<div class="sect4">
-<h5 id="work_group_reduce">work_group_reduce</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">work_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Return result of reduction operation specified by <span class="monospaced">op</span> for all values of <span class="monospaced">x</span> specified by work-items in a work-group.</p></div>
-</div>
-<div class="sect4">
-<h5 id="work_group_scan_exclusive">work_group_scan_exclusive</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Do an exclusive scan operation specified by <span class="monospaced">op</span> of all values specified by work-items in the work-group.
-The scan results are returned for each work-item.</p></div>
-<div class="paragraph"><p>The scan order is defined by increasing 1D linear global ID within the work-group.</p></div>
-</div>
-<div class="sect4">
-<h5 id="work_group_scan_inclusive">work_group_scan_inclusive</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">work_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Do an inclusive scan operation specified by <span class="monospaced">op</span> of all values specified by work-items in the work-group.
-The scan results are returned for each work-item.</p></div>
-<div class="paragraph"><p>The scan order is defined by increasing 1D linear global ID within the work-group.</p></div>
-</div>
-<div class="sect4">
-<h5 id="sub_group_reduce">sub_group_reduce</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_reduce</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Return result of reduction operation specified by <span class="monospaced">op</span> for all values of <span class="monospaced">x</span> specified by work-items in a sub-group.</p></div>
-</div>
-<div class="sect4">
-<h5 id="sub_group_scan_exclusive">sub_group_scan_exclusive</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_exclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Do an exclusive scan operation specified by <span class="monospaced">op</span> of all values specified by work-items in a sub-group.
-The scan results are returned for each work-item.</p></div>
-<div class="paragraph"><p>The scan order is defined by increasing 1D linear global ID within the sub-group.</p></div>
-</div>
-<div class="sect4">
-<h5 id="sub_group_scan_inclusive">sub_group_scan_inclusive</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">work_group_op</span> op<span style="color: #990000">&gt;</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_scan_inclusive</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Do an inclusive scan operation specified by <span class="monospaced">op</span> of all values specified by work-items in a sub-group.
-The scan results are returned for each work-item.</p></div>
-<div class="paragraph"><p>The scan order is defined by increasing 1D linear global ID within the sub-group.</p></div>
-<div class="paragraph"><p>The inclusive scan operation takes a binary operator <span class="monospaced">op</span> with an identity I and n (where n is the size of the work-group) elements [a<sub>0</sub>, a<sub>1</sub>, &#8230; a<sub>n-1</sub>] and returns [a<sub>0</sub>, (a<sub>0</sub> <em>op</em> a<sub>1</sub>), &#8230; (a<sub>0</sub> <em>op</em> a<sub>1</sub> <em>op</em> &#8230; <em>op</em> a<sub>n-1</sub>)].
-If <span class="monospaced">op</span> is <span class="monospaced">work_group_op::add</span>, the identity I is 0.
-If <span class="monospaced">op</span> is <span class="monospaced">work_group_op::min</span>, the identity I is <span class="monospaced">INT_MAX</span>, <span class="monospaced">UINT_MAX</span>, <span class="monospaced">LONG_MAX</span>, <span class="monospaced">ULONG_MAX</span>, for <span class="monospaced">int</span>, <span class="monospaced">uint</span>, <span class="monospaced">long</span>, <span class="monospaced">ulong</span> types and is <span class="monospaced">+INF</span> for floating-point types.
-Similarly if <span class="monospaced">op</span> is <span class="monospaced">work_group_op::max</span>, the identity I is <span class="monospaced">INT_MIN</span>, <span class="monospaced">0</span>, <span class="monospaced">LONG_MIN</span>, <span class="monospaced">0</span> and <span class="monospaced">-INF</span>.</p></div>
-<div class="paragraph"><p>Consider the following example:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_group&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> <span style="color: #990000">*</span>p<span style="color: #990000">)</span>
-<span style="color: #FF0000">{</span>
-    …
-    <span style="color: #009900">int</span> prefix_sum_val <span style="color: #990000">=</span>
-                work_group_scan_inclusive<span style="color: #990000">&lt;</span>work_group_op<span style="color: #990000">::</span>add<span style="color: #990000">&gt;(</span>
-    p<span style="color: #990000">[</span><span style="font-weight: bold"><span style="color: #000000">get_local_id</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">)]);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>For the example above, let&#8217;s assume that the work-group size is 8 and p points to the following elements [3 1 7 0 4 1 6 3].
-Work-item 0 calls <span class="monospaced">work_group_scan_inclusive&lt;work_group_op::add&gt;</span> with 3 and returns 3.
-Work-item 1 calls <span class="monospaced">work_group_scan_inclusive&lt;work_group_op::add&gt;</span> with 1 and returns 4.
-The full set of values returned by <span class="monospaced">work_group_scan_inclusive&lt;work_group_op::add&gt;</span> for work-items 0 &#8230; 7 is [3 4 11 11 15 16 22 25].</p></div>
-<div class="paragraph"><p>The exclusive scan operation takes a binary associative operator <span class="monospaced">op</span> with an identity I and n (where n is the size of the work-group) elements [a<sub>0</sub>, a<sub>1</sub>, &#8230; a<sub>n-1</sub>] and returns [I, a<sub>0</sub>, (a<sub>0</sub> <em>op</em> a<sub>1</sub>), &#8230; (a<sub>0</sub> <em>op</em> a<sub>1</sub> <em>op</em> &#8230; <em>op</em> a<sub>n-2</sub>)].
-For the example above, the exclusive scan add operation on the ordered set [3 1 7 0 4 1 6 3] would return [0 3 4 11 11 15 16 22].</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">The order of floating-point operations is not guaranteed for the <span class="monospaced">work_group_reduce&lt;op&gt;</span>, <span class="monospaced">work_group_scan_inclusive&lt;op&gt;</span> and <span class="monospaced">work_group_scan_exclusive&lt;op&gt;</span> built-in functions that operate on <span class="monospaced">half</span>, <span class="monospaced">float</span> and <span class="monospaced">double</span> data types.
-The order of these floating-point operations is also non-deterministic for a given work-group.</td>
-</tr></table>
-</div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="synchronization-functions">3.16. Synchronization Functions</h3>
-<div class="paragraph"><p>The OpenCL C++ library implements the following synchronization functions.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_synchronization-synopsis">3.16.1. Header &lt;opencl_synchronization&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">work_group_barrier</span></span><span style="color: #990000">(</span><span style="color: #008080">mem_fence</span> flags<span style="color: #990000">,</span>
-                        <span style="color: #008080">memory_scope</span> scope <span style="color: #990000">=</span> memory_scope_work_group<span style="color: #990000">);</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_barrier</span></span><span style="color: #990000">(</span><span style="color: #008080">mem_fence</span> flags<span style="color: #990000">,</span>
-                       <span style="color: #008080">memory_scope</span> scope <span style="color: #990000">=</span> memory_scope_work_group<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_subgroup_named_barrier
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">work_group_named_barrier</span><span style="color: #990000">:</span> marker_type
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #000000">work_group_named_barrier</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> sub_group_count<span style="color: #990000">);</span>
-    <span style="font-weight: bold"><span style="color: #000000">work_group_named_barrier</span></span><span style="color: #990000">()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">work_group_named_barrier</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> work_group_named_barrier<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">work_group_named_barrier</span></span><span style="color: #990000">(</span>work_group_named_barrier<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-
-    work_group_named_barrier<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>
-                                      <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> work_group_named_barrier<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    work_group_named_barrier<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>work_group_named_barrier<span style="color: #990000">&amp;&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    work_group_named_barrier<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&amp;()</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">wait</span></span><span style="color: #990000">(</span><span style="color: #008080">mem_fence</span> flags<span style="color: #990000">,</span>
-              <span style="color: #008080">memory_scope</span> scope <span style="color: #990000">=</span> memory_scope_work_group<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="synchronization-operations">3.16.2. Synchronization operations</h4>
-<div class="sect4">
-<h5 id="work_group_barrier">work_group_barrier</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">work_group_barrier</span></span><span style="color: #990000">(</span><span style="color: #008080">mem_fence</span> flags<span style="color: #990000">,</span>
-                        <span style="color: #008080">memory_scope</span> scope  <span style="color: #990000">=</span> memory_scope_work_group<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>All work-items in a work-group executing the kernel on a processor must execute this function before any are allowed to continue execution beyond the <span class="monospaced">work_group_barrier</span>.
-This function must be encountered by all work-items in a work-group executing the kernel.
-These rules apply to ND-ranges implemented with uniform and non-uniform work-groups.</p></div>
-<div class="paragraph"><p>If <span class="monospaced">work_group_barrier</span> is inside a conditional statement, then all work-items must enter the conditional if any work-item enters the conditional statement and executes the <span class="monospaced">work_group_barrier</span>.</p></div>
-<div class="paragraph"><p>If <span class="monospaced">work_group_barrier</span> is inside a loop, all work-items must execute the <span class="monospaced">work_group_barrier</span> for each iteration of the loop before any are allowed to continue execution beyond the <span class="monospaced">work_group_barrier</span>.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">scope</span> argument specifies whether the memory accesses of work-items in the work-group to memory address space(s) identified by <span class="monospaced">flags</span> become visible to all work-items in the work-group, the device or all SVM devices.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">work_group_barrier</span> function can also be used to specify which memory operations i.e. to global memory, local memory or images become visible to the appropriate memory scope identified by <span class="monospaced">scope</span>.
-The <span class="monospaced">flags</span> argument specifies the memory address spaces.
-This is a bitfield and can be set to 0 or a combination of the following values ORed together.
-When these flags are ORed together the <span class="monospaced">work_group_barrier</span> acts as a combined barrier for all address spaces specified by the flags ordering memory accesses both within and across the specified address spaces.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">mem_fence::local</span> - The <span class="monospaced">work_group_barrier</span> function will ensure that all local memory accesses become visible to all work-items in the work-group.
-Note that the value of <span class="monospaced">scope</span> is ignored as the memory scope is always <span class="monospaced">memory_scope_work_group</span>.
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">mem_fence::global</span> - The <span class="monospaced">work_group_barrier</span> function ensure that all global memory accesses become visible to the appropriate scope as given by <span class="monospaced">scope</span>.
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">mem_fence::image</span> - The <span class="monospaced">work_group_barrier</span> function will ensure that all image memory accesses become visible to the appropriate scope as given by <span class="monospaced">scope</span>.
-The value of <span class="monospaced">scope</span> must be <span class="monospaced">memory_scope_work_group</span> or <span class="monospaced">memory_scope_device</span>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><span class="monospaced">mem_fence::image</span> cannot be used together with <span class="monospaced">mem_fence::local</span> or <span class="monospaced">mem_fence::global</span>.</p></div>
-<div class="paragraph"><p>The values of <span class="monospaced">flags</span> and <span class="monospaced">scope</span> must be the same for all work-items in the work-group.</p></div>
-</div>
-<div class="sect4">
-<h5 id="sub_group_barrier">sub_group_barrier</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">sub_group_barrier</span></span><span style="color: #990000">(</span><span style="color: #008080">mem_fence</span> flags<span style="color: #990000">,</span>
-                       <span style="color: #008080">memory_scope</span> scope <span style="color: #990000">=</span> memory_scope_work_group<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>All work-items in a sub-group executing the kernel on a processor must execute this function before any are allowed to continue execution beyond the sub-group barrier.
-This function must be encountered by all work-items in a sub-group executing the kernel.
-These rules apply to ND-ranges implemented with uniform and non-uniform work-groups.</p></div>
-<div class="paragraph"><p>If <span class="monospaced">sub_group_barrier</span> is inside a conditional statement, then all work-items within the sub-group must enter the conditional if any work-item in the sub-group enters the conditional statement and executes the <span class="monospaced">sub_group_barrier</span>.</p></div>
-<div class="paragraph"><p>If <span class="monospaced">sub_group_barrier</span> is inside a loop, all work-items within the sub-group must execute the <span class="monospaced">sub_group_barrier</span> for each iteration of the loop before any are allowed to continue execution beyond the <span class="monospaced">sub_group_barrier</span>.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">sub_group_barrier</span> function also queues a memory fence (reads and writes) to ensure correct ordering of memory operations to local or global memory.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">flags</span> argument specifies the memory address spaces.
-This is a bitfield and can be set to 0 or a combination of the following values ORed together.
-When these flags are ORed together the <span class="monospaced">sub_group_barrier</span> acts as a combined barrier for all address spaces specified by the flags ordering memory accesses both within and across the specified address spaces.</p></div>
-<div class="paragraph"><p><span class="monospaced">mem_fence::local</span> - The <span class="monospaced">sub_group_barrier</span> function will ensure that all local memory accesses become visible to all work-items in the sub-group.
-Note that the value of <span class="monospaced">scope</span> is ignored as the memory scope is always <span class="monospaced">memory_scope_work_group</span>.</p></div>
-<div class="paragraph"><p><span class="monospaced">mem_fence::global</span> - The <span class="monospaced">sub_group_barrier</span> function ensure that all global memory accesses become visible to the appropriate scope as given by <span class="monospaced">scope</span>.</p></div>
-<div class="paragraph"><p><span class="monospaced">mem_fence::image</span> - The <span class="monospaced">sub_group_barrier</span> function will ensure that all image memory accesses become visible to the appropriate scope as given by <span class="monospaced">scope</span>.
-The value of <span class="monospaced">scope</span> must be <span class="monospaced">memory_scope_work_group</span> or <span class="monospaced">memory_scope_device</span>.</p></div>
-<div class="paragraph"><p><span class="monospaced">mem_fence::image</span> cannot be used together with <span class="monospaced">mem_fence::local</span> or <span class="monospaced">mem_fence::global</span>.</p></div>
-<div class="paragraph"><p>The values of <span class="monospaced">flags</span> and <span class="monospaced">scope</span> must be the same for all work-items in the sub-group.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="named-barriers">3.16.3. Named barriers</h4>
-<div class="paragraph"><p>This section describes optional <em>cl_khr_sub_group_named_barrier</em> extension which exposes the ability to perform barrier synchronization on flexible portions of an execution domain.</p></div>
-<div class="paragraph"><p>If <em>cl_khr_sub_group_named_barrier</em>  is supported by a device, an application that wants to use it will need to define <span class="monospaced">cl_khr_sub_group_named_barrier</span> macro before including the OpenCL C++ standard library headers or using <em>-D</em> compiler option (<em><a href="#preprocessor_options">Preprocessor options</a> section</em>).</p></div>
-<div class="paragraph"><p>An implementation shall support at least 8 named barriers per work-group.
-The exact maximum number can be queried using <span class="monospaced">clGetDeviceInfo</span> with <span class="monospaced">CL_DEVICE_MAX_NAMED_BARRIER_COUNT_KHR</span> from the OpenCL 2.2 Extension Specification.</p></div>
-<div class="paragraph"><p>Restrictions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The <span class="monospaced">work_group_named_barrier</span> type cannot be used with variables declared inside a class or union field, a pointer type, an array, global variables declared at program scope or the return type of a function.
-</p>
-</li>
-<li>
-<p>
-The <span class="monospaced">work_group_named_barrier</span> type cannot be used with the <span class="monospaced">global</span>, <span class="monospaced">priv</span> and <span class="monospaced">constant</span> address space storage classes (<em><a href="#explicit-address-space-storage-classes">Explicit address space storage classes</a> section</em>).
-</p>
-</li>
-<li>
-<p>
-The value returned by applying the <span class="monospaced">sizeof</span> operator to the <span class="monospaced">work_group_named_barrier</span> type is implementation-defined.
-</p>
-</li>
-</ul></div>
-<div class="sect4">
-<h5 id="work_group_named_barrier">work_group_named_barrier</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000000">work_group_named_barrier</span></span><span style="color: #990000">(</span><span style="color: #008080">uint</span> sub_group_count<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Initialize a new named barrier object to synchronize <span class="monospaced">sub_group_count</span> sub-groups in the current work-group.
-Construction of a named-barrier object is a work-group operation and hence must be called uniformly across the work-group.
-<span class="monospaced">sub_group_count</span> must be uniform across the work-group.</p></div>
-<div class="paragraph"><p>Named barrier objects can be reconstructed and assigned to underlying entities by the compiler, or reused.
-Reused barriers will always be the same size and act in phases such that when each participating sub-group has waited the wait count is set to 0 and the entire process can start again.
-The internal wait count will cycle through the range from <span class="monospaced">0</span> to <span class="monospaced">sub_group_count</span> in each phase of use of the barrier.</p></div>
-<div class="paragraph"><p>Named barrier objects can only be constructed within kernels, not within arbitrary functions.</p></div>
-</div>
-<div class="sect4">
-<h5 id="wait">wait</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">wait</span></span><span style="color: #990000">(</span><span style="color: #008080">mem_fence</span> flags<span style="color: #990000">,</span>
-          <span style="color: #008080">memory_scope</span> scope <span style="color: #990000">=</span> memory_scope_work_group<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>All work-items in a sub-group executing the kernel on a processor must execute this method before any are allowed to continue execution beyond the barrier.
-This function must be encountered by all work-items in a sub-group executing the kernel.</p></div>
-<div class="paragraph"><p>These rules apply to ND-ranges implemented with uniform and non-uniform work-groups.</p></div>
-<div class="paragraph"><p>If <span class="monospaced">wait</span> is called inside a conditional statement, then all work-items within the sub-group must enter the conditional if any work-item in the sub-group enters the conditional statement and executes the call to wait.</p></div>
-<div class="paragraph"><p>If <span class="monospaced">wait</span> is called inside a loop, all work-items within the sub-group must execute the wait operation for each iteration of the loop before any are allowed to continue execution beyond the call to wait.
-The wait function causes the entire sub-group to wait until <span class="monospaced">sub_group_count</span> sub-groups have waited on the named barrier, where <span class="monospaced">sub_group_count</span> is the initialization value passed to the call to the constructor of the named barrier.
-Once the wait count equals <span class="monospaced">sub_group_count</span>, any sub-groups waiting at the named barrier will be released and the barrier&#8217;s wait count reset to 0.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">flags</span> argument specifies the memory address spaces.
-This is a bitfield and can be set to 0 or a combination of the following values ORed together.
-When these flags are ORed together the wait acts as a combined wait operation for all address spaces specified by the flags ordering memory accesses both within and across the specified address spaces.</p></div>
-<div class="paragraph"><p><span class="monospaced">mem_fence::local</span> - The wait function will ensure that all local memory accesses become visible to all work-items in the sub-group.
-Note that the value of <span class="monospaced">scope</span> is ignored as the memory scope is always <span class="monospaced">memory_scope_work_group</span>.</p></div>
-<div class="paragraph"><p><span class="monospaced">mem_fence::global</span> - The wait function ensure that all global memory accesses become visible to the appropriate scope as given by <span class="monospaced">scope</span>.</p></div>
-<div class="paragraph"><p><span class="monospaced">mem_fence::image</span> cannot be specified as a flag for this function.</p></div>
-<div class="paragraph"><p>The values of <span class="monospaced">flags</span> and <span class="monospaced">scope</span> must be the same for all work-items in the sub-group.</p></div>
-<div class="paragraph"><p>The below example shows how to use the named barriers:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_synchronization&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_work_item&gt;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">aFunction</span></span><span style="color: #990000">(</span><span style="color: #008080">work_group_named_barrier</span> <span style="color: #990000">&amp;</span>b<span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">while</span></span><span style="color: #990000">(...)</span> <span style="color: #FF0000">{</span>
-        <span style="font-style: italic"><span style="color: #9A1900">// Do something in first set</span></span>
-        b<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">wait</span></span><span style="color: #990000">(</span>mem_fence<span style="color: #990000">::</span>global<span style="color: #990000">);</span>
-    <span style="color: #FF0000">}</span>
-<span style="color: #FF0000">}</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">aKernel</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="font-style: italic"><span style="color: #9A1900">// Initialize a set of named barriers</span></span>
-    <span style="color: #008080">local&lt;work_group_named_barrier&gt;</span> <span style="font-weight: bold"><span style="color: #000000">a</span></span><span style="color: #990000">(</span><span style="color: #993399">4</span><span style="color: #990000">);</span>
-    <span style="color: #008080">local&lt;work_group_named_barrier&gt;</span> <span style="font-weight: bold"><span style="color: #000000">b</span></span><span style="color: #990000">(</span><span style="color: #993399">2</span><span style="color: #990000">);</span>
-    <span style="color: #008080">local&lt;work_group_named_barrier&gt;</span> <span style="font-weight: bold"><span style="color: #000000">c</span></span><span style="color: #990000">(</span><span style="color: #993399">2</span><span style="color: #990000">);</span>
-
-    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">get_sub_group_id</span></span><span style="color: #990000">()</span> <span style="color: #990000">&lt;</span> <span style="color: #993399">4</span><span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-        a<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">wait</span></span><span style="color: #990000">(</span>mem_fence<span style="color: #990000">::</span>local<span style="color: #990000">);</span>
-        <span style="font-weight: bold"><span style="color: #0000FF">if</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">get_sub_group_id</span></span><span style="color: #990000">()</span> <span style="color: #990000">&lt;</span> <span style="color: #993399">2</span><span style="color: #990000">)</span> <span style="color: #FF0000">{</span>
-            <span style="font-style: italic"><span style="color: #9A1900">// Pass one of the named barriers to a function by reference</span></span>
-            <span style="font-style: italic"><span style="color: #9A1900">// Barrier cannot be constructed in a non-kernel function</span></span>
-            <span style="font-weight: bold"><span style="color: #000000">aFunction</span></span><span style="color: #990000">(</span>b<span style="color: #990000">);</span>
-        <span style="color: #FF0000">}</span> <span style="font-weight: bold"><span style="color: #0000FF">else</span></span> <span style="color: #FF0000">{</span>
-            <span style="font-style: italic"><span style="color: #9A1900">// Do something else</span></span>
-            c<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">wait</span></span><span style="color: #990000">(</span>mem_fence<span style="color: #990000">::</span>local<span style="color: #990000">);</span>
-            <span style="font-style: italic"><span style="color: #9A1900">// Continue</span></span>
-        <span style="color: #FF0000">}</span>
-
-        <span style="font-style: italic"><span style="color: #9A1900">// Wait a second time on the first barrier</span></span>
-        a<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">wait</span></span><span style="color: #990000">(</span>mem_fence<span style="color: #990000">::</span>global<span style="color: #990000">);</span>
-    <span style="color: #FF0000">}</span>
-
-
-    <span style="font-style: italic"><span style="color: #9A1900">// Back to work-group uniform control flow,</span></span>
-    <span style="font-style: italic"><span style="color: #9A1900">// we can synchronize the entire group if necessary</span></span>
-    <span style="font-weight: bold"><span style="color: #000000">work_group_barrier</span></span><span style="color: #990000">(</span>mem_fence<span style="color: #990000">::</span>global<span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="common-functions">3.17. Common Functions</h3>
-<div class="paragraph"><p>This section describes the OpenCL C++ library common functions that take scalar or vector arguments.
-Vector versions of common functions operate component-wise.
-Descriptions are always per-component.</p></div>
-<div class="paragraph"><p>The built-in common functions are implemented using the round to nearest even rounding mode.</p></div>
-<div class="paragraph"><p>Here <span class="monospaced">gentype</span> matches: <span class="monospaced">half</span><em>n</em> <a href="#ftn4">[4</a>], <span class="monospaced">float</span><em>n</em> or <span class="monospaced">double</span><em>n</em> <a href="#ftn18">[18</a>]</p></div>
-<div class="sect3">
-<h4 id="header-opencl_common-synopsis">3.17.1. Header &lt;opencl_common&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="color: #008080">halfn</span> <span style="font-weight: bold"><span style="color: #000000">clamp</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> x<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> min<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> max<span style="color: #990000">);</span>
-<span style="color: #008080">halfn</span> <span style="font-weight: bold"><span style="color: #000000">degrees</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">halfn</span> <span style="font-weight: bold"><span style="color: #000000">max</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> x<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">halfn</span> <span style="font-weight: bold"><span style="color: #000000">min</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> x<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">halfn</span> <span style="font-weight: bold"><span style="color: #000000">mix</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> x<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> y<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> a<span style="color: #990000">);</span>
-<span style="color: #008080">halfn</span> <span style="font-weight: bold"><span style="color: #000000">radians</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">halfn</span> <span style="font-weight: bold"><span style="color: #000000">step</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> edge<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">halfn</span> <span style="font-weight: bold"><span style="color: #000000">smoothstep</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> edge0<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> edge1<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">halfn</span> <span style="font-weight: bold"><span style="color: #000000">sign</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> t<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="color: #008080">doublen</span> <span style="font-weight: bold"><span style="color: #000000">clamp</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> x<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> min<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> max<span style="color: #990000">);</span>
-<span style="color: #008080">doublen</span> <span style="font-weight: bold"><span style="color: #000000">degrees</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">doublen</span> <span style="font-weight: bold"><span style="color: #000000">max</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> x<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">doublen</span> <span style="font-weight: bold"><span style="color: #000000">min</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> x<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">doublen</span> <span style="font-weight: bold"><span style="color: #000000">mix</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> x<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> y<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> a<span style="color: #990000">);</span>
-<span style="color: #008080">doublen</span> <span style="font-weight: bold"><span style="color: #000000">radians</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">doublen</span> <span style="font-weight: bold"><span style="color: #000000">step</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> edge<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">doublen</span> <span style="font-weight: bold"><span style="color: #000000">smoothstep</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> edge0<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> edge1<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">doublen</span> <span style="font-weight: bold"><span style="color: #000000">sign</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> t<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">clamp</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> min<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> max<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">degrees</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">max</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">min</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">mix</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> a<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">radians</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">step</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> edge<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">smoothstep</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> edge0<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> edge1<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">sign</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> t<span style="color: #990000">);</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="common-operations">3.17.2. Common operations</h4>
-<div class="sect4">
-<h5 id="clamp-1">clamp</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">clamp</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> minval<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> maxval<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">fmin(fmax(x, minval), maxval)</span>.</p></div>
-<div class="paragraph"><p>Results are undefined if <span class="monospaced">minval &gt; maxval</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="degrees">degrees</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">degrees</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> radians<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Converts radians to degrees, i.e. <span class="monospaced">(180 / π) * radians</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="max-1">max</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">max</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">y</span> if <span class="monospaced">x &lt; y</span>, otherwise it returns <span class="monospaced">x</span>.
-If <span class="monospaced">x</span> or <span class="monospaced">y</span> are <span class="monospaced">infinite</span> or <span class="monospaced">NaN</span>, the return values are undefined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="min-1">min</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">min</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">y</span> if <span class="monospaced">y &lt; x</span>, otherwise it returns <span class="monospaced">x</span>.
-If <span class="monospaced">x</span> or <span class="monospaced">y</span> are <span class="monospaced">infinite</span> or <span class="monospaced">NaN</span>, the return values are undefined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="mix">mix</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">mix</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> a<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the linear blend of <span class="monospaced">x</span> and <span class="monospaced">y</span> implemented as:</p></div>
-<div class="paragraph"><p><span class="monospaced">x + (y - x) * a</span></p></div>
-<div class="paragraph"><p><span class="monospaced">a</span> must be a value in the range 0.0 &#8230; 1.0.
-If <span class="monospaced">a</span> is not in the range 0.0 &#8230; 1.0, the return values are undefined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="radians">radians</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">radians</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> degrees<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Converts degrees to radians, i.e. <span class="monospaced">(π / 180) * degrees</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="step">step</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">step</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> edge<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">0.0</span> if <span class="monospaced">x &lt; edge</span>, otherwise it returns <span class="monospaced">1.0</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="smoothstep">smoothstep</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">smoothstep</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> edge0<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> edge1<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">0.0</span> if <span class="monospaced">x &lt;= edge0</span> and <span class="monospaced">1.0</span> if <span class="monospaced">x &gt;= edge1</span> and performs smooth Hermite interpolation between <span class="monospaced">0</span> and <span class="monospaced">1</span> when <span class="monospaced">edge0 &lt; x &lt; edge1</span>.
-This is useful in cases where you would want a threshold function with a smooth transition.</p></div>
-<div class="paragraph"><p>This is equivalent to:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> t<span style="color: #990000">;</span>
-t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">clamp</span></span><span style="color: #990000">((</span>x <span style="color: #990000">-</span> edge0<span style="color: #990000">)</span> <span style="color: #990000">/</span> <span style="color: #990000">(</span>edge1 <span style="color: #990000">-</span> edge0<span style="color: #990000">),</span> <span style="color: #993399">0</span><span style="color: #990000">,</span> <span style="color: #993399">1</span><span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">return</span></span> t <span style="color: #990000">*</span> t <span style="color: #990000">*</span> <span style="color: #990000">(</span><span style="color: #993399">3</span> <span style="color: #990000">-</span> <span style="color: #993399">2</span> <span style="color: #990000">*</span> t<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Results are undefined if <span class="monospaced">edge0 &gt;= edge1</span> or if <span class="monospaced">x</span>, <span class="monospaced">edge0</span> or <span class="monospaced">edge1</span> is a <span class="monospaced">NaN</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="sign">sign</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sign</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">1.0</span> if <span class="monospaced">x &gt; 0</span>, <span class="monospaced">-0.0</span> if <span class="monospaced">x = -0.0</span>, <span class="monospaced">+0.0</span> if <span class="monospaced">x = +0.0</span>, or <span class="monospaced">-1.0</span> if <span class="monospaced">x &lt; 0</span>.
-Returns <span class="monospaced">0.0</span> if <span class="monospaced">x</span> is a <span class="monospaced">NaN</span>.</p></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="geometric-functions">3.18. Geometric Functions</h3>
-<div class="paragraph"><p>This section describes the OpenCL C++ library geometric functions that take scalar or vector arguments.
-Vector versions of geometric functions operate component-wise.
-Descriptions are always per-component.
-The geometric functions are implemented using the round to nearest even rounding mode.</p></div>
-<div class="paragraph"><p><span class="monospaced">float</span><em>n</em> is <span class="monospaced">float</span>, <span class="monospaced">float2</span>, <span class="monospaced">float3</span> or <span class="monospaced">float4</span>.</p></div>
-<div class="paragraph"><p><span class="monospaced">half</span><em>n</em> <a href="#ftn4">[4</a>] is <span class="monospaced">half</span>, <span class="monospaced">half2</span>, <span class="monospaced">half3</span> or <span class="monospaced">half4</span>.</p></div>
-<div class="paragraph"><p><span class="monospaced">double</span><em>n</em> <a href="#ftn18">[18</a>] is <span class="monospaced">double</span>, <span class="monospaced">double2</span>, <span class="monospaced">double3</span> or <span class="monospaced">double4</span>.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_geometric-synopsis">3.18.1. Header &lt;opencl_geometric&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="color: #008080">half3</span> <span style="font-weight: bold"><span style="color: #000000">cross</span></span><span style="color: #990000">(</span><span style="color: #008080">half3</span> p0<span style="color: #990000">,</span> <span style="color: #008080">half3</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">half4</span> <span style="font-weight: bold"><span style="color: #000000">cross</span></span><span style="color: #990000">(</span><span style="color: #008080">half4</span> p0<span style="color: #990000">,</span> <span style="color: #008080">half4</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> p0<span style="color: #990000">,</span> <span style="color: #008080">half</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #008080">half2</span> p0<span style="color: #990000">,</span> <span style="color: #008080">half2</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #008080">half3</span> p0<span style="color: #990000">,</span> <span style="color: #008080">half3</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #008080">half4</span> p0<span style="color: #990000">,</span> <span style="color: #008080">half4</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> p0<span style="color: #990000">,</span> <span style="color: #008080">half</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #008080">half2</span> p0<span style="color: #990000">,</span> <span style="color: #008080">half2</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #008080">half3</span> p0<span style="color: #990000">,</span> <span style="color: #008080">half3</span> p1<span style="color: #990000">;</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #008080">half4</span> p0<span style="color: #990000">,</span> <span style="color: #008080">half4</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #008080">half2</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #008080">half3</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #008080">half4</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">half</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">half2</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">half2</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">half3</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">half3</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">half4</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">half4</span> t<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="color: #008080">double3</span> <span style="font-weight: bold"><span style="color: #000000">cross</span></span><span style="color: #990000">(</span><span style="color: #008080">double3</span> p0<span style="color: #990000">,</span> <span style="color: #008080">double3</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">double4</span> <span style="font-weight: bold"><span style="color: #000000">cross</span></span><span style="color: #990000">(</span><span style="color: #008080">double4</span> p0<span style="color: #990000">,</span> <span style="color: #008080">double4</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> p0<span style="color: #990000">,</span> <span style="color: #009900">double</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #008080">double2</span> p0<span style="color: #990000">,</span> <span style="color: #008080">double2</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #008080">double3</span> p0<span style="color: #990000">,</span> <span style="color: #008080">double3</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #008080">double4</span> p0<span style="color: #990000">,</span> <span style="color: #008080">double4</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> p0<span style="color: #990000">,</span> <span style="color: #009900">double</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #008080">double2</span> p0<span style="color: #990000">,</span> <span style="color: #008080">double2</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #008080">double3</span> p0<span style="color: #990000">,</span> <span style="color: #008080">double3</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #008080">double4</span> p0<span style="color: #990000">,</span> <span style="color: #008080">double4</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> t<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #008080">double2</span> t<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #008080">double3</span> t<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #008080">double4</span> t<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">double2</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">double2</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">double3</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">double3</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">double4</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">double4</span> t<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="color: #008080">float3</span> <span style="font-weight: bold"><span style="color: #000000">cross</span></span><span style="color: #990000">(</span><span style="color: #008080">float3</span> p0<span style="color: #990000">,</span> <span style="color: #008080">float3</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">float4</span> <span style="font-weight: bold"><span style="color: #000000">cross</span></span><span style="color: #990000">(</span><span style="color: #008080">float4</span> p0<span style="color: #990000">,</span> <span style="color: #008080">float4</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> p0<span style="color: #990000">,</span> <span style="color: #009900">float</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #008080">float2</span> p0<span style="color: #990000">,</span> <span style="color: #008080">float2</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #008080">float3</span> p0<span style="color: #990000">,</span> <span style="color: #008080">float3</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #008080">float4</span> p0<span style="color: #990000">,</span> <span style="color: #008080">float4</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> p0<span style="color: #990000">,</span> <span style="color: #009900">float</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #008080">float2</span> p0<span style="color: #990000">,</span> <span style="color: #008080">float2</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #008080">float3</span> p0<span style="color: #990000">,</span> <span style="color: #008080">float3</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #008080">float4</span> p0<span style="color: #990000">,</span> <span style="color: #008080">float4</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> t<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #008080">float2</span> t<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #008080">float3</span> t<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #008080">float4</span> t<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">float2</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">float2</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">float3</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">float3</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">float4</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">float4</span> t<span style="color: #990000">);</span>
-
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">fast_distance</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> p0<span style="color: #990000">,</span> <span style="color: #009900">float</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">fast_distance</span></span><span style="color: #990000">(</span><span style="color: #008080">float2</span> p0<span style="color: #990000">,</span> <span style="color: #008080">float2</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">fast_distance</span></span><span style="color: #990000">(</span><span style="color: #008080">float3</span> p0<span style="color: #990000">,</span> <span style="color: #008080">float3</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">fast_distance</span></span><span style="color: #990000">(</span><span style="color: #008080">float4</span> p0<span style="color: #990000">,</span> <span style="color: #008080">float4</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">fast_length</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> t<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">fast_length</span></span><span style="color: #990000">(</span><span style="color: #008080">float2</span> t<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">fast_length</span></span><span style="color: #990000">(</span><span style="color: #008080">float3</span> t<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">fast_length</span></span><span style="color: #990000">(</span><span style="color: #008080">float4</span> t<span style="color: #990000">);</span>
-<span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">fast_normalize</span></span><span style="color: #990000">(</span><span style="color: #009900">float</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">float2</span> <span style="font-weight: bold"><span style="color: #000000">fast_normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">float2</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">float3</span> <span style="font-weight: bold"><span style="color: #000000">fast_normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">float3</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">float4</span> <span style="font-weight: bold"><span style="color: #000000">fast_normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">float4</span> t<span style="color: #990000">);</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="geometric-operations">3.18.2. Geometric operations</h4>
-<div class="sect4">
-<h5 id="cross">cross</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">float4</span> <span style="font-weight: bold"><span style="color: #000000">cross</span></span><span style="color: #990000">(</span><span style="color: #008080">float4</span> p0<span style="color: #990000">,</span> <span style="color: #008080">float4</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">float3</span> <span style="font-weight: bold"><span style="color: #000000">cross</span></span><span style="color: #990000">(</span><span style="color: #008080">float3</span> p0<span style="color: #990000">,</span> <span style="color: #008080">float3</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">double4</span> <span style="font-weight: bold"><span style="color: #000000">cross</span></span><span style="color: #990000">(</span><span style="color: #008080">double4</span> p0<span style="color: #990000">,</span> <span style="color: #008080">double4</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">double3</span> <span style="font-weight: bold"><span style="color: #000000">cross</span></span><span style="color: #990000">(</span><span style="color: #008080">double3</span> p0<span style="color: #990000">,</span> <span style="color: #008080">double3</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">half4</span> <span style="font-weight: bold"><span style="color: #000000">cross</span></span><span style="color: #990000">(</span><span style="color: #008080">half4</span> p0<span style="color: #990000">,</span> <span style="color: #008080">half4</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">half3</span> <span style="font-weight: bold"><span style="color: #000000">cross</span></span><span style="color: #990000">(</span><span style="color: #008080">half3</span> p0<span style="color: #990000">,</span> <span style="color: #008080">half3</span> p1<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the cross product of <span class="monospaced">p0.xyz</span> and <span class="monospaced">p1.xyz</span>.
-The <span class="monospaced">w</span> component of <span class="monospaced">float4</span> result returned will be <span class="monospaced">0.0</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="dot">dot</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> p0<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> p0<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">dot</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> p0<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> p1<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute dot product.</p></div>
-</div>
-<div class="sect4">
-<h5 id="distance">distance</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> p0<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> p1<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> p0<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> p1<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> p0<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> p1<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the distance between <span class="monospaced">p0</span> and <span class="monospaced">p1</span>.</p></div>
-<div class="paragraph"><p>This is calculated as <span class="monospaced">length(p0 - p1)</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="length">length</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> p<span style="color: #990000">);</span>
-<span style="color: #009900">double</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> p<span style="color: #990000">);</span>
-<span style="color: #008080">half</span> <span style="font-weight: bold"><span style="color: #000000">length</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> p<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the length of vector <span class="monospaced">p</span>, i.e.,</p></div>
-<div class="mathblock">
-<div class="content">\[
-\sqrt{p.x^2 + p.y^2 + \ldots}
-\]</div></div>
-</div>
-<div class="sect4">
-<h5 id="normalize">normalize</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> p<span style="color: #990000">);</span>
-<span style="color: #008080">doublen</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> p<span style="color: #990000">);</span>
-<span style="color: #008080">halfn</span> <span style="font-weight: bold"><span style="color: #000000">normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> p<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns a vector in the same direction as <span class="monospaced">p</span> but with a length of <span class="monospaced">1</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="fast_distance">fast_distance</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">fast_distance</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> p0<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> p1<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">fast_length(p0 - p1)</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="fast_length">fast_length</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">float</span> <span style="font-weight: bold"><span style="color: #000000">fast_length</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> p<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the length of vector <span class="monospaced">p</span> computed as:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000000">half_sqrt</span></span><span style="color: #990000">(</span>p<span style="color: #990000">.</span>x<span style="color: #990000">^</span><span style="color: #993399">2</span> <span style="color: #990000">+</span> p<span style="color: #990000">.</span>y<span style="color: #990000">^</span><span style="color: #993399">2</span> <span style="color: #990000">+</span> <span style="color: #990000">...)</span></tt></pre></div></div>
-</div>
-<div class="sect4">
-<h5 id="fast_normalize">fast_normalize</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">fast_normalize</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> p<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns a vector in the same direction as <span class="monospaced">p</span> but with a length of 1.
-<span class="monospaced">fast_normalize</span> is computed as:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt>p <span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">half_rsqrt</span></span><span style="color: #990000">(</span>p<span style="color: #990000">.</span>x<span style="color: #990000">^</span><span style="color: #993399">2</span> <span style="color: #990000">+</span> p<span style="color: #990000">.</span>y<span style="color: #990000">^</span><span style="color: #993399">2</span> <span style="color: #990000">+</span> <span style="color: #990000">...)</span></tt></pre></div></div>
-<div class="paragraph"><p>The result shall be within 8192 ulps error from the infinitely precise result of</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">all</span></span><span style="color: #990000">(</span>p <span style="color: #990000">==</span> <span style="color: #993399">0</span><span style="color: #990000">.</span>0f<span style="color: #990000">))</span>
- result <span style="color: #990000">=</span> p<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">else</span></span>
- result <span style="color: #990000">=</span> p <span style="color: #990000">/</span> <span style="font-weight: bold"><span style="color: #000000">sqrt</span></span><span style="color: #990000">(</span>p<span style="color: #990000">.</span>x<span style="color: #990000">^</span><span style="color: #993399">2</span> <span style="color: #990000">+</span> p<span style="color: #990000">.</span>y<span style="color: #990000">^</span><span style="color: #993399">2</span> <span style="color: #990000">+</span> <span style="color: #990000">...</span> <span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>with the following exceptions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-If the sum of squares is greater than <span class="monospaced">FLT_MAX</span> then the value of the floating-point values in the result vector are undefined.
-</p>
-</li>
-<li>
-<p>
-If the sum of squares is less than <span class="monospaced">FLT_MIN</span> then the implementation may return back <span class="monospaced">p</span>.
-</p>
-</li>
-<li>
-<p>
-If the device is in “denorms are flushed to zero” mode, individual operand elements with magnitude less than <span class="monospaced">sqrt(FLT_MIN)</span> may be flushed to zero before proceeding with the calculation.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="math-functions">3.19. Math Functions</h3>
-<div class="paragraph"><p>The list of the OpenCL C++ library math functions is described in <em><a href="#trigonometric-functions">Trigonometric functions</a></em>, <em><a href="#logarithmic-functions">Logarithmic functions</a></em>, <em><a href="#exponential-functions">Exponential functions</a></em>, <em><a href="#floating-point-functions">Floating-point functions</a></em>, <em><a href="#comparison-functions">Comparison functions</a></em> and <em><a href="#other-functions-1">Other functions</a> sections</em>.</p></div>
-<div class="paragraph"><p>The built-in math functions are categorized into the following:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A list of built-in functions that have scalar or vector argument versions.
-</p>
-</li>
-<li>
-<p>
-A list of built-in functions that only take scalar float arguments.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The vector versions of the math functions operate component-wise.
-The description is per-component.</p></div>
-<div class="paragraph"><p>The built-in math functions are not affected by the prevailing rounding mode in the calling environment, and always return the same value as they would if called with the round to nearest even rounding mode.</p></div>
-<div class="paragraph"><p>Here <span class="monospaced">gentype</span> matches: <span class="monospaced">half</span><em>n</em> <a href="#ftn4">[4</a>], <span class="monospaced">float</span><em>n</em> or <span class="monospaced">double</span><em>n</em> <a href="#ftn18">[18</a>]</p></div>
-<div class="sect3">
-<h4 id="header-opencl_math-synopsis">3.19.1. Header &lt;opencl_math&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-style: italic"><span style="color: #9A1900">//trigonometric functions</span></span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">acos</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">acosh</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">acospi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">asin</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">asinh</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">asinpi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">atan</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">atanh</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">atanpi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">atan2</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> y<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">atan2pi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> y<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">cos</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">cosh</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">cospi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sin</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sincos</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> gentype <span style="color: #990000">*</span> cosval<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sinh</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sinpi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">tan</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">tanh</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">tanpi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//power functions</span></span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">cbrt</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">pow</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">pown</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">intn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">powr</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">rootn</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">intn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">rsqrt</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sqrt</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//logarithmic functions</span></span>
-<span style="color: #008080">intn</span> <span style="font-weight: bold"><span style="color: #000000">ilogb</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">lgamma</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">lgamma_r</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> intn<span style="color: #990000">*</span> signp<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">log</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">logb</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">log2</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">log10</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">log1p</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//exponential functions</span></span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">exp</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">expm1</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">exp2</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">exp10</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">ldexp</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">intn</span> k<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//floating-point functions</span></span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">ceil</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">copysign</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">floor</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fma</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> b<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> c<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fmod</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fract</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> gentype<span style="color: #990000">*</span> iptr<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">frexp</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> intn<span style="color: #990000">*</span> exp<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">modf</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> gentype<span style="color: #990000">*</span> iptr<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="color: #008080">halfn</span> <span style="font-weight: bold"><span style="color: #000000">nan</span></span><span style="color: #990000">(</span><span style="color: #008080">ushortn</span> nancode<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">nan</span></span><span style="color: #990000">(</span><span style="color: #008080">uintn</span> nancode<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="color: #008080">doublen</span> <span style="font-weight: bold"><span style="color: #000000">nan</span></span><span style="color: #990000">(</span><span style="color: #008080">ulong</span> nancode<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">nextafter</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">remainder</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">remquo</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">,</span> intn<span style="color: #990000">*</span> quo<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">rint</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">round</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">trunc</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//comparison functions</span></span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fdim</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fmax</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fmin</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">maxmag</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">minmag</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//other functions</span></span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">erf</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">erfc</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fabs</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">hypot</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">mad</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> b<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> c<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">tgamma</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//native functions</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> native
-<span style="color: #FF0000">{</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">cos</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">exp</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">exp2</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">exp10</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">log</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">log2</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">log10</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">recip</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">rsqrt</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">sin</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">sqrt</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">tan</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">divide</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">powr</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-
-<span style="color: #FF0000">}</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//half_math functions</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> half_math
-<span style="color: #FF0000">{</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">cos</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">exp</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">exp2</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">exp10</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">log</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">log2</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">log10</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">recip</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">rsqrt</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">sin</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">sqrt</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">tan</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">divide</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">powr</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-
-<span style="color: #FF0000">}</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="trigonometric-functions">3.19.2. Trigonometric functions</h4>
-<div class="sect4">
-<h5 id="acos">acos</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">acos</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Arc cosine function.
-Returns an angle in radians.</p></div>
-</div>
-<div class="sect4">
-<h5 id="acosh">acosh</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">acosh</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Inverse hyperbolic cosine.
-Returns an angle in radians.</p></div>
-</div>
-<div class="sect4">
-<h5 id="acospi">acospi</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">acospi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute acos(<span class="monospaced">x</span>) / π.</p></div>
-</div>
-<div class="sect4">
-<h5 id="asin">asin</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">asin</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Arc sine function.
-Returns an angle in radians.</p></div>
-</div>
-<div class="sect4">
-<h5 id="asinh">asinh</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">asinh</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Inverse hyperbolic sine.
-Returns an angle in radians.</p></div>
-</div>
-<div class="sect4">
-<h5 id="asinpi">asinpi</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">asinpi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute asin(<span class="monospaced">x</span>) / π.</p></div>
-</div>
-<div class="sect4">
-<h5 id="atan">atan</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">atan</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> y_over_x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Arc tangent function.
-Returns an angle in radians.</p></div>
-</div>
-<div class="sect4">
-<h5 id="atan2">atan2</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">atan2</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> y<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Arc tangent of <span class="monospaced">y / x</span>.
-Returns an angle in radians.</p></div>
-</div>
-<div class="sect4">
-<h5 id="atanh">atanh</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">atanh</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Hyperbolic arc tangent.
-Returns an angle in radians.</p></div>
-</div>
-<div class="sect4">
-<h5 id="atanpi">atanpi</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">atanpi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute atan(<span class="monospaced">x</span>) / π.</p></div>
-</div>
-<div class="sect4">
-<h5 id="atan2pi">atan2pi</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">atan2pi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> y<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute atan2(<span class="monospaced">y</span>, <span class="monospaced">x</span>) / π.</p></div>
-</div>
-<div class="sect4">
-<h5 id="cos">cos</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">cos</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute cosine, where <span class="monospaced">x</span> is an angle in radians.</p></div>
-</div>
-<div class="sect4">
-<h5 id="cosh">cosh</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">cosh</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute hyperbolic consine, where <span class="monospaced">x</span> is an angle in radians.</p></div>
-</div>
-<div class="sect4">
-<h5 id="cospi">cospi</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">cospi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute cos(π x).</p></div>
-</div>
-<div class="sect4">
-<h5 id="sin">sin</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sin</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute sine, where <span class="monospaced">x</span> is an angle in radians.</p></div>
-</div>
-<div class="sect4">
-<h5 id="sincos">sincos</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sincos</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> <span style="color: #990000">*</span>cosval<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute sine and cosine of <span class="monospaced">x</span>.
-The computed sine is the return value and computed cosine is returned in <span class="monospaced">cosval</span>, where <span class="monospaced">x</span> is an angle in radians</p></div>
-</div>
-<div class="sect4">
-<h5 id="sinh">sinh</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sinh</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute hyperbolic sine, where <span class="monospaced">x</span> is an angle in radians</p></div>
-</div>
-<div class="sect4">
-<h5 id="sinpi">sinpi</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sinpi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute sin(π <span class="monospaced">x</span>).</p></div>
-</div>
-<div class="sect4">
-<h5 id="tan">tan</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">tan</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute tangent, where <span class="monospaced">x</span> is an angle in radians.</p></div>
-</div>
-<div class="sect4">
-<h5 id="tanh">tanh</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">tanh</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute hyperbolic tangent, where <span class="monospaced">x</span> is an angle in radians.</p></div>
-</div>
-<div class="sect4">
-<h5 id="tanpi">tanpi</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">tanpi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute tan(π <span class="monospaced">x</span>).</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="power-functions">3.19.3. Power function</h4>
-<div class="sect4">
-<h5 id="cbrt">cbrt</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">cbrt</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute cube-root.</p></div>
-</div>
-<div class="sect4">
-<h5 id="pow">pow</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">pow</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute <span class="monospaced">x</span> to the power <span class="monospaced">y</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="pown">pown</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">pown</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">intn</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute <span class="monospaced">x</span> to the power <span class="monospaced">y</span>, where <span class="monospaced">y</span> is an integer.</p></div>
-</div>
-<div class="sect4">
-<h5 id="powr">powr</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">powr</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute <span class="monospaced">x</span> to the power <span class="monospaced">y</span>, where <span class="monospaced">x</span> is <span class="monospaced">&gt;= 0</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="rootn">rootn</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">powr</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute <span class="monospaced">x</span> to the power <span class="monospaced">1/y</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="rsqrt">rsqrt</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">rsqrt</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute inverse square root.</p></div>
-</div>
-<div class="sect4">
-<h5 id="sqrt">sqrt</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sqrt</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute square root.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="logarithmic-functions">3.19.4. Logarithmic functions</h4>
-<div class="sect4">
-<h5 id="ilogb">ilogb</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">intn</span> <span style="font-weight: bold"><span style="color: #000000">ilogb</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the exponent as an integer value.</p></div>
-</div>
-<div class="sect4">
-<h5 id="lgamma">lgamma</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">lgamma</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">lgamma_r</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">intn</span> <span style="color: #990000">*</span>signp<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Log gamma function.
-Returns the natural logarithm of the absolute value of the gamma function.
-The sign of the gamma function is returned in the signp argument of <span class="monospaced">lgamma_r</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="log">log</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">log</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute natural logarithm.</p></div>
-</div>
-<div class="sect4">
-<h5 id="log2">log2</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">log2</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute a base 2 logarithm.</p></div>
-</div>
-<div class="sect4">
-<h5 id="log10">log10</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">log10</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute a base 10 logarithm.</p></div>
-</div>
-<div class="sect4">
-<h5 id="log1p">log1p</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">log1p</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute log<sub>e</sub>(1.0 + x).</p></div>
-</div>
-<div class="sect4">
-<h5 id="logb">logb</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">logb</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute the exponent of <span class="monospaced">x</span>, which is the integral part of log<sub>r</sub>|<span class="monospaced">x</span>|.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="exponential-functions">3.19.5. Exponential functions</h4>
-<div class="sect4">
-<h5 id="exp">exp</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">exp</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute the base e exponential of <span class="monospaced">x</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="exp2">exp2</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">exp2</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Exponential base 2 function.</p></div>
-</div>
-<div class="sect4">
-<h5 id="exp10">exp10</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">exp10</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Exponential base 10 function.</p></div>
-</div>
-<div class="sect4">
-<h5 id="expm1">expm1</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">expm1</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute e<sup>x</sup>- 1.0.</p></div>
-</div>
-<div class="sect4">
-<h5 id="ldexp">ldexp</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">ldexp</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">intn</span> k<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Multiply <span class="monospaced">x</span> by 2 to the power <span class="monospaced">k</span>.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="floating-point-functions">3.19.6. Floating-point functions</h4>
-<div class="sect4">
-<h5 id="ceil">ceil</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">ceil</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Round to integral value using the round to positive infinity rounding mode.</p></div>
-</div>
-<div class="sect4">
-<h5 id="copysign">copysign</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">copysign</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns x with its sign changed to match the sign of y.</p></div>
-</div>
-<div class="sect4">
-<h5 id="floor">floor</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">floor</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Round to integral value using the round to negative infinity rounding mode.</p></div>
-</div>
-<div class="sect4">
-<h5 id="fma">fma</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fma</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> b<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> c<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the correctly rounded floating-point representation of the sum of <span class="monospaced">c</span> with the infinitely precise product of <span class="monospaced">a</span> and <span class="monospaced">b</span>.
-Rounding of intermediate products shall not occur.
-Edge case behavior is per the IEEE 754-2008 standard.</p></div>
-</div>
-<div class="sect4">
-<h5 id="fmod">fmod</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fmod</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Modulus. Returns <span class="monospaced">x - y * trunc (x/y)</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="fract">fract</h5>
-<div class="paragraph"><p><span class="monospaced">fract</span> <a href="#ftn20">[20</a>]:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fract</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> <span style="color: #990000">*</span>iptr<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">fmin(x - floor(x), 0x1.fffffep-1f)</span>.</p></div>
-<div class="paragraph"><p><span class="monospaced">floor(x)</span> is returned in <span class="monospaced">iptr</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="frexp">frexp</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">frexp</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">intn</span> <span style="color: #990000">*</span>exp<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Extract mantissa and exponent from <span class="monospaced">x</span>.
-For each component the mantissa returned is a half with magnitude in the interval [1/2, 1) or 0.
-Each component of <span class="monospaced">x</span> equals mantissa returned <span class="monospaced">* 2<sup>exp</sup></span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="modf">modf</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">modf</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> <span style="color: #990000">*</span>iptr<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Decompose a floating-point number.
-The modf function breaks the argument <span class="monospaced">x</span> into integral and fractional parts, each of which has the same sign as the argument.
-It stores the integral part in the object pointed to by <span class="monospaced">iptr</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="nan">nan</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> <span style="font-weight: bold"><span style="color: #000000">nan</span></span><span style="color: #990000">(</span><span style="color: #008080">uintn</span> nancode<span style="color: #990000">);</span>
-<span style="color: #008080">doublen</span> <span style="font-weight: bold"><span style="color: #000000">nan</span></span><span style="color: #990000">(</span><span style="color: #008080">ulongn</span> nancode<span style="color: #990000">);</span>
-<span style="color: #008080">halfn</span> <span style="font-weight: bold"><span style="color: #000000">nan</span></span><span style="color: #990000">(</span><span style="color: #008080">ushortn</span> nancode<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns a quiet <span class="monospaced">NaN</span>.
-The nancode may be placed in the significand of the resulting <span class="monospaced">NaN</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="nextafter">nextafter</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">nextafter</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Computes the next representable single-precision floating-point value following <span class="monospaced">x</span> in the direction of <span class="monospaced">y</span>.
-Thus, if <span class="monospaced">y</span> is less than <span class="monospaced">x</span>.
-<span class="monospaced">nextafter()</span> returns the largest representable floating-point number less than <span class="monospaced">x</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="remainder">remainder</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">remainder</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute the value <span class="monospaced">r</span> such that <span class="monospaced">r = x - n*y</span>, where <span class="monospaced">n</span> is the integer nearest the exact value of <span class="monospaced">x/y</span>.
-If there are two integers closest to <span class="monospaced">x/y</span>, <span class="monospaced">n</span> shall be the even one.
-If <span class="monospaced">r</span> is zero, it is given the same sign as <span class="monospaced">x</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="remquo">remquo</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">remquo</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">,</span> <span style="color: #008080">intn</span> <span style="color: #990000">*</span>quo<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>The remquo function computes the value <span class="monospaced">r</span> such that <span class="monospaced">r = x - k*y</span>, where <span class="monospaced">k</span> is the integer nearest the exact value of <span class="monospaced">x/y</span>.
-If there are two integers closest to <span class="monospaced">x/y</span>, <span class="monospaced">k</span> shall be the even one.
-If <span class="monospaced">r</span> is zero, it is given the same sign as <span class="monospaced">x</span>.
-This is the same value that is returned by the remainder function.
-<span class="monospaced">remquo</span> also calculates at least the seven lower bits of the integral quotient <span class="monospaced">x/y</span>, and gives that value the same sign as <span class="monospaced">x/y</span>.
-It stores this signed value in the object pointed to by <span class="monospaced">quo</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="rint">rint</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">rint</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Round to integral value (using round to nearest even rounding mode) in floating-point format.
-Refer to <em><a href="#rounding-modes">Rounding Modes</a> section</em> for description of rounding modes.</p></div>
-</div>
-<div class="sect4">
-<h5 id="round">round</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">round</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the integral value nearest to <span class="monospaced">x</span> rounding halfway cases away from zero, regardless of the current rounding direction.</p></div>
-</div>
-<div class="sect4">
-<h5 id="trunc">trunc</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">trunc</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Round to integral value using the round to zero rounding mode.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="comparison-functions">3.19.7. Comparison functions</h4>
-<div class="sect4">
-<h5 id="fdim">fdim</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fdim</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p><span class="monospaced">x - y</span> if <span class="monospaced">x &gt; y</span>, <span class="monospaced">+0</span> if <span class="monospaced">x</span> is less than or equal to <span class="monospaced">y</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="fmax">fmax</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fmax</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">y</span> if <span class="monospaced">x &lt; y</span>, otherwise it returns <span class="monospaced">x</span>.
-If one argument is a <span class="monospaced">NaN</span>, <span class="monospaced">fmax()</span> returns the other argument.
-If both arguments are NaNs, <span class="monospaced">fmax()</span> returns a <span class="monospaced">NaN</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="fmin">fmin</h5>
-<div class="paragraph"><p><span class="monospaced">fmin</span> <a href="#ftn21">[21</a>]:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fmin</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">y</span> if <span class="monospaced">y &lt; x</span>, otherwise it returns <span class="monospaced">x</span>.
-If one argument is a NaN, <span class="monospaced">fmin()</span> returns the other argument.
-If both arguments are NaNs, <span class="monospaced">fmin()</span> returns a <span class="monospaced">NaN</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="fmod-1">fmod</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fmod</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Modulus.
-Returns <span class="monospaced">x - y * trunc (x/y)</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="maxmag">maxmag</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">maxmag</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">x</span> if <span class="monospaced">|x| &gt; |y|</span>, <span class="monospaced">y</span> if <span class="monospaced">|y| &gt; |x|</span>, otherwise <span class="monospaced">fmax(x, y)</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="minmag">minmag</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">minmag</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">x</span> if <span class="monospaced">|x| &lt; |y|</span>, <span class="monospaced">y</span> if <span class="monospaced">|y| &lt; |x|</span>, otherwise <span class="monospaced">fmin(x, y)</span>.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="other-functions-1">3.19.8. Other functions</h4>
-<div class="sect4">
-<h5 id="erfc">erfc</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">erfc</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Complementary error function.</p></div>
-</div>
-<div class="sect4">
-<h5 id="erf">erf</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">erf</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Error function encountered in integrating the <a href="http://mathworld.wolfram.com/NormalDistribution.html">normal distribution</a>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="fabs">fabs</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">fabs</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute absolute value of a floating-point number.</p></div>
-</div>
-<div class="sect4">
-<h5 id="hypot">hypot</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">hypot</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute the value of the square root of <span class="monospaced">x<sup>2</sup> + y<sup>2</sup></span> without undue overflow or underflow.</p></div>
-</div>
-<div class="sect4">
-<h5 id="mad">mad</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">mad</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> b<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> c<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p><span class="monospaced">mad</span> approximates <span class="monospaced">a*b+c</span>.
-Whether or how the product of <span class="monospaced">a * b</span> is rounded and how supernormal or subnormal intermediate products are handled is not defined.
-<span class="monospaced">mad</span> is intended to be used where speed is preferred over accuracy <a href="#ftn22">[22</a>].</p></div>
-</div>
-<div class="sect4">
-<h5 id="tgamma">tgamma</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">tgamma</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute the gamma function.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="native-functions">3.19.9. Native functions</h4>
-<div class="paragraph"><p>This section describes the following functions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A subset of functions from previous sections that are defined in the <span class="monospaced">cl::native_math</span> namespace.
-These functions may map to one or more native device instructions and will typically have better performance compared to the corresponding functions (without the native_math namespace) described in <em><a href="#trigonometric-functions">Trigonometric functions</a></em>, <em><a href="#logarithmic-functions">Logarithmic functions</a></em>, <em><a href="#exponential-functions">Exponential functions</a></em>, <em><a href="#floating-point-functions">Floating-point functions</a></em>, <em><a href="#comparison-functions">Comparison functions</a></em> and <em><a href="#other-functions-1">Other functions</a> sections</em>.
-The accuracy (and in some cases the input range(s)) of these functions is implementation-defined.
-</p>
-</li>
-<li>
-<p>
-Native functions for following basic operations: divide and reciprocal.
-</p>
-</li>
-<li>
-<p>
-Support for denormal values is implementation-defined for native functions.
-</p>
-</li>
-</ul></div>
-<div class="sect4">
-<h5 id="native_mathcos">native_math::cos</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> native_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">cos</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute cosine over an implementation-defined range, where <span class="monospaced">x</span> is an angle in radians.
-The maximum error is implementation-defined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="native_mathdivide">native_math::divide</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> native_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">divide</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute <span class="monospaced">x / y</span> over an implementation-defined range.
-The maximum error is implementation-defined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="native_mathexp">native_math::exp</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> native_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">exp</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute the base e exponential of <span class="monospaced">x</span> over an implementation-defined range.
-The maximum error is implementation-defined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="native_mathexp2">native_math::exp2</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> native_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">exp2</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute the base 2 exponential of <span class="monospaced">x</span> over an implementation-defined range.
-The maximum error is implementation-defined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="native_mathexp10">native_math::exp10</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> native_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">exp10</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute the base 10 exponential of <span class="monospaced">x</span> over an implementation-defined range.
-The maximum error is implementation-defined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="native_mathlog">native_math::log</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> native_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">log</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute natural logarithm over an implementation-defined range.
-The maximum error is implementation-defined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="native_mathlog2">native_math::log2</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> native_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">log2</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute a base 2 logarithm over an implementation-defined range.
-The maximum error is implementation-defined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="native_mathlog10">native_math::log10</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> native_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">log10</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute a base 10 logarithm over an implementation-defined range.
-The maximum error is implementation-defined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="native_mathpowr">native_math::powr</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> native_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">powr</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute <span class="monospaced">x</span> to the power <span class="monospaced">y</span>, where <span class="monospaced">x</span> is <span class="monospaced">&gt;= 0</span>.
-The range of <span class="monospaced">x</span> and <span class="monospaced">y</span> are implementation-defined.
-The maximum error is implementation-defined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="native_mathrecip">native_math::recip</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> native_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">recip</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute reciprocal over an implementation-defined range.
-The maximum error is implementation-defined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="native_mathrsqrt">native_math::rsqrt</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> native_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">rsqrt</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute inverse square root over an implementation-defined range.
-The maximum error is implementation-defined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="native_mathsin">native_math::sin</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> native_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">sin</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute sine over an implementation-defined range, where <span class="monospaced">x</span> is an angle in radians.
-The maximum error is implementation-defined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="native_mathsqrt">native_math::sqrt</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> native_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">sqrt</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute square root over an implementation-defined range.
-The maximum error is implementation-defined.</p></div>
-</div>
-<div class="sect4">
-<h5 id="native_mathtan">native_math::tan</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> native_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">tan</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute tangent over an implementation-defined range, where <span class="monospaced">x</span> is an angle in radians.
-The maximum error is implementation-defined.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="half-functions">3.19.10. Half functions</h4>
-<div class="paragraph"><p>This section describes the following functions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A subset of functions from previous sections that are defined in the <span class="monospaced">cl::half_math</span> namespace.
-These functions are implemented with a minimum of 10-bits of accuracy i.e. an ULP value &lt;= 8192 ulp.
-</p>
-</li>
-<li>
-<p>
-half functions for following basic operations: divide and reciprocal.
-</p>
-</li>
-<li>
-<p>
-Support for denormal values is optional for half_math:: functions. The <span class="monospaced">half_math::</span> functions may return any result allowed by <em><a href="#edge-case-behavior-in-flush-to-zero-mode">Edge Case Behavior in Flush To Zero Mode</a> section</em>, even when <em>-cl-denorms-are-zero</em> is not in force.
-</p>
-</li>
-</ul></div>
-<div class="sect4">
-<h5 id="half_mathcos">half_math::cos</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> half_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">cos</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute cosine.
-<span class="monospaced">x</span> is an angle in radians and it must be in the range -2<sup>16</sup> &#8230; +2<sup>16</sup>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="half_mathdivide">half_math::divide</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> half_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">divide</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute <span class="monospaced">x / y</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="half_mathexp">half_math::exp</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> half_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">exp</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute the base e exponential of <span class="monospaced">x</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="half_mathexp2">half_math::exp2</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> half_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">exp2</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute the base 2 exponential of <span class="monospaced">x</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="half_mathexp10">half_math::exp10</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> half_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">exp10</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute the base 10 exponential of <span class="monospaced">x</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="half_mathlog">half_math::log</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> half_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">log</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute natural logarithm.</p></div>
-</div>
-<div class="sect4">
-<h5 id="half_mathlog2">half_math::log2</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> half_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">log2</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute a base 2 logarithm.</p></div>
-</div>
-<div class="sect4">
-<h5 id="half_mathlog10">half_math::log10</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> half_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">log10</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute a base 10 logarithm.</p></div>
-</div>
-<div class="sect4">
-<h5 id="half_mathpowr">half_math::powr</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> half_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">powr</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute <span class="monospaced">x</span> to the power <span class="monospaced">y</span>, where <span class="monospaced">x</span> is <span class="monospaced">&gt;= 0</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="half_mathrecip">half_math::recip</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> half_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">recip</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute reciprocal.</p></div>
-</div>
-<div class="sect4">
-<h5 id="half_mathrsqrt">half_math::rsqrt</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> half_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">rsqrt</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute inverse square root.</p></div>
-</div>
-<div class="sect4">
-<h5 id="half_mathsin">half_math::sin</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> half_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">sin</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute sine.
-<span class="monospaced">x</span> is an angle in radians and it must be in the range -2<sup>16</sup> &#8230; +2<sup>16</sup>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="half_mathsqrt">half_math::sqrt</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> half_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">sqrt</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute square root.</p></div>
-</div>
-<div class="sect4">
-<h5 id="half_mathtan">half_math::tan</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">floatn</span> half_math<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">tan</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Compute tangent.
-<span class="monospaced">x</span> is an angle in radians and it must be in the range -2<sup>16</sup> &#8230; +2<sup>16</sup>.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="floating-point-pragmas">3.19.11. Floating-point pragmas</h4>
-<div class="paragraph"><p>The <span class="monospaced">FP_CONTRACT</span> pragma can be used to allow (if the state is on) or disallow (if the state is off) the implementation to contract expressions.
-Each pragma can occur either outside external declarations or preceding all explicit declarations and statements inside a compound statement.
-When outside external declarations, the pragma takes effect from its occurrence until another <span class="monospaced">FP_CONTRACT</span> pragma is encountered, or until the end of the translation unit.
-When inside a compound statement, the pragma takes effect from its occurrence until another <span class="monospaced">FP_CONTRACT</span> pragma is encountered (including within a nested compound statement), or until the end of the compound statement; at the end of a compound statement the state for the pragma is restored to its condition just before the compound statement.
-If this pragma is used in any other context, the behavior is undefined.</p></div>
-<div class="paragraph"><p>The pragma definition to set <span class="monospaced">FP_CONTRACT</span> is:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#pragma</span></span> <span style="color: #008080">OPENCL</span> <span style="color: #008080">FP_CONTRACT</span> on<span style="color: #990000">-</span>off<span style="color: #990000">-</span><span style="font-weight: bold"><span style="color: #0000FF">switch</span></span>
-                          <span style="font-style: italic"><span style="color: #9A1900">// on-off-switch is one of: ON, OFF or DEFAULT.</span></span></tt></pre></div></div>
-<div class="paragraph"><p>The <span class="monospaced">DEFAULT</span> value is <span class="monospaced">ON</span>.</p></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="integer-functions">3.20. Integer Functions</h3>
-<div class="paragraph"><p>This section describes the OpenCL C++ library integer functions that take scalar or vector arguments.
-Vector versions of integer functions operate component-wise.
-Descriptions are always per-component.</p></div>
-<div class="paragraph"><p>Here <span class="monospaced">gentype</span> matches: <span class="monospaced">char</span><em>n</em>, <span class="monospaced">uchar</span><em>n</em>, <span class="monospaced">short</span><em>n</em>, <span class="monospaced">ushort</span><em>n</em>, <span class="monospaced">int</span><em>n</em>, <span class="monospaced">uint</span><em>n</em>, <span class="monospaced">long</span><em>n</em> and <span class="monospaced">ulong</span><em>n</em>.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_integer-synopsis">3.20.1. Header &lt;opencl_integer&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-style: italic"><span style="color: #9A1900">//bitwise functions</span></span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">clz</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">ctz</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">popcount</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">rotate</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> v<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> i<span style="color: #990000">);</span>
-
-<span style="color: #008080">shortn</span> <span style="font-weight: bold"><span style="color: #000000">upsample</span></span><span style="color: #990000">(</span><span style="color: #008080">charn</span> hi<span style="color: #990000">,</span> <span style="color: #008080">ucharn</span> lo<span style="color: #990000">);</span>
-<span style="color: #008080">ushortn</span> <span style="font-weight: bold"><span style="color: #000000">upsample</span></span><span style="color: #990000">(</span><span style="color: #008080">ucharn</span> hi<span style="color: #990000">,</span> <span style="color: #008080">ucharn</span> lo<span style="color: #990000">);</span>
-<span style="color: #008080">intn</span> <span style="font-weight: bold"><span style="color: #000000">upsample</span></span><span style="color: #990000">(</span><span style="color: #008080">shortn</span> hi<span style="color: #990000">,</span> <span style="color: #008080">ushortn</span> lo<span style="color: #990000">);</span>
-<span style="color: #008080">uintn</span> <span style="font-weight: bold"><span style="color: #000000">upsample</span></span><span style="color: #990000">(</span><span style="color: #008080">ushortn</span> hi<span style="color: #990000">,</span> <span style="color: #008080">ushortn</span> lo<span style="color: #990000">);</span>
-<span style="color: #008080">longn</span> <span style="font-weight: bold"><span style="color: #000000">upsample</span></span><span style="color: #990000">(</span><span style="color: #008080">intn</span> hi<span style="color: #990000">,</span> <span style="color: #008080">uintn</span> lo<span style="color: #990000">);</span>
-<span style="color: #008080">ulongn</span> <span style="font-weight: bold"><span style="color: #000000">upsample</span></span><span style="color: #990000">(</span><span style="color: #008080">uintn</span> hi<span style="color: #990000">,</span> <span style="color: #008080">uintn</span> lo<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//numeric functions</span></span>
-<span style="color: #008080">ugentype</span> <span style="font-weight: bold"><span style="color: #000000">abs</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span>
-<span style="color: #008080">ugentype</span> <span style="font-weight: bold"><span style="color: #000000">abs_diff</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span>  <span style="font-weight: bold"><span style="color: #000000">add_sat</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span>  <span style="font-weight: bold"><span style="color: #000000">hadd</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span>  <span style="font-weight: bold"><span style="color: #000000">rhadd</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span>  <span style="font-weight: bold"><span style="color: #000000">clamp</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> minval<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> maxval<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span>  <span style="font-weight: bold"><span style="color: #000000">clamp</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">sgentype</span> minval<span style="color: #990000">,</span> <span style="color: #008080">sgentype</span> maxval<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span>  <span style="font-weight: bold"><span style="color: #000000">mad_hi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> b<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> c<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span>  <span style="font-weight: bold"><span style="color: #000000">mad_sat</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> b<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> c<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span>  <span style="font-weight: bold"><span style="color: #000000">max</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span>  <span style="font-weight: bold"><span style="color: #000000">max</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">sgentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span>  <span style="font-weight: bold"><span style="color: #000000">min</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span>  <span style="font-weight: bold"><span style="color: #000000">min</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">sgentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span>  <span style="font-weight: bold"><span style="color: #000000">mul_hi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span>  <span style="font-weight: bold"><span style="color: #000000">sub_sat</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//24-bits functions</span></span>
-<span style="color: #008080">intn</span> <span style="font-weight: bold"><span style="color: #000000">mad24</span></span><span style="color: #990000">(</span><span style="color: #008080">intn</span> x<span style="color: #990000">,</span> <span style="color: #008080">intn</span> y<span style="color: #990000">,</span> <span style="color: #008080">intn</span> z<span style="color: #990000">);</span>
-<span style="color: #008080">uintn</span> <span style="font-weight: bold"><span style="color: #000000">mad24</span></span><span style="color: #990000">(</span><span style="color: #008080">uintn</span> x<span style="color: #990000">,</span> <span style="color: #008080">uintn</span> y<span style="color: #990000">,</span> <span style="color: #008080">uintn</span> z<span style="color: #990000">);</span>
-<span style="color: #008080">intn</span> <span style="font-weight: bold"><span style="color: #000000">mul24</span></span><span style="color: #990000">(</span><span style="color: #008080">intn</span> x<span style="color: #990000">,</span> <span style="color: #008080">intn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">uintn</span> <span style="font-weight: bold"><span style="color: #000000">mul24</span></span><span style="color: #990000">(</span><span style="color: #008080">uintn</span> x<span style="color: #990000">,</span> <span style="color: #008080">uintn</span> y<span style="color: #990000">);</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="bitwise-operations">3.20.2. Bitwise operations</h4>
-<div class="sect4">
-<h5 id="clz">clz</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">clz</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the number of leading 0-bits in <span class="monospaced">x</span>, starting at the most significant bit position.
-If <span class="monospaced">x</span> is <span class="monospaced">0</span>, returns the size in bits of the type of <span class="monospaced">x</span> or component type of <span class="monospaced">x</span>, if <span class="monospaced">x</span> is a vector.</p></div>
-</div>
-<div class="sect4">
-<h5 id="ctz">ctz</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">ctz</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the count of trailing 0-bits in <span class="monospaced">x</span>.
-If <span class="monospaced">x</span> is <span class="monospaced">0</span>, returns the size in bits of the type of <span class="monospaced">x</span> or component type of <span class="monospaced">x</span>, if <span class="monospaced">x</span> is a vector.</p></div>
-</div>
-<div class="sect4">
-<h5 id="rotate">rotate</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">rotate</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> v<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> i<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>For each element in <span class="monospaced">v</span>, the bits are shifted left by the number of bits given by the corresponding element in <span class="monospaced">i</span> (subject to usual shift modulo rules described in <em><a href="#expressions">Expressions</a> section</em>).
-Bits shifted off the left side of the element are shifted back in from the right.</p></div>
-</div>
-<div class="sect4">
-<h5 id="upsample">upsample</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">shortn</span> <span style="font-weight: bold"><span style="color: #000000">upsample</span></span><span style="color: #990000">(</span><span style="color: #008080">charn</span> hi<span style="color: #990000">,</span> <span style="color: #008080">ucharn</span> lo<span style="color: #990000">);</span>
-<span style="color: #008080">ushortn</span> <span style="font-weight: bold"><span style="color: #000000">upsample</span></span><span style="color: #990000">(</span><span style="color: #008080">ucharn</span> hi<span style="color: #990000">,</span> <span style="color: #008080">ucharn</span> lo<span style="color: #990000">);</span>
-
-<span style="color: #008080">intn</span> <span style="font-weight: bold"><span style="color: #000000">upsample</span></span><span style="color: #990000">(</span><span style="color: #008080">shortn</span> hi<span style="color: #990000">,</span> <span style="color: #008080">ushortn</span> lo<span style="color: #990000">);</span>
-<span style="color: #008080">uintn</span> <span style="font-weight: bold"><span style="color: #000000">upsample</span></span><span style="color: #990000">(</span><span style="color: #008080">ushortn</span> hi<span style="color: #990000">,</span> <span style="color: #008080">ushortn</span> lo<span style="color: #990000">);</span>
-
-<span style="color: #008080">longn</span> <span style="font-weight: bold"><span style="color: #000000">upsample</span></span><span style="color: #990000">(</span><span style="color: #008080">intn</span> hi<span style="color: #990000">,</span> <span style="color: #008080">uintn</span> lo<span style="color: #990000">);</span>
-<span style="color: #008080">ulongn</span> <span style="font-weight: bold"><span style="color: #000000">upsample</span></span><span style="color: #990000">(</span><span style="color: #008080">uintn</span> hi<span style="color: #990000">,</span> <span style="color: #008080">uintn</span> lo<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p><span class="monospaced">result[i] = ((short)hi[i] &lt;&lt; 8) | lo[i]</span></p></div>
-<div class="paragraph"><p><span class="monospaced">result[i] = ((ushort)hi[i] &lt;&lt; 8) | lo[i]</span></p></div>
-<div class="paragraph"><p><span class="monospaced">result[i] = ((int)hi[i] &lt;&lt; 16) | lo[i]</span></p></div>
-<div class="paragraph"><p><span class="monospaced">result[i] = ((uint)hi[i] &lt;&lt; 16) | lo[i]</span></p></div>
-<div class="paragraph"><p><span class="monospaced">result[i] = ((long)hi[i] &lt;&lt; 32) | lo[i]</span></p></div>
-<div class="paragraph"><p><span class="monospaced">result[i] = ((ulong)hi[i] &lt;&lt; 32) | lo[i]</span></p></div>
-</div>
-<div class="sect4">
-<h5 id="popcount">popcount</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">popcount</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the number of non-zero bits in <span class="monospaced">x</span>.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="numeric-functions">3.20.3. Numeric functions</h4>
-<div class="sect4">
-<h5 id="abs">abs</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">ugentype</span> <span style="font-weight: bold"><span style="color: #000000">abs</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">|x|</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="abs_diff">abs_diff</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">ugentype</span> <span style="font-weight: bold"><span style="color: #000000">abs_diff</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">|x - y|</span> without modulo overflow.</p></div>
-</div>
-<div class="sect4">
-<h5 id="add_sat">add_sat</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">add_sat</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">x + y</span> and saturates the result.</p></div>
-</div>
-<div class="sect4">
-<h5 id="hadd">hadd</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">hadd</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">(x + y) &gt;&gt; 1</span>.
-The intermediate sum does not modulo overflow.</p></div>
-</div>
-<div class="sect4">
-<h5 id="rhadd">rhadd</h5>
-<div class="paragraph"><p><span class="monospaced">rhadd</span> <a href="#ftn23">[23</a>]:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">rhadd</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">(x + y + 1) &gt;&gt; 1</span>.
-The intermediate sum does not modulo overflow.</p></div>
-</div>
-<div class="sect4">
-<h5 id="clamp">clamp</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">clamp</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> minval<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> maxval<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">clamp</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">sgentype</span> minval<span style="color: #990000">,</span> <span style="color: #008080">sgentype</span> maxval<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">min(max(x, minval), maxval)</span>.</p></div>
-<div class="paragraph"><p>Results are undefined if <span class="monospaced">minval &gt; maxval</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="mad_hi">mad_hi</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">mad_hi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> b<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> c<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">mul_hi(a, b) + c</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="mad_sat">mad_sat</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">mad_sat</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> b<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> c<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">a * b + c</span> and saturates the result.</p></div>
-</div>
-<div class="sect4">
-<h5 id="max">max</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">max</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">max</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">sgentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">y</span> if <span class="monospaced">x &lt; y</span>, otherwise it returns <span class="monospaced">x</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="min">min</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">min</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">min</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">sgentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">y</span> if <span class="monospaced">y &lt; x</span>, otherwise it returns <span class="monospaced">x</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="mul_hi">mul_hi</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">mul_hi</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Computes <span class="monospaced">x * y</span> and returns the high half of the product of <span class="monospaced">x</span> and <span class="monospaced">y</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="sub_sat">sub_sat</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">sub_sat</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">x - y</span> and saturates the result.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="bits-operations">3.20.4. 24-bits operations</h4>
-<div class="paragraph"><p>In this section fast integer functions are described that can be used for optimizing performance of kernels.</p></div>
-<div class="sect4">
-<h5 id="mad24">mad24</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">intn</span> <span style="font-weight: bold"><span style="color: #000000">mad24</span></span><span style="color: #990000">(</span><span style="color: #008080">intn</span> x<span style="color: #990000">,</span> <span style="color: #008080">intn</span> y<span style="color: #990000">,</span> <span style="color: #008080">intn</span> z<span style="color: #990000">);</span>
-<span style="color: #008080">uintn</span> <span style="font-weight: bold"><span style="color: #000000">mad24</span></span><span style="color: #990000">(</span><span style="color: #008080">uintn</span> x<span style="color: #990000">,</span> <span style="color: #008080">uintn</span> y<span style="color: #990000">,</span> <span style="color: #008080">uintn</span> z<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Multiply two 24-bit integer values <span class="monospaced">x</span> and <span class="monospaced">y</span> and add the 32-bit integer result to the 32-bit integer <span class="monospaced">z</span>.
-Refer to definition of mul24 to see how the 24-bit integer multiplication is performed.</p></div>
-<div class="listingblock">
-<a id="mul24"></a>
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">intn</span> <span style="font-weight: bold"><span style="color: #000000">mul24</span></span><span style="color: #990000">(</span><span style="color: #008080">intn</span> x<span style="color: #990000">,</span> <span style="color: #008080">intn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">uintn</span> <span style="font-weight: bold"><span style="color: #000000">mul24</span></span><span style="color: #990000">(</span><span style="color: #008080">uintn</span> x<span style="color: #990000">,</span> <span style="color: #008080">uintn</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Multiply two 24-bit integer values <span class="monospaced">x</span> and <span class="monospaced">y</span>.
-<span class="monospaced">x</span> and <span class="monospaced">y</span> are 32-bit integers but only the low 24-bits are used to perform the multiplication.
-<span class="monospaced">mul24</span> should only be used when values in <span class="monospaced">x</span> and <span class="monospaced">y</span> are in the range [-2<sup>23</sup>, 2<sup>23</sup>-1] if <span class="monospaced">x</span> and <span class="monospaced">y</span> are signed integers and in the range [0, 2<sup>24</sup>-1] if <span class="monospaced">x</span> and <span class="monospaced">y</span> are unsigned integers.
-If <span class="monospaced">x</span> and <span class="monospaced">y</span> are not in this range, the multiplication result is implementation-defined.</p></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="relational-functions">3.21. Relational Functions</h3>
-<div class="paragraph"><p>The relational and equality operators (<span class="monospaced">&lt;</span>, <span class="monospaced">&lt;=</span>, <span class="monospaced">&gt;</span>, <span class="monospaced">&gt;=</span>, <span class="monospaced">!=</span>, <span class="monospaced">==</span>) can be used with scalar and vector built-in types and produce a scalar or vector boolean result respectively as described in <em><a href="#expressions">Expressions</a> section</em>.</p></div>
-<div class="paragraph"><p>Here <span class="monospaced">gentype</span> matches: <span class="monospaced">char</span><em>n</em>, <span class="monospaced">uchar</span><em>n</em>, <span class="monospaced">short</span><em>n</em>, <span class="monospaced">ushort</span><em>n</em>, <span class="monospaced">int</span><em>n</em>, <span class="monospaced">uint</span><em>n</em>, <span class="monospaced">long</span><em>n</em>, <span class="monospaced">ulong</span><em>n</em>, <span class="monospaced">half</span><em>n</em> <a href="#ftn4">[4</a>], <span class="monospaced">float</span><em>n</em> and <span class="monospaced">double</span><em>n</em> <a href="#ftn18">[18</a>].</p></div>
-<div class="paragraph"><p>The relational functions <span class="monospaced">isequal</span>, <span class="monospaced">isgreater</span>, <span class="monospaced">isgreaterequal</span>, <span class="monospaced">isless</span>, <span class="monospaced">islessequal</span>, and <span class="monospaced">islessgreater</span> always return <span class="monospaced">false</span> if either argument is not a number (NaN).
-<span class="monospaced">isnotequal</span> returns <span class="monospaced">true</span> if one or both arguments are not a number (NaN).</p></div>
-<div class="sect3">
-<h4 id="header-opencl_relational-synopsis">3.21.1. Header &lt;opencl_relational&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isequal</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> x<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isnotequal</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> x<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isgreater</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> x<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isgreaterequal</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> x<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isless</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> x<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">islessequal</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> x<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">islessgreater</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> x<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isordered</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> x<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isunordered</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> x<span style="color: #990000">,</span> <span style="color: #008080">halfn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isfinite</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isinf</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isnan</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isnormal</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">signbit</span></span><span style="color: #990000">(</span><span style="color: #008080">halfn</span> t<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isequal</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> x<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isnotequal</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> x<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isgreater</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> x<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isgreaterequal</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> x<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isless</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> x<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">islessequal</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> x<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">islessgreater</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> x<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isordered</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> x<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isunordered</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> x<span style="color: #990000">,</span> <span style="color: #008080">doublen</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isfinite</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isinf</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isnan</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isnormal</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">signbit</span></span><span style="color: #990000">(</span><span style="color: #008080">doublen</span> t<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span> <span style="font-style: italic"><span style="color: #9A1900">//cl_khr_fp64</span></span>
-
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isequal</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isnotequal</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isgreater</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isgreaterequal</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isless</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">islessequal</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">islessgreater</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isordered</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isunordered</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> x<span style="color: #990000">,</span> <span style="color: #008080">floatn</span> y<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isfinite</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isinf</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isnan</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isnormal</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> t<span style="color: #990000">);</span>
-<span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">signbit</span></span><span style="color: #990000">(</span><span style="color: #008080">floatn</span> t<span style="color: #990000">);</span>
-
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span><span style="color: #990000">(</span><span style="color: #008080">booln</span> t<span style="color: #990000">);</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">all</span></span><span style="color: #990000">(</span><span style="color: #008080">booln</span> t<span style="color: #990000">);</span>
-
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">bitselect</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> b<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> c<span style="color: #990000">);</span>
-<span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">select</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> b<span style="color: #990000">,</span> <span style="color: #008080">booln</span> c<span style="color: #990000">);</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="comparison-operations">3.21.2. Comparison operations</h4>
-<div class="sect4">
-<h5 id="isequal">isequal</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isequal</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the component-wise compare of <span class="monospaced">x == y</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="isnotequal">isnotequal</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isnotequal</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the component-wise compare of <span class="monospaced">x != y</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="isgreater">isgreater</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isgreater</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the component-wise compare of <span class="monospaced">x &gt; y</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="isgreaterequal">isgreaterequal</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isgreaterequal</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the component-wise compare of <span class="monospaced">x &gt;= y</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="isless">isless</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isless</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the component-wise compare of <span class="monospaced">x &lt; y</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="islessequal">islessequal</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">islessequal</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the component-wise compare of <span class="monospaced">x &lt;= y</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="islessgreater">islessgreater</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">islessgreater</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns the component-wise compare of <span class="monospaced">(x &lt; y) || (x &gt; y)</span>.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="test-operations">3.21.3. Test operations</h4>
-<div class="sect4">
-<h5 id="isfinite">isfinite</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isfinite</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> t<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Test for finite value.</p></div>
-</div>
-<div class="sect4">
-<h5 id="isinf">isinf</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isinf</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> t<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Test for infinity value (positive or negative) .</p></div>
-</div>
-<div class="sect4">
-<h5 id="isnan">isnan</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isnan</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> t<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Test for a NaN.</p></div>
-</div>
-<div class="sect4">
-<h5 id="isnormal">isnormal</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isnormal</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> t<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Test for a normal value.</p></div>
-</div>
-<div class="sect4">
-<h5 id="isordered">isordered</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isordered</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Test if arguments are ordered.
-<span class="monospaced">isordered()</span> takes arguments <span class="monospaced">x</span> and <span class="monospaced">y</span>, and returns the result of <span class="monospaced">isequal(x, x) &amp;&amp; isequal(y, y)</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="isunordered">isunordered</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">isunordered</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> x<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> y<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Test if arguments are unordered.
-<span class="monospaced">isunordered()</span> takes arguments <span class="monospaced">x</span> and <span class="monospaced">y</span>, returning <span class="monospaced">true</span> if <span class="monospaced">x</span> or <span class="monospaced">y</span> is NaN, and <span class="monospaced">false</span> otherwise.</p></div>
-</div>
-<div class="sect4">
-<h5 id="signbit">signbit</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">booln</span> <span style="font-weight: bold"><span style="color: #000000">signbit</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> t<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Test for sign bit.
-Returns a <span class="monospaced">true</span> if the sign bit in the float is set else returns <span class="monospaced">false</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="any">any</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span><span style="color: #990000">(</span><span style="color: #008080">booln</span> t<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">true</span> if any component of <span class="monospaced">t</span> is <span class="monospaced">true</span>; otherwise returns <span class="monospaced">false</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="all">all</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">all</span></span><span style="color: #990000">(</span><span style="color: #008080">booln</span> t<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Returns <span class="monospaced">true</span> if all components of <span class="monospaced">t</span> are <span class="monospaced">true</span>; otherwise returns <span class="monospaced">false</span>.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="select-operations">3.21.4. Select operations</h4>
-<div class="sect4">
-<h5 id="bitselect">bitselect</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">bitselect</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> b<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> c<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Each bit of the result is the corresponding bit of <span class="monospaced">a</span> if the corresponding bit of <span class="monospaced">c</span> is <span class="monospaced">0</span>.
-Otherwise it is the corresponding bit of <span class="monospaced">b</span>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="select">select</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">gentype</span> <span style="font-weight: bold"><span style="color: #000000">select</span></span><span style="color: #990000">(</span><span style="color: #008080">gentype</span> a<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> b<span style="color: #990000">,</span> <span style="color: #008080">booln</span> c<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>For each component of a vector type,</p></div>
-<div class="paragraph"><p><span class="monospaced">result[i] = c[i] ? b[i] : a[i]</span>.</p></div>
-<div class="paragraph"><p>For a scalar type,  <span class="monospaced">result = c ? b : a</span>.</p></div>
-<div class="paragraph"><p><span class="monospaced">booln</span> must have the same number of elements as <span class="monospaced">gentype</span>.</p></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="vector-data-load-and-store-functions">3.22. Vector Data Load and Store Functions</h3>
-<div class="paragraph"><p>Functions described in this section allow user to read and write vector types from a pointer to memory.
-The results of these functions are undefined if the address being read from or written to is not correctly aligned as described in following subsections.</p></div>
-<div class="paragraph"><p>Here <span class="monospaced">gentype</span> matches: <span class="monospaced">char</span><em>n</em>, <span class="monospaced">uchar</span><em>n</em>, <span class="monospaced">short</span><em>n</em>, <span class="monospaced">ushort</span><em>n</em>, <span class="monospaced">int</span><em>n</em>, <span class="monospaced">uint</span><em>n</em>, <span class="monospaced">long</span><em>n</em>, <span class="monospaced">ulong</span><em>n</em>, <span class="monospaced">half</span><em>n</em> <a href="#ftn4">[4</a>], <span class="monospaced">float</span><em>n</em> and <span class="monospaced">double</span><em>n</em> <a href="#ftn18">[18</a>].</p></div>
-<div class="sect3">
-<h4 id="header-opencl_vector_load_store">3.22.1. Header &lt;opencl_vector_load_store&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-style: italic"><span style="color: #9A1900">//basic load &amp; store</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;T, N&gt;</span> <span style="font-weight: bold"><span style="color: #000000">vload</span></span><span style="color: #990000">(</span><span style="color: #008080">size_t</span> offset<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">*</span> p<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;T, N&gt; vload(size_t offset, const constant_ptr&lt;T&gt;</span> p<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">vstore</span></span><span style="color: #990000">(</span><span style="color: #008080">T</span> data<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> offset<span style="color: #990000">,</span> vector_element_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> p<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//half load &amp; store</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;float, N&gt;</span> <span style="font-weight: bold"><span style="color: #000000">vload_half</span></span><span style="color: #990000">(</span><span style="color: #008080">size_t</span> offset<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> half<span style="color: #990000">*</span> p<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;float, N&gt; vload_half(size_t offset, const constant_ptr&lt;half&gt;</span> p<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">rounding_mode</span> rmode <span style="color: #990000">=</span> rounding_mode<span style="color: #990000">::</span>rte<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">vstore_half</span></span><span style="color: #990000">(</span><span style="color: #008080">T</span> data<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> offset<span style="color: #990000">,</span> half<span style="color: #990000">*</span> p<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//half array load &amp; store</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;float, N&gt;</span> <span style="font-weight: bold"><span style="color: #000000">vloada_half</span></span><span style="color: #990000">(</span><span style="color: #008080">size_t</span> offset<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> half<span style="color: #990000">*</span> p<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;float, N&gt; vloada_half(size_t offset, const constant_ptr&lt;half&gt;</span> p<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">rounding_mode</span> rmode <span style="color: #990000">=</span> rounding_mode<span style="color: #990000">::</span>rte<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">vstorea_half</span></span><span style="color: #990000">(</span><span style="color: #008080">T</span> data<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> offset<span style="color: #990000">,</span> half<span style="color: #990000">*</span> p<span style="color: #990000">);</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="basic-load-store">3.22.2. Basic load &amp; store</h4>
-<div class="sect4">
-<h5 id="vload">vload</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;T, N&gt;</span> <span style="font-weight: bold"><span style="color: #000000">vload</span></span><span style="color: #990000">(</span><span style="color: #008080">size_t</span> offset<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">*</span> p<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;T, N&gt; vload(size_t offset, const constant_ptr&lt;T&gt;</span> p<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Return <span class="monospaced">sizeof(make_vector_t&lt;T, N&gt;)</span> bytes of data read from address <span class="monospaced">(p + (offset * n))</span>.</p></div>
-<div class="paragraph"><p>Requirements:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The address computed as <span class="monospaced">(p+(offset*n))</span> must be 8-bit aligned if <span class="monospaced">T</span> is <span class="monospaced">char</span>, <span class="monospaced">uchar</span>; 16-bit aligned if <span class="monospaced">T</span> is <span class="monospaced">short</span>, <span class="monospaced">ushort</span>, <span class="monospaced">half</span> <a href="#ftn4">[4</a>]; 32-bit aligned if <span class="monospaced">T</span> is <span class="monospaced">int</span>, <span class="monospaced">uint</span>, <span class="monospaced">float</span>; 64-bit aligned if <span class="monospaced">T</span> is <span class="monospaced">long</span>, <span class="monospaced">ulong</span>, <span class="monospaced">double</span> <a href="#ftn18">[18</a>].
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">vload</span> function is only defined for n = 2, 3, 4, 8, 16.
-</p>
-</li>
-<li>
-<p>
-half version is only defined if <em>cl_khr_fp16</em> is supported.
-</p>
-</li>
-<li>
-<p>
-double version is only defined if double precision is supported.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="vstore">vstore</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">vstore</span></span><span style="color: #990000">(</span><span style="color: #008080">T</span> data<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> offset<span style="color: #990000">,</span> vector_element_t<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> p<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Write <span class="monospaced">sizeof(T)</span> bytes given by data to address <span class="monospaced">(p+(offset*n))</span>.</p></div>
-<div class="paragraph"><p>Requirements:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The address computed as <span class="monospaced">(p+(offset*n))</span> must be 8-bit aligned if <span class="monospaced">T</span> is <span class="monospaced">char</span>, <span class="monospaced">uchar</span>; 16-bit aligned if <span class="monospaced">T</span> is <span class="monospaced">short</span>, <span class="monospaced">ushort</span>, <span class="monospaced">half</span> <a href="#ftn4">[4</a>]; 32-bit aligned if <span class="monospaced">T</span> is <span class="monospaced">int</span>, <span class="monospaced">uint</span>, <span class="monospaced">float</span>; 64-bit aligned if <span class="monospaced">T</span> is <span class="monospaced">long</span>, <span class="monospaced">ulong</span>, <span class="monospaced">double</span> <a href="#ftn18">[18</a>].
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">vstore</span> function is only defined for n = 2, 3, 4, 8, 16.
-</p>
-</li>
-<li>
-<p>
-half version is only defined if <em>cl_khr_fp16</em> is supported.
-</p>
-</li>
-<li>
-<p>
-double version is only defined if double precision is supported.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="half-vload-vstore">3.22.3. half vload &amp; vstore</h4>
-<div class="sect4">
-<h5 id="vload_half">vload_half</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;float, N&gt;</span> <span style="font-weight: bold"><span style="color: #000000">vload_half</span></span><span style="color: #990000">(</span><span style="color: #008080">size_t</span> offset<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> half<span style="color: #990000">*</span> p<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;float, N&gt; vload_half(size_t offset, const constant_ptr&lt;half&gt;</span> p<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>Read <span class="monospaced">sizeof(halfn)</span> bytes of data from address <span class="monospaced">(p+(offset*n))</span>.
-The data read is interpreted as a <span class="monospaced">halfn</span> value.
-The <span class="monospaced">halfn</span> value read is converted to a <span class="monospaced">float</span> value and the <span class="monospaced">floatn</span> value is returned.</p></div>
-<div class="paragraph"><p>Requirements:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The read address computed as <span class="monospaced">(p+(offset*n))</span> must be 16-bit aligned.
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">vload_half</span> function is only defined for n = 1, 2, 3, 4, 8, 16.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="vstore_half">vstore_half</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">rounding_mode</span> rmode <span style="color: #990000">=</span> rounding_mode<span style="color: #990000">::</span>rte<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">vstore_half</span></span><span style="color: #990000">(</span><span style="color: #008080">T</span> data<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> offset<span style="color: #990000">,</span> half<span style="color: #990000">*</span> p<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>The <span class="monospaced">T</span> value given by data is first converted to a <span class="monospaced">halfn</span> value using the appropriate rounding mode.
-The <span class="monospaced">half</span> value is then written to address computed as <span class="monospaced">(p+offset)</span>.</p></div>
-<div class="paragraph"><p>Requirements:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The address computed as <span class="monospaced">(p+offset)</span> must be 16-bit aligned.
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">T</span> can be <span class="monospaced">floatn</span> or <span class="monospaced">doublen</span> <a href="#ftn18">[18</a>].
-</p>
-</li>
-<li>
-<p>
-double version is only defined if double precision is supported.
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">vstore_half</span> function is only defined for n = 1, 2, 3, 4, 8, 16.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="half-array-vload-vstore">3.22.4. half array vload &amp; vstore</h4>
-<div class="sect4">
-<h5 id="vloada_half">vloada_half</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;float, N&gt;</span> <span style="font-weight: bold"><span style="color: #000000">vloada_half</span></span><span style="color: #990000">(</span><span style="color: #008080">size_t</span> offset<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> half<span style="color: #990000">*</span> p<span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="color: #008080">make_vector_t&lt;float, N&gt; vloada_half(size_t offset, const constant_ptr&lt;half&gt;</span> p<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>For <span class="monospaced">N</span> = 2, 4, 8 and 16 read <span class="monospaced">sizeof(halfn)</span> bytes of data from address <span class="monospaced">(p+(offset*n))</span>.
-The data read is interpreted as a <span class="monospaced">halfn</span> value.
-The <span class="monospaced">halfn</span> value read is converted to a <span class="monospaced">floatn</span> value and the <span class="monospaced">floatn</span> value is returned.</p></div>
-<div class="paragraph"><p>Requirements:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The address computed as <span class="monospaced">(p+(offset*n))</span> must be aligned to <span class="monospaced">sizeof(halfn)</span> bytes.
-</p>
-</li>
-<li>
-<p>
-For n = 3, <span class="monospaced">vloada_half</span> reads a <span class="monospaced">half3</span> from address <span class="monospaced">(p+(offset*4))</span> and returns a <span class="monospaced">float3</span>.
-The address computed as <span class="monospaced">(p+(offset*4))</span> must be aligned to <span class="monospaced">sizeof(half)*4</span> bytes.
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">vloada_half</span> function is only defined for <span class="monospaced">N</span> = 2, 3, 4, 8, 16.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="vstorea_half">vstorea_half</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">rounding_mode</span> rmode <span style="color: #990000">=</span> rounding_mode<span style="color: #990000">::</span>rte<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">vstorea_half</span></span><span style="color: #990000">(</span><span style="color: #008080">T</span> data<span style="color: #990000">,</span> <span style="color: #008080">size_t</span> offset<span style="color: #990000">,</span> half<span style="color: #990000">*</span> p<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>The <span class="monospaced">T</span> value is converted to a <span class="monospaced">halfn</span> value using the appropriate rounding mode.
-For n = 2, 4, 8 or 16, the halfn value is written to the address computed as <span class="monospaced">(p+(offset*n))</span>.
-For n = 3, the <span class="monospaced">half3</span> value is written to the address computed as <span class="monospaced">(p+(offset*4))</span>.
-The address computed as <span class="monospaced">(p+(offset*4))</span> must be aligned to <span class="monospaced">sizeof(half)*4</span> bytes.</p></div>
-<div class="paragraph"><p>Requirements:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The address computed as <span class="monospaced">(p+(offset* n))</span> must be aligned to <span class="monospaced">sizeof(halfn)</span> bytes.
-</p>
-</li>
-<li>
-<p>
-For n = 3, the address computed as <span class="monospaced">(p+(offset*4))</span> must be aligned to <span class="monospaced">sizeof(half)*4</span> bytes.
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">T</span> can be <span class="monospaced">floatn</span> or <span class="monospaced">doublen</span> <a href="#ftn18">[18</a>].
-</p>
-</li>
-<li>
-<p>
-double version is only defined if double precision is supported.
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">vstorea_half</span> function is only defined for n = 2, 3, 4, 8, 16.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="printf">3.23. printf</h3>
-<div class="paragraph"><p>The OpenCL C++ programming language implements the <span class="monospaced">printf</span> <a href="#ftn24">[24</a>] function.
-This function is defined in header <em>&lt;opencl_printf&gt;</em>.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_printf-synopsis">3.23.1. Header &lt;opencl_printf&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">printf</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #009900">char</span> <span style="color: #990000">*</span>format<span style="color: #990000">,</span> <span style="color: #990000">...);</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="printf-function">3.23.2. printf function</h4>
-<div class="sect4">
-<h5 id="printf-1">printf</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">printf</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #009900">char</span> <span style="color: #990000">*</span>format<span style="color: #990000">,</span> <span style="color: #990000">...);</span></tt></pre></div></div>
-<div class="paragraph"><p>The <span class="monospaced">printf</span> built-in function writes output to an implementation-defined stream such as stdout under control of the string pointed to by <span class="monospaced">format</span> that specifies how subsequent arguments are converted for output.
-If there are insufficient arguments for the format, the behavior is undefined.
-If the format is exhausted while arguments remain, the excess arguments are evaluated (as always) but are otherwise ignored.
-The <span class="monospaced">printf</span> function returns when the end of the format string is encountered.</p></div>
-<div class="paragraph"><p><span class="monospaced">printf</span> returns 0 if it was executed successfully and -1 otherwise.</p></div>
-<div class="paragraph"><p>Limitations:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Format must be known at compile time; otherwise it will be a compile time error.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="printf-output-synchronization">printf output synchronization</h5>
-<div class="paragraph"><p>When the event that is associated with a particular kernel invocation is completed, the output of all <span class="monospaced">printf()</span> calls executed by this kernel invocation is flushed to the implementation-defined output stream.
-Calling <span class="monospaced">clFinish</span> on a host command queue flushes all pending output by <span class="monospaced">printf</span> in previously enqueued and completed commands to the implementation-defined output stream.
-In the case that <span class="monospaced">printf</span> is executed from multiple work-items concurrently, there is no guarantee of ordering with respect to written data.
-For example, it is valid for the output of a work-item with a global id (0,0,1) to appear intermixed with the output of a work-item with a global id (0,0,4) and so on.</p></div>
-</div>
-<div class="sect4">
-<h5 id="printf-format-string">printf format string</h5>
-<div class="paragraph"><p>The format shall be a character sequence, beginning and ending in its initial shift state.
-The format is composed of zero or more directives: ordinary characters (not <strong>%</strong>), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments, converting them, if applicable, according to the corresponding conversion specifier, and then writing the result to the output stream.
-The format is in the <span class="monospaced">constant</span> address space and must be resolvable at compile time i.e. cannot be dynamically created by the executing program, itself.</p></div>
-<div class="paragraph"><p>Each conversion specification is introduced by the character <strong>%</strong>.
-After the <strong>%</strong>, the following appear in sequence:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Zero or more <em>flags</em> (in any order) that modify the meaning of the conversion specification.
-</p>
-</li>
-<li>
-<p>
-An optional minimum <em>field width</em>.
-If the converted value has fewer characters than the field width, it is padded with spaces (by default) on the left (or right, if the left adjustment flag, described later, has been given) to the field width.
-The field width takes the form of a nonnegative decimal integer. <a href="#ftn25">[25</a>]
-</p>
-</li>
-<li>
-<p>
-An optional <em>precision</em> that gives the minimum number of digits to appear for the <em>d</em>, <em>i</em>, <em>o</em>, <em>u</em>, <em>x</em>, and <em>X</em> conversions, the number of digits to appear after the decimal-point character for <em>a</em>, <em>A</em>, <em>e</em>, <em>E</em>, <em>f</em>, and <em>F</em> conversions, the maximum number of significant digits for the <em>g</em> and <em>G</em> conversions, or the maximum number of bytes to be written for <em>s</em> conversions.
-The precision takes the form of a period (.) followed by an optional decimal integer; if only the period is specified, the precision is taken as zero.
-If a precision appears with any other conversion specifier, the behavior is undefined.
-</p>
-</li>
-<li>
-<p>
-An optional <em>vector specifier</em>.
-</p>
-</li>
-<li>
-<p>
-A <em>length modifier</em> that specifies the size of the argument.
-The <em>length modifier</em> is required with a vector specifier and together specifies the vector type.
-Implicit conversions between vector types are disallowed (as per <em><a href="#implicit-type-conversions">Implicit Type Conversions</a> section</em>).
-If the <em>vector specifier</em> is not specified, the <em>length modifier</em> is optional.
-</p>
-</li>
-<li>
-<p>
-A <em>conversion specifier</em> character that specifies the type of conversion to be applied.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The flag characters and their meanings are:</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-<em>-</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-The result of the conversion is left-justified within the field.
-(It is right-justified if this flag is not specified.)
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>+</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-The result of a signed conversion always begins with a plus or minus sign.
-(It begins with a sign only when a negative value is converted if this flag is not specified.) <a href="#ftn26">[26</a>]
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>space</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-If the first character of a signed conversion is not a sign, or if a signed conversion results in no characters, a space is prefixed to the result.
-If the <em>space</em> and <em>+</em> flags both appear, the <em>space</em> flag is ignored.
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>#</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-The result is converted to an "alternative form".
-For <em>o</em> conversion, it increases the precision, if and only if necessary, to force the first digit of the result to be a zero (if the value and precision are both 0, a single 0 is printed).
-For <em>x</em> (or <em>X</em>) conversion, a nonzero result has <strong>0x</strong> (or <strong>0X</strong>) prefixed to it.
-For <em>a</em>, <em>A</em>, <em>e</em>, <em>E</em>, <em>f</em>, <em>F</em>, <em>g</em> and <em>G</em> conversions, the result of converting a floating-point number always contains a decimal-point character, even if no digits follow it.
-(Normally, a decimal-point character appears in the result of these conversions only if a digit follows it.) For <em>g</em> and <em>G</em> conversions, trailing zeros are <em>not</em> removed from the result.
-For other conversions, the behavior is undefined.
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>0</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-For <em>d</em>, <em>i</em>, <em>o</em>, <em>u</em>, <em>x</em>, <em>X</em>, <em>a</em>, <em>A</em>, <em>e</em>, <em>E</em>, <em>f</em>, <em>F</em>, <em>g</em> and <em>G</em> conversions, leading zeros (following any indication of sign or base) are used to pad to the field width rather than performing space padding, except when converting an infinity or NaN.
-If the <em>0</em> and <em>-</em> flags both appear, the <em>0</em> flag is ignored.
-For <em>d</em>, <em>i</em>, <em>o</em>, <em>u</em>, <em>x</em>, and <em>X</em> conversions, if a precision is specified, the <em>0</em> flag is ignored.
-For other conversions, the behavior is undefined.
-</p>
-</td>
-</tr>
-</table></div>
-<div class="paragraph"><p>The vector specifier and its meaning is:</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-<em>vn</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Specifies that a following <em>a</em>, <em>A</em>, <em>e</em>, <em>E</em>, <em>f</em>, <em>F</em>, <em>g</em>, <em>G</em>, <em>d</em>, <em>i</em>, <em>o</em>, <em>u</em>, <em>x</em> or <em>X</em> conversion specifier applies to a vector argument, where <em>n</em> is the size of the vector and must be 2, 3, 4, 8 or 16.
-</p>
-<div class="paragraph"><p>The vector value is displayed in the following general form:</p></div>
-<div class="paragraph"><p>value1 <em>C</em> value2 <em>C</em> &#8230; <em>C</em> value<em>n</em></p></div>
-<div class="paragraph"><p>where <em>C</em> is a separator character.
-The value for this separator character is a comma.</p></div>
-</td>
-</tr>
-</table></div>
-<div class="paragraph"><p>If the vector specifier is not used, the length modifiers and their meanings are:</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-<em>hh</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Specifies that a following <em>d</em>, <em>i</em>, <em>o</em>, <em>u</em>, <em>x</em>, or <em>X</em> conversion specifier applies to a <span class="monospaced">char</span> or <span class="monospaced">uchar</span> argument (the argument will have been promoted according to the integer promotions, but its value shall be converted to <span class="monospaced">char</span> or <span class="monospaced">uchar</span> before printing).
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>h</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Specifies that a following <em>d</em>, <em>i</em>, <em>o</em>, <em>u</em>, <em>x</em> or <em>X</em> conversion specifier applies to a <span class="monospaced">short</span> or <span class="monospaced">ushort</span> argument (the argument will have been promoted according to the integer promotions, but its value shall be converted to <span class="monospaced">short</span> or <span class="monospaced">ushort</span> before printing).
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>l</em> (ell)
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Specifies that a following <em>d</em>, <em>i</em>, <em>o</em>, <em>u</em>, <em>x</em> or <em>X</em> conversion specifier applies to a <span class="monospaced">long</span> or <span class="monospaced">ulong</span> argument.
-The <em>l</em> modifier is supported by the full profile.
-For the embedded profile, the <em>l</em> modifier is supported only if 64-bit integers are supported by the device.
-</p>
-</td>
-</tr>
-</table></div>
-<div class="paragraph"><p>If the vector specifier is used, the length modifiers and their meanings are:</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-<em>hh</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Specifies that a following <em>d</em>, <em>i</em>, <em>o</em>, <em>u</em>, <em>x</em> or <em>X</em> conversion specifier applies to a <span class="monospaced">char</span><em>n</em> or <span class="monospaced">uchar</span><em>n</em> argument (the argument will not be promoted).
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>h</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Specifies that a following <em>d</em>, <em>i</em>, <em>o</em>, <em>u</em>, <em>x</em> or <em>X</em> conversion specifier applies to a <span class="monospaced">short</span><em>n</em> or <span class="monospaced">ushort</span><em>n</em> argument (the argument will not be promoted); that a following <em>a</em>, <em>A</em>, <em>e</em>, <em>E</em>, <em>f</em>, <em>F</em>, <em>g</em> or <em>G</em> conversion specifier applies to a <span class="monospaced">half</span><em>n</em> argument.
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>hl</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-This modifier can only be used with the vector specifier.
-Specifies that a following <em>d</em>, <em>i</em>, <em>o</em>, <em>u</em>, <em>x</em> or <em>X</em> conversion specifier applies to an <span class="monospaced">int</span><em>n</em> or <span class="monospaced">uint</span><em>n</em> argument; that a following <em>a</em>, <em>A</em>, <em>e</em>, <em>E</em>, <em>f</em>, <em>F</em>, <em>g</em> or <em>G</em> conversion specifier applies to a <span class="monospaced">float</span><em>n</em> argument.
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>l</em> (ell)
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Specifies that a following <em>d</em>, <em>i</em>, <em>o</em>, <em>u</em>, <em>x</em> or <em>X</em> conversion specifier applies to a <span class="monospaced">long</span><em>n</em> or <span class="monospaced">ulong</span><em>n</em> argument; that a following <em>a</em>, <em>A</em>, <em>e</em>, <em>E</em>, <em>f</em>, <em>F</em>, <em>g</em> or <em>G</em> conversion specifier applies to a <span class="monospaced">double</span><em>n</em> argument.
-The <em>l</em> modifier is supported by the full profile.
-For the embedded profile, the <em>l</em> modifier is supported only if 64-bit integers or double-precision floating-point are supported by the device.
-</p>
-</td>
-</tr>
-</table></div>
-<div class="paragraph"><p>If a vector specifier appears without a length modifier, the behavior is undefined.
-The vector data type described by the vector specifier and length modifier must match the data type of the argument; otherwise the behavior is undefined.</p></div>
-<div class="paragraph"><p>If a length modifier appears with any conversion specifier other than as specified above, the behavior is undefined.</p></div>
-<div class="paragraph"><p>The conversion specifiers and their meanings are:</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-<em>d</em>,&#160;<em>i</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-The <span class="monospaced">int</span>, <span class="monospaced">char</span><em>n</em>, <span class="monospaced">short</span><em>n</em>, <span class="monospaced">int</span><em>n</em> or <span class="monospaced">long</span><em>n</em> argument is converted to signed decimal in the style <em>[-]dddd</em>.
-The precision specifies the minimum number of digits to appear; if the value being converted can be represented in fewer digits, it is expanded with leading zeros.
-The default precision is 1. The result of converting a zero value with a precision of zero is no characters.
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>o</em>,&#160;<em>u</em>, <em>x</em>,&#160;<em>X</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-The <span class="monospaced">uint</span>, <span class="monospaced">uchar</span><em>n</em>, <span class="monospaced">ushort</span><em>n</em>, <span class="monospaced">uint</span><em>n</em> or <span class="monospaced">ulong</span><em>n</em> argument is converted to unsigned octal (<em>o</em>), unsigned decimal (<em>u</em>), or unsigned hexadecimal notation (<em>x</em> or <em>X</em>) in the style <em>dddd</em>; the letters <strong>abcdef</strong> are used for <em>x</em> conversion and the letters <strong>ABCDEF</strong> for <em>X</em> conversion.
-The precision specifies the minimum number of digits to appear; if the value being converted can be represented in fewer digits, it is expanded with leading zeros.
-The default precision is 1.
-The result of converting a zero value with a precision of zero is no characters.
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>f</em>,&#160;<em>F</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-A <span class="monospaced">double</span>, <span class="monospaced">half</span><em>n</em>, <span class="monospaced">float</span><em>n</em> or <span class="monospaced">double</span><em>n</em> argument representing a floating-point number is converted to decimal notation in the style <em>[-]ddd</em><strong>.</strong><em>ddd</em>, where the number of digits after the decimal-point character is equal to the precision specification.
-If the precision is missing, it is taken as 6; if the precision is zero and the <em>#</em> flag is not specified, no decimal-point character appears.
-If a decimal-point character appears, at least one digit appears before it.
-The value is rounded to the appropriate number of digits.
-A <span class="monospaced">double</span>, <span class="monospaced">half</span><em>n</em>, <span class="monospaced">float</span><em>n</em> or <span class="monospaced">double</span><em>n</em> argument representing an infinity is converted in one of the styles <em>[-]</em><strong>inf</strong> or <em>[-]</em><strong>infinity</strong> - which style is implementation-defined.
-A <span class="monospaced">double</span>, <span class="monospaced">half</span><em>n</em>, <span class="monospaced">float</span><em>n</em> or <span class="monospaced">double</span><em>n</em> argument representing a NaN is converted in one of the styles <em>[-]</em><strong>nan</strong> or <em>[-]</em><strong>nan</strong>(<em>n-char-sequence</em>) - which style, and the meaning of any <em>n-char-sequence</em>, is implementation-defined.
-The <em>F</em> conversion specifier produces <strong>INF</strong>, <strong>INFINITY</strong>, or <strong>NAN</strong> instead of <strong>inf</strong>, <strong>infinity</strong>, or <strong>nan</strong>, respectively. <a href="#ftn27">[27</a>]
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>e</em>,&#160;<em>E</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-A <span class="monospaced">double</span>, <span class="monospaced">half</span><em>n</em>, <span class="monospaced">float</span><em>n</em> or <span class="monospaced">double</span><em>n</em> argument representing a floating-point number is converted in the style <em>[-]d</em><strong>.</strong><em>ddd</em><strong>e</strong><em>±dd</em>, where there is one digit (which is nonzero if the argument is nonzero) before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero and the <em>#</em> flag is not specified, no decimal-point character appears.
-The value is rounded to the appropriate number of digits.
-The <em>E</em> conversion specifier produces a number with <strong>E</strong> instead of <strong>e</strong> introducing the exponent.
-The exponent always contains at least two digits, and only as many more digits as necessary to represent the exponent.
-If the value is zero, the exponent is zero.
-A <span class="monospaced">double</span>, <span class="monospaced">half</span><em>n</em>, <span class="monospaced">float</span><em>n</em> or <span class="monospaced">double</span><em>n</em> argument representing an infinity or NaN is converted in the style of an <em>f</em> or <em>F</em> conversion specifier.
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>g</em>,&#160;<em>G</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-A <span class="monospaced">double</span>, <span class="monospaced">half</span><em>n</em>, <span class="monospaced">float</span><em>n</em> or <span class="monospaced">double</span><em>n</em> argument representing a floating-point number is converted in style <em>f</em> or <em>e</em> (or in style <em>F</em> or <em>E</em> in the case of a <em>G</em> conversion specifier), depending on the value converted and the precision.
-Let <em>P</em> equal the precision if nonzero, 6 if the precision is omitted, or 1 if the precision is zero.
-Then, if a conversion with style <em>E</em> would have an exponent of <em>X</em>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-if <em>P &gt; X ≥ −4</em>, the conversion is with style <em>f</em> (or <em>F</em>) and precision <em>P − (X + 1)</em>.
-</p>
-</li>
-<li>
-<p>
-otherwise, the conversion is with style <em>e</em> (or <em>E</em>) and precision <em>P − 1</em>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Finally, unless the <em>#</em> flag is used, any trailing zeros are removed from the fractional portion of the result and the decimal-point character is removed if there is no fractional portion remaining.
-A <span class="monospaced">double</span>, <span class="monospaced">half</span><em>n</em>, <span class="monospaced">float</span><em>n</em> or <span class="monospaced">double</span><em>n</em> argument representing an infinity or NaN is converted in the style of an <em>f</em> or <em>F</em> conversion specifier.</p></div>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>a</em>,&#160;<em>A</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-A <span class="monospaced">double</span>, <span class="monospaced">half</span><em>n</em>, <span class="monospaced">float</span><em>n</em> or <span class="monospaced">double</span><em>n</em> argument representing a floating-point number is converted in the style <em>[-]</em><strong>0x</strong><em>h</em><strong>.</strong><em>hhhh</em><strong>p</strong><em>±d</em>, where there is one hexadecimal digit (which is nonzero if the argument is a normalized floating-point number and is otherwise unspecified) before the decimal-point character <a href="#ftn28">[28</a>] and the number of hexadecimal digits after it is equal to the precision; if the precision is missing, then the precision is sufficient for an exact representation of the value; if the precision is zero and the <em>#</em> flag is not specified, no decimal point character appears.
-The letters <strong>abcdef</strong> are used for <em>a</em> conversion and the letters <strong>ABCDEF</strong> for <em>A</em> conversion.
-The <em>A</em> conversion specifier produces a number with <strong>X</strong> and <strong>P</strong> instead of <strong>x</strong> and <strong>p</strong>.
-The exponent always contains at least one digit, and only as many more digits as necessary to represent the decimal exponent of 2.
-If the value is zero, the exponent is zero.
-A <span class="monospaced">double</span>, <span class="monospaced">half</span><em>n</em>, <span class="monospaced">float</span><em>n</em> or <span class="monospaced">double</span><em>n</em> argument representing an infinity or NaN is converted in the style of an <em>f</em> or <em>F</em> conversion specifier.
-</p>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">The conversion specifiers <em>e</em>, <em>E</em>, <em>g</em>, <em>G</em>, <em>a</em>, <em>A</em> convert a <span class="monospaced">float</span> or <span class="monospaced">half</span> argument that is a scalar type to a <span class="monospaced">double</span> only if the <span class="monospaced">double</span> data type is supported.
-If the <span class="monospaced">double</span> data type is not supported, the argument will be a <span class="monospaced">float</span> instead of a <span class="monospaced">double</span> and the <span class="monospaced">half</span> type will be converted to a <span class="monospaced">float</span>.</td>
-</tr></table>
-</div>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>c</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-The <span class="monospaced">int</span> argument is converted to an <span class="monospaced">uchar</span> and the resulting character is written.
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>s</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-The argument shall be a literal string. <a href="#ftn29">[29</a>]
-Characters from the literal string array are written up to (but not including) the terminating null character.
-If the precision is specified, no more than that many bytes are written.
-If the precision is not specified or is greater than the size of the array, the array shall contain a null character.
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>p</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-The argument shall be a pointer to <span class="monospaced">void</span>.
-The pointer can refer to a memory region in the global, constant, local, private or  generic address space.
-The value of the pointer is converted to a sequence of printing characters in an implementation-defined manner.
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-<em>%</em>
-<br>
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-A <strong>%</strong> character is written.
-No argument is converted. The complete conversion specification shall be <strong>%%</strong>.
-</p>
-</td>
-</tr>
-</table></div>
-<div class="paragraph"><p>If a conversion specification is invalid, the behavior is undefined.
-If any argument is not the correct type for the corresponding conversion specification, the behavior is undefined.</p></div>
-<div class="paragraph"><p>In no case does a nonexistent or small field width cause truncation of a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.</p></div>
-<div class="paragraph"><p>For <em>a</em> and <em>A</em> conversions, the value is correctly rounded to a hexadecimal floating number with the given precision.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #008080">float4</span>  f <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">float4</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">2</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">3</span><span style="color: #990000">.</span>0f<span style="color: #990000">,</span> <span style="color: #993399">4</span><span style="color: #990000">.</span>0f<span style="color: #990000">);</span>
-<span style="color: #008080">uchar4</span> uc <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">uchar4</span></span><span style="color: #990000">(</span><span style="color: #993399">0xFA</span><span style="color: #990000">,</span> <span style="color: #993399">0xFB</span><span style="color: #990000">,</span> <span style="color: #993399">0xFC</span><span style="color: #990000">,</span> <span style="color: #993399">0xFD</span><span style="color: #990000">);</span>
-
-<span style="font-weight: bold"><span style="color: #000000">printf</span></span><span style="color: #990000">(</span><span style="color: #FF0000">"f4 = %2.2v4hlf</span><span style="color: #CC33CC">\n</span><span style="color: #FF0000">"</span><span style="color: #990000">,</span> f<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #000000">printf</span></span><span style="color: #990000">(</span><span style="color: #FF0000">"uc = %#v4hhx</span><span style="color: #CC33CC">\n</span><span style="color: #FF0000">"</span><span style="color: #990000">,</span> uc<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>The above two <span class="monospaced">printf</span> calls print the following:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>f4 = 1.00,2.00,3.00,4.00
-uc = 0xfa,0xfb,0xfc,0xfd</pre>
-</div></div>
-<div class="paragraph"><p>A few examples of valid use cases of <span class="monospaced">printf</span> for the conversion specifier <em>s</em> are given below.
-The argument value must be a pointer to a literal string.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_printf&gt;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">my_kernel</span></span><span style="color: #990000">(</span> <span style="color: #990000">...</span> <span style="color: #990000">)</span>
-<span style="color: #FF0000">{</span>
-    cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">printf</span></span><span style="color: #990000">(</span><span style="color: #FF0000">"%s</span><span style="color: #CC33CC">\n</span><span style="color: #FF0000">"</span><span style="color: #990000">,</span> <span style="color: #FF0000">"this is a test string</span><span style="color: #CC33CC">\n</span><span style="color: #FF0000">"</span><span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>A few examples of invalid use cases of <span class="monospaced">printf</span> for the conversion specifier <em>s</em> are given below:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_printf&gt;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">my_kernel</span></span><span style="color: #990000">(</span><span style="color: #009900">char</span> <span style="color: #990000">*</span>s<span style="color: #990000">,</span> <span style="color: #990000">...</span> <span style="color: #990000">)</span>
-<span style="color: #FF0000">{</span>
-    cl<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">printf</span></span><span style="color: #990000">(</span><span style="color: #FF0000">"%s</span><span style="color: #CC33CC">\n</span><span style="color: #FF0000">"</span><span style="color: #990000">,</span> s<span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>A few examples of invalid use cases of <span class="monospaced">printf</span> where data types given by the vector specifier and length modifier do not match the argument type are given below:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_printf&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">my_kernel</span></span><span style="color: #990000">(</span> <span style="color: #990000">...</span> <span style="color: #990000">)</span>
-<span style="color: #FF0000">{</span>
-    <span style="color: #008080">uint2</span> ui <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">uint2</span></span><span style="color: #990000">(</span><span style="color: #993399">0x12345678</span><span style="color: #990000">,</span> <span style="color: #993399">0x87654321</span><span style="color: #990000">);</span>
-    <span style="font-weight: bold"><span style="color: #000000">printf</span></span><span style="color: #990000">(</span><span style="color: #FF0000">"unsigned short value = (%#v2hx)</span><span style="color: #CC33CC">\n</span><span style="color: #FF0000">"</span><span style="color: #990000">,</span> ui<span style="color: #990000">);</span>
-    <span style="font-weight: bold"><span style="color: #000000">printf</span></span><span style="color: #990000">(</span><span style="color: #FF0000">"unsigned char value = (%#v2hhx)</span><span style="color: #CC33CC">\n</span><span style="color: #FF0000">"</span><span style="color: #990000">,</span> ui<span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="differences-between-opencl-c-and-c14-printf">3.23.3. Differences between OpenCL C++ and C++14 printf</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-The <em>l</em> modifier followed by a <em>c</em> conversion specifier or <em>s</em> conversion specifier is not supported by OpenCL C++.
-</p>
-</li>
-<li>
-<p>
-The <em>ll</em>, <em>j</em>, <em>z</em>, <em>t</em>, and <em>L</em> length modifiers are not supported by OpenCL C++ but are reserved.
-</p>
-</li>
-<li>
-<p>
-The <em>n</em> conversion specifier is not supported by OpenCL C++ but is reserved.
-</p>
-</li>
-<li>
-<p>
-OpenCL C++ adds the optional <em>vn</em> vector specifier to support printing of vector types.
-</p>
-</li>
-<li>
-<p>
-The conversion specifiers <em>f</em>, <em>F</em>, <em>e</em>, <em>E</em>, <em>g</em>, <em>G</em>, <em>a</em>, <em>A</em> convert a float argument to a double only if the double data type is supported.
-Refer to the description of <span class="monospaced">CL_DEVICE_DOUBLE_FP_CONFIG</span> in <em>table 4.3</em>.
-If the double data type is not supported, the argument will be a float instead of a double.
-</p>
-</li>
-<li>
-<p>
-For the embedded profile, the <em>l</em> length modifier is supported only if 64-bit integers are supported.
-</p>
-</li>
-<li>
-<p>
-In OpenCL C++, <span class="monospaced">printf</span> returns 0 if it was executed successfully and -1 otherwise vs. C++14 where <span class="monospaced">printf</span> returns the number of characters printed or a negative value if an output or encoding error occurred.
-</p>
-</li>
-<li>
-<p>
-In OpenCL C++, the conversion specifier <em>s</em> can only be used for arguments that are literal strings.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="atomic-operations-library">3.24. Atomic Operations Library</h3>
-<div class="paragraph"><p>The OpenCL C++ programming language implements a subset of the C++14 atomics (refer to <em>chapter 29</em> of the C++14 specification) and synchronization operations.
-These operations play a special role in making assignments in one work-item visible to another.
-Please note that this chapter only presents synopsis of the atomics library and differences from C++14 specification.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_atomic-synopsis">3.24.1. Header &lt;opencl_atomic&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> memory_order<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> memory_scope<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">atomic</span><span style="color: #990000">;</span>
-<span style="font-style: italic"><span style="color: #9A1900">// specialization for scalar types T that satisfy cl::is_integral&lt;T&gt;</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">atomic</span><span style="color: #990000">&lt;</span>integral<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">atomic</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_int <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span><span style="color: #009900">int</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_uint <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span><span style="color: #009900">unsigned</span> <span style="color: #009900">int</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span> <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_base_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span> <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_extended_atomics<span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_long <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span><span style="color: #009900">long</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_ulong <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span><span style="color: #009900">unsigned</span> <span style="color: #009900">long</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_float <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span><span style="color: #009900">float</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span> <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_fp64<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-    <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_base_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-    <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_extended_atomics<span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_double <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span><span style="color: #009900">double</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_base_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_extended_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     __INTPTR_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">64</span><span style="color: #990000">)</span> <span style="color: #990000">||</span>
-    __INTPTR_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">32</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_intptr_t <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span>intptr_t<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_uintptr_t <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span>uintptr_t<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_base_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_extended_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     __SIZE_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">64</span><span style="color: #990000">)</span> <span style="color: #990000">||</span>
-    __SIZE_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">32</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_size_t <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span>size_t<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_base_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_extended_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     __PTRDIFF_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">64</span><span style="color: #990000">)</span> <span style="color: #990000">||</span>
-    __PTRDIFF_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">32</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_ptrdiff_t <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span>ptrdiff_t<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// Please note that all operations taking memory_order as a parameter have,</span></span>
-<span style="font-style: italic"><span style="color: #9A1900">// in addition to cpp14 specification, additional parameter for memory_scope</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_is_lock_free</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_is_lock_free</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_init</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_init</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_store</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_store</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_store_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                           memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_store_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                           memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_load</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_load</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_load_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> memory_order<span style="color: #990000">,</span>
-                       memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_load_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_exchange</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_exchange</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_exchange_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                           memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_exchange_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_weak</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_weak</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_strong</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_strong</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_weak_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">*,</span> T<span style="color: #990000">,</span>
-                                           memory_order<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                                           memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_weak_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                                           memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_strong_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">*,</span> T<span style="color: #990000">,</span>
-                                             memory_order<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                                             memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_strong_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">*,</span> T<span style="color: #990000">,</span>
-                                             memory_order<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                                             memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// Please note that all operations taking memory_order as a parameter have</span></span>
-<span style="font-style: italic"><span style="color: #9A1900">// additional overloads, in addition to cpp14 specification, taking both</span></span>
-<span style="font-style: italic"><span style="color: #9A1900">// memory_order and memory_scope parameters.</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_add</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_add</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_add_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_add_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_sub</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_sub</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_sub_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_sub_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_and</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_and</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_and_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_and_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_or</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_or</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_or_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                           memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_or_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_xor</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_xor</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_xor_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_xor_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-style: italic"><span style="color: #9A1900">//OpenCL specific min/max atomics:</span></span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_min</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_min</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_min_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_min_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_max</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_max</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_max_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_max_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_store</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_store</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_store_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                           memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_store_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                           memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_load</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_load</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_load_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_load_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                       memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_exchange</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_exchange</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_exchange_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                           memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_exchange_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                           memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_strong</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> T<span style="color: #990000">*</span> expected<span style="color: #990000">,</span>
-                                    <span style="color: #008080">T</span> desired<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_strong</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> T<span style="color: #990000">*</span> expected<span style="color: #990000">,</span>
-                                    <span style="color: #008080">T</span> desired<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_strong_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> T<span style="color: #990000">*</span> expected<span style="color: #990000">,</span>
-                                             <span style="color: #008080">T</span> desired<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                                             memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_strong_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span>
-                                             T<span style="color: #990000">*</span> expected<span style="color: #990000">,</span> <span style="color: #008080">T</span> desired<span style="color: #990000">,</span>
-                                             memory_order<span style="color: #990000">,</span>
-                                             memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_weak</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> T<span style="color: #990000">*</span> expected<span style="color: #990000">,</span>
-                                  <span style="color: #008080">T</span> desired<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_weak</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> T<span style="color: #990000">*</span> expected<span style="color: #990000">,</span>
-                                  <span style="color: #008080">T</span> desired<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_weak_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> T<span style="color: #990000">*</span> expected<span style="color: #990000">,</span>
-                                           <span style="color: #008080">T</span> desired<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                                           memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_compare_exchange_weak_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span>
-                                           T<span style="color: #990000">*</span> expected<span style="color: #990000">,</span> <span style="color: #008080">T</span> desired<span style="color: #990000">,</span>
-                                           memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_add</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_add</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_add_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_add_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_and</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_and</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_and_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_and_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_or</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_or</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_or_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                           memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_or_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                           memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_sub</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_sub</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_sub_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_sub_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_xor</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_xor</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_xor_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_xor_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">T</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_base_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_extended_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     __SIZE_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">64</span><span style="color: #990000">)</span> <span style="color: #990000">||</span>
-    __SIZE_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">32</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_add</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_add</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_add_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                             memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_add_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">,</span>
-                             memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_and</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_and</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_and_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                             memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_and_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">,</span>
-                             memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_or</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_or</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_or_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                            memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_or_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">,</span>
-                            memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_sub</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_sub</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_sub_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                             memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_sub_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">,</span>
-                             memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_xor</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_xor</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_xor_explicit</span></span><span style="color: #990000">(</span>atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                             memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fetch_xor_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic<span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;*</span> object<span style="color: #990000">,</span> <span style="color: #008080">ptrdiff_t</span> value<span style="color: #990000">,</span>
-                             memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fence</span></span><span style="color: #990000">(</span><span style="color: #008080">mem_fence</span> flags<span style="color: #990000">,</span> <span style="color: #008080">memory_order</span> order<span style="color: #990000">,</span>
-                  <span style="color: #008080">memory_scope</span> scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> <span style="font-weight: bold"><span style="color: #000000">ATOMIC_VAR_INIT</span></span><span style="color: #990000">(</span>value<span style="color: #990000">)</span> as described in <span style="color: #008080">cpp14</span> specification <span style="color: #990000">[</span>atomics<span style="color: #990000">.</span>types<span style="color: #990000">.</span>operations<span style="color: #990000">]</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="order-and-scope">3.24.2. Order and scope</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> memory_order
-<span style="color: #FF0000">{</span>
-    memory_order_relaxed<span style="color: #990000">,</span>
-    memory_order_acquire<span style="color: #990000">,</span>
-    memory_order_release<span style="color: #990000">,</span>
-    memory_order_acq_rel<span style="color: #990000">,</span>
-    memory_order_seq_cst
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> memory_scope
-<span style="color: #FF0000">{</span>
-    memory_scope_all_svm_devices<span style="color: #990000">,</span>
-    memory_scope_device<span style="color: #990000">,</span>
-    memory_scope_work_group<span style="color: #990000">,</span>
-    memory_scope_sub_group<span style="color: #990000">,</span>
-    memory_scope_work_item
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>An enumeration <span class="monospaced">memory_order</span> is described in section [atomics.order] of C++14 specification. <a href="#ftn7">[7</a>]</p></div>
-<div class="paragraph"><p>The enumerated type <span class="monospaced">memory_scope</span> specifies whether the memory ordering constraints given by <span class="monospaced">memory_order</span> apply to work-items in a work-group or work-items of a kernel(s) executing on the device or across devices (in the case of shared virtual memory). Its enumeration constants are as follows:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">memory_scope_work_item</span> <a href="#ftn8">[8</a>]
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">memory_scope_sub_group</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">memory_scope_work_group</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">memory_scope_device</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">memory_scope_all_svm_devices</span>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The memory scope should only be used when performing atomic operations to global memory.
-Atomic operations to local memory only guarantee memory ordering in the work-group not across work-groups and therefore ignore the <span class="monospaced">memory_scope</span> value.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">With fine-grained system SVM, sharing happens at the granularity of individual loads and stores anywhere in host memory.
-Memory consistency is always guaranteed at synchronization points, but to obtain finer control over consistency, the OpenCL atomics functions may be used to ensure that the updates to individual data values made by
-one unit of execution are visible to other execution units.
-In particular, when a host thread needs fine control over the consistency of memory that is shared with one or more OpenCL devices, it must use atomic and fence operations that are compatible with the C++14 atomic operations <a href="#ftn9">[9</a>].</td>
-</tr></table>
-</div>
-</div>
-<div class="sect3">
-<h4 id="atomic-lock-free-property">3.24.3. Atomic lock-free property</h4>
-<div class="paragraph"><p>OpenCL C++ requires all atomic types to be lock free.</p></div>
-</div>
-<div class="sect3">
-<h4 id="atomic-types">3.24.4. Atomic types</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">atomic</span>
-<span style="color: #FF0000">{</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">is_lock_free</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">is_lock_free</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">store</span></span><span style="color: #990000">(</span>T<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-               memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">store</span></span><span style="color: #990000">(</span>T<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-               memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">load</span></span><span style="color: #990000">(</span>memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-           memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">load</span></span><span style="color: #990000">(</span>memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-           memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #000000">T</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #000000">T</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">exchange</span></span><span style="color: #990000">(</span>T<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-               memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">exchange</span></span><span style="color: #990000">(</span>T<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-               memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_weak</span></span><span style="color: #990000">(</span>T<span style="color: #990000">&amp;,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                               memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_weak</span></span><span style="color: #990000">(</span>T<span style="color: #990000">&amp;,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                               memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_strong</span></span><span style="color: #990000">(</span>T<span style="color: #990000">&amp;,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                                 memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_strong</span></span><span style="color: #990000">(</span>T<span style="color: #990000">&amp;,</span> T<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                                 memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_weak</span></span><span style="color: #990000">(</span>T<span style="color: #990000">&amp;,</span> T<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                          memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_weak</span></span><span style="color: #990000">(</span>T<span style="color: #990000">&amp;,</span> T<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                               memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_strong</span></span><span style="color: #990000">(</span>T<span style="color: #990000">&amp;,</span> T<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                          memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_strong</span></span><span style="color: #990000">(</span>T<span style="color: #990000">&amp;,</span> T<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                                 memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">atomic</span></span><span style="color: #990000">()</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">atomic</span></span><span style="color: #990000">(</span>T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">atomic</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    atomic<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    atomic<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic<span style="color: #990000">&amp;)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>T<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>T<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">atomic</span><span style="color: #990000">&lt;</span>integral<span style="color: #990000">&gt;</span>
-<span style="color: #FF0000">{</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">is_lock_free</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">is_lock_free</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">store</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-               memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">store</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-               memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">load</span></span><span style="color: #990000">(</span>memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                  memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">load</span></span><span style="color: #990000">(</span>memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                  memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #000000">integral</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> <span style="font-weight: bold"><span style="color: #000000">integral</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">exchange</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                      memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">exchange</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                      memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_weak</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">&amp;,</span> integral<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                               memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_weak</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">&amp;,</span> integral<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                               memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_strong</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">&amp;,</span> integral<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                                 memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_strong</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">&amp;,</span> integral<span style="color: #990000">,</span> memory_order<span style="color: #990000">,</span>
-                                 memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_weak</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">&amp;,</span> integral<span style="color: #990000">,</span>
-                          memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                          memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_weak</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">&amp;,</span> integral<span style="color: #990000">,</span>
-                               memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                               memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_strong</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">&amp;,</span> integral<span style="color: #990000">,</span>
-                          memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                          memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_strong</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">&amp;,</span> integral<span style="color: #990000">,</span>
-                                 memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                                 memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">fetch_add</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                       memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">fetch_add</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                       memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">fetch_sub</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                       memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">fetch_sub</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                       memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">fetch_and</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                       memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">fetch_and</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                       memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">fetch_or</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                      memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">fetch_or</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                      memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">fetch_xor</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                       memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">fetch_xor</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                       memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">fetch_min</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                       memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">fetch_min</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                       memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">fetch_max</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                       memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #000000">fetch_max</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                       memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">atomic</span></span><span style="color: #990000">()</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">atomic</span></span><span style="color: #990000">(</span>integral<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">atomic</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    atomic<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    atomic<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic<span style="color: #990000">&amp;)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>integral<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>integral<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span>integral<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span>integral<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span>integral<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span>integral<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&amp;=(</span>integral<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">&amp;=(</span>integral<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">|=(</span>integral<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">|=(</span>integral<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">^=(</span>integral<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">integral</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">^=(</span>integral<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_base_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_extended_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     __SIZE_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">64</span><span style="color: #990000">)</span> <span style="color: #990000">||</span>
-    __SIZE_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">32</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">atomic</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">*&gt;</span>
-<span style="color: #FF0000">{</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">is_lock_free</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">is_lock_free</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">store</span></span><span style="color: #990000">(</span>T<span style="color: #990000">*,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-               memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">store</span></span><span style="color: #990000">(</span>T<span style="color: #990000">*,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-               memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">load</span></span><span style="color: #990000">(</span>memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-            memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">load</span></span><span style="color: #990000">(</span>memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-            memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> T<span style="color: #990000">*()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span> T<span style="color: #990000">*()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">exchange</span></span><span style="color: #990000">(</span>T<span style="color: #990000">*,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">exchange</span></span><span style="color: #990000">(</span>T<span style="color: #990000">*,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_weak</span></span><span style="color: #990000">(</span>T<span style="color: #990000">*&amp;,</span> T<span style="color: #990000">*,</span> memory_order<span style="color: #990000">,</span>
-                               memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_weak</span></span><span style="color: #990000">(</span>T<span style="color: #990000">*&amp;,</span> T<span style="color: #990000">*,</span> memory_order<span style="color: #990000">,</span>
-                               memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_strong</span></span><span style="color: #990000">(</span>T<span style="color: #990000">*&amp;,</span> T<span style="color: #990000">*,</span> memory_order<span style="color: #990000">,</span>
-                                 memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_strong</span></span><span style="color: #990000">(</span>T<span style="color: #990000">*&amp;,</span> T<span style="color: #990000">*,</span> memory_order<span style="color: #990000">,</span>
-                                 memory_order<span style="color: #990000">,</span> memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_weak</span></span><span style="color: #990000">(</span>T<span style="color: #990000">*&amp;,</span> T<span style="color: #990000">*,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                          memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_weak</span></span><span style="color: #990000">(</span>T<span style="color: #990000">*&amp;,</span> T<span style="color: #990000">*,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                               memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_strong</span></span><span style="color: #990000">(</span>T<span style="color: #990000">*&amp;,</span> T<span style="color: #990000">*,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                          memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">compare_exchange_strong</span></span><span style="color: #990000">(</span>T<span style="color: #990000">*&amp;,</span> T<span style="color: #990000">*,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                                 memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">fetch_add</span></span><span style="color: #990000">(</span>ptrdiff_t<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                 memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">fetch_add</span></span><span style="color: #990000">(</span>ptrdiff_t<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                 memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">fetch_sub</span></span><span style="color: #990000">(</span>ptrdiff_t<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                 memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #000000">fetch_sub</span></span><span style="color: #990000">(</span>ptrdiff_t<span style="color: #990000">,</span> memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                 memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">atomic</span></span><span style="color: #990000">()</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="font-weight: bold"><span style="color: #000000">atomic</span></span><span style="color: #990000">(</span>T<span style="color: #990000">*)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">atomic</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    atomic<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    atomic<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic<span style="color: #990000">&amp;)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>T<span style="color: #990000">*)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span>T<span style="color: #990000">*)</span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--(</span><span style="color: #009900">int</span><span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">++()</span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">--()</span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span>ptrdiff_t<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">+=(</span>ptrdiff_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span>ptrdiff_t<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    T<span style="color: #990000">*</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">-=(</span>ptrdiff_t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>The <em>opencl_atomic</em> header defines general specialization for class template <span class="monospaced">atomic&lt;T&gt;</span>.</p></div>
-<div class="paragraph"><p>There are explicit specializations for integral types.
-Each of these specializations provides set of extra operators suitable for integral types.</p></div>
-<div class="paragraph"><p>There is an explicit specialization of the atomic template for pointer types.</p></div>
-<div class="paragraph"><p>All atomic classes have deleted copy constructor and deleted copy assignment operators.</p></div>
-<div class="paragraph"><p>There are several typedefs for atomic types specified as follows:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_int <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span><span style="color: #009900">int</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_uint <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span>uint<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span> <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_base_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span> <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_extended_atomics<span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_long <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span><span style="color: #009900">long</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_ulong <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span>ulong<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_float <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span><span style="color: #009900">float</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span> <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_fp64<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-    <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_base_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-    <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_extended_atomics<span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_double <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span><span style="color: #009900">double</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_base_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_extended_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     __INTPTR_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">64</span><span style="color: #990000">)</span> <span style="color: #990000">||</span>
-    __INTPTR_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">32</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_intptr_t <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span>intptr_t<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_uintptr_t <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span>uintptr_t<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_base_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_extended_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     __SIZE_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">64</span><span style="color: #990000">)</span> <span style="color: #990000">||</span>
-    __SIZE_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">32</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_size_t <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span>size_t<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#if</span></span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_base_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     <span style="font-weight: bold"><span style="color: #000000">defined</span></span><span style="color: #990000">(</span>cl_khr_int64_extended_atomics<span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span>
-     __PTRDIFF_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">64</span><span style="color: #990000">)</span> <span style="color: #990000">||</span>
-    __PTRDIFF_WIDTH__ <span style="color: #990000">==</span> <span style="color: #993399">32</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> atomic_ptrdiff_t <span style="color: #990000">=</span> atomic<span style="color: #990000">&lt;</span>ptrdiff_t<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="flag-type-and-operations">3.24.5. Flag type and operations</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">atomic_flag</span>
-<span style="color: #FF0000">{</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">test_and_set</span></span><span style="color: #990000">(</span>memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                      memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">test_and_set</span></span><span style="color: #990000">(</span>memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-                      memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">clear</span></span><span style="color: #990000">(</span>memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-               memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">clear</span></span><span style="color: #990000">(</span>memory_order <span style="color: #990000">=</span> memory_order_seq_cst<span style="color: #990000">,</span>
-               memory_scope <span style="color: #990000">=</span> memory_scope_device<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">atomic_flag</span></span><span style="color: #990000">()</span> noexcept <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #000000">atomic_flag</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic_flag<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    atomic_flag<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic_flag<span style="color: #990000">&amp;)</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-    atomic_flag<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">=(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> atomic_flag<span style="color: #990000">&amp;)</span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">delete</span></span><span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_flag_test_and_set</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic_flag<span style="color: #990000">*)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_flag_test_and_set</span></span><span style="color: #990000">(</span>atomic_flag<span style="color: #990000">*)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_flag_test_and_set_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic_flag<span style="color: #990000">*,</span> memory_order<span style="color: #990000">,</span>
-                                       memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">bool</span> <span style="font-weight: bold"><span style="color: #000000">atomic_flag_test_and_set_explicit</span></span><span style="color: #990000">(</span>atomic_flag<span style="color: #990000">*,</span> memory_order<span style="color: #990000">,</span>
-                                       memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_flag_clear</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic_flag<span style="color: #990000">*)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_flag_clear</span></span><span style="color: #990000">(</span>atomic_flag<span style="color: #990000">*)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_flag_clear_explicit</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> atomic_flag<span style="color: #990000">*,</span> memory_order<span style="color: #990000">,</span>
-                                memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_flag_clear_explicit</span></span><span style="color: #990000">(</span>atomic_flag<span style="color: #990000">*,</span> memory_order<span style="color: #990000">,</span>
-                                memory_scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> ATOMIC_FLAG_INIT as described in <span style="color: #008080">cpp14</span> specification <span style="color: #990000">[</span>atomics<span style="color: #990000">.</span>flag<span style="color: #990000">]</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="fences">3.24.6. Fences</h4>
-<div class="sect4">
-<h5 id="atomic_fence">atomic_fence</h5>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">atomic_fence</span></span><span style="color: #990000">(</span><span style="color: #008080">mem_fence</span> flags<span style="color: #990000">,</span> <span style="color: #008080">memory_order</span> order<span style="color: #990000">,</span> <span style="color: #008080">memory_scope</span> scope<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>Orders loads or/and stores of a work-item executing a kernel.</p></div>
-<div class="paragraph"><p><span class="monospaced">flags</span> must be set to <span class="monospaced">mem_fence::global</span>, <span class="monospaced">mem_fence::local</span>, <span class="monospaced">mem_fence::image</span> or a combination of these values ORed together; otherwise the behavior is undefined.
-The behavior of calling <span class="monospaced">atomic_fence</span> with <span class="monospaced">mem_fence::global</span> and <span class="monospaced">mem_fence::local</span> ORed together is equivalent to calling <span class="monospaced">atomic_fence</span> individually for each of the fence values set in <span class="monospaced">flags</span>.
-<span class="monospaced">mem_fence::image</span> cannot be specified ORed with <span class="monospaced">mem_fence::global</span> and <span class="monospaced">mem_fence::local</span>.</p></div>
-<div class="paragraph"><p>Depending on the value of order, this operation:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Has no effects, if <span class="monospaced">order == memory_order_relaxed</span>.
-</p>
-</li>
-<li>
-<p>
-Is an acquire fence, if <span class="monospaced">order == memory_order_acquire</span>.
-</p>
-</li>
-<li>
-<p>
-Is a release fence, if <span class="monospaced">order == memory_order_release</span>.
-</p>
-</li>
-<li>
-<p>
-Is both an acquire fence and a release fence, if <span class="monospaced">order == memory_order_acq_rel</span>.
-</p>
-</li>
-<li>
-<p>
-Is a sequentially consistent acquire and release fence, if <span class="monospaced">order == memory_order_seq_cst</span>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For images declared with the <span class="monospaced">image_access::read_write</span>, the <span class="monospaced">atomic_fence</span> must be called to make sure that writes to the image by a work-item become visible to that work-item on subsequent reads to that image by that work-item.
-Only a scope of <span class="monospaced">memory_order_acq_rel</span> is valid for <span class="monospaced">atomic_fence</span> when passed the <span class="monospaced">mem_fence::image</span> flag.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="bit-atomics">3.24.7. 64-bit Atomics</h4>
-<div class="paragraph"><p>The optional extensions <em>cl_khr_int64_base_atomics</em> and <em>cl_khr_int64_extended_atomics</em> implement atomic operations on 64-bit signed and unsigned integers to locations in global and local memory.</p></div>
-<div class="paragraph"><p>An application that wants to use 64-bit atomic types will need to define <span class="monospaced">cl_khr_int64_base_atomics</span> and <span class="monospaced">cl_khr_int64_extended_atomics</span> macros in the code before including the OpenCL C++ standard library headers or using <em>-D</em> compiler option (<em><a href="#preprocessor_options">Preprocessor options</a> section</em>).</p></div>
-</div>
-<div class="sect3">
-<h4 id="restrictions-3">3.24.8. Restrictions</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-The generic <span class="monospaced">atomic&lt;T&gt;</span> class template is only available if <span class="monospaced">T</span> is <span class="monospaced">int</span>, <span class="monospaced">uint</span>, <span class="monospaced">long</span>, <span class="monospaced">ulong</span> <a href="#ftn10">[10</a>], <span class="monospaced">float</span>, <span class="monospaced">double</span> <a href="#ftn11">[11</a>], <span class="monospaced">intptr_t</span> <a href="#ftn12">[12</a>], <span class="monospaced">uintptr_t</span>, <span class="monospaced">size_t</span>, <span class="monospaced">ptrdiff_t</span>.
-</p>
-</li>
-<li>
-<p>
-The <span class="monospaced">atomic_bool</span>, <span class="monospaced">atomic_char</span>, <span class="monospaced">atomic_uchar</span>, <span class="monospaced">atomic_short</span>, <span class="monospaced">atomic_ushort</span>, <span class="monospaced">atomic_intmax_t</span> and <span class="monospaced">atomic_uintmax_t</span> types are not supported by OpenCL C++.
-</p>
-</li>
-<li>
-<p>
-OpenCL C++ requires that the built-in atomic functions on atomic types are lock-free.
-</p>
-</li>
-<li>
-<p>
-The atomic data types cannot be declared inside a kernel or non-kernel function unless they are declared as <span class="monospaced">static</span> keyword or in <span class="monospaced">local&lt;T&gt;</span> and <span class="monospaced">global&lt;T&gt;</span> containers.
-</p>
-</li>
-<li>
-<p>
-The atomic operations on the private memory can result in undefined behavior.
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">memory_order_consume</span> is not supported by OpenCL C++.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="examples-4">3.24.9. Examples</h4>
-<div class="sect4">
-<h5 id="example-1-4">Example 1</h5>
-<div class="paragraph"><p>Examples of using atomic with and without an explicit address space
-storage class.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_memory&gt;</span>
-<span style="font-weight: bold"><span style="color: #000080">#include</span></span> <span style="color: #FF0000">&lt;opencl_atomic&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> <span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl<span style="color: #990000">;</span>
-
-<span style="color: #008080">atomic&lt;int&gt;</span> a<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK: atomic in the global memory</span></span>
-<span style="color: #008080">local&lt;atomic&lt;int&gt;&gt;</span> b<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK: atomic in the local memory</span></span>
-<span style="color: #008080">global&lt;atomic&lt;int&gt;&gt;</span> c<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK: atomic in the global memory</span></span>
-
-kernel <span style="color: #008080">void</span> <span style="font-weight: bold"><span style="color: #000000">foo</span></span><span style="color: #990000">()</span> <span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">global&lt;atomic&lt;int&gt;&gt;</span> d<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK: atomic in the global memory</span></span>
-    <span style="color: #008080">atomic&lt;global&lt;int&gt;&gt;</span> e<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// error: class members cannot be</span></span>
-                           <span style="font-style: italic"><span style="color: #9A1900">//        in address space</span></span>
-    <span style="color: #008080">local&lt;atomic&lt;int&gt;&gt;</span> f<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK: atomic in the local memory</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">atomic&lt;int&gt;</span> g<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// OK: atomic in the global memory</span></span>
-    <span style="color: #008080">atomic&lt;int&gt;</span> h<span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// undefined behavior</span></span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="array-library">3.25. Array Library</h3>
-<div class="paragraph"><p>OpenCL C++ implements part of array library (<em>chapter 23.3.2</em>, <em>[array]</em>) from the C++14 standard.</p></div>
-<div class="paragraph"><p>For the detailed description please refer to C++14 standard.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_array-synopsis">3.25.1. Header &lt;opencl_array&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">array</span>
-<span style="color: #FF0000">{</span>
-    <span style="font-style: italic"><span style="color: #9A1900">//types:</span></span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">T</span> value_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">size_t</span> size_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">ptrdiff_t</span> difference_type<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> T<span style="color: #990000">&amp;</span> reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&amp;</span> const_reference<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> iterator<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> implementation<span style="color: #990000">-</span><span style="color: #008080">defined</span> const_iterator<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> T<span style="color: #990000">*</span> pointer<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">*</span> const_pointer<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> cl<span style="color: #990000">::</span><span style="color: #008080">reverse_iterator&lt;iterator&gt;</span> reverse_iterator<span style="color: #990000">;</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> cl<span style="color: #990000">::</span><span style="color: #008080">reverse_iterator&lt;const_iterator&gt;</span> const_reverse_iterator<span style="color: #990000">;</span>
-
-    <span style="color: #008080">value_type</span> __elems<span style="color: #990000">[</span>N<span style="color: #990000">];</span> <span style="font-style: italic"><span style="color: #9A1900">// exposition only</span></span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">// no explicit construct/copy/destroy for aggregate type</span></span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">// iterators:</span></span>
-    <span style="color: #008080">iterator</span> <span style="font-weight: bold"><span style="color: #000000">begin</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">const_iterator</span> <span style="font-weight: bold"><span style="color: #000000">begin</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">iterator</span> <span style="font-weight: bold"><span style="color: #000000">end</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">const_iterator</span> <span style="font-weight: bold"><span style="color: #000000">end</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #008080">reverse_iterator</span> <span style="font-weight: bold"><span style="color: #000000">rbegin</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">const_reverse_iterator</span> <span style="font-weight: bold"><span style="color: #000000">rbegin</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">reverse_iterator</span> <span style="font-weight: bold"><span style="color: #000000">rend</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">const_reverse_iterator</span> <span style="font-weight: bold"><span style="color: #000000">rend</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span><span style="color: #990000">;</span>
-
-    <span style="color: #008080">const_iterator</span> <span style="font-weight: bold"><span style="color: #000000">cbegin</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">const_iterator</span> <span style="font-weight: bold"><span style="color: #000000">cend</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">const_reverse_iterator</span> <span style="font-weight: bold"><span style="color: #000000">crbegin</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">const_reverse_iterator</span> <span style="font-weight: bold"><span style="color: #000000">crend</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">// capacity:</span></span>
-    <span style="color: #008080">constexpr</span> <span style="color: #008080">size_type</span> <span style="font-weight: bold"><span style="color: #000000">size</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">constexpr</span> <span style="color: #008080">size_type</span> <span style="font-weight: bold"><span style="color: #000000">max_size</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    constexpr <span style="color: #008080">bool</span> <span style="font-weight: bold"><span style="color: #000000">empty</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="font-style: italic"><span style="color: #9A1900">// element access:</span></span>
-    <span style="color: #008080">reference</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">[](</span><span style="color: #008080">size_type</span> n<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">const_reference</span> <span style="font-weight: bold"><span style="color: #0000FF">operator</span></span><span style="color: #990000">[](</span><span style="color: #008080">size_type</span> n<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">reference</span> <span style="font-weight: bold"><span style="color: #000000">front</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">const_reference</span> <span style="font-weight: bold"><span style="color: #000000">front</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">reference</span> <span style="font-weight: bold"><span style="color: #000000">back</span></span><span style="color: #990000">()</span> noexcept<span style="color: #990000">;</span>
-    <span style="color: #008080">const_reference</span> <span style="font-weight: bold"><span style="color: #000000">back</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-
-    <span style="color: #008080">pointer</span> <span style="font-weight: bold"><span style="color: #000000">data</span></span><span style="color: #990000">();</span>
-    <span style="color: #008080">const_pointer</span> <span style="font-weight: bold"><span style="color: #000000">data</span></span><span style="color: #990000">()</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> noexcept<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">tuple_size</span><span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> I<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">tuple_element</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">tuple_size</span><span style="color: #990000">&lt;</span>array<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> N<span style="color: #990000">&gt;&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> I<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">tuple_element</span><span style="color: #990000">&lt;</span>I<span style="color: #990000">,</span> array<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> N<span style="color: #990000">&gt;&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> I<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="color: #008080">constexpr</span> T<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">(</span>array<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> N<span style="color: #990000">&gt;&amp;</span> a<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> I<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-<span style="color: #008080">constexpr</span> T<span style="color: #990000">&amp;&amp;</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">(</span>array<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> N<span style="color: #990000">&gt;&amp;&amp;</span> a<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="color: #008080">size_t</span> I<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">,</span> <span style="color: #008080">size_t</span> N<span style="color: #990000">&gt;</span>
-constexpr <span style="color: #008080">const</span> T<span style="color: #990000">&amp;</span> <span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> array<span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span> N<span style="color: #990000">&gt;&amp;</span> a<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="limits-library">3.26. Limits Library</h3>
-<div class="paragraph"><p>OpenCL C++ standard library implements modified version of the numeric limits library described in chapter <em>18.3 [support.limits]</em> of C++14 standard.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_limits-synopsis">3.26.1. Header &lt;opencl_limits&gt; Synopsis</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> float_round_style<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">enum</span></span> float_denorm_style<span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> CHAR_BIT    <span style="color: #993399">8</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> <span style="color: #008080">CHAR_MAX</span>    SCHAR_MAX
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> <span style="color: #008080">CHAR_MIN</span>    SCHAR_MIN
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> INT_MAX     <span style="color: #993399">2147483647</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> <span style="font-weight: bold"><span style="color: #000000">INT_MIN</span></span>     <span style="color: #990000">(-</span><span style="color: #993399">2147483647</span> <span style="color: #990000">-</span> <span style="color: #993399">1</span><span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> LONG_MAX    <span style="color: #993399">0x7fffffffffffffffL</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> <span style="font-weight: bold"><span style="color: #000000">LONG_MIN</span></span>    <span style="color: #990000">(-</span><span style="color: #993399">0x7fffffffffffffffL</span> <span style="color: #990000">-</span> <span style="color: #993399">1</span><span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> SCHAR_MAX   <span style="color: #993399">127</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> <span style="font-weight: bold"><span style="color: #000000">SCHAR_MIN</span></span>   <span style="color: #990000">(-</span><span style="color: #993399">127</span> <span style="color: #990000">-</span> <span style="color: #993399">1</span><span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> SHRT_MAX    <span style="color: #993399">32767</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> <span style="font-weight: bold"><span style="color: #000000">SHRT_MIN</span></span>    <span style="color: #990000">(-</span><span style="color: #993399">32767</span> <span style="color: #990000">-</span> <span style="color: #993399">1</span><span style="color: #990000">)</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> UCHAR_MAX   <span style="color: #993399">255</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> USHRT_MAX   <span style="color: #993399">65535</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> UINT_MAX    <span style="color: #993399">0xffffffff</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> ULONG_MAX   0xffffffffffffffffUL
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span><span style="color: #009900">bool</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>bool2<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>bool3<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>bool4<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>bool8<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>bool16<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span><span style="color: #009900">char</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>char2<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>char3<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>char4<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>char8<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>char16<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>uchar<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>uchar2<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>uchar3<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>uchar4<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>uchar8<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>uchar16<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span><span style="color: #009900">short</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>short2<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>short3<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>short4<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>short8<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>short16<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>ushort<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>ushort2<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>ushort3<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>ushort4<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>ushort8<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>ushort16<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span><span style="color: #009900">int</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>int2<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>int3<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>int4<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>int8<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>int16<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>uint<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>uint2<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>uint3<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>uint4<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>uint8<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>uint16<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span><span style="color: #009900">long</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>long2<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>long3<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>long4<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>long8<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>long16<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>ulong<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>ulong2<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>ulong3<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>ulong4<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>ulong8<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>ulong16<span style="color: #990000">&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp16
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_DIG        <span style="color: #993399">3</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_MANT_DIG   <span style="color: #993399">11</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_MAX_10_EXP <span style="color: #990000">+</span><span style="color: #993399">4</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_MAX_EXP    <span style="color: #990000">+</span><span style="color: #993399">16</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_MIN_10_EXP <span style="color: #990000">-</span><span style="color: #993399">4</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_MIN_EXP    <span style="color: #990000">-</span><span style="color: #993399">13</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_RADIX      <span style="color: #993399">2</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_MAX        <span style="color: #993399">0x1</span><span style="color: #990000">.</span>ffcp15h
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_MIN        <span style="color: #993399">0x1</span><span style="color: #990000">.</span>0p<span style="color: #990000">-</span>14h
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_EPSILON    <span style="color: #993399">0x1</span><span style="color: #990000">.</span>0p<span style="color: #990000">-</span>10h
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span>half<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_DIG         <span style="color: #993399">6</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_MANT_DIG    <span style="color: #993399">24</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_MAX_10_EXP  <span style="color: #990000">+</span><span style="color: #993399">38</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_MAX_EXP     <span style="color: #990000">+</span><span style="color: #993399">128</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_MIN_10_EXP  <span style="color: #990000">-</span><span style="color: #993399">37</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_MIN_EXP     <span style="color: #990000">-</span><span style="color: #993399">125</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_RADIX       <span style="color: #993399">2</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_MAX         <span style="color: #993399">0x1</span><span style="color: #990000">.</span>fffffep127f
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_MIN         <span style="color: #993399">0x1</span><span style="color: #990000">.</span>0p<span style="color: #990000">-</span>126f
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_EPSILON     <span style="color: #993399">0x1</span><span style="color: #990000">.</span>0p<span style="color: #990000">-</span>23f
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span><span style="color: #009900">float</span><span style="color: #990000">&gt;;</span>
-
-<span style="font-weight: bold"><span style="color: #000080">#ifdef</span></span> cl_khr_fp64
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_DIG         <span style="color: #993399">15</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_MANT_DIG    <span style="color: #993399">53</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_MAX_10_EXP  <span style="color: #990000">+</span><span style="color: #993399">308</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_MAX_EXP     <span style="color: #990000">+</span><span style="color: #993399">1024</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_MIN_10_EXP  <span style="color: #990000">-</span><span style="color: #993399">307</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_MIN_EXP     <span style="color: #990000">-</span><span style="color: #993399">1021</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_MAX         <span style="color: #993399">0x1</span><span style="color: #990000">.</span>fffffffffffffp1023
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_MIN         <span style="color: #993399">0x1</span><span style="color: #990000">.</span>0p<span style="color: #990000">-</span><span style="color: #993399">1022</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_EPSILON     <span style="color: #993399">0x1</span><span style="color: #990000">.</span>0p<span style="color: #990000">-</span><span style="color: #993399">52</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span><span style="color: #009900">double</span><span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="class-numeric_limits">3.26.2. Class numeric_limits</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">namespace</span></span> cl
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span>
-<span style="color: #FF0000">{</span>
-<span style="font-weight: bold"><span style="color: #0000FF">public</span></span><span style="color: #990000">:</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> is_specialized <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">min</span></span><span style="color: #990000">()</span> noexcept <span style="color: #FF0000">{</span> <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="font-weight: bold"><span style="color: #000000">T</span></span><span style="color: #990000">();</span> <span style="color: #FF0000">}</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">max</span></span><span style="color: #990000">()</span> noexcept <span style="color: #FF0000">{</span> <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="font-weight: bold"><span style="color: #000000">T</span></span><span style="color: #990000">();</span> <span style="color: #FF0000">}</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">lowest</span></span><span style="color: #990000">()</span> noexcept <span style="color: #FF0000">{</span> <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="font-weight: bold"><span style="color: #000000">T</span></span><span style="color: #990000">();</span> <span style="color: #FF0000">}</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">int</span> digits <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">int</span> digits10 <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">int</span> max_digits10 <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> is_signed <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> is_integer <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> is_exact <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">int</span> radix <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">epsilon</span></span><span style="color: #990000">()</span> noexcept <span style="color: #FF0000">{</span> <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="font-weight: bold"><span style="color: #000000">T</span></span><span style="color: #990000">();</span> <span style="color: #FF0000">}</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">round_error</span></span><span style="color: #990000">()</span> noexcept <span style="color: #FF0000">{</span> <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="font-weight: bold"><span style="color: #000000">T</span></span><span style="color: #990000">();</span> <span style="color: #FF0000">}</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">int</span> min_exponent <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">int</span> min_exponent10 <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">int</span> max_exponent <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">int</span> max_exponent10 <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> has_infinity <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> has_quiet_NaN <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> has_signaling_NaN <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">constexpr</span> <span style="color: #008080">float_denorm_style</span> has_denorm <span style="color: #990000">=</span> denorm_absent<span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> has_denorm_loss <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">infinity</span></span><span style="color: #990000">()</span> noexcept <span style="color: #FF0000">{</span> <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="font-weight: bold"><span style="color: #000000">T</span></span><span style="color: #990000">();</span> <span style="color: #FF0000">}</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">quiet_NaN</span></span><span style="color: #990000">()</span> noexcept <span style="color: #FF0000">{</span> <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="font-weight: bold"><span style="color: #000000">T</span></span><span style="color: #990000">();</span> <span style="color: #FF0000">}</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">signaling_NaN</span></span><span style="color: #990000">()</span> noexcept <span style="color: #FF0000">{</span> <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="font-weight: bold"><span style="color: #000000">T</span></span><span style="color: #990000">();</span> <span style="color: #FF0000">}</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">T</span> <span style="font-weight: bold"><span style="color: #000000">denorm_min</span></span><span style="color: #990000">()</span> noexcept <span style="color: #FF0000">{</span> <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="font-weight: bold"><span style="color: #000000">T</span></span><span style="color: #990000">();</span> <span style="color: #FF0000">}</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> is_iec559 <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> is_bounded <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> is_modulo <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> traps <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> tinyness_before <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #008080">constexpr</span> <span style="color: #008080">float_round_style</span> round_style <span style="color: #990000">=</span> round_toward_zero<span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> is_scalar <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> constexpr <span style="color: #008080">bool</span> is_vector <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> T<span style="color: #990000">&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">T</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">numeric_limits</span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="font-weight: bold"><span style="color: #0000FF">volatile</span></span> T<span style="color: #990000">&gt;;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="has_denorm-numeric_limits-class-member">3.26.3. has_denorm numeric_limits class member</h4>
-<div class="paragraph"><p><span class="monospaced">has_denorm</span> class member value depends on a macro:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">HAS_SINGLE_FP_DENORM</span> for type <span class="monospaced">float</span>.
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">HAS_HALF_FP_DENORM</span> for type <span class="monospaced">half</span>.
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">HAS_DOUBLE_FP_DENORM</span> for type <span class="monospaced">double</span>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If a macro is defined, <span class="monospaced">has_denorm</span> is set to <span class="monospaced">denorm_present</span>.
-Otherwise it is <span class="monospaced">denorm_absent</span>.</p></div>
-</div>
-<div class="sect3">
-<h4 id="floating-point-macros-and-limits">3.26.4. Floating-point macros and limits</h4>
-<div class="paragraph"><p>The macro names given in the following list must use the values specified.
-These constant expressions are suitable for use in <span class="monospaced">#if</span> preprocessing directives.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_DIG         <span style="color: #993399">6</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_MANT_DIG    <span style="color: #993399">24</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_MAX_10_EXP  <span style="color: #990000">+</span><span style="color: #993399">38</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_MAX_EXP     <span style="color: #990000">+</span><span style="color: #993399">128</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_MIN_10_EXP  <span style="color: #990000">-</span><span style="color: #993399">37</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_MIN_EXP     <span style="color: #990000">-</span><span style="color: #993399">125</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_RADIX       <span style="color: #993399">2</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_MAX         <span style="color: #993399">0x1</span><span style="color: #990000">.</span>fffffep127f
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_MIN         <span style="color: #993399">0x1</span><span style="color: #990000">.</span>0p<span style="color: #990000">-</span>126f
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> FLT_EPSILON     <span style="color: #993399">0x1</span><span style="color: #990000">.</span>0p<span style="color: #990000">-</span>23f</tt></pre></div></div>
-<div class="paragraph"><p>The following table describes the built-in macro names given above in the OpenCL C++ library and the corresponding macro names available to the application.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 22. Float Built-in Macros</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Macro in OpenCL C++</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Macro for application</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">FLT_DIG</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_FLT_DIG</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">FLT_MANT_DIG</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_FLT_MANT_DIG</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">FLT_MAX_10_EXP</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_FLT_MAX_10_EXP</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">FLT_MAX_EXP</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_FLT_MAX_EXP</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">FLT_MIN_10_EXP</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_FLT_MIN_10_EXP</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">FLT_MIN_EXP</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_FLT_MIN_EXP</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">FLT_RADIX</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_FLT_RADIX</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">FLT_MAX</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_FLT_MAX</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">FLT_MIN</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_FLT_MIN</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">FLT_EPSILSON</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_FLT_EPSILON</span></p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>The following macros shall expand to integer constant expressions whose values are returned by <span class="monospaced">ilogb(x)</span> if <span class="monospaced">x</span> is zero or NaN, respectively.
-The value of <span class="monospaced">FP_ILOGB0</span> shall be either <span class="monospaced">{INT_MIN}</span> or <span class="monospaced">{INT_MAX}</span>. The value of <span class="monospaced">FP_ILOGBNAN</span> shall be either <span class="monospaced">{INT_MAX}</span> or <span class="monospaced">{INT_MIN}</span>.</p></div>
-<div class="paragraph"><p>If double precision is supported by the device, the following macros and constants are available:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_DIG         <span style="color: #993399">15</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_MANT_DIG    <span style="color: #993399">53</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_MAX_10_EXP  <span style="color: #990000">+</span><span style="color: #993399">308</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_MAX_EXP     <span style="color: #990000">+</span><span style="color: #993399">1024</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_MIN_10_EXP  <span style="color: #990000">-</span><span style="color: #993399">307</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_MIN_EXP     <span style="color: #990000">-</span><span style="color: #993399">1021</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_MAX         <span style="color: #993399">0x1</span><span style="color: #990000">.</span>fffffffffffffp1023
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_MIN         <span style="color: #993399">0x1</span><span style="color: #990000">.</span>0p<span style="color: #990000">-</span><span style="color: #993399">1022</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> DBL_EPSILON     <span style="color: #993399">0x1</span><span style="color: #990000">.</span>0p<span style="color: #990000">-</span><span style="color: #993399">52</span></tt></pre></div></div>
-<div class="paragraph"><p>The macro names given in the following list must use the values specified.
-These constant expressions are suitable for use in <span class="monospaced">#if</span> preprocessing directives.</p></div>
-<div class="paragraph"><p>The following table describes the built-in macro names given above in the OpenCL C++ library and the corresponding macro names available to the application.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 23. Double Built-in Macros</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Macro in OpenCL cpp</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Macro for application</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">DBL_DIG</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_DBL_DIG</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">DBL_MANT_DIG</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_DBL_MANT_DIG</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">DBL_MAX_10_EXP</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_DBL_MAX_10_EXP</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">DBL_MAX_EXP</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_DBL_MAX_EXP</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">DBL_MIN_10_EXP</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_DBL_MIN_10_EXP</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">DBL_MIN_EXP</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_DBL_MIN_EXP</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">DBL_MAX</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_DBL_MAX</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">DBL_MIN</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_DBL_MIN</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">DBL_EPSILSON</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_DBL_EPSILON</span></p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>If half precision arithmetic operations are supported, the following macros and constants for half precision floating-point are available:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_DIG        <span style="color: #993399">3</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_MANT_DIG   <span style="color: #993399">11</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_MAX_10_EXP <span style="color: #990000">+</span><span style="color: #993399">4</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_MAX_EXP    <span style="color: #990000">+</span><span style="color: #993399">16</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_MIN_10_EXP <span style="color: #990000">-</span><span style="color: #993399">4</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_MIN_EXP    <span style="color: #990000">-</span><span style="color: #993399">13</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_RADIX      <span style="color: #993399">2</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_MAX        <span style="color: #993399">0x1</span><span style="color: #990000">.</span>ffcp15h
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_MIN        <span style="color: #993399">0x1</span><span style="color: #990000">.</span>0p<span style="color: #990000">-</span>14h
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> HALF_EPSILON    <span style="color: #993399">0x1</span><span style="color: #990000">.</span>0p<span style="color: #990000">-</span>10h</tt></pre></div></div>
-<div class="paragraph"><p>The macro names given in the following list must use the values specified.
-These constant expressions are suitable for use in <span class="monospaced">#if</span> preprocessing directives.</p></div>
-<div class="paragraph"><p>The following table describes the built-in macro names given above in the OpenCL C++ library and the corresponding macro names available to the application.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 24. Half Built-in Macros</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Macro in OpenCL cpp</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Macro for application</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">HALF_DIG</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_HALF_DIG</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">HALF_MANT_DIG</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_HALF_MANT_DIG</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">HALF_MAX_10_EXP</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_HALF_MAX_10_EXP</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">HALF_MAX_EXP</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_HALF_MAX_EXP</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">HALF_MIN_10_EXP</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_HALF_MIN_10_EXP</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">HALF_MIN_EXP</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_HALF_MIN_EXP</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">HALF_RADIX</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_HALF_RADIX</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">HALF_MAX</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_HALF_MAX</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">HALF_MIN</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_HALF_MIN</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">HALF_EPSILSON</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_HALF_EPSILON</span></p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>The following symbolic constants are available.
-Their values are of type float and are accurate within the precision of a single precision floating-point number.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 25. Float Symbolic Constants</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Constant Name</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">MAXFLOAT</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Value of maximum non-infinite single-precision floating-point number.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">HUGE_VALF</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A positive float constant expression. <span class="monospaced">HUGE_VALF</span> evaluates to +infinity.
-Used as an error value returned by the built-in math functions.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">INFINITY</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A constant expression of type float representing positive or unsigned infinity.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">NAN</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A constant expression of type float representing a quiet NaN.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>If double precision is supported by the device, the following symbolic constant will also be available:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 26. Double Symbolic Constants</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Constant Name</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Description</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">HUGE_VAL</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A positive double constant expression.
-<span class="monospaced">HUGE_VAL</span> evaluates to +infinity.
-Used as an error value returned by the built-in math functions.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="integer-macros-and-limits">3.26.5. Integer macros and limits</h4>
-<div class="paragraph"><p>The macro names given in the following list must use the values specified.
-The values shall all be constant expressions suitable for use in <span class="monospaced">#if</span> preprocessing directives.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">#define</span></span> CHAR_BIT    <span style="color: #993399">8</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> <span style="color: #008080">CHAR_MAX</span>    SCHAR_MAX
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> <span style="color: #008080">CHAR_MIN</span>    SCHAR_MIN
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> INT_MAX     <span style="color: #993399">2147483647</span>