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>
-<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</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 27. Integer 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">CHAR_BIT</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_CHAR_BIT</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CHAR_MAX</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_CHAR_MAX</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CHAR_MIN</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_CHAR_MIN</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">INT_MAX</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_INT_MAX</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">INT_MIN</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_INT_MIN</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">LONG_MAX</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_LONG_MAX</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">LONG_MIN</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_LONG_MIN</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">SCHAR_MAX</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_SCHAR_MAX</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">SCHAR_MIN</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_SCHAR_MIN</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">SHRT_MAX</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_SHRT_MAX</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">SHRT_MIN</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_SHRT_MIN</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">UCHAR_MAX</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_UCHAR_MAX</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">USHRT_MAX</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_USHRT_MAX</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">UINT_MAX</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_UINT_MAX</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">ULONG_MAX</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_ULONG_MAX</span></p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect2">
-<h3 id="math-constants-library">3.27. Math Constants Library</h3>
-<div class="paragraph"><p>OpenCL C++ implements math constant library.
-The purpose of this library is to provide the commonly used constants for half, float and double data types.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_math_constants-synopsis">3.27.1. Header &lt;opencl_math_constants&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">math_constants</span><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: #000080">#define</span></span> M_E_H           see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_LOG2E_H       see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_LOG10E_H      see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_LN2_H         see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_LN10_H        see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_PI_H          see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_PI_2_H        see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_PI_4_H        see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_1_PI_H        see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_2_PI_H        see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_2_SQRTPI_H    see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_SQRT2_H       see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_SQRT1_2_H     see below
-
-<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">math_constants</span><span style="color: #990000">&lt;</span>half<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">math_constants</span><span style="color: #990000">&lt;</span>half2<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">math_constants</span><span style="color: #990000">&lt;</span>half3<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">math_constants</span><span style="color: #990000">&lt;</span>half4<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">math_constants</span><span style="color: #990000">&lt;</span>half8<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">math_constants</span><span style="color: #990000">&lt;</span>half16<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> M_E_F           see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_LOG2E_F       see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_LOG10E_F      see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_LN2_F         see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_LN10_F        see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_PI_F          see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_PI_2_F        see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_PI_4_F        see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_1_PI_F        see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_2_PI_F        see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_2_SQRTPI_F    see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_SQRT2_F       see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_SQRT1_2_F     see below
-
-<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">math_constants</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: #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">math_constants</span><span style="color: #990000">&lt;</span>float2<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">math_constants</span><span style="color: #990000">&lt;</span>float3<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">math_constants</span><span style="color: #990000">&lt;</span>float4<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">math_constants</span><span style="color: #990000">&lt;</span>float8<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">math_constants</span><span style="color: #990000">&lt;</span>float16<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> M_E         see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_LOG2E     see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_LOG10E    see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_LN2       see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_LN10      see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_PI        see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_PI_2      see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_PI_4      see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_1_PI      see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_2_PI      see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_2_SQRTPI  see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_SQRT2     see below
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> M_SQRT1_2   see below
-
-<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">math_constants</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: #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">math_constants</span><span style="color: #990000">&lt;</span>double2<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">math_constants</span><span style="color: #990000">&lt;</span>double3<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">math_constants</span><span style="color: #990000">&lt;</span>double4<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">math_constants</span><span style="color: #990000">&lt;</span>double8<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">math_constants</span><span style="color: #990000">&lt;</span>double16<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">template</span></span><span style="color: #990000">&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>
-constexpr <span style="color: #008080">T</span> e_v <span style="color: #990000">=</span> math_constants<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span><span style="font-weight: bold"><span style="color: #000000">e</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">&gt;</span>
-constexpr <span style="color: #008080">T</span> log2e_v <span style="color: #990000">=</span> math_constants<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span><span style="font-weight: bold"><span style="color: #000000">log2e</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">&gt;</span>
-constexpr <span style="color: #008080">T</span> log10e_v <span style="color: #990000">=</span> math_constants<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span><span style="font-weight: bold"><span style="color: #000000">log10e</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">&gt;</span>
-constexpr <span style="color: #008080">T</span> ln2_v <span style="color: #990000">=</span> math_constants<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span><span style="font-weight: bold"><span style="color: #000000">ln2</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">&gt;</span>
-constexpr <span style="color: #008080">T</span> ln10_v <span style="color: #990000">=</span> math_constants<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span><span style="font-weight: bold"><span style="color: #000000">ln10</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">&gt;</span>
-constexpr <span style="color: #008080">T</span> pi_v <span style="color: #990000">=</span> math_constants<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span><span style="font-weight: bold"><span style="color: #000000">pi</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">&gt;</span>
-constexpr <span style="color: #008080">T</span> pi_2_v <span style="color: #990000">=</span> math_constants<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span><span style="font-weight: bold"><span style="color: #000000">pi_2</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">&gt;</span>
-constexpr <span style="color: #008080">T</span> pi_4_v <span style="color: #990000">=</span> math_constants<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span><span style="font-weight: bold"><span style="color: #000000">pi_4</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">&gt;</span>
-constexpr <span style="color: #008080">T</span> one_pi_v <span style="color: #990000">=</span> math_constants<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span><span style="font-weight: bold"><span style="color: #000000">one_pi</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">&gt;</span>
-constexpr <span style="color: #008080">T</span> two_pi_v <span style="color: #990000">=</span> math_constants<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span><span style="font-weight: bold"><span style="color: #000000">two_pi</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">&gt;</span>
-constexpr <span style="color: #008080">T</span> two_sqrtpi_v <span style="color: #990000">=</span> math_constants<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span><span style="font-weight: bold"><span style="color: #000000">two_sqrtpi</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">&gt;</span>
-constexpr <span style="color: #008080">T</span> sqrt2_v <span style="color: #990000">=</span> math_constants<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span><span style="font-weight: bold"><span style="color: #000000">sqrt2</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">&gt;</span>
-constexpr <span style="color: #008080">T</span> sqrt1_2_v <span style="color: #990000">=</span> math_constants<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span><span style="font-weight: bold"><span style="color: #000000">sqrt1_2</span></span><span style="color: #990000">();</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="class-math_constants">3.27.2. Class math_constants</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">math_constants</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">T</span> <span style="font-weight: bold"><span style="color: #000000">e</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">log2e</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">log10e</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">ln2</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">ln10</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">pi</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">pi_2</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">pi_4</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">one_pi</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">two_pi</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">two_sqrtpi</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">sqrt2</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">sqrt1_2</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="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="half-constants">3.27.3. Half Constants</h4>
-<div class="paragraph"><p>The following constants are also available.
-They are of type <span class="monospaced">half</span> and are accurate within the precision of the <span class="monospaced">half</span> type.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 28. Half Constants</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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"><span class="monospaced">e</span></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"><span class="monospaced">log2e</span></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"><span class="monospaced">log10e</span></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"><span class="monospaced">ln2</span></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"><span class="monospaced">ln10</span></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"><span class="monospaced">pi</span></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"><span class="monospaced">pi_2</span></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"><span class="monospaced">pi_4</span></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"><span class="monospaced">one_pi</span></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"><span class="monospaced">two_pi</span></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"><span class="monospaced">two_sqrtpi</span></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"><span class="monospaced">sqrt2</span></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"><span class="monospaced">sqrt1_2</span></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="float-constants">3.27.4. Float Constants</h4>
-<div class="paragraph"><p>The following constants are also available.
-They are of type <span class="monospaced">float</span> and are accurate within the precision of the <span class="monospaced">float</span> type.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 29. Float Constants</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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"><span class="monospaced">e</span></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"><span class="monospaced">log2e</span></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"><span class="monospaced">log10e</span></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"><span class="monospaced">ln2</span></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"><span class="monospaced">ln10</span></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"><span class="monospaced">pi</span></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"><span class="monospaced">pi_2</span></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"><span class="monospaced">pi_4</span></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"><span class="monospaced">one_pi</span></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"><span class="monospaced">two_pi</span></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"><span class="monospaced">two_sqrtpi</span></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"><span class="monospaced">sqrt2</span></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"><span class="monospaced">sqrt1_2</span></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="double-constants">3.27.5. Double Constants</h4>
-<div class="paragraph"><p>The following constants are also available.
-They are of type <span class="monospaced">double</span> and are accurate within the precision of the <span class="monospaced">double</span> type.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 30. Double Constants</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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"><span class="monospaced">e</span></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"><span class="monospaced">log2e</span></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"><span class="monospaced">log10e</span></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"><span class="monospaced">ln2</span></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"><span class="monospaced">ln10</span></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"><span class="monospaced">pi</span></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"><span class="monospaced">pi_2</span></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"><span class="monospaced">pi_4</span></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"><span class="monospaced">one_pi</span></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"><span class="monospaced">two_pi</span></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"><span class="monospaced">two_sqrtpi</span></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"><span class="monospaced">sqrt2</span></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"><span class="monospaced">sqrt1_2</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Value of 1 / √2</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect2">
-<h3 id="tuple-library">3.28. Tuple Library</h3>
-<div class="paragraph"><p>OpenCL C++ standard library implements most of the tuples described in <em>chapter 20.4 [tuple]</em> of C++14 standard.</p></div>
-<div class="paragraph"><p>The following parts of tuple library are not supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-allocator related traits (C++14 standard, <em>section 20.4.2.8</em>)
-</p>
-</li>
-</ul></div>
-<div class="sect3">
-<h4 id="header-opencl_tuple-synopsis">3.28.1. Header &lt;opencl_tuple&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">// class template tuple:</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: #990000">...</span> Types<span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">tuple</span><span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// tuple creation functions:</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">unspecified</span> ignore<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">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> Types<span style="color: #990000">&gt;</span>
-<span style="color: #008080">constexpr</span> <span style="color: #008080">tuple&lt;VTypes ...&gt;</span> <span style="font-weight: bold"><span style="color: #000000">make_tuple</span></span><span style="color: #990000">(</span>Types<span style="color: #990000">&amp;&amp;...);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">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> Types<span style="color: #990000">&gt;</span>
-<span style="color: #008080">constexpr</span> <span style="color: #008080">tuple&lt;Types&amp;&amp;...&gt;</span> <span style="font-weight: bold"><span style="color: #000000">forward_as_tuple</span></span><span style="color: #990000">(</span>Types<span style="color: #990000">&amp;&amp;...)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">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> Types<span style="color: #990000">&gt;</span>
-<span style="color: #008080">constexpr</span> <span style="color: #008080">tuple&lt;Types&amp;...&gt;</span> <span style="font-weight: bold"><span style="color: #000000">tie</span></span><span style="color: #990000">(</span>Types<span style="color: #990000">&amp;...)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">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> Tuples<span style="color: #990000">&gt;</span>
-<span style="color: #008080">constexpr</span> <span style="color: #008080">tuple&lt;Ctypes ...&gt;</span> <span style="font-weight: bold"><span style="color: #000000">tuple_cat</span></span><span style="color: #990000">(</span>Tuples<span style="color: #990000">&amp;&amp;...);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">//  tuple helper 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">tuple_size</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// undefined</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">tuple_size</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">tuple_size</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">tuple_size</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="font-weight: bold"><span style="color: #0000FF">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> Types<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">&lt;</span>tuple<span style="color: #990000">&lt;</span>Types<span style="color: #990000">...&gt;</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="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-style: italic"><span style="color: #9A1900">// undefined</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> 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">&lt;</span>I<span style="color: #990000">,</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="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">&lt;</span>I<span style="color: #990000">,</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="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">&lt;</span>I<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> 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="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: #990000">...</span> Types<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">&lt;</span>I<span style="color: #990000">,</span> tuple<span style="color: #990000">&lt;</span>Types<span style="color: #990000">...&gt;</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="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">using</span></span> tuple_element_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">tuple_element</span><span style="color: #990000">&lt;</span>I<span style="color: #990000">,</span> T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// element access:</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> I<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Types<span style="color: #990000">&gt;</span>
-<span style="color: #008080">constexpr</span> tuple_element_t<span style="color: #990000">&lt;</span>I<span style="color: #990000">,</span> tuple<span style="color: #990000">&lt;</span>Types<span style="color: #990000">...&gt;&gt;&amp;</span>
-<span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">(</span>tuple<span style="color: #990000">&lt;</span>Types<span style="color: #990000">...&gt;&amp;)</span> noexcept<span 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: #990000">...</span> Types<span style="color: #990000">&gt;</span>
-<span style="color: #008080">constexpr</span> tuple_element_t<span style="color: #990000">&lt;</span>I<span style="color: #990000">,</span> tuple<span style="color: #990000">&lt;</span>Types<span style="color: #990000">...&gt;&gt;&amp;&amp;</span>
-<span style="font-weight: bold"><span style="color: #000000">get</span></span><span style="color: #990000">(</span>tuple<span style="color: #990000">&lt;</span>Types<span style="color: #990000">...&gt;&amp;&amp;)</span> noexcept<span 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: #990000">...</span> Types<span style="color: #990000">&gt;</span>
-constexpr <span style="color: #008080">const</span> tuple_element_t<span style="color: #990000">&lt;</span>I<span style="color: #990000">,</span> tuple<span style="color: #990000">&lt;</span>Types<span style="color: #990000">...&gt;&gt;&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> tuple<span style="color: #990000">&lt;</span>Types<span style="color: #990000">...&gt;&amp;)</span> noexcept<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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: #990000">...</span> Types<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>tuple<span style="color: #990000">&lt;</span>Types<span style="color: #990000">...&gt;&amp;</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">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Types<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>tuple<span style="color: #990000">&lt;</span>Types<span style="color: #990000">...&gt;&amp;&amp;</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">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Types<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> tuple<span style="color: #990000">&lt;</span>Types<span style="color: #990000">...&gt;&amp;</span> t<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// relational operators:</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: #990000">...</span> TTypes<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> UTypes<span style="color: #990000">&gt;</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> tuple<span style="color: #990000">&lt;</span>TTypes<span style="color: #990000">...&gt;&amp;,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> tuple<span style="color: #990000">&lt;</span>UTypes<span style="color: #990000">...&gt;&amp;);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">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> TTypes<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> UTypes<span style="color: #990000">&gt;</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> tuple<span style="color: #990000">&lt;</span>TTypes<span style="color: #990000">...&gt;&amp;,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> tuple<span style="color: #990000">&lt;</span>UTypes<span style="color: #990000">...&gt;&amp;);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">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> TTypes<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> UTypes<span style="color: #990000">&gt;</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> tuple<span style="color: #990000">&lt;</span>TTypes<span style="color: #990000">...&gt;&amp;,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> tuple<span style="color: #990000">&lt;</span>UTypes<span style="color: #990000">...&gt;&amp;);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">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> TTypes<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> UTypes<span style="color: #990000">&gt;</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> tuple<span style="color: #990000">&lt;</span>TTypes<span style="color: #990000">...&gt;&amp;,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> tuple<span style="color: #990000">&lt;</span>UTypes<span style="color: #990000">...&gt;&amp;);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">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> TTypes<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> UTypes<span style="color: #990000">&gt;</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> tuple<span style="color: #990000">&lt;</span>TTypes<span style="color: #990000">...&gt;&amp;,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> tuple<span style="color: #990000">&lt;</span>UTypes<span style="color: #990000">...&gt;&amp;);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">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> TTypes<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> UTypes<span style="color: #990000">&gt;</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> tuple<span style="color: #990000">&lt;</span>TTypes<span style="color: #990000">...&gt;&amp;,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> tuple<span style="color: #990000">&lt;</span>UTypes<span style="color: #990000">...&gt;&amp;);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// specialized algorithms:</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: #990000">...</span> Types<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>tuple<span style="color: #990000">&lt;</span>Types<span style="color: #990000">...&gt;&amp;</span> x<span style="color: #990000">,</span> tuple<span style="color: #990000">&lt;</span>Types<span style="color: #990000">...&gt;&amp;</span> y<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #000000">noexcept</span></span><span style="color: #990000">(</span>see <span style="color: #008080">cpp14</span> standard<span style="color: #990000">);</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="type-traits-library">3.29. Type Traits Library</h3>
-<div class="paragraph"><p>OpenCL C++ supports type traits defined in C++14 specification with following changes:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<em><a href="#unary-type-traits">Unary Type Traits</a> section</em> describes additions and changes to <em>UnaryTypeTraits</em>.
-</p>
-</li>
-<li>
-<p>
-<em><a href="#binary-type-traits">Binary type traits</a> section</em> describes additions and changes to <em>BinaryTypeTraits</em>.
-</p>
-</li>
-<li>
-<p>
-<em><a href="#transformation-traits">Transformation traits</a> section</em> describes additions and changes to <em>TransformationTraits</em>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>This section specifies only OpenCL specific type traits and modifications.
-All C++ type traits are described in <em>chapter 20.10 [meta]</em> of C++14 standard.</p></div>
-<div class="sect3">
-<h4 id="header-opencl_type_traits-synopsis">3.29.1. Header &lt;opencl_type_traits&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">// helper class:</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">,</span> <span style="color: #008080">T</span> v<span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">integral_constant</span><span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">integral_constant&lt;bool, true&gt;</span> true_type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">integral_constant&lt;bool, false&gt;</span> false_type<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// primary type categories:</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">struct</span></span> <span style="color: #008080">is_void</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_null_pointer</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_integral</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_floating_point</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_array</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_pointer</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_lvalue_reference</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_rvalue_reference</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_member_object_pointer</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_member_function_pointer</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_enum</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_union</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_class</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_function</span><span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// composite type categories:</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">struct</span></span> <span style="color: #008080">is_reference</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_arithmetic</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_fundamental</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_object</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_scalar</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_compound</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_member_pointer</span><span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// type properties:</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">struct</span></span> <span style="color: #008080">is_const</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_volatile</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_private</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_local</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_global</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_constant</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_generic</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_vector</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_trivial</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_trivially_copyable</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_standard_layout</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_pod</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_literal_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_empty</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_polymorphic</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_abstract</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_final</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_signed</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_unsigned</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: #990000">...</span> Args<span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">is_constructible</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_default_constructible</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_copy_constructible</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_move_constructible</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="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">is_assignable</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_copy_assignable</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_move_assignable</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_destructible</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: #990000">...</span> Args<span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">is_trivially_constructible</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_trivially_default_constructible</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_trivially_copy_constructible</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_trivially_move_constructible</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="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">is_trivially_assignable</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_trivially_copy_assignable</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_trivially_move_assignable</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_trivially_destructible</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: #990000">...</span> Args<span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">is_nothrow_constructible</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_nothrow_default_constructible</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_nothrow_copy_constructible</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_nothrow_move_constructible</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="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">is_nothrow_assignable</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_nothrow_copy_assignable</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_nothrow_move_assignable</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_nothrow_destructible</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">has_virtual_destructor</span><span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// type property queries:</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">struct</span></span> <span style="color: #008080">alignment_of</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">rank</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> I <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">extent</span><span style="color: #990000">;</span>
-<span style="font-style: italic"><span style="color: #9A1900">// type relations:</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">,</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="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">is_same</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">Base</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Derived</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">is_base_of</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">From</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">To</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">is_convertible</span><span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// const-volatile modifications:</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">struct</span></span> <span style="color: #008080">remove_const</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">remove_volatile</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">remove_cv</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">add_const</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">add_volatile</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">add_cv</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> remove_const_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_const</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> remove_volatile_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_volatile</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> remove_cv_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_cv</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> add_const_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">add_const</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> add_volatile_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">add_volatile</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> add_cv_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">add_cv</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// as modifications</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">struct</span></span> <span style="color: #008080">remove_constant</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">remove_local</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">remove_global</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">remove_private</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">remove_generic</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">remove_as</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">remove_attrs</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">add_constant</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">add_local</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">add_global</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">add_private</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">add_generic</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> remove_constant_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_constant</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> remove_local_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_local</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> remove_global_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_global</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> remove_private_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_private</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> remove_generic_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_generic</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> remove_as_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_as</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> remove_attrs_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_attrs</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> add_constant_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">add_constant</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> add_local_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">add_local</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> add_global_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">add_global</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> add_private_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">add_private</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> add_generic_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">add_generic</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// reference modifications:</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">struct</span></span> <span style="color: #008080">remove_reference</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">add_lvalue_reference</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">add_rvalue_reference</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> remove_reference_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_reference</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> add_lvalue_reference_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">add_lvalue_reference</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> add_rvalue_reference_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">add_rvalue_reference</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// sign modifications:</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">struct</span></span> <span style="color: #008080">make_signed</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">make_unsigned</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> make_signed_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">make_signed</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> make_unsigned_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">make_unsigned</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// array modifications:</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">struct</span></span> <span style="color: #008080">remove_extent</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">remove_all_extents</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> remove_extent_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_extent</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> remove_all_extents_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_all_extents</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// pointer modifications:</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">struct</span></span> <span style="color: #008080">remove_pointer</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">add_pointer</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> remove_pointer_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_pointer</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> add_pointer_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">add_pointer</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// built-in vector queries</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">struct</span></span> <span style="color: #008080">is_vector_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">vector_size</span><span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// built-in vector modifications</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">struct</span></span> <span style="color: #008080">vector_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">uint</span> DIM<span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">make_vector</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> vector_element_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">vector_element</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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">uint</span> DIM<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> make_vector_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">make_vector</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">,</span>DIM<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// other transformations:</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span>cl<span style="color: #990000">::</span><span style="color: #008080">size_t</span> Len<span style="color: #990000">,</span>
-cl<span style="color: #990000">::</span><span style="color: #008080">size_t</span> Align <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">-</span>alignment<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">aligned_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>cl<span style="color: #990000">::</span><span style="color: #008080">size_t</span> Len<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Types<span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">aligned_union</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">decay</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: #009900">bool</span><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: #009900">void</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">enable_if</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: #009900">bool</span><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="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">F</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">conditional</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: #990000">...</span> T<span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">common_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">underlying_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: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">result_of</span><span style="color: #990000">;</span> <span style="font-style: italic"><span style="color: #9A1900">// not defined</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">F</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> ArgTypes<span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">result_of</span><span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #000000">F</span></span><span style="color: #990000">(</span>ArgTypes<span style="color: #990000">...)&gt;;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span>cl<span style="color: #990000">::</span><span style="color: #008080">size_t</span> Len<span style="color: #990000">,</span>
-cl<span style="color: #990000">::</span><span style="color: #008080">size_t</span> Align <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">default</span></span><span style="color: #990000">-</span>alignment <span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> aligned_storage_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">aligned_storage</span><span style="color: #990000">&lt;</span>Len<span style="color: #990000">,</span>Align<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span>cl<span style="color: #990000">::</span><span style="color: #008080">size_t</span> Len<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span><span style="color: #990000">...</span> Types<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> aligned_union_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">aligned_union</span><span style="color: #990000">&lt;</span>Len<span style="color: #990000">,</span>Types<span style="color: #990000">...&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> decay_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">decay</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span 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: #009900">bool</span> b<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: #009900">void</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> enable_if_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">enable_if</span><span style="color: #990000">&lt;</span>b<span style="color: #990000">,</span>T<span style="color: #990000">&gt;::</span>type<span 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: #009900">bool</span> b<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="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">F</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> conditional_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">conditional</span><span style="color: #990000">&lt;</span>b<span style="color: #990000">,</span>T<span style="color: #990000">,</span>F<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">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> T<span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> common_type_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">common_type</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">...&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> underlying_type_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">underlying_type</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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> result_of_t <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">result_of</span><span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>type<span style="color: #990000">;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">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">...&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">using</span></span> void_t <span style="color: #990000">=</span> <span style="color: #009900">void</span><span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<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"
-style="
-width:100%;
-">
-<caption class="title">Table 31. Additional type property predicates</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>Condition</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">template &lt;class T&gt;
-struct is_private;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct is_local;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct is_global;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct is_constant;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct is_generic;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct is_vector;</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">T</span> is built-in vector type.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect4">
-<h5 id="additional-type-property-queries">Additional type property queries</h5>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 32. Additional type property queries</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;class T&gt;
-struct vector_size;</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">If <span class="monospaced">T</span> names a built-in vector type, an integer value representing number of <span class="monospaced">T</span>'s components; otherwise <span class="monospaced">1</span>.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect3">
-<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"
-style="
-width:100%;
-">
-<caption class="title">Table 33. Changed relationship traits</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>Condition</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">template &lt;class T, class U&gt;
-struct is_same;</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">T</span> and <span class="monospaced">U</span> name the same type with the same <em>cv qualifications</em>.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect3">
-<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"
-style="
-width:100%;
-">
-<caption class="title">Table 34. Address space and vector traits</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>Comments</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">template &lt;class T&gt;
-struct remove_private;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct remove_local;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct remove_global;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct remove_constant;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct remove_generic;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct remove_as;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct remove_attrs;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct add_private;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct add_local;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct add_global;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct add_constant;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct add_generic;</span></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"><span class="monospaced">template &lt;class T&gt;
-struct vector_element;</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">If <span class="monospaced">T</span> is a built-in vector type, member typedef <span class="monospaced">T</span> shall name type of <span class="monospaced">T</span>'s component; otherwise it shall name <span class="monospaced">T</span>.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">template &lt;class T, size_t Dim&gt;
-struct make_vector;</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">If type <span class="monospaced">U</span> exists and names a built-in vector type with <span class="monospaced">Dim</span> components of type <span class="monospaced">T</span>, member typedef type shall name <span class="monospaced">U</span>; otherwise it shall name <span class="monospaced">T</span>.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="iterator-library">3.30. Iterator Library</h3>
-<div class="paragraph"><p>OpenCL C++ implements part of iterator library (<em>chapter 24, [iterators]</em>) from the C++14 standard.
-Primitives (C++14 standard, <em>section 24.4</em>), iterator operations (C++14 standard, <em>section 24.4.4,</em>), predefined iterators (C++14 standard, <em>section 24.5</em>) and range access (C++14 standard, <em>section 24.7</em>) are supported.</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_iterator-synopsis">3.30.1. Header &lt;opencl_iterator&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">// primitives:</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">Iterator</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">iterator_traits</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">iterator_traits</span><span style="color: #990000">&lt;</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">Category</span><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="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Distance</span> <span style="color: #990000">=</span> ptrdiff_t<span style="color: #990000">,</span>
-<span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Pointer</span> <span style="color: #990000">=</span> T<span style="color: #990000">*,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Reference</span> <span style="color: #990000">=</span> T<span style="color: #990000">&amp;&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">iterator</span><span style="color: #990000">;</span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">input_iterator_tag</span> <span style="color: #FF0000">{</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">output_iterator_tag</span> <span style="color: #FF0000">{</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">forward_iterator_tag</span><span style="color: #990000">:</span> <span style="font-weight: bold"><span style="color: #0000FF">public</span></span> input_iterator_tag <span style="color: #FF0000">{</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">bidirectional_iterator_tag</span><span style="color: #990000">:</span> <span style="font-weight: bold"><span style="color: #0000FF">public</span></span> forward_iterator_tag <span style="color: #FF0000">{</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">random_access_iterator_tag</span><span style="color: #990000">:</span> <span style="font-weight: bold"><span style="color: #0000FF">public</span></span> bidirectional_iterator_tag <span style="color: #FF0000">{</span> <span style="color: #FF0000">}</span><span style="color: #990000">;</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// iterator operations:</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">InputIterator</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Distance</span><span style="color: #990000">&gt;</span>
-<span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">advance</span></span><span style="color: #990000">(</span>InputIterator<span style="color: #990000">&amp;</span> i<span style="color: #990000">,</span> <span style="color: #008080">Distance</span> n<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">InputIterator</span><span style="color: #990000">&gt;</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">iterator_traits</span><span style="color: #990000">&lt;</span>InputIterator<span style="color: #990000">&gt;::</span>difference_type
-<span style="font-weight: bold"><span style="color: #000000">distance</span></span><span style="color: #990000">(</span><span style="color: #008080">InputIterator</span> first<span style="color: #990000">,</span> <span style="color: #008080">InputIterator</span> last<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">ForwardIterator</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">ForwardIterator</span> <span style="font-weight: bold"><span style="color: #000000">next</span></span><span style="color: #990000">(</span><span style="color: #008080">ForwardIterator</span> x<span style="color: #990000">,</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">std</span><span style="color: #990000">::</span>iterator_traits<span style="color: #990000">&lt;</span>ForwardIterator<span style="color: #990000">&gt;::</span><span style="color: #008080">difference_type</span> n <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">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">BidirectionalIterator</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">BidirectionalIterator</span> <span style="font-weight: bold"><span style="color: #000000">prev</span></span><span style="color: #990000">(</span><span style="color: #008080">BidirectionalIterator</span> x<span style="color: #990000">,</span>
-<span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">std</span><span style="color: #990000">::</span>iterator_traits<span style="color: #990000">&lt;</span>BidirectionalIterator<span style="color: #990000">&gt;::</span><span style="color: #008080">difference_type</span> n <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">// predefined iterators:</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">Iterator</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">reverse_iterator</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">Iterator1</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator2</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> reverse_iterator<span style="color: #990000">&lt;</span>Iterator1<span style="color: #990000">&gt;&amp;</span> x<span style="color: #990000">,</span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> reverse_iterator<span style="color: #990000">&lt;</span>Iterator2<span style="color: #990000">&gt;&amp;</span> y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator1</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator2</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> reverse_iterator<span style="color: #990000">&lt;</span>Iterator1<span style="color: #990000">&gt;&amp;</span> x<span style="color: #990000">,</span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> reverse_iterator<span style="color: #990000">&lt;</span>Iterator2<span style="color: #990000">&gt;&amp;</span> y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator1</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator2</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> reverse_iterator<span style="color: #990000">&lt;</span>Iterator1<span style="color: #990000">&gt;&amp;</span> x<span style="color: #990000">,</span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> reverse_iterator<span style="color: #990000">&lt;</span>Iterator2<span style="color: #990000">&gt;&amp;</span> y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator1</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator2</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> reverse_iterator<span style="color: #990000">&lt;</span>Iterator1<span style="color: #990000">&gt;&amp;</span> x<span style="color: #990000">,</span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> reverse_iterator<span style="color: #990000">&lt;</span>Iterator2<span style="color: #990000">&gt;&amp;</span> y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator1</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator2</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> reverse_iterator<span style="color: #990000">&lt;</span>Iterator1<span style="color: #990000">&gt;&amp;</span> x<span style="color: #990000">,</span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> reverse_iterator<span style="color: #990000">&lt;</span>Iterator2<span style="color: #990000">&gt;&amp;</span> y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator1</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator2</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> reverse_iterator<span style="color: #990000">&lt;</span>Iterator1<span style="color: #990000">&gt;&amp;</span> x<span style="color: #990000">,</span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> reverse_iterator<span style="color: #990000">&lt;</span>Iterator2<span style="color: #990000">&gt;&amp;</span> y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator1</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator2</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: #0000FF">operator</span></span><span style="color: #990000">-(</span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> reverse_iterator<span style="color: #990000">&lt;</span>Iterator1<span style="color: #990000">&gt;&amp;</span> x<span style="color: #990000">,</span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> reverse_iterator<span style="color: #990000">&lt;</span>Iterator2<span style="color: #990000">&gt;&amp;</span> y<span style="color: #990000">)</span> <span style="color: #990000">-&gt;</span><span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>y<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">base</span></span><span style="color: #990000">()</span> <span style="color: #990000">-</span> x<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">base</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">Iterator</span><span style="color: #990000">&gt;</span>
-reverse_iterator<span style="color: #990000">&lt;</span>Iterator<span style="color: #990000">&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">typename</span></span> <span style="color: #008080">reverse_iterator</span><span style="color: #990000">&lt;</span>Iterator<span style="color: #990000">&gt;::</span><span style="color: #008080">difference_type</span> n<span style="color: #990000">,</span>
-          <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> reverse_iterator<span style="color: #990000">&lt;</span>Iterator<span style="color: #990000">&gt;&amp;</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="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">reverse_iterator&lt;Iterator&gt;</span> <span style="font-weight: bold"><span style="color: #000000">make_reverse_iterator</span></span><span style="color: #990000">(</span><span style="color: #008080">Iterator</span> i<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Container</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">back_insert_iterator</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">Container</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">back_insert_iterator&lt;Container&gt;</span> <span style="font-weight: bold"><span style="color: #000000">back_inserter</span></span><span style="color: #990000">(</span>Container<span style="color: #990000">&amp;</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="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Container</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">front_insert_iterator</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">Container</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">front_insert_iterator&lt;Container&gt;</span> <span style="font-weight: bold"><span style="color: #000000">front_inserter</span></span><span style="color: #990000">(</span>Container<span style="color: #990000">&amp;</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="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Container</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">insert_iterator</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">Container</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">insert_iterator&lt;Container&gt;</span> <span style="font-weight: bold"><span style="color: #000000">inserter</span></span><span style="color: #990000">(</span>Container<span style="color: #990000">&amp;</span> x<span style="color: #990000">,</span>
-                                    <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">Container</span><span style="color: #990000">::</span><span style="color: #008080">iterator</span> i<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">move_iterator</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">Iterator1</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator2</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> move_iterator<span style="color: #990000">&lt;</span>Iterator1<span style="color: #990000">&gt;&amp;</span> x<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> move_iterator<span style="color: #990000">&lt;</span>Iterator2<span style="color: #990000">&gt;&amp;</span> y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator1</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator2</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> move_iterator<span style="color: #990000">&lt;</span>Iterator1<span style="color: #990000">&gt;&amp;</span> x<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> move_iterator<span style="color: #990000">&lt;</span>Iterator2<span style="color: #990000">&gt;&amp;</span> y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator1</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator2</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> move_iterator<span style="color: #990000">&lt;</span>Iterator1<span style="color: #990000">&gt;&amp;</span> x<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> move_iterator<span style="color: #990000">&lt;</span>Iterator2<span style="color: #990000">&gt;&amp;</span> y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator1</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator2</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> move_iterator<span style="color: #990000">&lt;</span>Iterator1<span style="color: #990000">&gt;&amp;</span> x<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> move_iterator<span style="color: #990000">&lt;</span>Iterator2<span style="color: #990000">&gt;&amp;</span> y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator1</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator2</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> move_iterator<span style="color: #990000">&lt;</span>Iterator1<span style="color: #990000">&gt;&amp;</span> x<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> move_iterator<span style="color: #990000">&lt;</span>Iterator2<span style="color: #990000">&gt;&amp;</span> y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator1</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator2</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> move_iterator<span style="color: #990000">&lt;</span>Iterator1<span style="color: #990000">&gt;&amp;</span> x<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> move_iterator<span style="color: #990000">&lt;</span>Iterator2<span style="color: #990000">&gt;&amp;</span> y<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator1</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator2</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: #0000FF">operator</span></span><span style="color: #990000">-(</span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> move_iterator<span style="color: #990000">&lt;</span>Iterator1<span style="color: #990000">&gt;&amp;</span> x<span style="color: #990000">,</span>
-<span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">move_iterator&lt;Iterator2&gt;&amp; y) -&gt;</span> <span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>x<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">base</span></span><span style="color: #990000">()</span> <span style="color: #990000">-</span> y<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">base</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">Iterator</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">move_iterator&lt;Iterator&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">typename</span></span> <span style="color: #008080">move_iterator</span><span style="color: #990000">&lt;</span>Iterator<span style="color: #990000">&gt;::</span><span style="color: #008080">difference_type</span> n<span style="color: #990000">,</span>
-                            <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> move_iterator<span style="color: #990000">&lt;</span>Iterator<span style="color: #990000">&gt;&amp;</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="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Iterator</span><span style="color: #990000">&gt;</span>
-<span style="color: #008080">move_iterator&lt;Iterator&gt;</span> <span style="font-weight: bold"><span style="color: #000000">make_move_iterator</span></span><span style="color: #990000">(</span><span style="color: #008080">Iterator</span> i<span style="color: #990000">);</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// range access:</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">C</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">begin</span></span><span style="color: #990000">(</span>C<span style="color: #990000">&amp;</span> c<span style="color: #990000">)</span> <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>c<span style="color: #990000">.</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">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">C</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">begin</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> C<span style="color: #990000">&amp;</span> c<span style="color: #990000">)</span> <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>c<span style="color: #990000">.</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">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">C</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">end</span></span><span style="color: #990000">(</span>C<span style="color: #990000">&amp;</span> c<span style="color: #990000">)</span> <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>c<span style="color: #990000">.</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">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">C</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">end</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> C<span style="color: #990000">&amp;</span> c<span style="color: #990000">)</span> <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>c<span style="color: #990000">.</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">template</span></span> <span style="color: #990000">&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="color: #008080">constexpr</span> T<span style="color: #990000">*</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: #000000">T</span></span> <span style="color: #990000">(&amp;</span>array<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="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">*</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: #000000">T</span></span> <span style="color: #990000">(&amp;</span>array<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="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">C</span><span style="color: #990000">&gt;</span>
-constexpr <span style="color: #008080">auto</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> C<span style="color: #990000">&amp;</span> c<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #000000">noexcept</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">noexcept</span></span><span style="color: #990000">(</span>std<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">begin</span></span><span style="color: #990000">(</span>c<span style="color: #990000">)))</span>
-<span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>std<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">begin</span></span><span style="color: #990000">(</span>c<span style="color: #990000">));</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">C</span><span style="color: #990000">&gt;</span>
-constexpr <span style="color: #008080">auto</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> C<span style="color: #990000">&amp;</span> c<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #000000">noexcept</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">noexcept</span></span><span style="color: #990000">(</span>std<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">end</span></span><span style="color: #990000">(</span>c<span style="color: #990000">)))</span>
-<span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>std<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">end</span></span><span style="color: #990000">(</span>c<span style="color: #990000">));</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">C</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">rbegin</span></span><span style="color: #990000">(</span>C<span style="color: #990000">&amp;</span> c<span style="color: #990000">)</span> <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>c<span style="color: #990000">.</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">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">C</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">rbegin</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> C<span style="color: #990000">&amp;</span> c<span style="color: #990000">)</span> <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>c<span style="color: #990000">.</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">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">C</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">rend</span></span><span style="color: #990000">(</span>C<span style="color: #990000">&amp;</span> c<span style="color: #990000">)</span> <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>c<span style="color: #990000">.</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">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">C</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">rend</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> C<span style="color: #990000">&amp;</span> c<span style="color: #990000">)</span> <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>c<span style="color: #990000">.</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">template</span></span> <span style="color: #990000">&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="color: #008080">reverse_iterator&lt;T*&gt;</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: #000000">T</span></span> <span style="color: #990000">(&amp;</span>array<span style="color: #990000">)[</span>N<span style="color: #990000">]);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&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="color: #008080">reverse_iterator&lt;T*&gt;</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: #000000">T</span></span> <span style="color: #990000">(&amp;</span>array<span style="color: #990000">)[</span>N<span style="color: #990000">]);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">E</span><span style="color: #990000">&gt;</span> <span style="color: #008080">reverse_iterator&lt;const E*&gt; rbegin(initializer_list&lt;E&gt;</span> il<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">E</span><span style="color: #990000">&gt;</span> <span style="color: #008080">reverse_iterator&lt;const E*&gt; rend(initializer_list&lt;E&gt;</span> il<span style="color: #990000">);</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">C</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">crbegin</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> C<span style="color: #990000">&amp;</span> c<span style="color: #990000">)</span> <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>std<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">rbegin</span></span><span style="color: #990000">(</span>c<span style="color: #990000">));</span>
-<span style="font-weight: bold"><span style="color: #0000FF">template</span></span> <span style="color: #990000">&lt;</span><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">C</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">crend</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> C<span style="color: #990000">&amp;</span> c<span style="color: #990000">)</span> <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">decltype</span></span><span style="color: #990000">(</span>std<span style="color: #990000">::</span><span style="font-weight: bold"><span style="color: #000000">rend</span></span><span style="color: #990000">(</span>c<span style="color: #990000">));</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="general-utilities-library">3.31. General Utilities Library</h3>
-<div class="paragraph"><p>OpenCL C++ implements part of utility library (<em>chapter 20.2, [utilities]</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_utility-synopsis">3.31.1. Header &lt;opencl_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="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">add_rvalue_reference_t&lt;T&gt;</span> <span style="font-weight: bold"><span style="color: #000000">declval</span></span><span style="color: #990000">(</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="color: #008080">constexpr</span> T<span style="color: #990000">&amp;&amp;</span> <span style="font-weight: bold"><span style="color: #000000">forward</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_reference_t</span><span style="color: #990000">&amp;</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">constexpr</span> T<span style="color: #990000">&amp;&amp;</span> <span style="font-weight: bold"><span style="color: #000000">forward</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_reference_t</span><span style="color: #990000">&amp;&amp;</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>
-constexpr <span style="font-weight: bold"><span style="color: #0000FF">typename</span></span> <span style="color: #008080">remove_reference_t</span><span style="color: #990000">&amp;&amp;</span> <span style="font-weight: bold"><span style="color: #000000">move</span></span><span style="color: #990000">(</span>T<span style="color: #990000">&amp;&amp;</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">swap</span></span><span style="color: #990000">(</span>T<span style="color: #990000">&amp;</span> a<span style="color: #990000">,</span> T<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: #008080">constexpr</span> conditional_t<span style="color: #990000">&lt;</span>
-  <span style="color: #990000">!</span>is_nothrow_move_constructible<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>value <span style="color: #990000">&amp;&amp;</span> is_copy_constructible<span style="color: #990000">&lt;</span>T<span style="color: #990000">&gt;::</span>value<span style="color: #990000">,</span>
-  <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> T<span style="color: #990000">&amp;,</span> T<span style="color: #990000">&amp;&amp;&gt;</span> <span style="font-weight: bold"><span style="color: #000000">move_if_noexcept</span></span><span style="color: #990000">(</span>T<span style="color: #990000">&amp;</span> x<span style="color: #990000">)</span> noexcept<span style="color: #990000">;</span>
-
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-</div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="opencl-numerical-compliance">4. OpenCL Numerical Compliance</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This section describes features of the C++14 and IEEE 754 standards that must be supported by all OpenCL compliant devices.</p></div>
-<div class="paragraph"><p>This section describes the functionality that must be supported by all OpenCL devices for single precision floating-point numbers.
-Currently, only single precision and half precision floating-point is a requirement.
-Double precision floating-point is an optional feature.</p></div>
-<div class="sect2">
-<h3 id="rounding-modes-1">4.1. Rounding Modes</h3>
-<div class="paragraph"><p>Floating-point calculations may be carried out internally with extra precision and then rounded to fit into the destination type.
-IEEE 754 defines four possible rounding modes:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Round to nearest even.
-</p>
-</li>
-<li>
-<p>
-Round toward +infinity.
-</p>
-</li>
-<li>
-<p>
-Round toward -infinity.
-</p>
-</li>
-<li>
-<p>
-Round toward zero.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><em>Round to nearest even</em> is currently the only rounding mode required <a href="#ftn30">[30</a>] by the OpenCL specification for single precision and double precision operations and is therefore the default rounding mode.
-In addition, only static selection of rounding mode is supported.
-Static and dynamic selection of rounding mode is not supported.</p></div>
-</div>
-<div class="sect2">
-<h3 id="inf-nan-and-denormalized-numbers">4.2. INF, NaN and Denormalized Numbers</h3>
-<div class="paragraph"><p>INF and NaNs must be supported.
-Support for signaling NaNs is not required.</p></div>
-<div class="paragraph"><p>Support for denormalized numbers with single precision floating-point is optional.
-Denormalized single precision floating-point numbers passed as input or produced as the output of single precision floating-point operations such as add, sub, mul, divide, and the functions defined in <a href="#math-functions">Math Functions</a>, <a href="#common-functions">Common Functions</a> and <a href="#geometric-functions">Geometric Functions</a> may be flushed to zero.</p></div>
-</div>
-<div class="sect2">
-<h3 id="floating-point-exceptions">4.3. Floating-Point Exceptions</h3>
-<div class="paragraph"><p>Floating-point exceptions are disabled in OpenCL.
-The result of a floating-point exception must match the IEEE 754 spec for the exceptions not enabled case.
-Whether and when the implementation sets floating-point flags or raises floating-point exceptions is implementation-defined.
-This standard provides no method for querying, clearing or setting floating-point flags or trapping raised exceptions.
-Due to non-performance, non-portability of trap mechanisms and the impracticality of servicing precise exceptions in a vector context (especially on heterogeneous hardware), such features are discouraged.</p></div>
-<div class="paragraph"><p>Implementations that nevertheless support such operations through an extension to the standard shall initialize with all exception flags cleared and the exception masks set so that exceptions raised by arithmetic operations do not trigger a trap to be taken.
-If the underlying work is reused by the implementation, the implementation is however not responsible for reclearing the flags or resetting exception masks to default values before entering the kernel.
-That is to say that kernels that do not inspect flags or enable traps are licensed to expect that their arithmetic will not trigger a trap.
-Those kernels that do examine flags or enable traps are responsible for clearing flag state and disabling all traps before returning control to the implementation.
-Whether or when the underlying work-item (and accompanying global floating-point state if any) is reused is implementation-defined.</p></div>
-<div class="paragraph"><p>The expressions math_errorhandling and MATH_ERREXCEPT are reserved for use by this standard, but not defined.
-Implementations that extend this specification with support for floating-point exceptions shall define math_errorhandling and MATH_ERREXCEPT per ISO / IEC 9899 : TC2.</p></div>
-</div>
-<div class="sect2">
-<h3 id="relative-error-as-ulps">4.4. Relative Error as ULPs</h3>
-<div class="paragraph"><p>In this section we discuss the maximum relative error defined as ulp (units in the last place).
-Addition, subtraction, multiplication, fused multiply-add and conversion between integer and a single precision floating-point format are IEEE 754 compliant and are therefore correctly rounded.
-Conversion between floating-point formats and explicit conversions specified in <em><a href="#conversions-library">Conversions Library</a> section</em> must be correctly rounded.</p></div>
-<div class="paragraph"><p>The ULP is defined as follows:</p></div>
-<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 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</a></em></p></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 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 class="tableblock frame-all grid-all" id="ulp_values_for_single_precision_builtin_math_functions"
-style="
-width:100%;
-">
-<caption class="title">Table 35. ULP values for single precision built-in math functions</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Function</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Min Accuracy - ULP values <a href="#ftn32">[32</a>]</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>x</em> + <em>y</em></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"><em>x</em> - <em>y</em></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"><em>x</em> * <em>y</em></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">1.0  / <em>x</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2.5 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>x</em> / <em>y</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2.5 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">acos</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">acospi</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">asin</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">asinpi</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">atan</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">atan2</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">atanpi</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">atan2pi</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">acosh</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">asinh</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">atanh</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">cbrt</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">ceil</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">copysign</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">cos</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">cosh</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">cospi</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">erfc</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">erf</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">exp</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">exp2</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">exp10</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">expm1</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">fabs</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">fdim</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">floor</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">fma</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">fmax</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">fmin</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">fmod</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">fract</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">frexp</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">hypot</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">ilogb</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">ldexp</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">log</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">log2</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">log10</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">log1p</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">logb</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">mad</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented either as a correctly rounded fma or as a multiply followed by an add both of which are correctly rounded</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">maxmag</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">minmag</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">modf</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">nan</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">nextafter</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">pow(x, y)</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">pown(x, y)</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">powr(x, y)</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">remainder</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">remquo</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">rint</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">rootn</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">round</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">rsqrt</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">sin</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">sincos</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">sinh</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">sinpi</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">sqrt</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">tan</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">tanh</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">tanpi</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">tgamma</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">trunc</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">native_math::cos</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">native_math::divide</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">native_math::exp</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">native_math::exp2</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">native_math::exp10</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">native_math::log</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">native_math::log2</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">native_math::log10</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">native_math::powr</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">native_math::recip</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">native_math::rsqrt</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">native_math::sin</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">native_math::sqrt</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">native_math::tan</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implementation-defined</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><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 class="tableblock frame-all grid-all" id="ulp_values_for_single_precision_builtin_math_functions_for_embedded_profile"
-style="
-width:100%;
-">
-<caption class="title">Table 36. ULP values for single precision built-in math functions for embedded profile</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Function</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Min Accuracy - ULP values <a href="#ftn32">[32</a>]</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><em>x</em> + <em>y</em></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"><em>x</em> - <em>y</em></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"><em>x</em> * <em>y</em></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">1.0  / <em>x</em></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"><em>x</em> / <em>y</em></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">acos</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">acospi</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">asin</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">asinpi</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">atan</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">atan2</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">atanpi</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">atan2pi</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">acosh</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">asinh</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">atanh</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">cbrt</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">ceil</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">copysign</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">cos</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">cosh</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">cospi</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">erfc</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">erf</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">exp</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">exp2</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">exp10</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">expm1</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">fabs</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">fdim</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">floor</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">fma</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">fmax</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">fmin</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">fmod</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">fract</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">frexp</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">hypot</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">ilogb</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">ldexp</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">log</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">log2</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">log10</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">log1p</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">logb</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">mad</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Any value allowed (infinite ulp)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">maxmag</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">minmag</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">modf</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">nan</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">nextafter</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">pow(x, y)</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">pown(x, y)</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">powr(x, y)</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">remainder</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">remquo</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">rint</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">rootn</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">round</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">rsqrt</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">sin</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">sincos</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">sinh</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">sinpi</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">sqrt</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">tan</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">tanh</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">tanpi</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">tgamma</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">trunc</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">half_cos</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half_divide</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half_exp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half_exp2</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half_exp10</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half_log</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half_log2</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half_log10</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half_powr</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half_recip</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half_rsqrt</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half_sin</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half_sqrt</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half_tan</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">native_math::cos</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">native_math::divide</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">native_math::exp</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">native_math::exp2</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">native_math::exp10</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">native_math::log</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">native_math::log2</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">native_math::log10</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">native_math::powr</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">native_math::recip</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">native_math::rsqrt</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">native_math::sin</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">native_math::sqrt</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">native_math::tan</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implementation-defined</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><a href="#ulp_values_for_single_precision_builtin_math_functions_with_fast_relaxed_math">ULP values for single precision built-in math functions with fast relaxed math</a> table describes the minimum accuracy of commonly used single precision floating-point arithmetic operations given as ULP values if the <em>-cl-fast-relaxed-math</em> compiler option is specified when compiling or building an OpenCL program.
-For derived implementations, the operations used in the derivation may themselves be relaxed according to <a href="#ulp_values_for_single_precision_builtin_math_functions_with_fast_relaxed_math">ULP values for single precision built-in math functions with fast relaxed math</a> table.
-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 fast relaxed math</a> table when the <em>-cl-fast-relaxed-math</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 class="tableblock frame-all grid-all" id="ulp_values_for_single_precision_builtin_math_functions_with_fast_relaxed_math"
-style="
-width:100%;
-">
-<caption class="title">Table 37. ULP values for single precision built-in math functions with fast relaxed math in the full and embedded profiles</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Function</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Min Accuracy - ULP values <a href="#ftn32">[32</a>]</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">1.0  / x</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2.5 ulp for x in the domain of 2<sup>-126</sup> to 2<sup>126</sup> for the full profile, and &lt;= 3 ulp for the embedded profile.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">x / y</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2.5 ulp for x in the domain of 2<sup>-62</sup> to 2<sup>62</sup> and <em>y</em> in the domain of 2<sup>-62</sup> to 2<sup>62</sup> for the full profile, and &lt;= 3 ulp for the embedded profile.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">acos(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4096 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">acospi(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as acos(x) * M_PI_F.
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">asin(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4096 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">asinpi(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as asin(x) * M_PI_F.
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">atan(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4096 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">atan2(y, x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as atan(y/x) for x &gt; 0, atan(y/x) + M_PI_F for x &lt; 0 and y &gt; 0 and atan(y/x) - M_PI_F for x &lt; 0 and y &lt; 0.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">atanpi(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as atan(x) * M_1_PI_F.
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">atan2pi(y, x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as atan2(y, x) * M_1_PI_F.
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">acosh(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as log( x + sqrt(x*x - 1) ).</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">asinh(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as log( x + sqrt(x*x + 1) ).</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">atanh(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Defined for x in the domain (-1, 1). For x in [-2<sup>-10</sup>, 2<sup>-10</sup>], implemented as x.
-For x outside of [-2<sup>-10</sup>, 2<sup>-10</sup>], implemented as 0.5f * log( (1.0f + x) / (1.0f - x) ).
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cbrt(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as rootn(x, 3).
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cos(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For x in the domain [-π, π], the maximum absolute error is &lt;= 2<sup>-11</sup> and larger otherwise.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cosh(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Defined for x in the domain [-88, 88] and implemented as 0.5f * ( exp(x) + exp(-x) ).
-For non-derived implementations, the error is &lt;= 8192 ULP.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cospi(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For x in the domain [-1, 1], the maximum absolute error is &lt;= 2<sup>-11</sup> and larger otherwise.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">exp(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 + floor( fabs(2 * x) ) ulp for the full profile, and &lt;= 4 ulp for the embedded profile.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">exp2(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 + floor( fabs(2 * x) ) ulp for the full profile, and &lt;= 4 ulp for the embedded profile.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">exp10(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Derived implementations implement this as exp2( x * log2(10) ).
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">expm1(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Derived implementations implement this as exp(x) - 1.
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">log(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For x in the domain [0.5, 2] the maximum absolute error is &lt;= 2<sup>-21</sup>; otherwise the maximum error is &lt;=3 ulp for the full profile and &lt;= 4 ulp for the embedded profile</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">log2(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For x in the domain [0.5, 2] the maximum absolute error is &lt;= 2<sup>-21</sup>; otherwise the maximum error is &lt;=3 ulp for the full profile and &lt;= 4 ulp for the embedded profile</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">log10(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For x in the domain [0.5, 2] the maximum absolute error is &lt;= 2<sup>-21</sup>; otherwise the maximum error is &lt;=3 ulp for the full profile and &lt;= 4 ulp for the embedded profile</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">log1p(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Derived implementations implement this as log(x + 1).
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">pow(x, y)</p></td>
-<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 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>
-<tr>
-<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 &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>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">powr(x, y)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Defined only for x &gt;= 0.
-Undefined for x = 0 and y = 0.
-Derived implementations implement this as exp2( y * log2(x) ).
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">rootn(x, y)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Defined for x &gt; 0 when y is non-zero, derived implementations implement this case as exp2( log2(x) / y ). Defined for x &lt; 0 when y is odd, derived implementations implement this case as -exp2( log2(-x) / y ).
-Defined for x = +/-0 when y &gt; 0, derived implementations will return +0 in this case.
-For non-derived implementations, the error is &lt;= 8192 ULP.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">sin(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For x in the domain [-π, π], the maximum absolute error is &lt;= 2<sup>-11</sup> and larger otherwise.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">sincos(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">ulp values as defined for sin(x) and cos(x).</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">sinh(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Defined for x in the domain [-88, 88].
-For x in [-2<sup>-10</sup>, 2<sup>-10</sup>], derived implementations implement as x.
-For x outside of [-2<sup>-10</sup>, 2<sup>-10</sup>], derived implement as 0.5f * ( exp(x) - exp(-x) ).
-For non-derived implementations, the error is &lt;= 8192 ULP.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">sinpi(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For x in the domain [-1, 1], the maximum absolute error is &lt;= 2<sup>-11</sup> and larger otherwise.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">tan(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Derived implementations implement this as sin(x) * ( 1.0f / cos(x) ).
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">tanh</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Defined for x in the domain [-88, 88].
-For x in [-2<sup>-10</sup>, 2<sup>-10</sup>], derived implementations implement as x.
-For x outside of [-2<sup>-10</sup>, 2<sup>-10</sup>], derived implementations implement as ( exp(x) - exp(-x) ) / ( exp(x) + exp(-x) ).
-For non-derived implementations, the error is &lt;= 8192 ULP.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">tanpi(x)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Derived implementations implement this as tan(x * M_PI_F).
-For non-derived implementations, the error is &lt;= 8192 ulp for x in the domain [-1, 1].</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">x * y + z</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented either as a correctly rounded fma or as a multiply and an add both of which are correctly rounded.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><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 class="tableblock frame-all grid-all" id="ulp_values_for_double_precision_builtin_math_functions"
-style="
-width:100%;
-">
-<caption class="title">Table 38. ULP values for double precision built-in math functions</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Function</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Min Accuracy - ULP values <a href="#ftn32">[32</a>]</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">x + y</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">x - y</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">x * y</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">1.0  / x</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">x / y</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">acos</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">acospi</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">asin</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">asinpi</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">atan</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">atan2</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">atanpi</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">atan2pi</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">acosh</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">asinh</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">atanh</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">cbrt</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">ceil</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">copysign</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">cos</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">cosh</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">cospi</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">erfc</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">erf</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">exp</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">exp2</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">exp10</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">expm1</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">fabs</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">fdim</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">floor</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">fma</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">fmax</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">fmin</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">fmod</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">fract</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">frexp</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">hypot</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">ilogb</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">ldexp</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">log</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">log2</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">log10</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">log1p</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">logb</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">mad</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Any value allowed (infinite ulp)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">maxmag</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">minmag</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">modf</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">nan</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">nextafter</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">pow(x, y)</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">pown(x, y)</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">powr(x, y)</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">remainder</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">remquo</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">rint</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">rootn</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">round</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">rsqrt</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">sin</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">sincos</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">sinh</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">sinpi</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">sqrt</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">tan</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">tanh</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">tanpi</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">tgamma</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">trunc</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><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 class="tableblock frame-all grid-all" id="ulp_values_for_half_precision_builtin_math_functions"
-style="
-width:100%;
-">
-<caption class="title">Table 39. ULP values for half precision built-in math functions</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Function</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Min Accuracy - ULP values <a href="#ftn32">[32</a>]</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">x + y</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">x - y</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">x * y</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">1.0 / x</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">x / y</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">acos</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">acospi</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">asin</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">asinpi</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">atan</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">atan2</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">atanpi</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">atan2pi</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">acosh</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">asinh</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">atanh</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">cbrt</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">ceil</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">copysign</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">cos</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">cosh</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">cospi</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">erfc</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">erf</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">exp</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">exp2</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">exp10</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">expm1</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">fabs</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">fdim</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">floor</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">fma</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">fmax</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">fmin</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">fmod</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">fract</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">frexp</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">hypot</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">ilogb</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">ldexp</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">log</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">log2</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">log10</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">log1p</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">logb</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">mad</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Any value allowed (infinite ulp)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">maxmag</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">minmag</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">modf</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">nan</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">nextafter</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">pow(x, y)</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">pown(x, y)</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">powr(x, y)</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">remainder</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">remquo</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">rint</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">rootn</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">round</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">rsqrt</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 1 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">sin</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">sincos</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp for sine and cosine values</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">sinh</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">sinpi</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">sqrt</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">tan</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">tanh</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">tanpi</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">tgamma</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">trunc</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect2">
-<h3 id="edge-case-behavior">4.5. Edge Case Behavior</h3>
-<div class="paragraph"><p>The edge case behavior of the math functions (<em><a href="#math-functions">Math Functions</a> section</em>) shall conform to sections F.9 and G.6 of ISO/IEC 9899:TC 2, except where noted below in <em><a href="#additional-requirements-beyond-isoiec-9899tc2">Additional Requirements Beyond ISO/IEC 9899:TC2</a> section</em>.</p></div>
-<div class="sect3">
-<h4 id="additional-requirements-beyond-isoiec-9899tc2">4.5.1. Additional Requirements Beyond ISO/IEC 9899:TC2</h4>
-<div class="paragraph"><p>Functions that return a NaN with more than one NaN operand shall return one of the NaN operands.
-Functions that return a NaN operand may silence the NaN if it is a signaling NaN.
-A non-signaling NaN shall be converted to a non-signaling NaN.
-A signaling NaN shall be converted to a NaN, and should be converted to a non-signaling NaN.
-How the rest of the NaN payload bits or the sign of NaN is converted is undefined.</p></div>
-<div class="paragraph"><p>The usual allowances for rounding error (<em><a href="#relative-error-as-ulps">Relative Error as ULPs</a> section</em>) or flushing behavior (<em><a href="#edge-case-behavior-in-flush-to-zero-mode">Edge Case Behavior in Flush To Zero Mode</a> section</em>) shall not apply for those values for which <em>section F.9</em> of ISO/IEC 9899:,TC2, or <em><a href="#additional-requirements-beyond-isoiec-9899tc2">Additional Requirements Beyond ISO/IEC 9899:TC2</a></em> and <em><a href="#edge-case-behavior-in-flush-to-zero-mode">Edge Case Behavior in Flush To Zero Mode</a> sections</em> below (and similar sections for other floating-point precisions) prescribe a result (e.g. ceil( -1 &lt; x &lt; 0 ) returns -0).
-Those values shall produce exactly the prescribed answers, and no other.
-Where the ± symbol is used, the sign shall be preserved.
-For example, sin(±0) = ±0 shall be interpreted to mean sin(+0) is +0 and sin(-0) is -0.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-acospi( 1 ) = +0.
-</p>
-</li>
-<li>
-<p>
-acospi( x ) returns a NaN for | x | &gt; 1.
-</p>
-</li>
-<li>
-<p>
-asinpi( ±0 ) = ±0.
-</p>
-</li>
-<li>
-<p>
-asinpi( x ) returns a NaN for | x | &gt; 1.
-</p>
-</li>
-<li>
-<p>
-atanpi( ±0 ) = ±0.
-</p>
-</li>
-<li>
-<p>
-atanpi ( ±∞ ) = ±0.5.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( ±0, -0 ) = ±1.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( ±0, +0 ) = ± 0.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( ±0, x ) returns ± 1 for x &lt; 0.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( ±0, x) returns ± 0 for x &gt; 0.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( y, ±0 ) returns -0.5 for y &lt; 0.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( y, ±0 ) returns 0.5 for y &gt; 0.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( ±y, -∞ ) returns ± 1 for finite y &gt; 0.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( ±y, +∞ ) returns ± 0 for finite y &gt; 0.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( ±∞, x ) returns ± 0.5 for finite x.
-</p>
-</li>
-<li>
-<p>
-atan2pi (±∞, -∞ ) returns ±0.75.
-</p>
-</li>
-<li>
-<p>
-atan2pi (±∞, +∞ ) returns ±0.25.
-</p>
-</li>
-<li>
-<p>
-ceil( -1 &lt; x &lt; 0 ) returns -0.
-</p>
-</li>
-<li>
-<p>
-cospi( ±0 ) returns 1
-</p>
-</li>
-<li>
-<p>
-cospi( n + 0.5 ) is +0 for any integer n where n + 0.5 is representable.
-</p>
-</li>
-<li>
-<p>
-cospi( ±∞ ) returns a NaN.
-</p>
-</li>
-<li>
-<p>
-exp10( ±0 ) returns 1.
-</p>
-</li>
-<li>
-<p>
-exp10( -∞ ) returns +0.
-</p>
-</li>
-<li>
-<p>
-exp10( +∞ ) returns +∞.
-</p>
-</li>
-<li>
-<p>
-distance(x, y) calculates the distance from x to y without overflow or extraordinary precision loss due to underflow.
-</p>
-</li>
-<li>
-<p>
-fdim( any, NaN ) returns NaN.
-</p>
-</li>
-<li>
-<p>
-fdim( NaN, any ) returns NaN.
-</p>
-</li>
-<li>
-<p>
-fmod( ±0, NaN ) returns NaN.
-</p>
-</li>
-<li>
-<p>
-frexp( ±∞, exp ) returns ±∞ and stores 0 in exp.
-</p>
-</li>
-<li>
-<p>
-frexp( NaN, exp ) returns the NaN and stores 0 in exp.
-</p>
-</li>
-<li>
-<p>
-fract( x, iptr) shall not return a value greater than or equal to 1.0, and shall not return a value less than 0.
-</p>
-</li>
-<li>
-<p>
-fract( +0, iptr ) returns +0 and +0 in iptr.
-</p>
-</li>
-<li>
-<p>
-fract( -0, iptr ) returns -0 and -0 in iptr.
-</p>
-</li>
-<li>
-<p>
-fract( +inf, iptr ) returns +0 and +inf in iptr.
-</p>
-</li>
-<li>
-<p>
-fract( -inf, iptr ) returns -0 and -inf in iptr.
-</p>
-</li>
-<li>
-<p>
-fract( NaN, iptr ) returns the NaN and NaN in iptr.
-</p>
-</li>
-<li>
-<p>
-length calculates the length of a vector without overflow or extraordinary precision loss due to underflow.
-</p>
-</li>
-<li>
-<p>
-lgamma_r( x, signp ) returns 0 in signp if x is zero or a negative integer.
-</p>
-</li>
-<li>
-<p>
-nextafter( -0, y &gt; 0 ) returns smallest positive denormal value.
-</p>
-</li>
-<li>
-<p>
-nextafter( +0, y &lt; 0 ) returns smallest negative denormal value.
-</p>
-</li>
-<li>
-<p>
-normalize shall reduce the vector to unit length, pointing in the same direction without overflow or extraordinary precision loss due to underflow.
-</p>
-</li>
-<li>
-<p>
-normalize( v ) returns v if all elements of v are zero.
-</p>
-</li>
-<li>
-<p>
-normalize( v ) returns a vector full of NaNs if any element is a NaN.
-</p>
-</li>
-<li>
-<p>
-normalize( v ) for which any element in v is infinite shall proceed as if the elements in v were replaced as follows:
-</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="font-weight: bold"><span style="color: #0000FF">for</span></span><span style="color: #990000">(</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="font-weight: bold"><span style="color: #0000FF">sizeof</span></span><span style="color: #990000">(</span>v<span style="color: #990000">)</span> <span style="color: #990000">/</span> <span style="font-weight: bold"><span style="color: #0000FF">sizeof</span></span><span style="color: #990000">(</span>v<span style="color: #990000">[</span><span style="color: #993399">0</span><span style="color: #990000">]</span> <span style="color: #990000">);</span> i<span style="color: #990000">++</span> <span style="color: #990000">)</span>
-    v<span style="color: #990000">[</span>i<span style="color: #990000">]</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">isinf</span></span><span style="color: #990000">(</span>v<span style="color: #990000">[</span>i<span style="color: #990000">]</span> <span style="color: #990000">)</span>  <span style="color: #990000">?</span>  <span style="font-weight: bold"><span style="color: #000000">copysign</span></span><span style="color: #990000">(</span><span style="color: #993399">1.0</span><span style="color: #990000">,</span> v<span style="color: #990000">[</span>i<span style="color: #990000">])</span> <span style="color: #990000">:</span> <span style="color: #993399">0.0</span> <span style="color: #990000">*</span> v <span style="color: #990000">[</span>i<span style="color: #990000">];</span></tt></pre></div></div>
-</li>
-<li>
-<p>
-pow( ±0, -∞ ) returns +∞
-</p>
-</li>
-<li>
-<p>
-pown( x, 0 ) is 1 for any x, even zero, NaN or infinity.
-</p>
-</li>
-<li>
-<p>
-pown( ±0, n ) is ±∞ for odd n &lt; 0.
-</p>
-</li>
-<li>
-<p>
-pown( ±0, n ) is +∞ for even n &lt; 0.
-</p>
-</li>
-<li>
-<p>
-pown( ±0, n ) is +0 for even n &gt; 0.
-</p>
-</li>
-<li>
-<p>
-pown( ±0, n ) is ±0 for odd n &gt; 0.
-</p>
-</li>
-<li>
-<p>
-powr( x, ±0 ) is 1 for finite x &gt; 0.
-</p>
-</li>
-<li>
-<p>
-powr( ±0, y ) is +∞ for finite y &lt; 0.
-</p>
-</li>
-<li>
-<p>
-powr( ±0, -∞) is +∞.
-</p>
-</li>
-<li>
-<p>
-powr( ±0, y ) is +0 for y &gt; 0.
-</p>
-</li>
-<li>
-<p>
-powr( +1, y ) is 1 for finite y.
-</p>
-</li>
-<li>
-<p>
-powr( x, y ) returns NaN for x &lt; 0.
-</p>
-</li>
-<li>
-<p>
-powr( ±0, ±0 ) returns NaN.
-</p>
-</li>
-<li>
-<p>
-powr( +∞, ±0 ) returns NaN.
-</p>
-</li>
-<li>
-<p>
-powr( +1, ±∞ ) returns NaN.
-</p>
-</li>
-<li>
-<p>
-powr( x, NaN ) returns the NaN for x &gt;= 0.
-</p>
-</li>
-<li>
-<p>
-powr( NaN, y ) returns the NaN.
-</p>
-</li>
-<li>
-<p>
-rint( -0.5 &lt;= x &lt; 0 ) returns -0.
-</p>
-</li>
-<li>
-<p>
-remquo(x, y, &amp;quo) returns a NaN and 0 in quo if x is ±∞, or if y is 0 and the other argument is non-NaN or if either argument is a NaN.
-</p>
-</li>
-<li>
-<p>
-rootn( ±0, n ) is ±∞ for odd n &lt; 0.
-</p>
-</li>
-<li>
-<p>
-rootn( ±0, n ) is +∞ for even n &lt; 0.
-</p>
-</li>
-<li>
-<p>
-rootn( ±0, n ) is +0 for even n &gt; 0.
-</p>
-</li>
-<li>
-<p>
-rootn( ±0, n ) is ±0 for odd n &gt; 0.
-</p>
-</li>
-<li>
-<p>
-rootn( x, n ) returns a NaN for x &lt; 0 and n is even.
-</p>
-</li>
-<li>
-<p>
-rootn( x, 0 ) returns a NaN.
-</p>
-</li>
-<li>
-<p>
-round( -0.5 &lt; x &lt; 0 ) returns -0.
-</p>
-</li>
-<li>
-<p>
-sinpi( ±0 ) returns ±0.
-</p>
-</li>
-<li>
-<p>
-sinpi( +n) returns +0 for positive integers n.
-</p>
-</li>
-<li>
-<p>
-sinpi( -n ) returns -0 for negative integers n.
-</p>
-</li>
-<li>
-<p>
-sinpi( ±∞ ) returns a NaN.
-</p>
-</li>
-<li>
-<p>
-tanpi( ±0 ) returns ±0.
-</p>
-</li>
-<li>
-<p>
-tanpi( ±∞ ) returns a NaN.
-</p>
-</li>
-<li>
-<p>
-tanpi( n ) is copysign( 0.0, n ) for even integers n.
-</p>
-</li>
-<li>
-<p>
-tanpi( n ) is copysign( 0.0, - n) for odd integers n.
-</p>
-</li>
-<li>
-<p>
-tanpi( n + 0.5 ) for even integer n is +∞ where n + 0.5 is representable.
-</p>
-</li>
-<li>
-<p>
-tanpi( n + 0.5 ) for odd integer n is -∞ where n + 0.5 is representable.
-</p>
-</li>
-<li>
-<p>
-trunc( -1 &lt; x &lt; 0 ) returns -0.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="changes-to-isoiec-9899-tc2-behavior">4.5.2. Changes to ISO/IEC 9899: TC2 Behavior</h4>
-<div class="paragraph"><p><span class="monospaced">modf</span> behaves as though implemented by:</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">modf</span></span><span style="color: #990000">(</span> <span style="color: #008080">gentype</span> value<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> <span style="color: #990000">*</span>iptr <span style="color: #990000">)</span>
-<span style="color: #FF0000">{</span>
-    <span style="color: #990000">*</span>iptr <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">trunc</span></span><span style="color: #990000">(</span> value <span style="color: #990000">);</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="font-weight: bold"><span style="color: #000000">copysign</span></span><span style="color: #990000">(</span> <span style="font-weight: bold"><span style="color: #000000">isinf</span></span><span style="color: #990000">(</span> value <span style="color: #990000">)</span> <span style="color: #990000">?</span> <span style="color: #993399">0.0</span> <span style="color: #990000">:</span> value <span style="color: #990000">-</span> <span style="color: #990000">*</span>iptr<span style="color: #990000">,</span> value <span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p>rint always rounds according to round to nearest even rounding mode even if the caller is in some other rounding mode.</p></div>
-</div>
-<div class="sect3">
-<h4 id="edge-case-behavior-in-flush-to-zero-mode">4.5.3. Edge Case Behavior in Flush To Zero Mode</h4>
-<div class="paragraph"><p>If denormals are flushed to zero, then a function may return one of four results:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-Any conforming result for non-flush-to-zero mode.
-</p>
-</li>
-<li>
-<p>
-If the result given by 1. is a sub-normal before rounding, it may be flushed to zero.
-</p>
-</li>
-<li>
-<p>
-Any non-flushed conforming result for the function if one or more of its sub-normal operands are flushed to zero.
-</p>
-</li>
-<li>
-<p>
-If the result of 3. is a sub-normal before rounding, the result may be flushed to zero.
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p>In each of the above cases, if an operand or result is flushed to zero, the sign of the zero is undefined.</p></div>
-<div class="paragraph"><p>If subnormals are flushed to zero, a device may choose to conform to the following edge cases for nextafter instead of those listed in <em><a href="#additional-requirements-beyond-isoiec-9899tc2">Additional Requirements Beyond ISO/IEC 9899:TC2</a> section</em>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-nextafter ( +smallest normal, y &lt; +smallest normal ) = +0.
-</p>
-</li>
-<li>
-<p>
-nextafter ( -smallest normal, y &gt; -smallest normal ) = -0.
-</p>
-</li>
-<li>
-<p>
-nextafter ( -0, y &gt; 0 ) returns smallest positive normal value.
-</p>
-</li>
-<li>
-<p>
-nextafter ( +0, y &lt; 0 ) returns smallest negative normal value.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For clarity, subnormals or denormals are defined to be the set of representable numbers in the range 0 &lt; x &lt; TYPE_MIN  and -TYPE_MIN &lt; x &lt; -0.
-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). <a href="#ftn35">[35</a>]</p></div>
-</div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="image-addressing-and-filtering">5. Image Addressing and Filtering</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Let w<sub>t</sub>, h<sub>t</sub> and d<sub>t</sub> be the width, height (or image array size for a 1D image array) and depth (or image array size for a 2D image array) of the image in pixels.
-Let coord.xy also referred to as (s,t) or coord.xyz also referred to as (s,t,r) be the coordinates specified to <span class="monospaced">image::read</span>.
-The sampler specified in <span class="monospaced">image::read</span> is used to determine how to sample the image and return an appropriate color.</p></div>
-<div class="sect2">
-<h3 id="image-coordinates">5.1. Image Coordinates</h3>
-<div class="paragraph"><p>This affects the interpretation of image coordinates.
-If image coordinates specified to <span class="monospaced">image::read</span> are normalized (as specified in the sampler), the s,t, and r coordinate values are multiplied by w<sub>t</sub>, h<sub>t,</sub> and d<sub>t</sub> respectively to generate the unnormalized coordinate values.
-For image arrays, the image array coordinate (i.e. t if it is a 1D image array or r if it is a 2D image array) specified to <span class="monospaced">image::read</span> must always be the unnormalized image coordinate value.</p></div>
-<div class="paragraph"><p>Let (u,v,w) represent the unnormalized image coordinate values.</p></div>
-</div>
-<div class="sect2">
-<h3 id="addressing-and-filter-modes">5.2. Addressing and Filter Modes</h3>
-<div class="paragraph"><p>We first describe how the addressing and filter modes are applied to generate the appropriate sample locations to read from the image if the addressing mode is not <span class="monospaced">addressing_mode::repeat</span> nor <span class="monospaced">addressing_mode::mirrored_repeat</span>.</p></div>
-<div class="paragraph"><p>After generating the image coordinate (u,v,w) we apply the appropriate addressing and filter mode to generate the appropriate sample locations to read from the image.</p></div>
-<div class="paragraph"><p>If values in (u,v,w) are INF or NaN, the behavior of <span class="monospaced">image::read</span> is undefined.</p></div>
-<div class="sect3">
-<h4 id="filtering_modenearest">5.2.1. filtering_mode::nearest</h4>
-<div class="paragraph"><p>When filter mode is <span class="monospaced">filtering_mode::nearest</span>, the image element in the image that is nearest (in Manhattan distance) to that specified by (u,v,w) is obtained.
-This means the image element at location (i,j,k) becomes the image element value, where</p></div>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{rcl}
-i &=& address\_mode((int)floor(u))\\
-j &=& address\_mode((int)floor(v))\\
-k &=& address\_mode((int)floor(w))
-\end{array}
-\]</div></div>
-<div class="paragraph"><p>For a 3D image, the image element at location (i, j, k) becomes the color value.
-For a 2D image, the image element at location (i, j) becomes the color value.</p></div>
-<div class="paragraph"><p>The below table describes the <span class="monospaced">address_mode</span> function.</p></div>
-<table class="tableblock frame-all grid-all" id="addressing_modes_to_generate_texel_location"
-style="
-width:100%;
-">
-<caption class="title">Table 40. Addressing modes to generate texel location</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><div class="paragraph"><p><strong>Addressing Mode</strong></p></div></th>
-<th class="tableblock halign-left valign-top" ><div class="paragraph"><p><strong>Result of address_mode(coord)</strong></p></div></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p><span class="monospaced">clamp_to_edge</span></p></div></div></td>
-<td class="tableblock halign-left valign-top" ><div><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"><p><span class="monospaced">clamp</span></p></div></div></td>
-<td class="tableblock halign-left valign-top" ><div><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"><p><span class="monospaced">none</span></p></div></div></td>
-<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p>Coord</p></div></div></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>The size term in <a href="#addressing_modes_to_generate_texel_location">Addressing modes to generate texel location</a> table is w<sub>t</sub> for u, h<sub>t</sub> for v and d<sub>t</sub> for w.</p></div>
-<div class="paragraph"><p>The clamp function used in <a href="#addressing_modes_to_generate_texel_location">Addressing modes to generate texel location</a> table is defined as:</p></div>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{rcl}
-clamp(a, b, c) &=& return (a < b) ? b : ((a > c) ? c : a)
-\end{array}
-\]</div></div>
-<div class="paragraph"><p>If the selected texel location (i,j,k) refers to a location outside the image, the border color is used as the color value for this texel.</p></div>
-</div>
-<div class="sect3">
-<h4 id="filtering_modelinear">5.2.2. filtering_mode::linear</h4>
-<div class="paragraph"><p>When filter mode is <span class="monospaced">filtering_mode::linear</span>, a 2 x 2 square of image elements for a 2D image or a 2 x 2 x 2 cube of image elements for a 3D image is selected.
-This 2 x 2 square or 2 x 2 x 2 cube is obtained as follows.</p></div>
-<div class="paragraph"><p>Let</p></div>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{rcl}
-i0 &=& address\_mode((int)floor(u - 0.5))\\
-j0 &=& address\_mode((int)floor(v - 0.5))\\
-k0 &=& address\_mode((int)floor(w - 0.5))\\
-i1 &=& address\_mode((int)floor(u - 0.5) + 1)\\
-j1 &=& address\_mode((int)floor(v - 0.5) + 1)\\
-k1 &=& address\_mode((int)floor(w - 0.5) + 1)\\
-a  &=& frac(u - 0.5)\\
-b  &=& frac(v - 0.5)\\
-c  &=& frac(w - 0.5)
-\end{array}
-\]</div></div>
-<div class="paragraph"><p>where frac(x) denotes the fractional part of x and is computed as x - floor(x).</p></div>
-<div class="paragraph"><p>For a 3D image, the image element value is found as</p></div>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{rcl}
-T &=& (1 - a) * (1 - b) * (1 - c) * T_{i0j0k0}\\
-&& \negmedspace {} + a * (1 - b) * (1 - c) * T_{i1j0k0}\\
-&& \negmedspace {} + (1 - a) * b * (1 - c) * T_{i0j1k0}\\
-&& \negmedspace {} + a * b * (1 - c) * T_{i1j1k0}\\
-&& \negmedspace {} + (1 - a) * (1 - b) * c * T_{i0j0k1}\\
-&& \negmedspace {} + a * (1 - b) * c * T_{i1j0k1}\\
-&& \negmedspace {} + (1 - a) * b * c * T_{i0j1k1}\\
-&& \negmedspace {} + a * b * c * T_{i1j1k1}
-\end{array}
-\]</div></div>
-<div class="paragraph"><p>where T<sub>ijk</sub> is the image element at location (i,j,k) in the 3D image.</p></div>
-<div class="paragraph"><p>For a 2D image, the image element value is found as</p></div>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{rcl}
-T &=& (1 - a) * (1 - b) * T_{i0j0}\\
-&& \negmedspace {} + a * (1 - b) * T_{i1j0}\\
-&& \negmedspace {} + (1 - a) * b * T_{i0j1}\\
-&& \negmedspace {} + a * b * T_{i1j1}
-\end{array}
-\]</div></div>
-<div class="paragraph"><p>where T<sub>ij</sub> is the image element at location (i,j) in the 2D image.</p></div>
-<div class="paragraph"><p>If any of the selected T<sub>ijk</sub> or T<sub>ij</sub> in the above equations refers to a location outside the image, the border color is used as the color value for T<sub>ijk</sub> or T<sub>ij</sub>.</p></div>
-<div class="paragraph"><p>If the image channel type is <span class="monospaced">CL_FLOAT</span> or <span class="monospaced">CL_HALF_FLOAT</span> and any of the image elements T<sub>ijk</sub> or T<sub>ij</sub> is INF or NaN, the behavior of the built-in image read function is undefined.</p></div>
-<div class="paragraph"><p>We now discuss how the addressing and filter modes are applied to generate the appropriate sample locations to read from the image if the addressing mode is <span class="monospaced">addressing_mode::repeat</span>.</p></div>
-<div class="paragraph"><p>If values in (s,t,r) are INF or NaN, the behavior of the built-in image read functions is undefined.</p></div>
-</div>
-<div class="sect3">
-<h4 id="filtering_modenearest-1">5.2.3. filtering_mode::nearest</h4>
-<div class="paragraph"><p>When filter mode is <span class="monospaced">filtering_mode::nearest</span>, the image element at location (i,j,k) becomes the image element value, with i, j and k computed as</p></div>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{l}
-u = (s - floor(s)) * w_t\\
-i = (int)floor(u)\\
-if (i > w_t - 1)\\
-\qquad i = i - w_t\\
-v = (t - floor(t)) * h_t\\
-j = (int)floor(v)\\
-if (j > h_t - 1)\\
-\qquad j = j - h_t\\
-w = (r - floor(r)) * d_t\\
-k = (int)floor(w)\\
-if (k > d_t - 1)\\
-\qquad k = k - d_t
-\end{array}
-\]</div></div>
-<div class="paragraph"><p>For a 3D image, the image element at location (i, j, k) becomes the color value.
-For a 2D image, the image element at location (i, j) becomes the color value.</p></div>
-</div>
-<div class="sect3">
-<h4 id="filtering_modelinear-1">5.2.4. filtering_mode::linear</h4>
-<div class="paragraph"><p>When filter mode is <span class="monospaced">filtering_mode::linear</span>, a 2 x 2 square of image elements for a 2D image or a 2 x 2 x 2 cube of image elements for a 3D image is selected.
-This 2 x 2 square or 2 x 2 x 2 cube is obtained as follows.</p></div>
-<div class="paragraph"><p>Let</p></div>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{l}
-u = (s - floor(s)) * w_t\\
-i0 = (int)floor(u - 0.5)\\
-i1 = i0 + 1\\
-if (i0 < 0)\\
-i0 = w_t + i0\\
-if (i1 > w_t - 1)\\
-\qquad i1 = i1 - w_t\\
-v = (t - floor(t)) * h_t\\
-j0 = (int)floor(v - 0.5)\\
-j1 = j0 + 1\\
-if (j0 < 0)\\
-j0 = h_t + j0\\
-if (j1 > h_t - 1)\\
-\qquad j1 = j1 - h_t\\
-w = (r - floor(r)) * d_t\\
-k0 = (int)floor(w - 0.5)\\
-k1 = k0 + 1\\
-if (k0 < 0)\\
-\qquad k0 = d_t + k0\\
-if (k1 > d_t - 1)\\
-\qquad k1 = k1 - d_t\\
-a = frac(u - 0.5)\\
-b = frac(v - 0.5)\\
-c = frac(w - 0.5)
-\end{array}
-\]</div></div>
-<div class="paragraph"><p>where frac(x) denotes the fractional part of x and is computed as x - floor(x).</p></div>
-<div class="paragraph"><p>For a 3D image, the image element value is found as</p></div>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{rcl}
-T &=& (1 - a) * (1 - b) * (1 - c) * T_{i0j0k0}\\
-&& \negmedspace {} + a * (1 - b) * (1 - c) * T_{i1j0k0}\\
-&& \negmedspace {} + (1 - a) * b * (1 - c) * T_{i0j1k0}\\
-&& \negmedspace {} + a * b * (1 - c) * T_{i1j1k0}\\
-&& \negmedspace {} + (1 - a) * (1 - b) * c * T_{i0j0k1}\\
-&& \negmedspace {} + a * (1 - b) * c * T_{i1j0k1}\\
-&& \negmedspace {} + (1 - a) * b * c * T_{i0j1k1}\\
-&& \negmedspace {} + a * b * c * T_{i1j1k1}
-\end{array}
-\]</div></div>
-<div class="paragraph"><p>where T<sub>ijk</sub> is the image element at location (i,j,k) in the 3D image.</p></div>
-<div class="paragraph"><p>For a 2D image, the image element value is found as</p></div>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{rcl}
-T &=&(1 - a) * (1 - b) * T_{i0j0}\\
-&& \negmedspace {} + a * (1 - b) * T_{i1j0}\\
-&& \negmedspace {} + (1 - a) * b * T_{i0j1}\\
-&& \negmedspace {} + a * b * T_{i1j1}
-\end{array}
-\]</div></div>
-<div class="paragraph"><p>where T<sub>ij</sub> is the image element at location (i,j) in the 2D image.</p></div>
-<div class="paragraph"><p>If the image channel type is <span class="monospaced">CL_FLOAT</span> or <span class="monospaced">CL_HALF_FLOAT</span> and any of the image elements T<sub>ijk</sub> or T<sub>ij</sub> is INF or NaN, the behavior of the built-in image read function is undefined.</p></div>
-<div class="paragraph"><p>We now discuss how the addressing and filter modes are applied to generate the appropriate sample locations to read from the image if the addressing mode is <span class="monospaced">addressing_mode::repeat</span>.
-The <span class="monospaced">addressing_mode::mirrored_repeat</span> addressing mode causes the image to be read as if it is tiled at every integer seam with the interpretation of the image data flipped at each integer crossing.
-For example, the (s,t,r) coordinates between 2 and 3 are addressed into the image as coordinates from 1 down to 0.
-If values in (s,t,r) are INF or NaN, the behavior of the built-in image read functions is undefined.</p></div>
-</div>
-<div class="sect3">
-<h4 id="filtering_modenearest-2">5.2.5. filtering_mode::nearest</h4>
-<div class="paragraph"><p>When filter mode is <span class="monospaced">filtering_mode::nearest</span>, the image element at location (i,j,k) becomes the image element value, with i,j and k computed as</p></div>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{rcl}
-s' &=& 2.0f * rint(0.5f * s)\\
-s' &=& fabs(s - s')\\
-u  &=& s' * w_t\\
-i  &=& (int)floor(u)\\
-i  &=& min(i, w_t - 1)\\
-t' &=& 2.0f * rint(0.5f * t)\\
-t' &=& fabs(t - t')\\
-v  &=& t' * h_t\\
-j  &=& (int)floor(v)\\
-j  &=& min(j, h_t - 1)\\
-r' &=& 2.0f * rint(0.5f * r)\\
-r' &=& fabs(r - r')\\
-w  &=& r' * d_t\\
-k  &=& (int)floor(w)\\
-k  &=& min(k, d_t - 1)
-\end{array}
-\]</div></div>
-<div class="paragraph"><p>For a 3D image, the image element at location (i, j, k) becomes the color value.
-For a 2D image, the image element at location (i, j) becomes the color value.</p></div>
-</div>
-<div class="sect3">
-<h4 id="filtering_modelinear-2">5.2.6. filtering_mode::linear</h4>
-<div class="paragraph"><p>When filter mode is <span class="monospaced">filtering_mode::linear</span>, a 2 x 2 square of image elements for a 2D image or a 2 x 2 x 2 cube of image elements for a 3D image is selected.
-This 2 x 2 square or 2 x 2 x 2 cube is obtained as follows.</p></div>
-<div class="paragraph"><p>Let</p></div>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{rcl}
-s' &=& 2.0f * rint(0.5f * s)\\
-s' &=& fabs(s - s')\\
-u  &=& s' * w_t\\
-i0 &=& (int)floor(u - 0.5f)\\
-i1 &=& i0 + 1\\
-i0 &=& max(i0, 0)\\
-i1 &=& min(i1, w_t - 1)\\
-t' &=& 2.0f * rint(0.5f * t)\\
-t' &=& fabs(t - t')\\
-v  &=& t' * h_t\\
-j0 &=& (int)floor(v - 0.5f)\\
-j1 &=& j0 + 1\\
-j0 &=& max(j0, 0)\\
-j1 &=& min(j1, h_t - 1)\\
-r' &=& 2.0f * rint(0.5f * r)\\
-r' &=& fabs(r - r')\\
-w  &=& r' * d_t\\
-k0 &=& (int)floor(w - 0.5f)\\
-k1 &=& k0 + 1\\
-k0 &=& max(k0, 0)\\
-k1 &=& min(k1, d_t - 1)\\
-a  &=& frac(u - 0.5)\\
-b  &=& frac(v - 0.5)\\
-c  &=& frac(w - 0.5)
-\end{array}
-\]</div></div>
-<div class="paragraph"><p>where frac(x) denotes the fractional part of x and is computed as x - floor(x).</p></div>
-<div class="paragraph"><p>For a 3D image, the image element value is found as</p></div>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{rcl}
-T &=& (1 - a) * (1 - b) * (1 - c) * T_{i0j0k0}\\
-&& \negmedspace {} + a * (1 - b) * (1 - c) * T_{i1j0k0}\\
-&& \negmedspace {} + (1 - a) * b * (1 - c) * T_{i0j1k0}\\
-&& \negmedspace {} + a * b * (1 - c) * T_{i1j1k0}\\
-&& \negmedspace {} + (1 - a) * (1 - b) * c * T_{i0j0k1}\\
-&& \negmedspace {} + a * (1 - b) * c * T_{i1j0k1}\\
-&& \negmedspace {} + (1 - a) * b * c * T_{i0j1k1}\\
-&& \negmedspace {} + a * b * c * T_{i1j1k1}
-\end{array}
-\]</div></div>
-<div class="paragraph"><p>where T<sub>ijk</sub> is the image element at location (i,j,k) in the 3D image.</p></div>
-<div class="paragraph"><p>For a 2D image, the image element value is found as</p></div>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{rcl}
-T &=& (1 - a) * (1 - b) * T_{i0j0}\\
-&& \negmedspace {} + a * (1 - b) * T_{i1j0}\\
-&& \negmedspace {} + (1 - a) * b * T_{i0j1}\\
-&& \negmedspace {} + a * b * T_{i1j1}
-\end{array}
-\]</div></div>
-<div class="paragraph"><p>where T<sub>ij</sub> is the image element at location (i,j) in the 2D image.</p></div>
-<div class="paragraph"><p>For a 1D image, the image element value is found as</p></div>
-<div class="mathblock">
-<div class="content">\[
-T = (1 - a) * T_i0 + a * T_i1
-\]</div></div>
-<div class="paragraph"><p>where T<sub>i</sub> is the image element at location (i) in the 1D image.</p></div>
-<div class="paragraph"><p>If the image channel type is <span class="monospaced">CL_FLOAT</span> or <span class="monospaced">CL_HALF_FLOAT</span> and any of the image elements T<sub>ijk</sub> or T<sub>ij</sub> is INF or NaN, the behavior of the built-in image read function is undefined.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">If the sampler is specified as using unnormalized coordinates (floating-point or integer coordinates), filter mode set to <span class="monospaced">filtering_mode::nearest</span> and addressing mode set to one of the following modes - <span class="monospaced">addressing_mode::none</span>, <span class="monospaced">addressing_mode::clamp_to_edge</span> or <span class="monospaced">addressing_mode::clamp</span>, the location of the image element in the image given by (i, j, k) will be computed without any loss of precision.
-For all other sampler combinations of normalized or unnormalized coordinates, filter and addressing modes, the relative error or precision of the addressing mode calculations and the image filter operation are not defined by this revision of the OpenCL specification.
-To ensure a minimum precision of image addressing and filter calculations across any OpenCL device, for these sampler combinations, developers should unnormalize the image coordinate in the kernel and implement the linear filter in the kernel with appropriate calls to <span class="monospaced">image::read</span> with a sampler that uses unnormalized coordinates, filter mode set to <span class="monospaced">filtering_mode::nearest</span>, addressing mode set to <span class="monospaced">addressing_mode::none</span>, <span class="monospaced">addressing_mode::clamp_to_edge</span> or <span class="monospaced">addressing_mode::clamp</span> and finally performing the interpolation of color values read from the image to generate the filtered color value.</td>
-</tr></table>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="conversion-rules">5.3. Conversion Rules</h3>
-<div class="paragraph"><p>In this section we discuss conversion rules that are applied when reading and writing images in a kernel.</p></div>
-<div class="sect3">
-<h4 id="conversion-rules-for-normalized-integer-channel-data-types">5.3.1. Conversion rules for normalized integer</h4>
-<div class="paragraph"><p>In this section we discuss converting normalized integer channel data types to half-precision and single-precision floating-point values and vice-versa.</p></div>
-<div class="sect4">
-<h5 id="converting-normalized-integer-channel-data-types-to-half-precision-floating-point-values">Converting normalized integer channel data types to half precision floating-point values</h5>
-<div class="paragraph"><p>For images created with image channel data type of <span class="monospaced">CL_UNORM_INT8</span> and <span class="monospaced">CL_UNORM_INT16</span>, <span class="monospaced">image::read</span> will convert the channel values from an 8-bit or 16-bit unsigned integer to normalized half precision floating-point values in the range [0.0h &#8230; 1.0h].</p></div>
-<div class="paragraph"><p>For images created with image channel data type of <span class="monospaced">CL_SNORM_INT8</span> and <span class="monospaced">CL_SNORM_INT16</span>, <span class="monospaced">image::read</span> will convert the channel values from an 8-bit or 16-bit signed integer to normalized half precision floating-point values in the range [-1.0h &#8230; 1.0h].</p></div>
-<div class="paragraph"><p>These conversions are performed as follows:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">CL_UNORM_INT8</span> (8-bit unsigned integer) &#8594; <span class="monospaced">half</span>
-</p>
-<div class="mathblock">
-<div class="content">\[
-normalized\_half\_value(x)=round\_to\_half(\frac{x}{255})
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">CL_UNORM_INT_101010</span> (10-bit unsigned integer) &#8594; <span class="monospaced">half</span>
-</p>
-<div class="mathblock">
-<div class="content">\[
-normalized\_half\_value(x)=round\_to\_half(\frac{x}{1023})
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">CL_UNORM_INT16</span> (16-bit unsigned integer) &#8594; <span class="monospaced">half</span>
-</p>
-<div class="mathblock">
-<div class="content">\[
-normalized\_half\_value(x)=round\_to\_half(\frac{x}{65535})
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">CL_SNORM_INT8</span> (8-bit signed integer) &#8594; <span class="monospaced">half</span>
-</p>
-<div class="mathblock">
-<div class="content">\[
-normalized\_half\_value(x)=max(-1.0h, round\_to\_half(\frac{x}{127}))
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">CL_SNORM_INT16</span> (16-bit signed integer) &#8594; <span class="monospaced">half</span>
-</p>
-<div class="mathblock">
-<div class="content">\[
-normalized\_half\_value(x)=max(-1.0h, round\_to\_half(\frac{x}{32767}))
-\]</div></div>
-</li>
-</ul></div>
-<div class="paragraph"><p>The precision of the above conversions is &lt;= 1.5 ulp except for the following cases.</p></div>
-<div class="paragraph"><p>For <span class="monospaced">CL_UNORM_INT8</span>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-0 must convert to 0.0h and
-</p>
-</li>
-<li>
-<p>
-255 must convert to 1.0h
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For <span class="monospaced">CL_UNORM_INT_101010</span>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-0 must convert to 0.0h and
-</p>
-</li>
-<li>
-<p>
-1023 must convert to 1.0h
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For <span class="monospaced">CL_UNORM_INT16</span>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-0 must convert to 0.0h and
-</p>
-</li>
-<li>
-<p>
-65535 must convert to 1.0h
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For <span class="monospaced">CL_SNORM_INT8</span>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
--128 and -127 must convert to -1.0h,
-</p>
-</li>
-<li>
-<p>
-0 must convert to 0.0h and
-</p>
-</li>
-<li>
-<p>
-127 must convert to 1.0h
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For <span class="monospaced">CL_SNORM_INT16</span>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
--32768 and -32767 must convert to -1.0h,
-</p>
-</li>
-<li>
-<p>
-0 must convert to 0.0h and
-</p>
-</li>
-<li>
-<p>
-32767 must convert to 1.0h
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="converting-half-precision-floating-point-values-to-normalized-integer-channel-data-types">Converting half precision floating-point values to normalized integer channel data types</h5>
-<div class="paragraph"><p>For images created with image channel data type of <span class="monospaced">CL_UNORM_INT8</span> and <span class="monospaced">CL_UNORM_INT16</span>, <span class="monospaced">image::write</span> will convert the half precision floating-point color value to an 8-bit or 16-bit unsigned integer.</p></div>
-<div class="paragraph"><p>For images created with image channel data type of <span class="monospaced">CL_SNORM_INT8</span> and <span class="monospaced">CL_SNORM_INT16</span>, <span class="monospaced">image::write</span> will convert the half precision floating-point color value to an 8-bit or 16-bit signed integer.</p></div>
-<div class="paragraph"><p>OpenCL implementations may choose to approximate the rounding mode used in the conversions described below.
-When approximate rounding is used instead of the preferred rounding, the result of the conversion must satisfy the bound given below.</p></div>
-<div class="paragraph"><p>The conversions from half precision floating-point values to normalized integer values are performed is as follows:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">half</span> &#8594; <span class="monospaced">CL_UNORM_INT8</span> (8-bit unsigned integer)
-</p>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{l}
-f(x)=max(0,min(255,255 \times x))\\
-\\
-f_{preferred}(x) =
-\begin{cases}
- round\_to\_nearest\_even\_uint8(f(x)) & x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & x = \infty \text{ or } x = NaN
-\end{cases}\\
-f_{approx}(x) =
-\begin{cases}
- round\_to\_impl\_uint8(f(x)) & x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & x = \infty \text{ or } x = NaN
-\end{cases}\\
-\\
-|f(x) - f_{approx}(x)|\leq 0.6, x \neq \infty \text{ and } x \neq NaN
-\end{array}
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">half</span> &#8594; <span class="monospaced">CL_UNORM_INT16</span> (16-bit unsigned integer)
-</p>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{l}
-f(x)=max(0,min(65535,65535 \times x))\\
-\\
-f_{preferred}(x) =
-\begin{cases}
- round\_to\_nearest\_even\_uint16(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-f_{approx}(x) =
-\begin{cases}
- round\_to\_impl\_uint16(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-\\
-|f(x) - f_{approx}(x)|\leq 0.6, x \neq \infty \text{ and } x \neq NaN
-\end{array}
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">half</span> &#8594; <span class="monospaced">CL_SNORM_INT8</span> (8-bit signed integer)
-</p>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{l}
-f(x)=max(-128,min(127,127 \times x))\\
-\\
-f_{preferred}(x) =
-\begin{cases}
- round\_to\_nearest\_even\_uint8(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-f_{approx}(x) =
-\begin{cases}
- round\_to\_impl\_uint8(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-\\
-|f(x) - f_{approx}(x)|\leq 0.6, x \neq \infty \text{ and } x \neq NaN
-\end{array}
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">half</span> &#8594; <span class="monospaced">CL_SNORM_INT16</span> (16-bit signed integer)
-</p>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{l}
-f(x)=max(-32768,min(32767,32767 \times x))\\
-\\
-f_{preferred}(x) =
-\begin{cases}
- round\_to\_nearest\_even\_uint16(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-f_{approx}(x) =
-\begin{cases}
- round\_to\_impl\_uint16(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-\\
-|f(x) - f_{approx}(x)|\leq 0.6, x \neq \infty \text{ and } x \neq NaN
-\end{array}
-\]</div></div>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="converting-normalized-integer-channel-data-types-to-floating-point-values">Converting normalized integer channel data types to floating-point values</h5>
-<div class="paragraph"><p>For images created with image channel data type of <span class="monospaced">CL_UNORM_INT8</span> and <span class="monospaced">CL_UNORM_INT16</span>, <span class="monospaced">image::read</span> will convert the channel values from an 8-bit or 16-bit unsigned integer to normalized floating-point values in the range [0.0f &#8230; 1.0f].</p></div>
-<div class="paragraph"><p>For images created with image channel data type of <span class="monospaced">CL_SNORM_INT8</span> and <span class="monospaced">CL_SNORM_INT16</span>, <span class="monospaced">image::read</span> will convert the channel values from an 8-bit or 16-bit signed integer to normalized floating-point values in the range [-1.0f &#8230; 1.0f].</p></div>
-<div class="paragraph"><p>These conversions are performed as follows:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">CL_UNORM_INT8</span> (8-bit unsigned integer) &#8594; <span class="monospaced">float</span>
-</p>
-<div class="mathblock">
-<div class="content">\[
-normalized\_float\_value(x)=round\_to\_float(\frac{x}{255})
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">CL_UNORM_INT_101010</span> (10-bit unsigned integer) &#8594; <span class="monospaced">float</span>
-</p>
-<div class="mathblock">
-<div class="content">\[
-normalized\_float\_value(x)=round\_to\_float(\frac{x}{1023})
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">CL_UNORM_INT16</span> (16-bit unsigned integer) &#8594; <span class="monospaced">float</span>
-</p>
-<div class="mathblock">
-<div class="content">\[
-normalized\_float\_value(x)=round\_to\_float(\frac{x}{65535})
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">CL_SNORM_INT8</span> (8-bit signed integer) &#8594; <span class="monospaced">float</span>
-</p>
-<div class="mathblock">
-<div class="content">\[
-normalized\_float\_value(x)=max(-1.0f, round\_to\_float(\frac{x}{127}))
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">CL_SNORM_INT16</span> (16-bit signed integer) &#8594; <span class="monospaced">float</span>
-</p>
-<div class="mathblock">
-<div class="content">\[
-normalized\_float\_value(x)=max(-1.0f, round\_to\_float(\frac{x}{32767}))
-\]</div></div>
-</li>
-</ul></div>
-<div class="paragraph"><p>The precision of the above conversions is &lt;= 1.5 ulp except for the following cases.</p></div>
-<div class="paragraph"><p>For <span class="monospaced">CL_UNORM_INT8</span>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-0 must convert to 0.0f and
-</p>
-</li>
-<li>
-<p>
-255 must convert to 1.0f
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For <span class="monospaced">CL_UNORM_INT_101010</span>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-0 must convert to 0.0f and
-</p>
-</li>
-<li>
-<p>
-1023 must convert to 1.0f
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For <span class="monospaced">CL_UNORM_INT16</span>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-0 must convert to 0.0f and
-</p>
-</li>
-<li>
-<p>
-65535 must convert to 1.0f
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For <span class="monospaced">CL_SNORM_INT8</span>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
--128 and -127 must convert to -1.0f,
-</p>
-</li>
-<li>
-<p>
-0 must convert to 0.0f and
-</p>
-</li>
-<li>
-<p>
-127 must convert to 1.0f
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For <span class="monospaced">CL_SNORM_INT16</span>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
--32768 and -32767 must convert to -1.0f,
-</p>
-</li>
-<li>
-<p>
-0 must convert to 0.0f and
-</p>
-</li>
-<li>
-<p>
-32767 must convert to 1.0f
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect4">
-<h5 id="converting-floating-point-values-to-normalized-integer-channel-data-types">Converting floating-point values to normalized integer channel data types</h5>
-<div class="paragraph"><p>For images created with image channel data type of <span class="monospaced">CL_UNORM_INT8</span> and <span class="monospaced">CL_UNORM_INT16</span>, <span class="monospaced">image::write</span> will convert the floating-point color value to an 8-bit or 16-bit unsigned integer.</p></div>
-<div class="paragraph"><p>For images created with image channel data type of <span class="monospaced">CL_SNORM_INT8</span> and <span class="monospaced">CL_SNORM_INT16</span>, <span class="monospaced">image::write</span> will convert the floating-point color value to an 8-bit or 16-bit signed integer.</p></div>
-<div class="paragraph"><p>OpenCL implementations may choose to approximate the rounding mode used in the conversions described below.
-When approximate rounding is used instead of the preferred rounding, the result of the conversion must satisfy the bound given below.</p></div>
-<div class="paragraph"><p>The conversions from half precision floating-point values to normalized integer values are performed is as follows:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">float</span> &#8594; <span class="monospaced">CL_UNORM_INT8</span> (8-bit unsigned integer)
-</p>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{l}
-f(x)=max(0,min(255,255 \times x))\\
-\\
-f_{preferred}(x) =
-\begin{cases}
- round\_to\_nearest\_even\_uint8(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-f_{approx}(x) =
-\begin{cases}
- round\_to\_impl\_uint8(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-\\
-|f(x) - f_{approx}(x)|\leq 0.6, x \neq \infty \text{ and } x \neq NaN
-\end{array}
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">float</span> &#8594; <span class="monospaced">CL_UNORM_INT_101010</span> (10-bit unsigned integer)
-</p>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{l}
-f(x)=max(0,min(1023,1023 \times x))\\
-\\
-f_{preferred}(x) =
-\begin{cases}
- round\_to\_nearest\_even\_uint10(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-f_{approx}(x) =
-\begin{cases}
- round\_to\_impl\_uint10(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-\\
-|f(x) - f_{approx}(x)|\leq 0.6, x \neq \infty \text{ and } x \neq NaN
-\end{array}
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">float</span> &#8594; <span class="monospaced">CL_UNORM_INT16</span> (16-bit unsigned integer)
-</p>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{l}
-f(x)=max(0,min(65535,65535 \times x))\\
-\\
-f_{preferred}(x) =
-\begin{cases}
- round\_to\_nearest\_even\_uint16(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-f_{approx}(x) =
-\begin{cases}
- round\_to\_impl\_uint16(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-\\
-|f(x) - f_{approx}(x)|\leq 0.6, x \neq \infty \text{ and } x \neq NaN
-\end{array}
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">float</span> &#8594; <span class="monospaced">CL_SNORM_INT8</span> (8-bit signed integer)
-</p>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{l}
-f(x)=max(-128,min(127,127 \times x))\\
-\\
-f_{preferred}(x) =
-\begin{cases}
- round\_to\_nearest\_even\_uint8(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-f_{approx}(x) =
-\begin{cases}
- round\_to\_impl\_uint8(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-\\
-|f(x) - f_{approx}(x)|\leq 0.6, x \neq \infty \text{ and } x \neq NaN
-\end{array}
-\]</div></div>
-</li>
-<li>
-<p>
-<span class="monospaced">float</span> &#8594; <span class="monospaced">CL_SNORM_INT16</span> (16-bit signed integer)
-</p>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{l}
-f(x)=max(-32768,min(32767,32767 \times x))\\
-\\
-f_{preferred}(x) =
-\begin{cases}
- round\_to\_nearest\_even\_uint16(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-f_{approx}(x) =
-\begin{cases}
- round\_to\_impl\_uint16(f(x)) & \quad x \neq \infty \text{ and } x \neq NaN\\
- \text{implementation-defined} & \quad x = \infty \text{ or } x = NaN
-\end{cases}\\
-\\
-|f(x) - f_{approx}(x)|\leq 0.6, x \neq \infty \text{ and } x \neq NaN
-\end{array}
-\]</div></div>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="conversion-rules-for-half-precision-floating-point-channel-data-type">5.3.2. Conversion rules for half precision floating-point channel data type</h4>
-<div class="paragraph"><p>For images created with a channel data type of <span class="monospaced">CL_HALF_FLOAT</span>, the conversions of half to float and half to half are lossless (as described in <em><a href="#builtin-half-data-type">Built-in Half Data Type</a> section</em>).
-Conversions from float to half round the mantissa using the round to nearest even or round to zero rounding mode.
-Denormalized numbers for the half data type which may be generated when converting a float to a half  may be flushed to zero.
-A float NaN must be converted to an appropriate NaN in the half type.
-A float INF must be converted to an appropriate INF in the half type.</p></div>
-</div>
-<div class="sect3">
-<h4 id="conversion-rules-for-floating-point-channel-data-type">5.3.3. Conversion rules for floating-point channel data type</h4>
-<div class="paragraph"><p>The following rules apply for reading and writing images created with channel data type of <span class="monospaced">CL_FLOAT</span>.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-NaNs may be converted to a NaN value(s) supported by the device.
-</p>
-</li>
-<li>
-<p>
-Denorms can be flushed to zero.
-</p>
-</li>
-<li>
-<p>
-All other values must be preserved.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="conversion-rules-for-signed-and-unsigned-8-bit-16-bit-and-32-bit-integer-channel-data-types">5.3.4. Conversion rules for signed and unsigned 8-bit, 16-bit and 32-bit integer channel data types</h4>
-<div class="paragraph"><p>Calls to <span class="monospaced">image::read</span> with channel data type values of <span class="monospaced">CL_SIGNED_INT8</span>, <span class="monospaced">CL_SIGNED_INT16</span> and <span class="monospaced">CL_SIGNED_INT32</span> return the unmodified integer values stored in the image at specified location.</p></div>
-<div class="paragraph"><p>Calls to <span class="monospaced">image::read</span> with channel data type values of <span class="monospaced">CL_UNSIGNED_INT8</span>, <span class="monospaced">CL_UNSIGNED_INT16</span> and <span class="monospaced">CL_UNSIGNED_INT32</span> return the unmodified integer values stored in the image at specified location.</p></div>
-<div class="paragraph"><p>Calls to <span class="monospaced">image::write</span> will perform one of the following conversions:</p></div>
-<div class="paragraph"><p>32 bit signed integer &#8594; 8-bit signed integer</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>convert_cast<span style="color: #990000">&lt;</span><span style="color: #009900">char</span><span style="color: #990000">,</span>saturate<span style="color: #990000">::</span>on<span style="color: #990000">&gt;(</span>i<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>32 bit signed integer &#8594; 16-bit signed integer</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>convert_cast<span style="color: #990000">&lt;</span><span style="color: #009900">short</span><span style="color: #990000">,</span>saturate<span style="color: #990000">::</span>on<span style="color: #990000">&gt;(</span>i<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>32 bit signed integer &#8594; 32-bit signed integer</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>no conversion is performed</pre>
-</div></div>
-<div class="paragraph"><p>Calls to image::write will perform one of the following conversions:</p></div>
-<div class="paragraph"><p>32 bit unsigned integer &#8594; 8-bit unsigned integer</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>convert_cast<span style="color: #990000">&lt;</span>uchar<span style="color: #990000">,</span>saturate<span style="color: #990000">::</span>on<span style="color: #990000">&gt;(</span>i<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>32 bit unsigned integer &#8594; 16-bit unsigned integer</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>convert_cast<span style="color: #990000">&lt;</span>ushort<span style="color: #990000">,</span>saturate<span style="color: #990000">::</span>on<span style="color: #990000">&gt;(</span>i<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>32 bit unsigned integer &#8594; 32-bit unsigned integer</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>no conversion is performed</pre>
-</div></div>
-<div class="paragraph"><p>The conversions described in this section must be correctly saturated.</p></div>
-</div>
-<div class="sect3">
-<h4 id="conversion-rules-for-srgba-and-sbgra-images">5.3.5. Conversion rules for sRGBA and sBGRA images</h4>
-<div class="paragraph"><p>Standard RGB data, which roughly displays colors in a linear ramp of luminosity levels such that an average observer, under average viewing conditions, can view them as perceptually equal steps on an average display.
-All 0&#8217;s maps to 0.0f, and all 1&#8217;s maps to 1.0f.
-The sequence of unsigned integer encodings between all 0&#8217;s and all 1&#8217;s represent a nonlinear progression in the floating-point interpretation of the numbers between 0.0f to 1.0f.
-For more detail, see the SRGB color standard, IEC 61996-2-1, at IEC (International Electrotechnical Commission).</p></div>
-<div class="paragraph"><p>Conversion from sRGB space is automatically done by image::read built-in functions if the image channel order is one of the sRGB values described above.
-When reading from an sRGB image, the conversion from sRGB to linear RGB is performed before the filter specified in the sampler specified to image::sample is applied.
-If the format has an alpha channel, the alpha data is stored in linear color space.
-Conversion to sRGB space is automatically done by image::write built-in functions if the image channel order is one of the sRGB values described above and the device supports writing to sRGB images.</p></div>
-<div class="paragraph"><p>If the format has an alpha channel, the alpha data is stored in linear color space.</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-The following process is used by image::read and image::sample to convert a normalized 8-bit unsigned integer sRGB color value x to a floating-point linear RGB color value y:
-</p>
-<div class="olist loweralpha"><ol class="loweralpha">
-<li>
-<p>
-Convert a normalized 8-bit unsigned integer sRGB value x to a floating-point sRGB value r as per rules described in <em><a href="#converting-floating-point-values-to-normalized-integer-channel-data-types">Converting floating-point values to normalized integer channel data types</a> section</em>.
-</p>
-<div class="mathblock">
-<div class="content">\[
-r=normalized\_float\_value(x)
-\]</div></div>
-</li>
-<li>
-<p>
-Convert a floating-point sRGB value r to a floating-point linear RGB color value y:
-</p>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{l}
-c_{linear}(x) =
-\begin{cases}
- \frac{r}{12.92} & \quad r \geq 0 \text{ and } r \leq 0.04045\\
- (\frac{r + 0.055}{1.055})^{2.4} & \quad r > 0.04045 \text{ and } \leq 1
-\end{cases}\\
-\\
-y = c_{linear}(r)
-\end{array}
-\]</div></div>
-</li>
-</ol></div>
-</li>
-<li>
-<p>
-The following process is used by <span class="monospaced">image::write</span> to convert a linear RGB floating-point color value y to a normalized 8-bit unsigned integer sRGB value x:
-</p>
-<div class="olist loweralpha"><ol class="loweralpha">
-<li>
-<p>
-Convert a floating-point linear RGB value y to a normalized floating point sRGB value r:
-</p>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{l}
-c_{linear}(x) =
-\begin{cases}
- 0 & \quad y \geq NaN \text{ or } y < 0\\
- 12.92 \times y & \quad y \geq 0 \text{ and } y < 0.0031308\\
- 1.055 \times y^{(\frac{1}{2.4})} & \quad y \geq 0.0031308 \text{ and } y \leq 1\\
- 1 & \quad y > 1
-\end{cases}\\
-\\
-r = c_{sRGB}(y)
-\end{array}
-\]</div></div>
-</li>
-<li>
-<p>
-Convert a normalized floating-point sRGB value r to a normalized 8-bit unsigned integer sRGB value x as per rules described in <a href="#converting-normalized-integer-channel-data-types-to-half-precision-floating-point-values">Converting normalized integer channel data types to half precision floating-point values</a> section.
-</p>
-<div class="mathblock">
-<div class="content">\[
-\begin{array}{l}
-g(r) =
-\begin{cases}
- f_{preferred}(r) & \quad \text{if rounding mode is round to even}\\
- f_{approx}(r) & \quad \text{if implementation-defined rounding mode}
-\end{cases}\\
-\\
-x = g(r)
-\end{array}
-\]</div></div>
-</li>
-</ol></div>
-</li>
-</ol></div>
-<div class="paragraph"><p>The accuracy required of using <span class="monospaced">image::read</span> and <span class="monospaced">image::sample</span> to convert a normalized 8-bit unsigned integer sRGB color value x to a floating-point linear RGB color value y is given by:</p></div>
-<div class="mathblock">
-<div class="content">\[
-|x-255 \times c_{sRGB}(y)|\leq 0.5
-\]</div></div>
-<div class="paragraph"><p>The accuracy required of using <span class="monospaced">image::write</span> to convert a linear RGB floating-point color value y to a normalized 8-bit unsigned integer sRGB value x is given by:</p></div>
-<div class="mathblock">
-<div class="content">\[
-|x-255 \times c_{sRGB}(y)|\leq 0.6
-\]</div></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="selecting-an-image-from-an-image-array">5.4. Selecting an Image from an Image Array</h3>
-<div class="paragraph"><p>Let (u,v,w)  represent the unnormalized image coordinate values for reading from and/or writing to a 2D image in a 2D image array.</p></div>
-<div class="paragraph"><p>When read using a sampler, the 2D image layer selected is computed as:</p></div>
-<div class="mathblock">
-<div class="content">\[
-layer = clamp(rint(w), 0, d_t - 1)
-\]</div></div>
-<div class="paragraph"><p>otherwise the layer selected is computed as:</p></div>
-<div class="mathblock">
-<div class="content">\[
-layer = w
-\]</div></div>
-<div class="paragraph"><p>(since w is already an integer) and the result is undefined if w is not one of the integers 0, 1, &#8230; d<sub>t</sub> - 1.</p></div>
-<div class="paragraph"><p>Let (u,v)  represent the unnormalized image coordinate values for reading from and/or writing to a 1D image in a 1D image array.</p></div>
-<div class="paragraph"><p>When read using a sampler, the 1D image layer selected is computed as:</p></div>
-<div class="mathblock">
-<div class="content">\[
-layer = clamp(rint(v), 0, h_t - 1)
-\]</div></div>
-<div class="paragraph"><p>otherwise the layer selected is computed as:</p></div>
-<div class="mathblock">
-<div class="content">\[
-layer = v
-\]</div></div>
-<div class="paragraph"><p>(since v is already an integer) and the result is undefined if v is not one of the integers 0, 1, &#8230; h<sub>t</sub> - 1.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="compiler_options">6. Compiler options</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The compiler options are categorized as preprocessor options, options for controlling the OpenCL C++ version, options that control FP16 and FP64 support.
-This specification defines a standard set of options that must be supported by the compiler when building program executables online or offline from OpenCL C++ to an IL.
-These may be extended by a set of vendor or platform specific options.</p></div>
-<div class="sect2">
-<h3 id="preprocessor_options">6.1. Preprocessor options</h3>
-<div class="paragraph"><p>These options control the OpenCL C++ preprocessor which is run on each program source before actual compilation.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-D name</pre>
-</div></div>
-<div class="paragraph"><p>Predefine name as a macro, with definition 1.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-D name=definition</pre>
-</div></div>
-<div class="paragraph"><p>The contents of definition are tokenized and processed as if they appeared during translation phase three in a <span class="monospaced">#define</span> directive.
-In particular, the definition will be truncated by embedded newline characters.</p></div>
-</div>
-<div class="sect2">
-<h3 id="options-controlling_the-opencl_c_version">6.2. Options Controlling the OpenCL C++ version</h3>
-<div class="paragraph"><p>The following option controls the version of OpenCL C++ that the compiler accepts.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-std=</pre>
-</div></div>
-<div class="paragraph"><p>Determine the OpenCL C++ language version to use.
-A value for this option must be provided.
-Valid values are:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-c++ - Support all OpenCL C++ programs that use the OpenCL C++ language features defined in <em><a href="#openclcpp-programming-language">OpenCL C++ Programming Language</a> section</em>.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect2">
-<h3 id="fp16_and_fp64_options">6.3. Double and half-precision floating-point options</h3>
-<div class="paragraph"><p>The following option controls the double and half floating-point support that the compiler accepts.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-fp16-enable</pre>
-</div></div>
-<div class="paragraph"><p>This option enables full half data type support.
-The option defines <span class="monospaced">cl_khr_fp16</span> macro.
-The default is disabled.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-fp64-enable</pre>
-</div></div>
-<div class="paragraph"><p>This option enables double data type support.
-The option defines <span class="monospaced">cl_khr_fp64</span> macro.
-The default is disabled.</p></div>
-</div>
-<div class="sect2">
-<h3 id="other_options">6.4. Other options</h3>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-zero-init-local-mem-vars</pre>
-</div></div>
-<div class="paragraph"><p>This option enables software zero-initialization of variables allocated in local memory.</p></div>
-<hr>
-<div class="paragraph" id="ftn2"><p><a href="#_ftnref2">[2</a>] The double data type is an optional type that is supported if <span class="monospaced">CL_DEVICE_DOUBLE_FP_CONFIG</span> in table 4.3 for a device is not zero.</p></div>
-<div class="paragraph" id="ftn3"><p><a href="#_ftnref3">[3</a>] The question mark ? in numerical selector refers to special undefined component of vector; reading from it results in undefined value, writing to it is discarded.</p></div>
-<div class="paragraph" id="ftn4"><p><a href="#_ftnref4">[4</a>] Only if <em>cl_khr_fp16</em> extension is enabled and has been supported</p></div>
-<div class="paragraph" id="ftn5"><p><a href="#_ftnref5">[5</a>] For conversions to floating-point format, when a finite source value exceeds the maximum representable finite floating-point destination value, the rounding mode will affect whether the result is the maximum finite floating-point value or infinity of same sign as the source value, per IEEE-754 rules for rounding.</p></div>
-<div class="paragraph" id="ftn6"><p><a href="#_ftnref6">[6</a>] The <span class="monospaced">as_type&lt;T&gt;</span> function is intended to reflect the organization of data in register.
-The <span class="monospaced">as_type&lt;T&gt;</span> construct is intended to compile to no instructions on devices that use a shared register file designed to operate on both the operand and result types.
-Note that while differences in memory organization are expected to largely be limited to those arising from endianness, the register based representation may also differ due to size of the element in register.
-(For example, an architecture may load a char into a 32-bit register, or a char vector into a SIMD vector register with fixed 32-bit element size.)
-If the element count does not match, then the implementation should pick a data representation that most closely matches what would happen if an appropriate result type operator was applied to a register containing data of the source type.
-So, for example if an implementation stores all single precision data as double in register, it should implement <span class="monospaced">as_type&lt;int&gt;(float)</span> by first downconverting  the double to single precision and then (if necessary) moving the single precision bits to a register suitable for operating on integer data.
-If data stored in different address spaces do not have the same endianness, then the "dominant endianness" of the device should prevail.</p></div>
-<div class="paragraph" id="ftn7"><p><a href="#_ftnref7">[7</a>] <span class="monospaced">memory_order_consume</span> is not supported in OpenCL C++</p></div>
-<div class="paragraph" id="ftn8"><p><a href="#_ftnref8">[8</a>] This value for <span class="monospaced">memory_scope</span> can only be used with <span class="monospaced">atomic_fence</span> with flags set to <span class="monospaced">mem_fence::image</span>.</p></div>
-<div class="paragraph" id="ftn9"><p><a href="#_ftnref9">[9</a>] We can&#8217;t require C++14 atomics since host programs can be implemented in other programming languages and versions of C or C++, but we do require that the host programs use atomics and that those atomics be compatible with those in C++14.</p></div>
-<div class="paragraph" id="ftn10"><p><a href="#_ftnref10">[10</a>] The <span class="monospaced">atomic_long</span> and <span class="monospaced">atomic_ulong</span> types are supported if the <em>cl_khr_int64_base_atomics</em> and <em>cl_khr_int64_extended_atomics</em> extensions are supported and have been enabled.</p></div>
-<div class="paragraph" id="ftn11"><p><a href="#_ftnref11">[11</a>] The <span class="monospaced">atomic_double</span> type is only supported if the double precision is supported and the <em>cl_khr_int64_base_atomics</em> and <em>cl_khr_int64_extended_atomics</em> extensions are supported and have been enabled.</p></div>
-<div class="paragraph" id="ftn12"><p><a href="#_ftnref12">[12</a>] If the device address space is 64-bits, the data types <span class="monospaced">atomic_intptr_t</span>, <span class="monospaced">atomic_uintptr_t</span>, <span class="monospaced">atomic_size_t</span> and <span class="monospaced">atomic_ptrdiff_t</span> are supported if the <em>cl_khr_int64_base_atomics</em> and <em>cl_khr_int64_extended_atomics</em> extensions are supported and have been enabled.</p></div>
-<div class="paragraph" id="ftn13"><p><a href="#_ftnref13">[13</a>] *<em>ms</em> types are supported if the <em>cl_khr_gl_msaa_sharing</em> and <em>cl_khr_gl_depth_images</em> extensions are supported and have been enabled.</p></div>
-<div class="paragraph" id="ftn14"><p><a href="#_ftnref14">[14</a>] Immediate meaning not side effects resulting from child kernels. The side effects would include stores to global memory and pipe reads and writes.</p></div>
-<div class="paragraph" id="ftn15"><p><a href="#_ftnref15">[15</a>] This acts as a memory synchronization point between work-items in a work-group and child kernels enqueued by work-items in the work-group.</p></div>
-<div class="paragraph" id="ftn16"><p><a href="#_ftnref16">[16</a>] i.e. the <span class="monospaced">global_work_size</span> values passed to <span class="monospaced">clEnqueueNDRangeKernel</span> are not evenly divisible by the <span class="monospaced">local_work_size</span> values for each dimension.</p></div>
-<div class="paragraph" id="ftn17"><p><a href="#_ftnref17">[17</a>] i.e. the <span class="monospaced">global_work_size</span> values specified to <span class="monospaced">clEnqueueNDRangeKernel</span> are not evenly divisible by the <span class="monospaced">local_work_size</span> values for each dimension.</p></div>
-<div class="paragraph" id="ftn18"><p><a href="#_ftnref18">[18</a>] Only if double precision is supported and has been enabled.</p></div>
-<div class="paragraph" id="ftn19"><p><a href="#_ftnref19">[19</a>] Refer to <em><a href="#order-and-scope">Memory order and scope</a> section</em> for description of memory_scope.</p></div>
-<div class="paragraph" id="ftn20"><p><a href="#_ftnref20">[20</a>] The <span class="monospaced">min()</span> operator is there to prevent <span class="monospaced">fract(-small)</span> from returning 1.0.
-It returns the largest positive floating-point number less than 1.0.</p></div>
-<div class="paragraph" id="ftn21"><p><a href="#_ftnref21">[21</a>] fmin and fmax behave as defined by C++14 and may not match the IEEE 754-2008 definition for minNum and maxNum with regard to signaling NaNs.
-Specifically, signaling NaNs may behave as quiet NaNs.</p></div>
-<div class="paragraph" id="ftn22"><p><a href="#_ftnref22">[22</a>] The user is cautioned that for some usages, e.g. <span class="monospaced">mad(a, b, -a*b)</span>, the definition of <span class="monospaced">mad()</span> is loose enough that almost any result is allowed from <span class="monospaced">mad()</span> for some values of <span class="monospaced">a</span> and <span class="monospaced">b</span>.</p></div>
-<div class="paragraph" id="ftn23"><p><a href="#_ftnref23">[23</a>] Frequently vector operations need n + 1 bits temporarily to calculate a result.
-The rhadd instruction gives you an extra bit without needing to upsample and downsample. This can be a profound performance win.</p></div>
-<div class="paragraph" id="ftn24"><p><a href="#_ftnref24">[24</a>] The primary purpose of the printf function is to help in debugging OpenCL kernels.</p></div>
-<div class="paragraph" id="ftn25"><p><a href="#_ftnref25">[25</a>] Note that <em>0</em> is taken as a flag, not as the beginning of a field width.</p></div>
-<div class="paragraph" id="ftn26"><p><a href="#_ftnref26">[26</a>] The results of all floating conversions of a negative zero, and of negative values that round to zero, include a minus sign.</p></div>
-<div class="paragraph" id="ftn27"><p><a href="#_ftnref27">[27</a>] When applied to infinite and NaN values, the -, +, and space flag characters have their usual meaning; the # and <em>0</em> flag characters have no effect.</p></div>
-<div class="paragraph" id="ftn28"><p><a href="#_ftnref28">[28</a>] Binary implementations can choose the hexadecimal digit to the left of the decimal-point character so that subsequent digits align to nibble (4-bit) boundaries.</p></div>
-<div class="paragraph" id="ftn29"><p><a href="#_ftnref29">[29</a>] No special provisions are made for multibyte characters.
-The behavior of printf  with the <em>s</em> conversion specifier is undefined if the argument value is not a pointer to a literal string.</p></div>
-<div class="paragraph" id="ftn30"><p><a href="#_ftnref30">[30</a>] Except for the embedded profile whether either round to zero or round to nearest rounding mode may be supported for single precision floating-point.</p></div>
-<div class="paragraph" id="ftn31"><p><a href="#_ftnref31">[31</a>] The ULP values for built-in math functions <span class="monospaced">lgamma</span> and <span class="monospaced">lgamma_r</span> is currently undefined.</p></div>
-<div class="paragraph" id="ftn32"><p><a href="#_ftnref32">[32</a>] 0 ulp is used for math functions that do not require rounding.</p></div>
-<div class="paragraph" id="ftn33"><p><a href="#_ftnref33">[33</a>] On some implementations, <span class="monospaced">powr()</span> or <span class="monospaced">pown()</span> may perform faster than <span class="monospaced">pow()</span>.
-If <span class="monospaced">x</span> is known to be <span class="monospaced">&gt;= 0</span>, consider using <span class="monospaced">powr()</span> in place of <span class="monospaced">pow()</span>, or if <span class="monospaced">y</span> is known to be an integer, consider using <span class="monospaced">pown()</span> in place of <span class="monospaced">pow()</span>.</p></div>
-<div class="paragraph" id="ftn34"><p><a href="#_ftnref34">[34</a>] 0 ulp is used for math functions that do not require rounding.</p></div>
-<div class="paragraph" id="ftn35"><p><a href="#_ftnref35">[35</a>] Here <span class="monospaced">TYPE_MIN</span> and <span class="monospaced">TYPE_MIN_EXP</span> should be substituted by constants appropriate to the floating-point type under consideration, such as <span class="monospaced">FLT_MIN</span> and <span class="monospaced">FLT_MIN_EXP</span> for float.</p></div>
-</div>
-</div>
-</div>
-</div>
-<div id="footnotes"><hr></div>
-<div id="footer">
-<div id="footer-text">
-Last updated
- 2017-05-12 11:00:12 PDT
-</div>
-</div>
-</body>
-</html>
diff --git a/specs/opencl-2.2-cplusplus.pdf b/specs/opencl-2.2-cplusplus.pdf
deleted file mode 100644
index 121830b..0000000
--- a/specs/opencl-2.2-cplusplus.pdf
+++ /dev/null
Binary files differ
diff --git a/specs/opencl-2.2-environment.html b/specs/opencl-2.2-environment.html
deleted file mode 100644
index 1def64c..0000000
--- a/specs/opencl-2.2-environment.html
+++ /dev/null
@@ -1,4798 +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 SPIR-V Environment 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 SPIR-V Environment Specification</h1>
-<span id="author">Khronos OpenCL Working Group</span><br>
-<span id="revnumber">version v2.2-3</span>
-<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>
-</div>
-</div>
-<div class="sect1">
-<h2 id="introduction">Introduction</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>OpenCL</strong> (Open Computing Language) is an open royalty-free standard for general purpose parallel programming across CPUs, GPUs and other processors, giving software developers portable and efficient access to the power of these heterogeneous processing platforms.</p></div>
-<div class="paragraph"><p>Parallel programs in OpenCL may be written in the OpenCL C source language, or may compiled from OpenCL C, OpenCL C++, or other source languages into SPIR-V modules.</p></div>
-<div class="paragraph"><p>All SPIR-V intermediate binary modules are consumed by environments, such as an API, a specific version of an API, or an implementation of an API.  The environment describes required support for some SPIR-V capabilities, additional semantics for some SPIR-V instructions, and additional validation rules a module must adhere to in order to be considered valid.</p></div>
-<div class="paragraph"><p>This document describes the environment for implementations of the OpenCL API.  It is written for compiler developers who are generating SPIR-V modules to be consumed by the OpenCL API, for implementors of the OpenCL API who are consuming SPIR-V modules, and by software developers who are using SPIR-V modules with the OpenCL API.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="consumption">SPIR-V Consumption</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This section describes common properties of all OpenCL environments.  Subsequent sections describe environments for specific versions of OpenCL, and how an environment may additionally be modified via OpenCL or SPIR-V extensions.</p></div>
-<div class="paragraph"><p>A SPIR-V module passed to an OpenCL environment is interpreted as a series of 32-bit words in host endianness, with literal strings packed as described in the SPIR-V specification.  The first few words of the SPIR-V module must be a magic number and a SPIR-V version number, as described in the SPIR-V specification.</p></div>
-<div class="sect2">
-<h3 id="_validation_rules">Validation Rules</h3>
-<div class="paragraph"><p>The following are a list of validation rules that apply to SPIR-V modules executing in all OpenCL environments:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The <em>Execution Model</em> declared in <strong>OpEntryPoint</strong> must be <strong>Kernel</strong>.
-</p>
-</li>
-<li>
-<p>
-The <em>Addressing Model</em> declared in <strong>OpMemoryModel</strong> must be either <strong>Physical32</strong> or <strong>Physical64</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-Modules indicating a <strong>Physical32</strong> <em>Addressing Model</em> are valid for OpenCL devices reporting <span class="monospaced">32</span> for <span class="monospaced">CL_DEVICE_ADDRESS_BITS</span>.
-</p>
-</li>
-<li>
-<p>
-Modules indicating a <strong>Physical64</strong> <em>Addressing Model</em> are valid for OpenCL devices reporting <span class="monospaced">64</span> for <span class="monospaced">CL_DEVICE_ADDRESS_BITS</span>.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-The <em>Memory Model</em> declared in <strong>OpMemoryModel</strong> must be <strong>OpenCL</strong>.
-</p>
-</li>
-<li>
-<p>
-For all <strong>OpTypeImage</strong> type-declaration instructions:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-<em>MS</em> must be 0, indicating single-sampled content.
-</p>
-</li>
-<li>
-<p>
-<em>Arrayed</em> may only be set to 1, indicating arrayed content, when <em>Dim</em> is set to <strong>1D</strong> or <strong>2D</strong>.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-The image write instruction <strong>OpImageWrite</strong> must not include any optional <em>Image Operands</em>.
-</p>
-</li>
-<li>
-<p>
-The image read instructions <strong>OpImageRead</strong>, <strong>OpImageFetch</strong>, and <strong>OpImageSampleExplicitLod</strong> must not include the optional <em>Image Operand</em> <strong>ConstOffset</strong>.
-</p>
-</li>
-<li>
-<p>
-Only 32-bit integer types are supported for the <em>Result Type</em> and/or type of <em>Value</em> for all <strong>Atomic Instructions</strong>.
-</p>
-</li>
-<li>
-<p>
-Recursion is not supported.  The static function call graph for an entry point must not contain cycles.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect2">
-<h3 id="_source_language_encoding">Source Language Encoding</h3>
-<div class="paragraph"><p>If a SPIR-V module represents a program written in OpenCL C, then the <em>Source Language</em> operand for the <strong>OpSource</strong> instruction should be <strong>OpenCL_C</strong>, and the 32-bit literal language <em>Version</em> should describe the version of OpenCL C, encoded MSB to LSB as:</p></div>
-<div class="literalblock">
-<div class="content monospaced">
-<pre>0 | Major Number | Minor Number | Revision Number (optional)</pre>
-</div></div>
-<div class="paragraph"><p>Hence, OpenCL C 1.2 would be encoded as <span class="monospaced">0x00010200</span>, and OpenCL C 2.0 as <span class="monospaced">0x00020000</span>.</p></div>
-<div class="paragraph"><p>If a SPIR-V module represents a program written in OpenCL C++, then the <em>Source Language</em> operand for the <strong>OpSource</strong> instruction should be <strong>OpenCL_CPP</strong>, and the 32-bit literal language <em>Version</em> should describe the version of OpenCL C++, encoded similarly.  Hence, OpenCL C++ 2.2 would be encoded as <span class="monospaced">0x00020200</span>.</p></div>
-<div class="paragraph"><p>The source language version is purely informational and has no semantic meaning.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_numerical_type_formats">Numerical Type Formats</h3>
-<div class="paragraph"><p>For all OpenCL environments, floating-point types are represented and stored using IEEE-754 semantics.  All integer formats are represented and stored using 2’s compliment format.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_image_channel_order_mapping">Image Channel Order Mapping</h3>
-<div class="paragraph"><p>The following table describes how the results of the SPIR-V <strong>OpImageQueryOrder</strong> instruction correspond to the OpenCL host API image channel orders.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 1. Image Channel Order mapping</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" > <strong>SPIR-V Image Channel Order</strong></th>
-<th class="tableblock halign-left valign-top" > <strong>OpenCL Image Channel Order</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<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"><span class="monospaced">CL_R</span></p></td>
-</tr>
-<tr>
-<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"><span class="monospaced">CL_A</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">RG</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_RG</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">RA</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_RA</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">RGB</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_RGB</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">RGBA</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_RGBA</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">BGRA</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_BGRA</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">ARGB</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_ARGB</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">Intensity</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_INTENSITY</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">Luminance</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_LUMINANCE</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">Rx</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_Rx</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">RGx</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_RGx</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">RGBx</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_RGBx</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">Depth</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_DEPTH</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">DepthStencil</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_DEPTH_STENCIL</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">sRGB</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_sRGB</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">sRGBA</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_sRGBA</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">sBGRA</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_sBGRA</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">sRGBx</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_sRGBx</span></p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect2">
-<h3 id="_image_channel_data_type_mapping">Image Channel Data Type Mapping</h3>
-<div class="paragraph"><p>The following table describes how the results of the SPIR-V <strong>OpImageQueryFormat</strong> instruction correspond to the OpenCL host API image channel data types.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 2. Image Channel Data Type mapping</caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" > <strong>SPIR-V Image Channel Data Type</strong></th>
-<th class="tableblock halign-left valign-top" > <strong>OpenCL Image Channel Data Type</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">SnormInt8</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_SNORM_INT8</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">SnormInt16</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_SNORM_INT16</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">UnormInt8</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_UNORM_INT8</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">UnormInt16</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_UNORM_INT16</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">UnormInt24</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_UNORM_INT24</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">UnormShort565</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_UNORM_SHORT_565</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">UnormShort555</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_UNORM_SHORT_555</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">UnormInt101010</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_UNORM_INT_101010</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">SignedInt8</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_SIGNED_INT8</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">SignedInt16</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_SIGNED_INT16</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">SignedInt32</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_SIGNED_INT32</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">UnsignedInt8</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_UNSIGNED_INT8</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">UnsignedInt16</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_UNSIGNED_INT16</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">UnsignedInt32</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_UNSIGNED_INT32</span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">HalfFloat</span></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">CL_HALF_FLOAT</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>
-</tbody>
-</table>
-</div>
-<div class="sect2">
-<h3 id="_kernels">Kernels</h3>
-<div class="paragraph"><p>An <strong>OpFunction</strong> in a SPIR-V module that is identified with <strong>OpEntryPoint</strong> defines an OpenCL kernel that may be invoked using the OpenCL host API enqueue kernel interfaces.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_kernel_return_types">Kernel Return Types</h3>
-<div class="paragraph"><p>The <em>Result Type</em> for an <strong>OpFunction</strong> identified with <strong>OpEntryPoint</strong> must be <strong>OpTypeVoid</strong>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_kernel_arguments">Kernel Arguments</h3>
-<div class="paragraph"><p>An <strong>OpFunctionParameter</strong> for an <strong>OpFunction</strong> that is identified with <strong>OpEntryPoint</strong> defines an OpenCL kernel argument.  Allowed types for OpenCL kernel arguments are:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>OpTypeInt</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpTypeFloat</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpTypeStruct</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpTypeVector</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpTypePointer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpTypeSampler</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpTypeImage</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpTypePipe</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpTypeQueue</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For <strong>OpTypeInt</strong> parameters, supported <em>Widths</em> are 8, 16, 32, and 64, and may be signed or unsigned.</p></div>
-<div class="paragraph"><p>For <strong>OpTypeFloat</strong> parameters, <em>Width</em> must be 32.</p></div>
-<div class="paragraph"><p>For <strong>OpTypeStruct</strong> parameters, supported structure <em>Member Types</em> are:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>OpTypeInt</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpTypeFloat</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpTypeStruct</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpTypeVector</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpTypePointer</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For <strong>OpTypePointer</strong> parameters, supported <em>Storage Classes</em> are:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>CrossWorkgroup</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Workgroup</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>UniformConstant</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>OpenCL kernel argument types must have a representation in the OpenCL host API.</p></div>
-<div class="paragraph"><p>Environments that support extensions or optional features may allow additional types in an entry point’s parameter list.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="opencl2_2">OpenCL 2.2</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An OpenCL 2.2 environment must accept SPIR-V 1.0, 1.1, and 1.2 modules.</p></div>
-<div class="sect2">
-<h3 id="_full_profile">Full Profile</h3>
-<div class="paragraph"><p>An OpenCL 2.2 Full Profile environment is guaranteed to support the following SPIR-V capabilities:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Address</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>DeviceEnqueue</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Float16Buffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>GenericPointer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Groups</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int64</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int16</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int8</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Kernel</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Linkage</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Pipes</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Vector16</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>SubgroupDispatch</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>PipeStorage</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following capabilities may be optionally supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>ImageBasic</strong>, if <span class="monospaced">CL_DEVICE_IMAGE_SUPPORT</span> is <span class="monospaced">CL_TRUE</span>
-</p>
-</li>
-<li>
-<p>
-<strong>Float64</strong>, if the device supports double precision floating-point
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <strong>ImageBasic</strong> is supported then the following capabilities must also be supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>ImageReadWrite</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>LiteralSampler</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Sampled1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Image1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>SampledBuffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>ImageBuffer</strong>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect2">
-<h3 id="_embedded_profile">Embedded Profile</h3>
-<div class="paragraph"><p>An OpenCL 2.2 Embedded Profile environment is guaranteed to support the following SPIR-V capabilities:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Address</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>DeviceEnqueue</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Float16Buffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>GenericPointer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Groups</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int16</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int8</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Kernel</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Linkage</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Pipes</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Vector16</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>SubgroupDispatch</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>PipeStorage</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Furthermore, the following capabilities may optionally be supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>ImageBasic</strong>, if <span class="monospaced">CL_DEVICE_IMAGE_SUPPORT</span> is <span class="monospaced">CL_TRUE</span>
-</p>
-</li>
-<li>
-<p>
-<strong>Float64</strong>, if the device supports double precision floating-point
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <strong>ImageBasic</strong> is supported then the following capabilities must also be supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>ImageReadWrite</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>LiteralSampler</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Sampled1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Image1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>SampledBuffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>ImageBuffer</strong>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect2">
-<h3 id="_validation_rules_2">Validation Rules</h3>
-<div class="paragraph"><p>The following are a list of validation rules for SPIR-V modules executing in an OpenCL 2.2 environment:</p></div>
-<div class="paragraph"><p><em>Scope</em> for <em>Execution</em> is generally limited to:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Workgroup</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Subgroup</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><em>Scope</em> for <em>Memory</em> is generally limited to:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>CrossDevice</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Device</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Workgroup</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Invocation</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><em>Scope</em> for <em>Execution</em> for the <strong>OpGroupAsyncCopy</strong> and <strong>OpGroupWaitEvents</strong> instructions is specifically limited to:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Workgroup</strong>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="opencl2_1">OpenCL 2.1</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An OpenCL 2.1 environment must accept SPIR-V 1.0 modules.</p></div>
-<div class="sect2">
-<h3 id="_full_profile_2">Full Profile</h3>
-<div class="paragraph"><p>An OpenCL 2.1 Full Profile environment is guaranteed to support the following SPIR-V capabilities:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Address</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>DeviceEnqueue</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Float16Buffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>GenericPointer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Groups</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int64</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int16</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int8</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Kernel</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Linkage</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Pipes</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Vector16</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following capabilities may be optionally supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>ImageBasic</strong>, if <span class="monospaced">CL_DEVICE_IMAGE_SUPPORT</span> is <span class="monospaced">CL_TRUE</span>
-</p>
-</li>
-<li>
-<p>
-<strong>Float64</strong>, if the device supports double precision floating-point
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <strong>ImageBasic</strong> is supported then the following capabilities must also be supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>ImageReadWrite</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>LiteralSampler</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Sampled1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Image1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>SampledBuffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>ImageBuffer</strong>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect2">
-<h3 id="_embedded_profile_2">Embedded Profile</h3>
-<div class="paragraph"><p>An OpenCL 2.1 Embedded Profile environment is guaranteed to support the following SPIR-V capabilities:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Address</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>DeviceEnqueue</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Float16Buffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>GenericPointer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Groups</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int16</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int8</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Kernel</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Linkage</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Pipes</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Vector16</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Furthermore, the following capabilities may optionally be supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>ImageBasic</strong>, if <span class="monospaced">CL_DEVICE_IMAGE_SUPPORT</span> is <span class="monospaced">CL_TRUE</span>
-</p>
-</li>
-<li>
-<p>
-<strong>Float64</strong>, if the device supports double precision floating-point
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <strong>ImageBasic</strong> is supported then the following capabilities must also be supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>ImageReadWrite</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>LiteralSampler</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Sampled1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Image1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>SampledBuffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>ImageBuffer</strong>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect2">
-<h3 id="_validation_rules_3">Validation Rules</h3>
-<div class="paragraph"><p>The following are a list of validation rules for SPIR-V modules executing in an OpenCL 2.1 environment:</p></div>
-<div class="paragraph"><p><em>Scope</em> for <em>Execution</em> is generally limited to:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Workgroup</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Subgroup</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><em>Scope</em> for <em>Memory</em> is generally limited to:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>CrossDevice</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Device</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Workgroup</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Invocation</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><em>Scope</em> for <em>Execution</em> for the <strong>OpGroupAsyncCopy</strong> and <strong>OpGroupWaitEvents</strong> instructions is specifically limited to:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Workgroup</strong>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="opencl2_0">OpenCL 2.0</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An OpenCL 2.0 environment must accept SPIR-V 1.0 modules if it includes the optional extension <span class="monospaced">cl_khr_il_program</span> in the host API <span class="monospaced">CL_PLATFORM_EXTENSIONS</span> or <span class="monospaced">CL_DEVICE_EXTENSIONS</span> string.</p></div>
-<div class="sect2">
-<h3 id="_full_profile_3">Full Profile</h3>
-<div class="paragraph"><p>An OpenCL 2.0 Full Profile environment is guaranteed to support the following SPIR-V capabilities:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Address</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>DeviceEnqueue</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Float16Buffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>GenericPointer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Groups</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int64</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int16</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int8</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Kernel</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Linkage</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Pipes</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Vector16</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following capabilities may be optionally supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>ImageBasic</strong>, if <span class="monospaced">CL_DEVICE_IMAGE_SUPPORT</span> is <span class="monospaced">CL_TRUE</span>
-</p>
-</li>
-<li>
-<p>
-<strong>Float64</strong>, if the device supports double precision floating-point
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <strong>ImageBasic</strong> is supported then the following capabilities must also be supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>ImageReadWrite</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>LiteralSampler</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Sampled1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Image1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>SampledBuffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>ImageBuffer</strong>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect2">
-<h3 id="_embedded_profile_3">Embedded Profile</h3>
-<div class="paragraph"><p>An OpenCL 2.0 Embedded Profile environment is guaranteed to support the following SPIR-V capabilities:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Address</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>DeviceEnqueue</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Float16Buffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>GenericPointer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Groups</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int16</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int8</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Kernel</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Linkage</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Pipes</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Vector16</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Furthermore, the following capabilities may optionally be supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>ImageBasic</strong>, if <span class="monospaced">CL_DEVICE_IMAGE_SUPPORT</span> is <span class="monospaced">CL_TRUE</span>
-</p>
-</li>
-<li>
-<p>
-<strong>Float64</strong>, if the device supports double precision floating-point
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <strong>ImageBasic</strong> is supported then the following capabilities must also be supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>ImageReadWrite</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>LiteralSampler</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Sampled1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Image1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>SampledBuffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>ImageBuffer</strong>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect2">
-<h3 id="_validation_rules_4">Validation Rules</h3>
-<div class="paragraph"><p>The following are a list of validation rules for SPIR-V modules executing in an OpenCL 2.0 environment:</p></div>
-<div class="paragraph"><p><em>Scope</em> for <em>Execution</em> is generally limited to:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Workgroup</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><em>Scope</em> for <em>Memory</em> is generally limited to:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>CrossDevice</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Device</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Workgroup</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Invocation</strong>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="opencl1_2">OpenCL 1.2</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An OpenCL 1.2 environment must accept SPIR-V 1.0 modules if it includes the optional extension <span class="monospaced">cl_khr_il_program</span> in the host API <span class="monospaced">CL_PLATFORM_EXTENSIONS</span> or <span class="monospaced">CL_DEVICE_EXTENSIONS</span> string.</p></div>
-<div class="sect2">
-<h3 id="_full_profile_4">Full Profile</h3>
-<div class="paragraph"><p>An OpenCL 1.2 Full Profile environment is guaranteed to support the following SPIR-V capabilities:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Address</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Float16Buffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Groups</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int64</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int16</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int8</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Kernel</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Linkage</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Vector16</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following capabilities may be optionally supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>ImageBasic</strong>, if <span class="monospaced">CL_DEVICE_IMAGE_SUPPORT</span> is <span class="monospaced">CL_TRUE</span>
-</p>
-</li>
-<li>
-<p>
-<strong>Float64</strong>, if the device supports double precision floating-point
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <strong>ImageBasic</strong> is supported then the following capabilities must also be supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>LiteralSampler</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Sampled1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Image1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>SampledBuffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>ImageBuffer</strong>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect2">
-<h3 id="_embedded_profile_4">Embedded Profile</h3>
-<div class="paragraph"><p>An OpenCL 1.2 Embedded Profile environment is guaranteed to support the following SPIR-V capabilities:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Address</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Float16Buffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Groups</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int16</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Int8</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Kernel</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Linkage</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Pipes</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Vector16</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following capabilities may be optionally supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>ImageBasic</strong>, if <span class="monospaced">CL_DEVICE_IMAGE_SUPPORT</span> is <span class="monospaced">CL_TRUE</span>
-</p>
-</li>
-<li>
-<p>
-<strong>Float64</strong>, if the device supports double precision floating-point
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <strong>ImageBasic</strong> is supported then the following capabilities must also be supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>LiteralSampler</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Sampled1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Image1D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>SampledBuffer</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>ImageBuffer</strong>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect2">
-<h3 id="_validation_rules_5">Validation Rules</h3>
-<div class="paragraph"><p>The following are a list of validation rules for SPIR-V modules executing in an OpenCL 1.2 environment:</p></div>
-<div class="paragraph"><p><em>Scope</em> for <em>Execution</em> is generally limited to:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Workgroup</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><em>Scope</em> for <em>Memory</em> is generally limited to:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>CrossDevice</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Device</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Workgroup</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>Invocation</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following <strong>Group Instructions</strong> are not supported:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>OpGroupAll</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpGroupAny</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpGroupBroadcast</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpGroupIAdd</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpGroupFAdd</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpGroupFMin</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpGroupUMin</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpGroupSMin</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpGroupFMax</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpGroupUMax</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpGroupSMax</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For the <strong>Barrier Instructions</strong> <strong>OpControlBarrier</strong> and <strong>OpMemoryBarrier</strong>, the <em>Scope</em> for execution must be <strong>Workgroup</strong>, the <em>Scope</em> for memory must be <strong>Workgroup</strong>, and the <em>Memory Semantics</em> must be <strong>SequentiallyConsistent</strong>.</p></div>
-<div class="paragraph"><p>For the <strong>Atomic Instructions</strong>, the <em>Scope</em> must be <strong>Device</strong>, and the <em>Memory Semantics</em> must be <strong>Relaxed</strong>.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="opencl_extensions">OpenCL Extensions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An OpenCL environment may be modified by OpenCL extensions that affect SPIR-V.  An implementation indicates support for an OpenCL extension by including the extension name in the host API <span class="monospaced">CL_PLATFORM_EXTENSIONS</span> or <span class="monospaced">CL_DEVICE_EXTENSIONS</span> string.  To enable the behavior described for an extension, a SPIR-V module must declare use of the extension using <strong>OpExtension</strong> and the name of the extension, for example:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>OpExtension "cl_khr_extension_name"</pre>
-</div></div>
-<div class="paragraph"><p>This section describes how the OpenCL environment is modified by Khronos (<span class="monospaced">khr</span>) OpenCL extensions.  Other OpenCL extensions, such as multi-vendor (<span class="monospaced">ext</span>) extensions or vendor-specific extensions, describe how they modify the OpenCL environment in their individual extension documents.</p></div>
-<div class="sect2">
-<h3 id="_full_and_embedded_profile_extensions">Full and Embedded Profile Extensions</h3>
-<div class="sect3">
-<h4 id="_span_class_monospaced_cl_khr_3d_image_writes_span"><span class="monospaced">cl_khr_3d_image_writes</span></h4>
-<div class="paragraph"><p>If the OpenCL environment supports the extension <span class="monospaced">cl_khr_3d_image_writes</span>, and use of the extension is declared in the module using <strong>OpExtension</strong>, then the environment must accept <em>Image</em> operands to <strong>OpImageWrite</strong> that are declared with with dimensionality <strong>3D</strong>.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_span_class_monospaced_cl_khr_depth_images_span"><span class="monospaced">cl_khr_depth_images</span></h4>
-<div class="paragraph"><p>If the OpenCL environment supports the extension <span class="monospaced">cl_khr_depth_images</span>, and use of the extension is declared in the module using <strong>OpExtension</strong>, then the following Image Channel Orders may additionally be returned by <strong>OpImageQueryOrder</strong>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Depth</strong>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="_span_class_monospaced_cl_khr_device_enqueue_local_arg_types_span"><span class="monospaced">cl_khr_device_enqueue_local_arg_types</span></h4>
-<div class="paragraph"><p>If the OpenCL environment supports the extension <span class="monospaced">cl_khr_device_enqueue_local_arg_types</span>, and use of the extension is declared in the module using <strong>OpExtension</strong>, then then environment will allow <em>Invoke</em> functions to be passed to <strong>OpEnqueueKernel</strong> with <strong>Workgroup</strong> memory pointer parameters of any type.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_span_class_monospaced_cl_khr_fp16_span"><span class="monospaced">cl_khr_fp16</span></h4>
-<div class="paragraph"><p>If the OpenCL environment supports the extension <span class="monospaced">cl_khr_fp16</span>, and use of the extension is declared in the module using <strong>OpExtension</strong>, then the environment must accept modules that declare the following SPIR-V capabilities:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Float16</strong>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="_span_class_monospaced_cl_khr_fp64_span"><span class="monospaced">cl_khr_fp64</span></h4>
-<div class="paragraph"><p>If the OpenCL environment supports the extension <span class="monospaced">cl_khr_fp64</span>, and use of the extension is declared in the module using <strong>OpExtension</strong>, then the environment must accept modules that declare the following SPIR-V capabilities:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Float64</strong>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="_span_class_monospaced_cl_khr_gl_depth_images_span"><span class="monospaced">cl_khr_gl_depth_images</span></h4>
-<div class="paragraph"><p>If the OpenCL environment supports the extension <span class="monospaced">cl_khr_gl_depth_images</span>, and use of the extension is declared in the module using <strong>OpExtension</strong>, then:</p></div>
-<div class="paragraph"><p>The following Image Channel Orders may additionally be returned by <strong>OpImageQueryOrder</strong>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>DepthStencil</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Also, the following Image Channel Data Types may additionally be returned by <strong>OpImageQueryFormat</strong>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>UnormInt24</strong>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="_span_class_monospaced_cl_khr_gl_msaa_sharing_span"><span class="monospaced">cl_khr_gl_msaa_sharing</span></h4>
-<div class="paragraph"><p>If the OpenCL environment supports the extension <span class="monospaced">cl_khr_gl_msaa_sharing</span>, and use of the extension is declared in the module using <strong>OpExtension</strong>, then 2D multi-sampled image types may be declared using <strong>OpTypeImage</strong> with dimensionality <em>Dim</em> equal to <strong>2D</strong> and <em>MS</em> equal to 1, indicating multi-sampled content.</p></div>
-<div class="paragraph"><p>The 2D multi-sampled images may be used with the following instructions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>OpImageRead</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpImageQuerySizeLod</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpImageQueryFormat</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpImageQueryOrder</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpImageQuerySamples</strong>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="_span_class_monospaced_cl_khr_int64_base_atomics_span_and_span_class_monospaced_cl_khr_int64_extended_atomics_span"><span class="monospaced">cl_khr_int64_base_atomics</span> and <span class="monospaced">cl_khr_int64_extended_atomics</span></h4>
-<div class="paragraph"><p>If the OpenCL environment supports the extension <span class="monospaced">cl_khr_int64_base_atomics</span> or <span class="monospaced">cl_khr_int64_extended_atomics</span>, and use of either extension is declared in the module using <strong>OpExtension</strong>, then the environment must support 64-bit integer operands for all of the SPIR-V <strong>Atomic Instructions</strong>.</p></div>
-<div class="paragraph"><p>When the <strong>WorkgroupMemory</strong> <em>Memory Semantic</em> is used the <em>Scope</em> must be <strong>Workgroup</strong>.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">OpenCL environments that consume SPIR-V must support both <span class="monospaced">cl_khr_int64_base_atomics</span> and <span class="monospaced">cl_khr_int64_extended_atomics</span> or neither of these extensions.  Only one of the extension strings need to be declared via <strong>OpExtension</strong>.</td>
-</tr></table>
-</div>
-</div>
-<div class="sect3">
-<h4 id="_span_class_monospaced_cl_khr_mipmap_image_span"><span class="monospaced">cl_khr_mipmap_image</span></h4>
-<div class="paragraph"><p>If the OpenCL environment supports the extension <span class="monospaced">cl_khr_mipmap_image</span>, and use of the extension is declared in the module using <strong>OpExtension</strong>, then the environment must accept non-zero optional <strong>Lod</strong> <em>Image Operands</em> for the following instructions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>OpImageSampleExplicitLod</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpImageFetch</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpImageRead</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>OpImageQuerySizeLod</strong>
-</p>
-</li>
-</ul></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">Implementations that support <span class="monospaced">cl_khr_mipmap_image</span> are not guaranteed to support the <strong>ImageMipmap</strong> capability, since this extension does not require non-zero optional <strong>Lod</strong> <em>Image Operands</em> for <strong>OpImageWrite</strong>.</td>
-</tr></table>
-</div>
-</div>
-<div class="sect3">
-<h4 id="_span_class_monospaced_cl_khr_mipmap_image_writes_span"><span class="monospaced">cl_khr_mipmap_image_writes</span></h4>
-<div class="paragraph"><p>If the OpenCL environment supports the extension <span class="monospaced">cl_khr_mipmap_image_writes</span>, and use of the extension is declared in the module using <strong>OpExtension</strong>, then the environment must accept non-zero optional <strong>Lod</strong> <em>Image Operands</em> for the following instructions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>OpImageWrite</strong>
-</p>
-</li>
-</ul></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">An implementation that supports <span class="monospaced">cl_khr_mipmap_image_writes</span> must also support <span class="monospaced">cl_khr_mipmap_image</span>, and support for both extensions does guarantee support for the <strong>ImageMipmap</strong> capability.</td>
-</tr></table>
-</div>
-</div>
-<div class="sect3">
-<h4 id="_span_class_monospaced_cl_khr_subgroups_span"><span class="monospaced">cl_khr_subgroups</span></h4>
-<div class="paragraph"><p>If the OpenCL environment supports the extension <span class="monospaced">cl_khr_subgroups</span>, and use of the extension is declared in the module using <strong>OpExtension</strong>, then the environment will generally allows the scope for <em>Execution</em> to include:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Subgroup</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>However, the <em>Scope</em> for <em>Execution</em> for the <strong>OpGroupAsyncCopy</strong> and <strong>OpGroupWaitEvents</strong> instructions still is limited to:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Workgroup</strong>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="_span_class_monospaced_cl_khr_subgroup_named_barrier_span"><span class="monospaced">cl_khr_subgroup_named_barrier</span></h4>
-<div class="paragraph"><p>If the OpenCL environment supports the extension <span class="monospaced">cl_khr_subgroup_named_barrier</span>, and use of the extension is declared in the module using <strong>OpExtension</strong>, the the environment must accept modules that declare the following SPIR-V capabilities:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>NamedBarrier</strong>
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_embedded_profile_extensions">Embedded Profile Extensions</h3>
-<div class="sect3">
-<h4 id="_span_class_monospaced_cles_khr_int64_span"><span class="monospaced">cles_khr_int64</span></h4>
-<div class="paragraph"><p>If the OpenCL environment supports the extension <span class="monospaced">cles_khr_int64</span>, and use of the extension is declared in the module using <strong>OpExtension</strong>, then the environment must accept modules that declare the following SPIR-V capabilities:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Int64</strong>
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="numerical_compliance">OpenCL Numerical Compliance</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This section describes features of the C++14 and IEEE 754 standards that must be supported by all OpenCL compliant devices.</p></div>
-<div class="paragraph"><p>This section describes the functionality that must be supported by all OpenCL devices for single precision floating-point numbers.  Currently, only single precision floating-point is a requirement.  Half precision floating-point is an optional feature indicated by the <strong>Float16</strong> capability.  Double precision floating-point is also an optional feature indicated by the <strong>Float64</strong> capability.</p></div>
-<div class="sect2">
-<h3 id="_rounding_modes">Rounding Modes</h3>
-<div class="paragraph"><p>Floating-point calculations may be carried out internally with extra precision and then rounded to fit into the destination type.  IEEE 754 defines four possible rounding modes:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<em>Round to nearest even</em>
-</p>
-</li>
-<li>
-<p>
-<em>Round toward +infinity</em>
-</p>
-</li>
-<li>
-<p>
-<em>Round toward -infinity</em>
-</p>
-</li>
-<li>
-<p>
-<em>Round toward zero</em>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The complete set of rounding modes supported by the device are described by the <span class="monospaced">CL_DEVICE_SINGLE_FP_CONFIG</span>, <span class="monospaced">CL_DEVICE_HALF_FP_CONFIG</span>, and <span class="monospaced">CL_DEVICE_DOUBLE_FP_CONFIG</span> device queries.</p></div>
-<div class="paragraph"><p>For double precision operations, <em>Round to nearest even</em> is a required rounding mode, and is therefore the default rounding mode for double precision operations.</p></div>
-<div class="paragraph"><p>For single precision operations, devices supporting the full profile must support <em>Round to nearest even</em>, therefore for full profile devices this is the default rounding mode for single precision operations.  Devices supporting the embedded profile may support either <em>Round to nearest even</em> or <em>Round toward zero</em> as the default rounding mode for single precision operations.</p></div>
-<div class="paragraph"><p>For half precision operations, devices may support either <em>Round to nearest even</em> or <em>Round toward zero</em> as the default rounding mode for half precision operations.</p></div>
-<div class="paragraph"><p>Only static selection of rounding mode is supported.  Dynamically reconfiguring the rounding mode as specified by the IEEE 754 spec is not supported.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_rounding_modes_for_conversions">Rounding Modes for Conversions</h3>
-<div class="paragraph"><p>The rounding mode for conversion operations may be specified explicitly via an <strong>FPRoundingMode</strong> decoration or may use an implicit rounding mode.  If no rounding mode is specified explicitly then the default rounding mode for OpenCL conversion operations is:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<em>Round to nearest even</em>, for conversions to floating-point types.
-</p>
-</li>
-<li>
-<p>
-<em>Round toward zero</em>, for conversions from floating-point to integer types.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect2">
-<h3 id="_inf_nan_and_denormalized_numbers">INF, NaN, and Denormalized Numbers</h3>
-<div class="paragraph"><p>INFs and NaNs must be supported.  Support for signaling NaNs is not required.</p></div>
-<div class="paragraph"><p>Support for denormalized numbers with single precision and half precision floating-point is optional.  Denormalized single precision or half precision floating-point numbers passed as the input or produced as the output of single precision or half precision floating-point operations may be flushed to zero.  Support for denormalized numbers is required for double precision floating-point.</p></div>
-<div class="paragraph"><p>Support for INFs, NaNs, and denormalized numbers is described by the <span class="monospaced">CL_FP_DENORM</span> and <span class="monospaced">CL_FP_INF_NAN</span> bits in the <span class="monospaced">CL_DEVICE_SINGLE_FP_CONFIG</span>, <span class="monospaced">CL_DEVICE_HALF_FP_CONFIG</span>, and <span class="monospaced">CL_DEVICE_DOUBLE_FP_CONFIG</span> device queries.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_floating_point_exceptions">Floating-Point Exceptions</h3>
-<div class="paragraph"><p>Floating-point exceptions are disabled in OpenCL.  The result of a floating-point exception must match the IEEE 754 spec for the exceptions-not-enabled case.  Whether and when the implementation sets floating-point flags or raises floating-point exceptions is implementation-defined.</p></div>
-<div class="paragraph"><p>This standard provides no method for querying, clearing or setting floating-point flags or trapping raised exceptions.  Due to non-performance, non-portability of trap mechanisms, and the impracticality of servicing precise exceptions in a vector context (especially on heterogeneous hardware), such features are discouraged.</p></div>
-<div class="paragraph"><p>Implementations that nevertheless support such operations through an extension to the standard shall initialize with all exception flags cleared and the exception masks set so that exceptions raised by arithmetic operations do not trigger a trap to be taken.  If the underlying work is reused by the implementation, the implementation is however not responsible for re-clearing the flags or resetting exception masks to default values before entering the kernel.  That is to say that kernels that do not inspect flags or enable traps are licensed to expect that their arithmetic will not trigger a trap.  Those kernels that do examine flags or enable traps are responsible for clearing flag state and disabling all traps before returning control to the implementation.  Whether or when the underlying work-item (and accompanying global floating-point state if any) is reused is implementation-defined.</p></div>
-</div>
-<div class="sect2">
-<h3 id="relative-error-as-ulps">Relative Error as ULPs</h3>
-<div class="paragraph"><p>In this section we discuss the maximum relative error defined as ulp (units in the last place).  Addition, subtraction, multiplication, fused multiply-add, and conversion between integer and a single precision floating-point format are IEEE 754 compliant and are therefore correctly rounded.  Conversion between floating-point formats and explicit conversions must be correctly rounded.</p></div>
-<div class="paragraph"><p>The ULP is defined as follows:</p></div>
-<div class="quoteblock">
-<div class="content">
-<div class="paragraph"><p><span class="monospaced">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.</span></p></div>
-</div>
-<div class="attribution">
-</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">ftp://ftp.inria.fr/INRIA/publication/publi-pdf/RR/RR-5504.pdf</a></em></p></div>
-<div class="paragraph"><p>0 ULP is used for math functions that do not require rounding.  The reference value used to compute the ULP value is the infinitely precise result.</p></div>
-<div class="sect3">
-<h4 id="_ulp_values_for_math_instructions_full_profile">ULP Values for Math Instructions - Full Profile</h4>
-<div class="paragraph"><p>The ULP Values for Math Instructions table below describes the minimum accuracy of floating-point math arithmetic instructions for full profile devices given as ULP values.</p></div>
-<table class="tableblock frame-all grid-all" id="ulp_values_for_math_instructions"
-style="
-width:100%;
-">
-<caption class="title">Table 3. ULP Values for Math Instructions - Full Profile</caption>
-<col style="width:31%;">
-<col style="width:23%;">
-<col style="width:23%;">
-<col style="width:23%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>SPIR-V Instruction</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Minimum Accuracy - Float64</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Minimum Accuracy - Float32</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Minimum Accuracy - Float16</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpFAdd</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpFSub</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpFMul</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpFDiv</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2.5 ulp</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>OpExtInst</strong> <strong>acos</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>acosh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>acospi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</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>OpExtInst</strong> <strong>asin</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>asinh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>asinpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</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>OpExtInst</strong> <strong>atan</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</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>OpExtInst</strong> <strong>atanh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</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>OpExtInst</strong> <strong>atanpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</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>OpExtInst</strong> <strong>atan2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 6 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 6 ulp</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>OpExtInst</strong> <strong>atan2pi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 6 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 6 ulp</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>OpExtInst</strong> <strong>cbrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>OpExtInst</strong> <strong>ceil</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>copysign</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>cos</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>cosh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>cospi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>erfc</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</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>OpExtInst</strong> <strong>erf</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</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>OpExtInst</strong> <strong>exp</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</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>OpExtInst</strong> <strong>exp2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</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>OpExtInst</strong> <strong>exp10</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</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>OpExtInst</strong> <strong>expm1</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</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>OpExtInst</strong> <strong>fabs</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>fdim</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>floor</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>fma</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>fmax</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>fmin</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>fmod</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>fract</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>frexp</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>hypot</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>ilogb</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>ldexp</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>lgamma</strong></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>lgamma_r</strong></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>log</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</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>OpExtInst</strong> <strong>log2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</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>OpExtInst</strong> <strong>log10</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</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>OpExtInst</strong> <strong>log1p</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>OpExtInst</strong> <strong>logb</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>mad</strong></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">Implemented either as a correctly rounded fma, or as a multiply followed by an add, both of which are correctly rounded</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>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>minmag</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>modf</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>nan</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>nextafter</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>pow</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</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>OpExtInst</strong> <strong>pown</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</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>OpExtInst</strong> <strong>powr</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</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>OpExtInst</strong> <strong>remainder</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <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>
-<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>
-<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>OpExtInst</strong> <strong>rint</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>rootn</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</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>OpExtInst</strong> <strong>round</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>rsqrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 1 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>sin</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <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>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp for sine and cosine values</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp for sine and cosine values</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>sinh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>sinpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>sqrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</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>OpExtInst</strong> <strong>tan</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</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>OpExtInst</strong> <strong>tanh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</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>OpExtInst</strong> <strong>tanpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 6 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 6 ulp</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>OpExtInst</strong> <strong>tgamma</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</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>OpExtInst</strong> <strong>trunc</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>half_cos</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_divide</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_exp</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_exp2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_exp10</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_log</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_log2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_log10</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_powr</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_recip</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_rsqrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_sin</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_sqrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_tan</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>native_cos</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_divide</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_exp</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_exp2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_exp10</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_log</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_log2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_log10</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_powr</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_recip</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_rsqrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_sin</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_sqrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_tan</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="_ulp_values_for_math_instructions_embedded_profile">ULP Values for Math Instructions - Embedded Profile</h4>
-<div class="paragraph"><p>The ULP Values for Math instructions for Embedded Profile table below describes the minimum accuracy of floating-point math arithmetic operations given as ULP values for the embedded profile.</p></div>
-<table class="tableblock frame-all grid-all" id="ulp_values_for_math_instructions_for_embedded_profile"
-style="
-width:100%;
-">
-<caption class="title">Table 4. ULP Values for Math Instructions - Embedded Profile</caption>
-<col style="width:31%;">
-<col style="width:23%;">
-<col style="width:23%;">
-<col style="width:23%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>SPIR-V Instruction</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Minimum Accuracy - Float64</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Minimum Accuracy - Float32</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Minimum Accuracy - Float16</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpFAdd</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpFSub</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpFMul</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpFDiv</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 1 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>acos</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>acosh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>acospi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</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>OpExtInst</strong> <strong>asin</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>asinh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>asinpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</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>OpExtInst</strong> <strong>atan</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</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>OpExtInst</strong> <strong>atanh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</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>OpExtInst</strong> <strong>atanpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</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>OpExtInst</strong> <strong>atan2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 6 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 6 ulp</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>OpExtInst</strong> <strong>atan2pi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 6 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 6 ulp</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>OpExtInst</strong> <strong>cbrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>ceil</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>copysign</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>cos</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>cosh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>cospi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>erfc</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</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>OpExtInst</strong> <strong>erf</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</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>OpExtInst</strong> <strong>exp</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>exp2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>exp10</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>expm1</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>fabs</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>fdim</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>floor</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>fma</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>fmax</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>fmin</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>fmod</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>fract</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>frexp</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>hypot</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>ilogb</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>ldexp</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>lgamma</strong></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>lgamma_r</strong></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>log</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>log2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>log10</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>log1p</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>logb</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>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>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>maxmag</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>minmag</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>modf</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>nan</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>nextafter</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <strong>pow</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</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>OpExtInst</strong> <strong>pown</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</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>OpExtInst</strong> <strong>powr</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</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>OpExtInst</strong> <strong>remainder</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>OpExtInst</strong> <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>
-<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>
-<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>OpExtInst</strong> <strong>rint</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>rootn</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</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>OpExtInst</strong> <strong>round</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>rsqrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 1 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>sin</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <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>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp for sine and cosine values</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp for sine and cosine values</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>sinh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>sinpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>OpExtInst</strong> <strong>sqrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 1 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>tan</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</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>OpExtInst</strong> <strong>tanh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 5 ulp</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>OpExtInst</strong> <strong>tanpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 6 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 6 ulp</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>OpExtInst</strong> <strong>tgamma</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 16 ulp</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>OpExtInst</strong> <strong>trunc</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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>OpExtInst</strong> <strong>half_cos</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_divide</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_exp</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_exp2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_exp10</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_log</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_log2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_log10</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_powr</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_recip</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_rsqrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_sin</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_sqrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>half_tan</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 8192 ulp</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"><strong>OpExtInst</strong> <strong>native_cos</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_divide</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_exp</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_exp2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_exp10</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_log</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_log2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_log10</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_powr</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_recip</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_rsqrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_sin</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_sqrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>native_tan</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></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"></p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="_ulp_values_for_math_instructions_fast_relaxed_math">ULP Values for Math Instructions - Fast Relaxed Math</h4>
-<div class="paragraph"><p>The ULP Values for Math Instructions with Fast Relaxed Math table below describes the minimum accuracy of commonly used single precision floating-point math arithmetic instructions given as ULP values if the <em>-cl-fast-relaxed-math</em> compiler option is specified when compiling or building the OpenCL program.</p></div>
-<div class="paragraph"><p>For derived implementations, the operations used in the derivation may themselves be relaxed according to the ULP Values for Math Instructions with Fast Relaxed Math table.</p></div>
-<div class="paragraph"><p>The minimum accuracy of math functions not defined in the ULP Values for Math Instructions with Fast Relaxed Math table when the <em>-cl-fast-relaxed-math</em> compiler option is specified is as defined in the <a href="#ulp_values_for_math_instructions">ULP Values for Math Instructions for Full Profile</a> table when operating in the full profile, and as defined in the <a href="#ulp_values_for_math_instructions_for_embedded_profile">ULP Values for Math instructions for Embedded Profile</a> table when operating in the embedded profile.</p></div>
-<table class="tableblock frame-all grid-all" id="ulp_values_for_math_instructions_with_fast_relaxed_math"
-style="
-width:75%;
-">
-<caption class="title">Table 5. ULP Values for Single Precision Math Instructions with <em>-cl-fast-relaxed-math</em></caption>
-<col style="width:40%;">
-<col style="width:60%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>SPIR-V Instruction</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Minimum Accuracy</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpFDiv</strong> for 1.0 / <em>x</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2.5 ulp for x in the domain of 2<sup>-126</sup> to 2<sup>126</sup> for the full profile, and &lt;= 3 ulp for the embedded profile.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpFDiv</strong> for <em>x</em> / <em>y</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2.5 ulp for x in the domain of 2<sup>-62</sup> to 2<sup>62</sup> and <em>y</em> in the domain of 2<sup>-62</sup> to 2<sup>62</sup> for the full profile, and &lt;= 3 ulp for the embedded profile.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>acos</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4096 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>acosh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as log( x + sqrt(x*x - 1) ).</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>acospi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as acos(x) * M_PI_F.
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>asin</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4096 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>asinh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as log( x + sqrt(x*x + 1) ).</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>asinpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as asin(x) * M_PI_F.
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>atan</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4096 ulp</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>atanh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Defined for x in the domain (-1, 1). For x in [-2<sup>-10</sup>, 2<sup>-10</sup>], implemented as x.
-For x outside of [-2<sup>-10</sup>, 2<sup>-10</sup>], implemented as 0.5f * log( (1.0f + x) / (1.0f - x) ).
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>atanpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as atan(x) * M_1_PI_F.
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>atan2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as atan(y/x) for x &gt; 0, atan(y/x) + M_PI_F for x &lt; 0 and y &gt; 0 and atan(y/x) - M_PI_F for x &lt; 0 and y &lt; 0.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>atan2pi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as atan2(y, x) * M_1_PI_F.
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>cbrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented as rootn(x, 3).
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>cos</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For x in the domain [-π, π], the maximum absolute error is &lt;= 2<sup>-11</sup> and larger otherwise.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>cosh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Defined for x in the domain [-88, 88] and implemented as 0.5f * ( exp(x) + exp(-x) ).
-For non-derived implementations, the error is &lt;= 8192 ULP.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>cospi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For x in the domain [-1, 1], the maximum absolute error is &lt;= 2<sup>-11</sup> and larger otherwise.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>exp</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 + floor( fabs(2 * x) ) ulp for the full profile, and &lt;= 4 ulp for the embedded profile.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>exp2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 3 + floor( fabs(2 * x) ) ulp for the full profile, and &lt;= 4 ulp for the embedded profile.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>exp10</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Derived implementations implement this as exp2( x * log2(10) ).
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>expm1</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Derived implementations implement this as exp(x) - 1.
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>log</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For x in the domain [0.5, 2] the maximum absolute error is &lt;= 2<sup>-21</sup>; otherwise the maximum error is &lt;=3 ulp for the full profile and &lt;= 4 ulp for the embedded profile</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>log2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For x in the domain [0.5, 2] the maximum absolute error is &lt;= 2<sup>-21</sup>; otherwise the maximum error is &lt;=3 ulp for the full profile and &lt;= 4 ulp for the embedded profile</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>log10</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For x in the domain [0.5, 2] the maximum absolute error is &lt;= 2<sup>-21</sup>; otherwise the maximum error is &lt;=3 ulp for the full profile and &lt;= 4 ulp for the embedded profile</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>log1p</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Derived implementations implement this as log(x + 1).
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>pow</strong></p></td>
-<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) ).
-For x == 0 and nonzero y, derived implementations return zero.
-For non-derived implementations, the error is &lt;= 8192 ULP.
-<span class="footnote"><br>[On some implementations, <span class="monospaced">powr()</span> or <span class="monospaced">pown()</span> may perform faster than <span class="monospaced">pow()</span>.
-If <span class="monospaced">x</span> is known to be <span class="monospaced">&gt;= 0</span>, consider using <span class="monospaced">powr()</span> in place of <span class="monospaced">pow()</span>, or if <span class="monospaced">y</span> is known to be an integer, consider using <span class="monospaced">pown()</span> in place of <span class="monospaced">pow()</span>.]<br></span></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>pown</strong></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 &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>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>powr</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Defined only for x &gt;= 0.
-Undefined for x = 0 and y = 0.
-Derived implementations implement this as exp2( y * log2(x) ).
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>rootn</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Defined for x &gt; 0 when y is non-zero, derived implementations implement this case as exp2( log2(x) / y ). Defined for x &lt; 0 when y is odd, derived implementations implement this case as -exp2( log2(-x) / y ).
-Defined for x = +/-0 when y &gt; 0, derived implementations will return +0 in this case.
-For non-derived implementations, the error is &lt;= 8192 ULP.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>sin</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For x in the domain [-π, π], the maximum absolute error is &lt;= 2<sup>-11</sup> and larger otherwise.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>sincos</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">ulp values as defined for sin(x) and cos(x).</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>sinh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Defined for x in the domain [-88, 88].
-For x in [-2<sup>-10</sup>, 2<sup>-10</sup>], derived implementations implement as x.
-For x outside of [-2<sup>-10</sup>, 2<sup>-10</sup>], derived implement as 0.5f * ( exp(x) - exp(-x) ).
-For non-derived implementations, the error is &lt;= 8192 ULP.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>sinpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">For x in the domain [-1, 1], the maximum absolute error is &lt;= 2<sup>-11</sup> and larger otherwise.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>tan</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Derived implementations implement this as sin(x) * ( 1.0f / cos(x) ).
-For non-derived implementations, the error is &lt;= 8192 ulp.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>tanh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Defined for x in the domain [-88, 88].
-For x in [-2<sup>-10</sup>, 2<sup>-10</sup>], derived implementations implement as x.
-For x outside of [-2<sup>-10</sup>, 2<sup>-10</sup>], derived implementations implement as ( exp(x) - exp(-x) ) / ( exp(x) + exp(-x) ).
-For non-derived implementations, the error is &lt;= 8192 ULP.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpExtInst</strong> <strong>tanpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Derived implementations implement this as tan(x * M_PI_F).
-For non-derived implementations, the error is &lt;= 8192 ulp for x in the domain [-1, 1].</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>OpFMul</strong> and <strong>OpFAdd</strong> for <em>x</em> * <em>y</em> + <em>z</em></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Implemented either as a correctly rounded fma or as a multiply and an add both of which are correctly rounded.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_edge_case_behavior">Edge Case Behavior</h3>
-<div class="paragraph"><p>The edge case behavior of the math functions shall conform to sections F.9 and G.6 of ISO/IEC 9899:TC 2, except where noted below in the <em><a href="#additional-requirements-beyond-isoiec-9899tc2">Additional Requirements Beyond ISO/IEC 9899:TC2</a> section</em>.</p></div>
-<div class="sect3">
-<h4 id="additional-requirements-beyond-isoiec-9899tc2">Additional Requirements Beyond ISO/IEC 9899:TC2</h4>
-<div class="paragraph"><p>Functions that return a NaN with more than one NaN operand shall return one of the NaN operands.
-Functions that return a NaN operand may silence the NaN if it is a signaling NaN.
-A non-signaling NaN shall be converted to a non-signaling NaN.
-A signaling NaN shall be converted to a NaN, and should be converted to a non-signaling NaN.
-How the rest of the NaN payload bits or the sign of NaN is converted is undefined.</p></div>
-<div class="paragraph"><p>The usual allowances for rounding error (<em><a href="#relative-error-as-ulps">Relative Error as ULPs</a> section</em>) or flushing behavior (<em><a href="#edge-case-behavior-in-flush-to-zero-mode">Edge Case Behavior in Flush To Zero Mode</a> section</em>) shall not apply for those values for which <em>section F.9</em> of ISO/IEC 9899:,TC2, or <em><a href="#additional-requirements-beyond-isoiec-9899tc2">Additional Requirements Beyond ISO/IEC 9899:TC2</a></em> and <em><a href="#edge-case-behavior-in-flush-to-zero-mode">Edge Case Behavior in Flush To Zero Mode</a> sections</em> below (and similar sections for other floating-point precisions) prescribe a result (e.g. ceil( -1 &lt; x &lt; 0 ) returns -0).
-Those values shall produce exactly the prescribed answers, and no other.
-Where the ± symbol is used, the sign shall be preserved.
-For example, sin(±0) = ±0 shall be interpreted to mean sin(+0) is +0 and sin(-0) is -0.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>acospi</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-acospi( 1 ) = +0.
-</p>
-</li>
-<li>
-<p>
-acospi( x ) returns a NaN for | x | &gt; 1.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>asinpi</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-asinpi( ±0 ) = ±0.
-</p>
-</li>
-<li>
-<p>
-asinpi( x ) returns a NaN for | x | &gt; 1.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>atanpi</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-atanpi( ±0 ) = ±0.
-</p>
-</li>
-<li>
-<p>
-atanpi ( ±∞ ) = ±0.5.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>atan2pi</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-atan2pi ( ±0, -0 ) = ±1.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( ±0, +0 ) = ± 0.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( ±0, x ) returns ± 1 for x &lt; 0.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( ±0, x) returns ± 0 for x &gt; 0.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( y, ±0 ) returns -0.5 for y &lt; 0.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( y, ±0 ) returns 0.5 for y &gt; 0.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( ±y, -∞ ) returns ± 1 for finite y &gt; 0.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( ±y, +∞ ) returns ± 0 for finite y &gt; 0.
-</p>
-</li>
-<li>
-<p>
-atan2pi ( ±∞, x ) returns ± 0.5 for finite x.
-</p>
-</li>
-<li>
-<p>
-atan2pi (±∞, -∞ ) returns ±0.75.
-</p>
-</li>
-<li>
-<p>
-atan2pi (±∞, +∞ ) returns ±0.25.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>ceil</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-ceil( -1 &lt; x &lt; 0 ) returns -0.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>cospi</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-cospi( ±0 ) returns 1
-</p>
-</li>
-<li>
-<p>
-cospi( n + 0.5 ) is +0 for any integer n where n + 0.5 is representable.
-</p>
-</li>
-<li>
-<p>
-cospi( ±∞ ) returns a NaN.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>exp10</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-exp10( ±0 ) returns 1.
-</p>
-</li>
-<li>
-<p>
-exp10( -∞ ) returns +0.
-</p>
-</li>
-<li>
-<p>
-exp10( +∞ ) returns +∞.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>distance</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-distance(x, y) calculates the distance from x to y without overflow or extraordinary precision loss due to underflow.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>fdim</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-fdim( any, NaN ) returns NaN.
-</p>
-</li>
-<li>
-<p>
-fdim( NaN, any ) returns NaN.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>fmod</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-fmod( ±0, NaN ) returns NaN.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>fract</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-fract( x, iptr) shall not return a value greater than or equal to 1.0, and shall not return a value less than 0.
-</p>
-</li>
-<li>
-<p>
-fract( +0, iptr ) returns +0 and +0 in iptr.
-</p>
-</li>
-<li>
-<p>
-fract( -0, iptr ) returns -0 and -0 in iptr.
-</p>
-</li>
-<li>
-<p>
-fract( +inf, iptr ) returns +0 and +inf in iptr.
-</p>
-</li>
-<li>
-<p>
-fract( -inf, iptr ) returns -0 and -inf in iptr.
-</p>
-</li>
-<li>
-<p>
-fract( NaN, iptr ) returns the NaN and NaN in iptr.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>frexp</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-frexp( ±∞, exp ) returns ±∞ and stores 0 in exp.
-</p>
-</li>
-<li>
-<p>
-frexp( NaN, exp ) returns the NaN and stores 0 in exp.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>length</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-length calculates the length of a vector without overflow or extraordinary precision loss due to underflow.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>lgamma_r</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-lgamma_r( x, signp ) returns 0 in signp if x is zero or a negative integer.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>nextafter</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-nextafter( -0, y &gt; 0 ) returns smallest positive denormal value.
-</p>
-</li>
-<li>
-<p>
-nextafter( +0, y &lt; 0 ) returns smallest negative denormal value.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>normalize</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-normalize shall reduce the vector to unit length, pointing in the same direction without overflow or extraordinary precision loss due to underflow.
-</p>
-</li>
-<li>
-<p>
-normalize( v ) returns v if all elements of v are zero.
-</p>
-</li>
-<li>
-<p>
-normalize( v ) returns a vector full of NaNs if any element is a NaN.
-</p>
-</li>
-<li>
-<p>
-normalize( v ) for which any element in v is infinite shall proceed as if the elements in v were replaced as follows:
-</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="font-weight: bold"><span style="color: #0000FF">for</span></span><span style="color: #990000">(</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="font-weight: bold"><span style="color: #0000FF">sizeof</span></span><span style="color: #990000">(</span>v<span style="color: #990000">)</span> <span style="color: #990000">/</span> <span style="font-weight: bold"><span style="color: #0000FF">sizeof</span></span><span style="color: #990000">(</span>v<span style="color: #990000">[</span><span style="color: #993399">0</span><span style="color: #990000">]</span> <span style="color: #990000">);</span> i<span style="color: #990000">++</span> <span style="color: #990000">)</span>
-    v<span style="color: #990000">[</span>i<span style="color: #990000">]</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">isinf</span></span><span style="color: #990000">(</span>v<span style="color: #990000">[</span>i<span style="color: #990000">]</span> <span style="color: #990000">)</span>  <span style="color: #990000">?</span>  <span style="font-weight: bold"><span style="color: #000000">copysign</span></span><span style="color: #990000">(</span><span style="color: #993399">1.0</span><span style="color: #990000">,</span> v<span style="color: #990000">[</span>i<span style="color: #990000">])</span> <span style="color: #990000">:</span> <span style="color: #993399">0.0</span> <span style="color: #990000">*</span> v <span style="color: #990000">[</span>i<span style="color: #990000">];</span></tt></pre></div></div>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>pow</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-pow( ±0, -∞ ) returns +∞
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>pown</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-pown( x, 0 ) is 1 for any x, even zero, NaN or infinity.
-</p>
-</li>
-<li>
-<p>
-pown( ±0, n ) is ±∞ for odd n &lt; 0.
-</p>
-</li>
-<li>
-<p>
-pown( ±0, n ) is +∞ for even n &lt; 0.
-</p>
-</li>
-<li>
-<p>
-pown( ±0, n ) is +0 for even n &gt; 0.
-</p>
-</li>
-<li>
-<p>
-pown( ±0, n ) is ±0 for odd n &gt; 0.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>powr</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-powr( x, ±0 ) is 1 for finite x &gt; 0.
-</p>
-</li>
-<li>
-<p>
-powr( ±0, y ) is +∞ for finite y &lt; 0.
-</p>
-</li>
-<li>
-<p>
-powr( ±0, -∞) is +∞.
-</p>
-</li>
-<li>
-<p>
-powr( ±0, y ) is +0 for y &gt; 0.
-</p>
-</li>
-<li>
-<p>
-powr( +1, y ) is 1 for finite y.
-</p>
-</li>
-<li>
-<p>
-powr( x, y ) returns NaN for x &lt; 0.
-</p>
-</li>
-<li>
-<p>
-powr( ±0, ±0 ) returns NaN.
-</p>
-</li>
-<li>
-<p>
-powr( +∞, ±0 ) returns NaN.
-</p>
-</li>
-<li>
-<p>
-powr( +1, ±∞ ) returns NaN.
-</p>
-</li>
-<li>
-<p>
-powr( x, NaN ) returns the NaN for x &gt;= 0.
-</p>
-</li>
-<li>
-<p>
-powr( NaN, y ) returns the NaN.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>rint</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-rint( -0.5 &lt;= x &lt; 0 ) returns -0.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>remquo</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-remquo(x, y, &amp;quo) returns a NaN and 0 in quo if x is ±∞, or if y is 0 and the other argument is non-NaN or if either argument is a NaN.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>rootn</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-rootn( ±0, n ) is ±∞ for odd n &lt; 0.
-</p>
-</li>
-<li>
-<p>
-rootn( ±0, n ) is +∞ for even n &lt; 0.
-</p>
-</li>
-<li>
-<p>
-rootn( ±0, n ) is +0 for even n &gt; 0.
-</p>
-</li>
-<li>
-<p>
-rootn( ±0, n ) is ±0 for odd n &gt; 0.
-</p>
-</li>
-<li>
-<p>
-rootn( x, n ) returns a NaN for x &lt; 0 and n is even.
-</p>
-</li>
-<li>
-<p>
-rootn( x, 0 ) returns a NaN.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>round</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-round( -0.5 &lt; x &lt; 0 ) returns -0.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>sinpi</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-sinpi( ±0 ) returns ±0.
-</p>
-</li>
-<li>
-<p>
-sinpi( +n) returns +0 for positive integers n.
-</p>
-</li>
-<li>
-<p>
-sinpi( -n ) returns -0 for negative integers n.
-</p>
-</li>
-<li>
-<p>
-sinpi( ±∞ ) returns a NaN.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>tanpi</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-tanpi( ±0 ) returns ±0.
-</p>
-</li>
-<li>
-<p>
-tanpi( ±∞ ) returns a NaN.
-</p>
-</li>
-<li>
-<p>
-tanpi( n ) is copysign( 0.0, n ) for even integers n.
-</p>
-</li>
-<li>
-<p>
-tanpi( n ) is copysign( 0.0, - n) for odd integers n.
-</p>
-</li>
-<li>
-<p>
-tanpi( n + 0.5 ) for even integer n is +∞ where n + 0.5 is representable.
-</p>
-</li>
-<li>
-<p>
-tanpi( n + 0.5 ) for odd integer n is -∞ where n + 0.5 is representable.
-</p>
-</li>
-</ul></div>
-</li>
-<li>
-<p>
-<strong>OpExtInst</strong> <strong>trunc</strong>:
-</p>
-<div class="ulist"><ul>
-<li>
-<p>
-trunc( -1 &lt; x &lt; 0 ) returns -0.
-</p>
-</li>
-</ul></div>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="changes-to-isoiec-9899-tc2-behavior">Changes to ISO/IEC 9899: TC2 Behavior</h4>
-<div class="paragraph"><p><strong>OpExtInst</strong> <strong>modf</strong> behaves as though implemented by:</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">modf</span></span><span style="color: #990000">(</span> <span style="color: #008080">gentype</span> value<span style="color: #990000">,</span> <span style="color: #008080">gentype</span> <span style="color: #990000">*</span>iptr <span style="color: #990000">)</span>
-<span style="color: #FF0000">{</span>
-    <span style="color: #990000">*</span>iptr <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">trunc</span></span><span style="color: #990000">(</span> value <span style="color: #990000">);</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="font-weight: bold"><span style="color: #000000">copysign</span></span><span style="color: #990000">(</span> <span style="font-weight: bold"><span style="color: #000000">isinf</span></span><span style="color: #990000">(</span> value <span style="color: #990000">)</span> <span style="color: #990000">?</span> <span style="color: #993399">0.0</span> <span style="color: #990000">:</span> value – <span style="color: #990000">*</span>iptr<span style="color: #990000">,</span> value <span style="color: #990000">);</span>
-<span style="color: #FF0000">}</span></tt></pre></div></div>
-<div class="paragraph"><p><strong>OpExtInst</strong> <strong>rint</strong> always rounds according to round to nearest even rounding mode even if the caller is in some other rounding mode.</p></div>
-</div>
-<div class="sect3">
-<h4 id="edge-case-behavior-in-flush-to-zero-mode">Edge Case Behavior in Flush To Zero Mode</h4>
-<div class="paragraph"><p>If denormals are flushed to zero, then a function may return one of four results:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-Any conforming result for non-flush-to-zero mode.
-</p>
-</li>
-<li>
-<p>
-If the result given by 1. is a sub-normal before rounding, it may be flushed to zero.
-</p>
-</li>
-<li>
-<p>
-Any non-flushed conforming result for the function if one or more of its sub-normal operands are flushed to zero.
-</p>
-</li>
-<li>
-<p>
-If the result of 3. is a sub-normal before rounding, the result may be flushed to zero.
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p>In each of the above cases, if an operand or result is flushed to zero, the sign of the zero is undefined.</p></div>
-<div class="paragraph"><p>If subnormals are flushed to zero, a device may choose to conform to the following edge cases for <strong>OpExtInst</strong> <strong>nextafter</strong> instead of those listed in <em><a href="#additional-requirements-beyond-isoiec-9899tc2">Additional Requirements Beyond ISO/IEC 9899:TC2</a> section</em>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-nextafter ( +smallest normal, y &lt; +smallest normal ) = +0.
-</p>
-</li>
-<li>
-<p>
-nextafter ( -smallest normal, y &gt; -smallest normal ) = -0.
-</p>
-</li>
-<li>
-<p>
-nextafter ( -0, y &gt; 0 ) returns smallest positive normal value.
-</p>
-</li>
-<li>
-<p>
-nextafter ( +0, y &lt; 0 ) returns smallest negative normal value.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For clarity, subnormals or denormals are defined to be the set of representable numbers in the range 0 &lt; x &lt; TYPE_MIN  and -TYPE_MIN &lt; x &lt; -0.
-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). <span class="footnote"><br>[Here <span class="monospaced">TYPE_MIN</span> and <span class="monospaced">TYPE_MIN_EXP</span> should be substituted by constants appropriate to the floating-point type under consideration, such as <span class="monospaced">FLT_MIN</span> and <span class="monospaced">FLT_MIN_EXP</span> for float.]<br></span></p></div>
-</div>
-</div>
-</div>
-</div>
-</div>
-<div id="footnotes"><hr></div>
-<div id="footer">
-<div id="footer-text">
-Version v2.2-3<br>
-Last updated
- 2017-05-12 11:30:12 PDT
-</div>
-</div>
-</body>
-</html>
diff --git a/specs/opencl-2.2-environment.pdf b/specs/opencl-2.2-environment.pdf
deleted file mode 100644
index 985afcb..0000000
--- a/specs/opencl-2.2-environment.pdf
+++ /dev/null
Binary files differ
diff --git a/specs/opencl-2.2-extension.html b/specs/opencl-2.2-extension.html
deleted file mode 100644
index b937922..0000000
--- a/specs/opencl-2.2-extension.html
+++ /dev/null
@@ -1,8191 +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 Extension 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(2);
-/*]]>*/
-</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 Extension Specification</h1>
-<span id="author">Khronos OpenCL Working Group</span><br>
-<span id="revnumber">version v2.2-3</span>
-<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>
-</div>
-</div>
-<div class="sect1">
-<h2 id="optional-extensions">Optional Extensions</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. 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></div>
-<div class="paragraph"><p>For OpenCL extensions approved by the OpenCL working group, the following naming conventions are used:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A unique <em>name string</em> of the form "<strong>cl_khr_&lt;<em>name</em>&gt;</strong>" 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>
-</li>
-<li>
-<p>
-All API functions defined by the extension will have names of the form <strong>cl&lt;<em>function_name</em>&gt;KHR</strong>.
-</p>
-</li>
-<li>
-<p>
-All enumerants defined by the extension will have names of the form <strong>CL_&lt;<em>enum_name</em>&gt;_KHR.</strong>
-</p>
-</li>
-</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. 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 functions and enumerants as a transition aid.</p></div>
-<div class="paragraph"><p>For vendor extensions, the following naming conventions are used:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A unique <em>name string</em> of the form "<strong>cl_&lt;<em>vendor_name</em>&gt;_&lt;<em>name&gt;</em></strong>" 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>
-</li>
-<li>
-<p>
-All API functions defined by the vendor extension will have names of the form <strong>cl&lt;<em>function_name</em>&gt;&lt;<em>vendor_name</em>&gt;</strong>.
-</p>
-</li>
-<li>
-<p>
-All enumerants defined by the vendor extension will have names of the form <strong>CL_&lt;<em>enum_name</em>&gt;_&lt;<em>vendor_name</em>&gt;.</strong>
-</p>
-</li>
-</ul></div>
-<div class="sect2">
-<h3 id="compiler-directives-for-optional-extensions">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. The <strong>#pragma OPENCL EXTENSION</strong> directive is defined 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> <span style="color: #008080">OPENCL</span> EXTENSION <span style="color: #990000">&lt;</span>extension_name<span style="color: #990000">&gt;</span> <span style="color: #990000">:</span> <span style="color: #990000">&lt;</span>behavior<span style="color: #990000">&gt;</span>
-<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> <span style="color: #990000">&lt;</span>behavior<span style="color: #990000">&gt;</span></tt></pre></div></div>
-<div class="paragraph"><p>where <em>extension_name</em> is the name of the extension. The <em>extension_name</em> will have names of the form <strong>cl_khr_&lt;<em>name</em>&gt;</strong> for an extension approved by the OpenCL working group and will have names of the form <strong>cl_&lt;<em>vendor_name</em>&gt;_&lt;<em>name</em>&gt;</strong> for vendor extensions.  The token <strong>all</strong> means that the behavior applies to all extensions supported by the compiler. 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"
-style="
-width:100%;
-">
-<col style="width:25%;">
-<col style="width:75%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>behavior</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>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><span class="monospaced">#pragma OPENCL EXTENSION</span></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><span class="monospaced">#pragma OPENCL EXTENSION</span></strong> if the extension <em>extension_name</em> is not supported.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>The <strong><span class="monospaced">#pragma OPENCL EXTENSION</span></strong> directive is a simple, low-level mechanism to set the behavior for each extension. It does not define policies such as which combinations are appropriate; those must be
-defined elsewhere. The order of directives matter in setting the behavior for each extension. Directives that occur later override those seen earlier. The <strong>all</strong> variant sets the behavior for all extensions, overriding all previously issued extension directives, but only if the <em>behavior</em> is set to <strong>disable</strong>.</p></div>
-<div class="paragraph"><p>The initial state of the compiler is as if the directive</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> OPENCL <span style="color: #008080">EXTENSION</span> all <span style="color: #990000">:</span> disable</tt></pre></div></div>
-<div class="paragraph"><p>was issued, telling the compiler that all error and warning reporting must be done according to this specification, ignoring any extensions.</p></div>
-<div class="paragraph"><p>Every extension which affects the OpenCL language semantics, syntax or adds built-in functions to the language must create a preprocessor <span class="monospaced">#define</span> that matches the extension name string. This <span class="monospaced">#define</span> would be
-available in the language if and only if the extension is supported on a given implementation.</p></div>
-<div class="paragraph"><p><strong>Example</strong>:</p></div>
-<div class="paragraph"><p>An extension which adds the extension string "<strong><span class="monospaced">cl_khr_3d_image_writes</span></strong>" should also add a preprocessor <span class="monospaced">#define</span> called <strong><span class="monospaced">cl_khr_3d_image_writes</span></strong>. A kernel can now use this preprocessor <span class="monospaced">#define</span> to do something like:</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">#ifdef</span></span> cl_khr_3d_image_writes
-    <span style="font-style: italic"><span style="color: #9A1900">// do something using the extension</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#else</span></span>
-    <span style="font-style: italic"><span style="color: #9A1900">// do something else or #error!</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#endif</span></span></tt></pre></div></div>
-</div>
-<div class="sect2">
-<h3 id="getting-opencl-api-extension-function-pointers">Getting OpenCL API Extension Function Pointers</h3>
-<div class="paragraph"><p>The function <span class="footnote"><br>[Since there is no way to qualify the query with a device, the function pointer
-returned must work for all implementations of that extension on different devices for a platform. The behavior of calling a device extension function on a device not supporting that extension is undefined.]<br></span></p></div>
-<div class="paragraph"><p></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">clGetExtensionFunctionAddressForPlatform</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_platform_id</span> platform<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>funcname<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>returns the address of the extension function named by <em>funcname</em> for a given <em>platform</em> The pointer returned should be cast to a function pointer type matching the extension function’s definition defined in the appropriate extension specification and header file. A return value of NULL indicates that the specified function does not exist for the implementation or <em>platform</em> is not a valid platform. A non-NULL return value for <strong>clGetExtensionFunctionAddressForPlatform</strong> does not guarantee that an extension function is actually supported by the platform. The application must also make a corresponding query using <strong>clGetPlatformInfo</strong>(platform, CL_PLATFORM_EXTENSIONS, &#8230;) or <strong>clGetDeviceInfo</strong>(device, CL_DEVICE_EXTENSIONS, &#8230;) to determine if an extension is supported by the OpenCL implementation.</p></div>
-<div class="paragraph"><p><strong>clGetExtensionFunctionAddressForPlatform</strong> may not be queried for core (non-extension) functions in OpenCL. For functions that are queryable with <strong>clGetExtensionFunctionAddressForPlatform</strong>, implementations may choose to also export those functions statically from the object libraries implementing those functions. However, portable applications cannot rely on this behavior.</p></div>
-<div class="paragraph"><p>Function pointer typedefs must be declared for all extensions that add API entrypoints. These typedefs are a required part of the extension interface, to be provided in an appropriate header (such as cl_ext.h if the extension is an OpenCL extension, or cl_gl_ext.h if the extension is an OpenCL / OpenGL sharing extension).</p></div>
-<div class="paragraph"><p>The following convention must be followed for all extensions affecting the host API:</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">#ifndef</span></span> extension_name
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> extension_name <span style="color: #993399">1</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// all data typedefs, token #defines, prototypes, and</span></span>
-<span style="font-style: italic"><span style="color: #9A1900">// function pointer typedefs for this extension</span></span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// function pointer typedefs must use the</span></span>
-<span style="font-style: italic"><span style="color: #9A1900">// following naming convention</span></span>
-
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">CL_API_ENTRY</span> return_type
-            <span style="color: #990000">(</span><span style="color: #008080">CL_API_CALL</span> <span style="color: #990000">*</span>clExtensionFunctionNameTAG_fn<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">// _extension_name_</span></span></tt></pre></div></div>
-<div class="paragraph"><p>where <span class="monospaced">TAG</span> can be <span class="monospaced">KHR</span>, <span class="monospaced">EXT</span> or <span class="monospaced">vendor-specific</span>.</p></div>
-<div class="paragraph"><p>Consider, for example, the <strong>cl_khr_gl_sharing</strong> extension. This extension would add the following to cl_gl_ext.h:</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">#ifndef</span></span> cl_khr_gl_sharing
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> cl_khr_gl_sharing <span style="color: #993399">1</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// all data typedefs, token #defines, prototypes, and</span></span>
-<span style="font-style: italic"><span style="color: #9A1900">// function pointer typedefs for this extension</span></span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR <span style="color: #990000">-</span><span style="color: #993399">1000</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR <span style="color: #993399">0x2006</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> CL_DEVICES_FOR_GL_CONTEXT_KHR <span style="color: #993399">0x2007</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> CL_GL_CONTEXT_KHR <span style="color: #993399">0x2008</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> CL_EGL_DISPLAY_KHR <span style="color: #993399">0x2009</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> CL_GLX_DISPLAY_KHR <span style="color: #993399">0x200A</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> CL_WGL_HDC_KHR <span style="color: #993399">0x200B</span>
-<span style="font-weight: bold"><span style="color: #000080">#define</span></span> CL_CGL_SHAREGROUP_KHR <span style="color: #993399">0x200C</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">// function pointer typedefs must use the</span></span>
-<span style="font-style: italic"><span style="color: #9A1900">// following naming convention</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">typedef</span></span> <span style="color: #008080">CL_API_ENTRY</span> cl_int
-        <span style="color: #990000">(</span><span style="color: #008080">CL_API_CALL</span> <span style="color: #990000">*</span>clGetGLContextInfoKHR_fn<span style="color: #990000">)(</span>
-            <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> cl_context_properties <span style="color: #990000">*</span> <span style="font-style: italic"><span style="color: #9A1900">/* properties */</span></span><span style="color: #990000">,</span>
-            cl_gl_context_info <span style="font-style: italic"><span style="color: #9A1900">/* param_name */</span></span><span style="color: #990000">,</span>
-            size_t <span style="font-style: italic"><span style="color: #9A1900">/* param_value_size */</span></span><span style="color: #990000">,</span>
-            <span style="color: #009900">void</span> <span style="color: #990000">*</span> <span style="font-style: italic"><span style="color: #9A1900">/* param_value */</span></span><span style="color: #990000">,</span>
-            size_t <span style="color: #990000">*</span> <span style="font-style: italic"><span style="color: #9A1900">/*param_value_size_ret*/</span></span><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_gl_sharing</span></span></tt></pre></div></div>
-<div style="page-break-after:always"></div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_fp16">Half Precision Floating-Point</h3>
-<div class="paragraph"><p>This section describes the <strong>cl_khr_fp16</strong> extension.  This extension adds support for half scalar and vector types as built-in types that can be used for arithmetic operations, conversions etc.</p></div>
-<div class="sect3">
-<h4 id="cl_khr_fp16-additions-to-chapter-6-of-the-opencl-2.0-specification">Additions to Chapter 6 of the OpenCL 2.0 C Specification</h4>
-<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"
-style="
-width:100%;
-">
-<col style="width:25%;">
-<col style="width:75%;">
-<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>half2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 2-component half-precision floating-point vector.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>half3</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 3-component half-precision floating-point vector.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>half4</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 4-component half-precision floating-point vector.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>half8</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 8-component half-precision floating-point vector.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>half16</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 16-component half-precision floating-point vector.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>The built-in vector data types for <span class="monospaced">halfn</span> 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 types for <span class="monospaced">halfn</span> 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"
-style="
-width:100%;
-">
-<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"><strong>half2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_half2</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>half 3</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_half3</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>half 4</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_half4</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>half 8</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_half8</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>half16</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_half16</strong></p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>The relational, equality, logical and logical unary operators described in <em>section 6.3</em> can be used with <span class="monospaced">half</span> scalar and <span class="monospaced">halfn</span> vector types and shall produce a scalar <span class="monospaced">int</span> and vector <span class="monospaced">shortn</span> result respectively.</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 half.</p></div>
-<div class="sect4">
-<h5 id="cl_khr_fp16-conversions">Conversions</h5>
-<div class="paragraph"><p>The implicit conversion rules specified in <em>section 6.2.1</em> now include the <span class="monospaced">half</span> scalar and <span class="monospaced">halfn</span> 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 <span class="monospaced">half</span> scalar data type and a <span class="monospaced">halfn</span> 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 <span class="monospaced">half</span> scalar data type and a <span class="monospaced">halfn</span> vector data type.</p></div>
-<div class="paragraph"><p>The <span class="monospaced">as_typen()</span> function for re-interpreting types as described in <em>section 6.2.4.2</em> is extended to allow conversion-free casts between <span class="monospaced">shortn</span>, <span class="monospaced">ushortn</span>, and <span class="monospaced">halfn</span> scalar and vector data types.</p></div>
-</div>
-<div class="sect4">
-<h5 id="cl_khr_fp16-math-functions">Math Functions</h5>
-<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 <span class="monospaced">half</span>, and <span class="monospaced">half{2|3|4|8|16}</span> as arguments and return values. <span class="monospaced">gentype</span> now also includes <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>, and <span class="monospaced">half16</span>.</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"
-style="
-width:100%;
-">
-<caption class="title">Table 1. <em>Half Precision Built-in Math Functions</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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 consine.</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.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">gentype <strong>fmax</strong> (gentype x, gentype y)<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. 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>, half <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>, 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 ).<br>
-<br>
-<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>
-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 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><sup>2</sup>+ <em>y</em><sup>2</sup> 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> (half<em>n</em> <em>x</em>)<br>
-int <strong>ilogb</strong> (half <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">half<em>n</em> <strong>ldexp</strong> (half<em>n</em> <em>x</em>, int<em>n</em> <em>k</em>)<br>
-half<em>n</em> <strong>ldexp</strong> (half<em>n</em> <em>x</em>, int <em>k</em>)<br>
-half <strong>ldexp</strong> (half <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>
-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. 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> approximates <em>a</em> * <em>b</em> + <em>c</em>. Whether or how the product of <em>a</em> * <em>b</em> is rounded and how supernormal or subnormal intermediate products are handled is not defined. <strong>mad</strong> is intended to be used where speed is preferred over accuracy<span class="footnote"><br>[The user is cautioned that 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.]<br></span>.</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>, 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">half<em>n</em> <strong>nan</strong> (ushort<em>n</em> <em>nancode</em>)<br>
-half <strong>nan</strong> (ushort <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 half-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">half<em>n</em> <strong>pown</strong> (half<em>n</em> <em>x</em>, int<em>n</em> <em>y</em>)<br>
-half <strong>pown</strong> (half <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">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>. 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">half<em>n</em> <strong>rootn</strong> (half<em>n</em> <em>x</em>, int<em>n</em> <em>y</em>)<br>
-half <strong>rootn</strong> (half <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>, 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>The <strong>FP_FAST_FMA_HALF</strong> macro indicates whether the <strong>fma()</strong> family of functions are fast compared with direct code for half precision 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></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"><!-- Generator: 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 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"
-style="
-width:100%;
-">
-<col style="width:50%;">
-<col style="width:50%;">
-<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>HALF_DIG</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_HALF_DIG</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>HALF_MANT_DIG</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_HALF_MANT_DIG</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>HALF_MAX_10_EXP</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_HALF_MAX_10_EXP</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>HALF_MAX_EXP</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_HALF_MAX_EXP</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>HALF_MIN_10_EXP</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_HALF_MIN_10_EXP</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>HALF_MIN_EXP</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_HALF_MIN_EXP</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>HALF_RADIX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_HALF_RADIX</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>HALF_MAX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_HALF_MAX</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>HALF_MIN</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_HALF_MIN</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>HALF_EPSILSON</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_HALF_EPSILON</strong></p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>The following constants are also available. They are of type <span class="monospaced">half</span> and are accurate within the precision of the <span class="monospaced">half</span> type.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:50%;">
-<col style="width:50%;">
-<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_H</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_H</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_H</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_H</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_H</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_H</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_H</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_H</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_H</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_H</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_H</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_H</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_H</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="sect4">
-<h5 id="cl_khr_fp16-common-functions">Common Functions<span class="footnote"><br>[The half precision <strong>mix</strong> and <strong>smoothstep</strong> functions can be implemented using contractions such as <strong>mad</strong> or <strong>fma</strong>.]<br></span></h5>
-<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 <span class="monospaced">half</span>, <span class="monospaced">and half{2|3|4|8|16}</span> as arguments and return values. gentype now also includes <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> and <span class="monospaced">half16</span>. These are described below.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 2. <em>Half Precision Built-in Common Functions</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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>)<br>
-<br>
-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>).<br>
-<br>
-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>, 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 <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>, half <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>, 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:<br>
-<br>
-<em>x</em> + (<em>y</em> – <em>x)</em> * <em>a</em><br>
-<br>
-<em>a</em> must be a value in the range 0.0 &#8230; 1.0. If <em>a</em> is not in the range 0.0 &#8230; 1.0, the return values are undefined.</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> (half <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>
-<br>
-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.<br>
-<br>
-This is equivalent to:<br>
-<br>
-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>
-<br>
-Results are undefined if <em>edge0</em> &gt;= <em>edge1</em>.</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="sect4">
-<h5 id="cl_khr_fp16-geometric-functions">Geometric Functions<span class="footnote"><br>[The half precision geometric functions can be implemented using contractions such as <strong>mad</strong> or <strong>fma</strong>.]<br></span></h5>
-<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 half, and half{2|3|4} as arguments and return values. gentype now also includes half, half2, half3 and half4. These are described below.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 3. <em>Half Precision Built-in Geometric Functions</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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">half4 <strong>cross</strong> (half4 <em>p0</em>, half4 <em>p1</em>)<br>
-half3 <strong>cross</strong> (half3 <em>p0</em>, half3 <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">half <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">half <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">half <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; )</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="sect4">
-<h5 id="cl_khr_fp16-relational-functions">Relational Functions</h5>
-<div class="paragraph"><p>The scalar and vector relational functions described in <em>table 6.14</em> are extended to include versions that take <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> and <span class="monospaced">half16</span> as arguments.</p></div>
-<div class="paragraph"><p>The relational and equality operators (&lt;, &lt;=, &gt;, &gt;=, !=, ==) can be used with <span class="monospaced">halfn</span> vector types and shall produce a vector <span class="monospaced">shortn</span> 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 <span class="monospaced">halfn</span> vector types.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 4. <em>Half Precision Relational Functions</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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> (half <em>x</em>, half <em>y</em>)<br>
-short<em>n</em> <strong>isequal</strong> (half<em>n x</em>, half<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> (half <em>x</em>, half <em>y</em>)<br>
-short<em>n</em> <strong>isnotequal</strong> (half<em>n x</em>, half<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> (half <em>x</em>, half <em>y</em>)<br>
-short<em>n</em> <strong>isgreater</strong> (half<em>n x</em>, half<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> (half <em>x</em>, half <em>y</em>)<br>
-short<em>n</em> <strong>isgreaterequal</strong> (half<em>n x</em>, half<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> (half <em>x</em>, half <em>y</em>)<br>
-short<em>n</em> <strong>isless</strong> (half<em>n x</em>, half<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> (half <em>x</em>, half <em>y</em>)<br>
-short<em>n</em> <strong>islessequal</strong> (half<em>n x</em>, half<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> (half <em>x</em>, half <em>y</em>)<br>
-short<em>n</em> <strong>islessgreater</strong> (half<em>n x</em>, half<em>n y</em>)</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Returns the component-wise compare of (<em>x_ &lt; _y</em>) || (<em>x_ &gt; _y</em>) .</p></td>
-</tr>
-<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>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">int <strong>isfinite</strong> (half)<br>
-short<em>n</em> <strong>isfinite</strong> (half<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> (half)<br>
-short<em>n</em> <strong>isinf</strong> (half<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> (half)<br>
-short<em>n</em> <strong>isnan</strong> (half<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> (half)<br>
-short<em>n</em> <strong>isnormal</strong> (half<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> (half <em>x</em>, half <em>y</em>)<br>
-short<em>n</em> <strong>isordered</strong> (half<em>n x</em>, half<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> (half <em>x</em>, half <em>y</em>)<br>
-short<em>n</em> <strong>isunordered</strong> (half<em>n x</em>, half<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> (half)<br>
-short<em>n</em> <strong>signbit</strong> (half<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 half is set else returns 0. The vector version of the function returns the following for each component in half<em>n</em>: -1
-(i.e all bits set) if the sign bit in the half is set else returns 0.</p></td>
-</tr>
-<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>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half<em>n</em> <strong>bitselect</strong> (half<em>n a</em>, half<em>n b</em>, half<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">half<em>n</em> <strong>select</strong> (half<em>n a</em>, half<em>n b</em>, short<em>n</em> <em>c</em>)<br>
-half<em>n</em> <strong>select</strong> (half<em>n a</em>, half<em>n b</em>, ushort<em>n</em> <em>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="sect4">
-<h5 id="cl_khr_fp16-vector-data-load-and-store-functions">Vector Data Load and Store Functions</h5>
-<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 versions that read from or write to half scalar or vector values. The generic type <span class="monospaced">gentype</span> is extended to include <span class="monospaced">half</span>. The generic type <span class="monospaced">gentypen</span> is extended to include <span class="monospaced">half</span>, <span class="monospaced">half2</span>, <span class="monospaced">half3</span> <span class="footnote"><br>[<strong>vload3</strong> reads <em>x</em>, <em>y</em>, <em>z</em> components from address (<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)).]<br></span>, <span class="monospaced">half4</span>, <span class="monospaced">half8</span>, and <span class="monospaced">half16</span>.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 5. <em>Half Precision Vector Data Load and Store Functions</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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><br>
-(size_t <em>offset</em>, const gentype *<em>p</em>)<br>
-<br>
-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">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">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 aligned.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect4">
-<h5 id="cl_khr_fp16-async-copies-from-global-to-local-memory-local-to-global-memory-and-prefetch">Async Copies from Global to Local Memory, Local to Global Memory, and Prefetch</h5>
-<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 <span class="monospaced">gentype</span> is extended to include <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>, and <span class="monospaced">half16</span>.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 6. <em>Half Precision Built-in Async Copy and Prefetch Functions</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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>
-<em>local gentype <em>*dst</em>, const </em>global gentype *<em>src</em>,<br>
-size_t <em>num_gentypes</em>, event_t <em>event</em>)<br>
-<br>
-event_t <strong>async_work_group_copy</strong> (<br>
-<em>global gentype <em>*dst</em>, const </em>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.<br>
-<br>
-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.<br>
-<br>
-If <em>event</em> argument is not zero, the event object supplied in <em>event</em> argument will be returned.<br>
-<br>
-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" ><p class="tableblock"></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">event_t <strong>async_work_group_strided_copy</strong> (<br>
-<em>local gentype <em>*dst</em>, const </em>global gentype *<em>src</em>,<br>
-size_t <em>num_gentypes</em>, size_t <em>src_stride</em>, event_t <em>event</em>)<br>
-<br>
-event_t <strong>async_work_group_strided_copy</strong> (<br>
-<em>global gentype <em>*dst</em>, const </em>local gentype *<em>src</em>,<br>
-size_t <em>num_gentypes</em>, 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.<br>
-<br>
-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.<br>
-<br>
-If <em>event</em> argument is not zero, the event object supplied in <em>event</em> argument will be returned.<br>
-<br>
-This function does not perform any implicit synchronization of source data such as using a <strong>barrier</strong> before performing the copy.<br>
-<br>
-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" ><p class="tableblock"></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">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.<br>
-<br>
-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 <em>_global gentype *_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="sect4">
-<h5 id="cl_khr_fp16-image-read-and-write-functions">Image Read and Write Functions</h5>
-<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 <span class="monospaced">half</span> type.</p></div>
-</div>
-<div class="sect4">
-<h5 id="_built_in_image_read_functions">Built-in Image Read Functions</h5>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 7. <em>Half Precision Built-in Image Read Functions</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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">half4 <strong>read_imageh</strong> (<br>
-read_only image2d_t <em>image</em>,<br>
-sampler_t <em>sampler</em>,<br>
-int2 <em>coord</em>)<br>
-<br>
-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>.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [0.0 &#8230; 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.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [-1.0 &#8230; 1.0] for image objects created with <em>image_channel_data_type</em> set to CL_SNORM_INT8, or CL_SNORM_INT16.<br>
-<br>
-<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.<br>
-<br>
-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.<br>
-<br>
-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"></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">half4 <strong>read_imageh</strong> (<br>
-read_only image3d_t <em>image</em>,<br>
-sampler_t <em>sampler</em>,<br>
-int4 <em>coord</em> )<br>
-<br>
-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.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [0.0 &#8230; 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.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [-1.0 &#8230; 1.0] for image objects created with <em>image_channel_data_type</em> set to CL_SNORM_INT8, or CL_SNORM_INT16.<br>
-<br>
-<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.<br>
-<br>
-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.<br>
-<br>
-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>
-<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>
-</tr>
-<tr>
-<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>)<br>
-<br>
-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>.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [0.0 &#8230; 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.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [-1.0 &#8230; 1.0] for image objects created with image_channel_data_type set to CL_SNORM_INT8, or CL_SNORM_INT16.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values for image objects created with image_channel_data_type set to CL_HALF_FLOAT.<br>
-<br>
-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.<br>
-<br>
-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>
-<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>
-</tr>
-<tr>
-<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>)<br>
-<br>
-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>.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [0.0 &#8230; 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.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [-1.0 &#8230; 1.0] for image objects created with <em>image_channel_data_type</em> set to CL_SNORM_INT8, or CL_SNORM_INT16.<br>
-<br>
-<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.<br>
-<br>
-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.<br>
-<br>
-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"></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">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>)<br>
-<br>
-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>.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [0.0 &#8230; 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.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [-1.0 &#8230; 1.0] for image objects created with image_channel_data_type set to CL_SNORM_INT8, or CL_SNORM_INT16.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values for image objects created with image_channel_data_type set to CL_HALF_FLOAT.<br>
-<br>
-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.
-<br>
-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>
-</tbody>
-</table>
-</div>
-<div class="sect4">
-<h5 id="_built_in_image_sampler_less_read_functions">Built-in Image Sampler-less Read Functions</h5>
-<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"
-style="
-width:100%;
-">
-<caption class="title">Table 8. <em>Half Precision Built-in Image Sampler-less Read Functions</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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">half4 <strong>read_imageh</strong> (<br>
-<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>.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [0.0 &#8230; 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.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [-1.0 &#8230; 1.0] for image objects created with <em>image_channel_data_type</em> set to CL_SNORM_INT8, or CL_SNORM_INT16.<br>
-<br>
-<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.<br>
-<br>
-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> 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.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [0.0 &#8230; 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.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [-1.0 &#8230; 1.0] for image objects created with <em>image_channel_data_type</em> set to CL_SNORM_INT8, or CL_SNORM_INT16.
-<br>
-<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.<br>
-<br>
-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>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">half4 <strong>read_imageh</strong> (<br>
-<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>.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [0.0 &#8230; 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.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [-1.0 &#8230; 1.0] for image objects created with <em>image_channel_data_type</em> set to CL_SNORM_INT8, or CL_SNORM_INT16.<br>
-<br>
-<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.<br>
-<br>
-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>)<br>
-<br>
-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>.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [0.0 &#8230; 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.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [-1.0 &#8230; 1.0] for image objects created with <em>image_channel_data_type</em> set to CL_SNORM_INT8, or CL_SNORM_INT16.<br>
-<br>
-<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.<br>
-<br>
-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_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>.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [0.0 &#8230; 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.<br>
-<br>
-<strong>read_imageh</strong> returns half precision floating-point values in the range [-1.0 &#8230; 1.0] for image objects created with <em>image_channel_data_type</em> set to CL_SNORM_INT8, or CL_SNORM_INT16.<br>
-<br>
-<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.<br>
-<br>
-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>
-</tbody>
-</table>
-</div>
-<div class="sect4">
-<h5 id="_built_in_image_write_functions">Built-in Image Write Functions</h5>
-<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"
-style="
-width:100%;
-">
-<caption class="title">Table 9. <em>Half Precision Built-in Image Write Functions</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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_imageh</strong> (<br>
-<em>aQual</em> image2d_t <em>image</em>,<br>
-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>.<br>
-<br>
-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; width – 1, and 0 &#8230; height – 1.<br>
-<br>
-<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.<br>
-<br>
-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; width – 1, 0 &#8230; height – 1) respectively, is undefined.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">void <strong>write_imageh</strong> (<br>
-<em>aQual</em> image2d_array_t <em>image</em>,<br>
-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>.<br>
-<br>
-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; image width – 1, 0 &#8230; image height – 1 and 0 &#8230; image number of layers – 1.<br>
-<br>
-<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.<br>
-<br>
-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; image width – 1, 0 &#8230; image height – 1, 0 &#8230; image number of layers – 1), respectively, is undefined.</p></td>
-</tr>
-<tr>
-<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>)<br>
-<br>
-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>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Write <em>color</em> value to location specified by <em>coord</em> in the 1D image or 1D image buffer object specified by <em>image</em>. 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; image width – 1.<br>
-<br>
-<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.<br>
-<br>
-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; image width – 1), is undefined.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">void <strong>write_imageh</strong> (<br>
-<em>aQual</em> image1d_array_t <em>image</em>,<br>
-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.x</em> in the 1D image identified by <em>coord.y</em> in the 1D image array specified by <em>image</em>. 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; image width – 1 and 0 &#8230; image number of layers – 1.<br>
-<br>
-<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.<br>
-<br>
-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; image width – 1, 0 &#8230; image number of layers – 1), respectively, is undefined.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">void <strong>write_imageh</strong> (<br>
-<em>aQual</em> image3d_t <em>image</em>,<br>
-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>.<br>
-<br>
-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; image width – 1, 0 &#8230; image height – 1 and 0 &#8230; image depth – 1.<br>
-<br>
-<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.<br>
-<br>
-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; image width – 1, 0 &#8230; image height – 1, 0 &#8230; image depth – 1), respectively, is undefined.<br>
-<br>
-NOTE: This built-in function is only available in the cl_khr_3d_image_writes extension is also supported by the device.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect4">
-<h5 id="cl_khr_fp16-ieee754-compliance">IEEE754 Compliance</h5>
-<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"
-style="
-width:100%;
-">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:50%;">
-<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_HALF_<br>
-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:<br>
-<br>
-CL_FP_DENORM – denorms are supported<br>
-<br>
-CL_FP_INF_NAN – INF and NaNs are supported<br>
-<br>
-CL_FP_ROUND_TO_NEAREST – round to nearest even rounding mode supported<br>
-<br>
-CL_FP_ROUND_TO_ZERO – round to zero rounding mode supported<br>
-<br>
-CL_FP_ROUND_TO_INF – round to positive and negative infinity rounding modes supported<br>
-<br>
-CP_FP_FMA – IEEE754-2008 fused multiply-add is supported<br>
-<br>
-CL_FP_SOFT_FLOAT – Basic floating-point operations (such as addition, subtraction, multiplication) are implemented in software.<br>
-<br>
-The required minimum half precision floating-point capability as implemented by this extension is:<br>
-<br>
-CL_FP_ROUND_TO_ZERO, or<br>
-CL_FP_ROUND_TO_NEAREST | CL_FP_INF_NAN.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect4">
-<h5 id="cl_khr_fp16-rounding-modes">Rounding Modes</h5>
-<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; otherwise the default rounding mode will be round to zero.</p></div>
-<div class="paragraph"><p>Conversions to half floating point format must be correctly rounded using the indicated <span class="monospaced">convert</span> operator rounding mode or the default rounding mode for half-precision floating-point operations if no rounding mode is specified by the operator, or a C-style cast is used.</p></div>
-<div class="paragraph"><p>Conversions from half to integer format shall correctly round using the indicated <span class="monospaced">convert</span> operator rounding mode, or towards zero if no rounding mode is specified by the operator or a C-style cast is used. All conversions from half to floating point formats are exact.</p></div>
-</div>
-<div class="sect4">
-<h5 id="cl_khr_fp16-relative-error-as-ulps">Relative Error as ULPs</h5>
-<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 operations on half types are required to be correctly rounded using the default rounding mode for half-precision floating-point operations.</p></div>
-<div class="paragraph"><p>The following table describes the minimum accuracy of half 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"
-style="
-width:100%;
-">
-<caption class="title">Table 10. <em>ULP Values for Half Precision Floating-Point Arithmetic Operations</em></caption>
-<col style="width:33%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Function</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Min Accuracy - Full Profile</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Min Accuracy - Embedded Profile</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>
-<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>
-<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>
-<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>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 1 ulp</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>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 1 ulp</p></td>
-</tr>
-<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"></p></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;= 2 ulp</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>acosh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>acospi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>asin</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>asinh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>asinpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>atan</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>atanh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>atanpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>atan2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>atan2pi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>cbrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>
-<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>
-<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;= 2 ulp</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>cosh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>cospi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>erfc</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>erf</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>exp</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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;= 2 ulp</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;= 2 ulp</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;= 2 ulp</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>
-<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>
-<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>
-<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>
-<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>
-<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>
-<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>
-<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>
-<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>
-<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;= 2 ulp</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>ilogb</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>
-<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;= 2 ulp</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;= 2 ulp</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;= 2 ulp</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>
-<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>logb</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>
-<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>
-<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>
-<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>
-<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>
-<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>
-<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;= 4 ulp</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>pown(x, y)</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>powr(x, y)</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>remainder</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0 ulp</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>
-<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>
-<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;= 4 ulp</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>round</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</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;=1 ulp</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;=1 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;= 2 ulp</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>sincos</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp for sine and cosine values</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 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;= 2 ulp</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>sinpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>sqrt</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 1 ulp</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;= 2 ulp</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>tanh</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>tanpi</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 2 ulp</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>tgamma</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&lt;= 4 ulp</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>trunc</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Correctly rounded</p></td>
-</tr>
-</tbody>
-</table>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content"><em>Implementations may perform floating-point operations on</em> <span class="monospaced">half</span> <em>scalar or vector data types by converting the</em> <span class="monospaced">half</span> <em>values to single precision floating-point values and performing the operation in single precision floating-point. In this case, the implementation will use the</em> <span class="monospaced">half</span> <em>scalar or vector data type as a storage only format</em>.</td>
-</tr></table>
-</div>
-<div style="page-break-after:always"></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_gl_sharing">Creating an OpenCL Context from an OpenGL Context or Share Group</h3>
-<div class="sect3">
-<h4 id="cl_khr_gl_sharing-overview">Overview</h4>
-<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 OpenGL Objects</a> defines how to share data with texture and buffer objects in a parallel OpenGL implementation, but does not define how the association between an OpenCL context and an OpenGL context or share group is established. This extension defines optional attributes to OpenCL context creation routines which associate a OpenGL context or share group object with a newly created OpenCL context.</p></div>
-<div class="paragraph"><p>An OpenGL implementation supporting buffer objects and sharing of texture and buffer object images with OpenCL is required by this extension.</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_sharing-new-procedures-and-functions">New Procedures and 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: #008080">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clGetGLContextInfoKHR</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_context_properties</span> <span style="color: #990000">*</span>properties<span style="color: #990000">,</span>
-                             <span style="color: #008080">cl_gl_context_info</span> param_name<span style="color: #990000">,</span>
-                             <span style="color: #008080">size_t</span> param_value_size<span style="color: #990000">,</span>
-                             <span style="color: #009900">void</span> <span style="color: #990000">*</span>param_value<span style="color: #990000">,</span>
-                             <span style="color: #008080">size_t</span> <span style="color: #990000">*</span>param_value_size_ret<span style="color: #990000">);</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_sharing-new-tokens">New Tokens</h4>
-<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 handle is specified in <em>properties</em>:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR      -1000</pre>
-</div></div>
-<div class="paragraph"><p>Accepted as the <em>param_name</em> argument of <strong>clGetGLContextInfoKHR</strong>:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR        0x2006
-CL_DEVICES_FOR_GL_CONTEXT_KHR               0x2007</pre>
-</div></div>
-<div class="paragraph"><p>Accepted as an attribute name in the <em>properties</em> argument of <strong>clCreateContext</strong> and <strong>clCreateContextFromType</strong>:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<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>
-</div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_sharing-additions-to-chapter-4">Additions to Chapter 4 of the OpenCL 2.2 Specification</h4>
-<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>"<em>properties</em> points to an attribute list, which is a array of ordered &lt;attribute name, value&gt; pairs terminated with zero. If an attribute 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 NULL or empty (points to a list whose first value is zero), all attributes take on their default values.</p></div>
-<div class="paragraph"><p>Attributes control sharing of OpenCL memory objects with OpenGL buffer, texture, and renderbuffer objects. Depending on the platform-specific API used to bind OpenGL contexts to the window system, the following attributes may be set to identify an OpenGL context:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-When the CGL binding API is supported, the attribute CL_CGL_SHAREGROUP_KHR should be set to a CGLShareGroup handle to a CGL share group object.
-</p>
-</li>
-<li>
-<p>
-When the EGL binding API is supported, the attribute CL_GL_CONTEXT_KHR should be set to an EGLContext handle to an OpenGL ES or OpenGL context, and the attribute CL_EGL_DISPLAY_KHR should be set to the EGLDisplay handle of the display used to create the OpenGL ES or OpenGL context.
-</p>
-</li>
-<li>
-<p>
-When the GLX binding API is supported, the attribute CL_GL_CONTEXT_KHR should be set to a GLXContext handle to an OpenGL context, and the attribute CL_GLX_DISPLAY_KHR should be set to the Display handle of the X Window System display used to create the OpenGL context.
-</p>
-</li>
-<li>
-<p>
-When the WGL binding API is supported, the attribute CL_GL_CONTEXT_KHR should be set to an HGLRC handle to an OpenGL context, and the attribute CL_WGL_HDC_KHR should be set to the HDC handle of the display used to create the OpenGL context.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Memory objects created in the context so specified may be shared with the specified OpenGL or OpenGL ES context (as well as with any other OpenGL contexts on the share list of that context, according to the description of sharing in the GLX 1.4 and EGL 1.4 specifications, and the WGL documentation for OpenGL implementations on Microsoft Windows), or with the explicitly identified OpenGL share group for CGL. If no OpenGL or OpenGL ES context or share group is specified in the attribute list, then memory objects may not be shared, and calling any of the commands described in <a href="#cl_khr_gl_sharing__memobjs">Creating OpenCL Memory Objects from OpenGL Objects</a> will result in a CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR error."</p></div>
-<div class="paragraph"><p>OpenCL / OpenGL sharing does not support the CL_CONTEXT_INTEROP_USER_SYNC property defined in <em>table 4.5</em>. Specifying this property when creating a context with OpenCL / OpenGL sharing will return an appropriate error.</p></div>
-<div class="paragraph"><p>Add to <em>table 4.5</em>:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 11. <em>OpenGL Sharing Context Creation Attributes</em></caption>
-<col style="width:33%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>Attribute Name</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Allowed Values</strong>
-
-<strong>(Default value is in bold)</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">CL_GL_CONTEXT_KHR</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>0</strong>, OpenGL context handle</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">OpenGL context to associated the OpenCL context with</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_CGL_SHAREGROUP_KHR</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>0</strong>, CGL share group handle</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CGL share group to associate the OpenCL context with</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_EGL_DISPLAY_KHR</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>EGL_NO_DISPLAY</strong>, EGLDisplay handle</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">EGLDisplay an OpenGL context was created with respect to</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_GLX_DISPLAY_KHR</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>None</strong>, X handle</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">X Display an OpenGL context was created with respect to</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_WGL_HDC_KHR</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>0</strong>, HDC handle</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">HDC an OpenGL context was created with respect to</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>Replace the first error in the list for <strong>clCreateContext</strong> with:</p></div>
-<div class="paragraph"><p>"<em>errcode_ret</em> returns CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR if a context was specified by any of the following means:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A context was specified for an EGL-based OpenGL ES or OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_EGL_DISPLAY_KHR.
-</p>
-</li>
-<li>
-<p>
-A context was specified for a GLX-based OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_GLX_DISPLAY_KHR.
-</p>
-</li>
-<li>
-<p>
-A context was specified for a WGL-based OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_WGL_HDC_KHR
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>and any of the following conditions hold:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The specified display and context attributes do not identify a valid OpenGL or OpenGL ES context.
-</p>
-</li>
-<li>
-<p>
-The specified context does not support buffer and renderbuffer objects.
-</p>
-</li>
-<li>
-<p>
-The specified context is not compatible with the OpenCL context being created (for example, it exists in a physically distinct address space, such as another hardware device; or it does not support sharing data with OpenCL due to implementation restrictions).
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><em>errcode_ret</em> returns CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR if a share group was specified for a CGL-based OpenGL implementation by setting the attribute CL_CGL_SHAREGROUP_KHR, and the specified share group does not identify a valid CGL share group object.</p></div>
-<div class="paragraph"><p><em>errcode_ret</em> returns CL_INVALID_OPERATION if a context was specified as described above and any of the following conditions hold:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A context or share group object was specified for one of CGL, EGL, GLX, or WGL and the OpenGL implementation does not support that window-system binding API.
-</p>
-</li>
-<li>
-<p>
-More than one of the attributes CL_CGL_SHAREGROUP_KHR, CL_EGL_DISPLAY_KHR, CL_GLX_DISPLAY_KHR, and CL_WGL_HDC_KHR is set to a non-default value.
-</p>
-</li>
-<li>
-<p>
-Both of the attributes CL_CGL_SHAREGROUP_KHR and CL_GL_CONTEXT_KHR are set to non-default values.
-</p>
-</li>
-<li>
-<p>
-Any of the devices specified in the <em>devices</em> argument cannot support OpenCL objects which share the data store of an OpenGL object.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><em>errcode_ret</em> returns CL_INVALID_PROPERTY if an attribute name other than those specified in <em>table 4.5</em> or if CL_CONTEXT_INTEROP_USER_SYNC is specified in <em>properties</em>."</p></div>
-<div class="paragraph"><p>Replace the description of <em>properties</em> under <strong>clCreateContextFromType</strong> with:</p></div>
-<div class="paragraph"><p>"<em>properties</em> points to an attribute list whose format and valid contents are identical to the <strong>properties</strong> argument of <strong>clCreateContext</strong>."</p></div>
-<div class="paragraph"><p>Replace the first error in the list for <strong>clCreateContextFromType</strong> with the same two new errors described above for <strong>clCreateContext</strong>.</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_sharing-additions-to-chapter-5">Additions to Chapter 5 of the OpenCL 2.2 Specification</h4>
-<div class="paragraph"><p>Add a new section to describe the new API for querying OpenCL devices that support sharing with OpenGL:</p></div>
-<div class="paragraph"><p>"OpenCL device(s) corresponding to an OpenGL context may be queried. Such a device may not always exist (for example, if an OpenGL context is specified on a GPU not supporting OpenCL command queues, but which does support shared CL/GL objects), and if it does exist, may change over time. When such a device does exist, acquiring and releasing shared CL/GL objects may be faster on a command queue corresponding to this device than on command queues corresponding to other devices available to an OpenCL context. To query the currently corresponding device, use the function</p></div>
-<div class="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clGetGLContextInfoKHR</span></span><span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_context_properties</span> <span style="color: #990000">*</span>properties<span style="color: #990000">,</span>
-                             <span style="color: #008080">cl_gl_context_info</span> param_name<span style="color: #990000">,</span>
-                             <span style="color: #008080">size_t</span> param_value_size<span style="color: #990000">,</span>
-                             <span style="color: #009900">void</span> <span style="color: #990000">*</span>param_value<span style="color: #990000">,</span>
-                             <span style="color: #008080">size_t</span> <span style="color: #990000">*</span>param_value_size_ret<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p><em>properties</em> points to an attribute list whose format and valid contents are identical to the <em>properties</em> argument of <strong>clCreateContext</strong>. <em>properties</em> must identify a single valid GL context or GL share group object.</p></div>
-<div class="paragraph"><p><em>param_name</em> is a constant that specifies the device types to query, and must be one of the values shown in the table below.</p></div>
-<div class="paragraph"><p><em>param_value</em> is a pointer to memory where the result of the query is returned as described in the table below. If <em>param_value</em> is NULL, it is ignored.</p></div>
-<div class="paragraph"><p><em>param_value_size</em> specifies the size in bytes of memory pointed to by <em>param_value</em>. This size must be greater than or equal to the size of the return type described in the table below.</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_value</em>. If <em>param_value_size_ret</em> is NULL, it is ignored.</p></div>
-<table class="tableblock frame-all grid-all" id="cl_khr_gl_sharing-clGetGLContextInfoKHR-table"
-style="
-width:100%;
-">
-<caption class="title">Table 12. <em>Supported Device Types for</em> <strong>clGetGLContextInfoKHR</strong></caption>
-<col style="width:40%;">
-<col style="width:20%;">
-<col style="width:40%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>param_name</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">CL_CURRENT_DEVICE_FOR_<br>
-GL_CONTEXT_KHR</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_device_id</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return the OpenCL device currently associated with the specified OpenGL context.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICES_FOR_<br>
-GL_CONTEXT_KHR</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_device_id[]</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return all OpenCL devices which may be associated with the specified OpenGL context.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><strong>clGetGLContextInfoKHR</strong> returns CL_SUCCESS if the function is executed successfully. If no device(s) exist corresponding to <em>param_name</em>, the call will not fail, but the value of <em>param_value_size_ret</em> will be zero.</p></div>
-<div class="paragraph"><p><strong>clGetGLContextInfoKHR</strong> returns CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR if a context was specified by any of the following means:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A context was specified for an EGL-based OpenGL ES or OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_EGL_DISPLAY_KHR.
-</p>
-</li>
-<li>
-<p>
-A context was specified for a GLX-based OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_GLX_DISPLAY_KHR.
-</p>
-</li>
-<li>
-<p>
-A context was specified for a WGL-based OpenGL implementation by setting the attributes CL_GL_CONTEXT_KHR and CL_WGL_HDC_KHR.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>and any of the following conditions hold:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The specified display and context attributes do not identify a valid OpenGL or OpenGL ES context.
-</p>
-</li>
-<li>
-<p>
-The specified context does not support buffer and renderbuffer objects.
-</p>
-</li>
-<li>
-<p>
-The specified context is not compatible with the OpenCL context being created (for example, it exists in a physically distinct address space, such as another hardware device; or it does not support sharing data with OpenCL due to implementation restrictions).
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><strong>clGetGLContextInfoKHR</strong> returns CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR if a share group was specified for a CGL-based OpenGL implementation by setting the attribute CL_CGL_SHAREGROUP_KHR, and the specified share group does not identify a valid CGL share group object.</p></div>
-<div class="paragraph"><p><strong>clGetGLContextInfoKHR</strong> returns CL_INVALID_OPERATION if a context was specified as described above and any of the following conditions hold:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A context or share group object was specified for one of CGL, EGL, GLX, or WGL and the OpenGL implementation does not support that window-system binding API.
-</p>
-</li>
-<li>
-<p>
-More than one of the attributes CL_CGL_SHAREGROUP_KHR, CL_EGL_DISPLAY_KHR, CL_GLX_DISPLAY_KHR, and CL_WGL_HDC_KHR is set to a non-default value.
-</p>
-</li>
-<li>
-<p>
-Both of the attributes CL_CGL_SHAREGROUP_KHR and CL_GL_CONTEXT_KHR are set to non-default values.
-</p>
-</li>
-<li>
-<p>
-Any of the devices specified in the &lt;devices&gt; argument cannot support OpenCL objects which share the data store of an OpenGL object.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><strong>clGetGLContextInfoKHR</strong> returns CL_INVALID_VALUE if an attribute name other than those specified in <em>table 4.5</em> is specified in <em>properties</em>.</p></div>
-<div class="paragraph"><p>Additionally, <strong>clGetGLContextInfoKHR</strong> returns CL_INVALID_VALUE if <em>param_name</em> is not one of the values listed in the table <a href="#cl_khr_gl_sharing-clGetGLContextInfoKHR-table"><em>GL context information that can be queried with</em> <strong>clGetGLContextInfoKHR</strong></a>, or if the size in bytes specified by <em>param_value_size</em> is less than the size of the return type shown in the table and <em>param_value</em> is not a NULL value; CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device; or CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host."</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_sharing-issues">Issues</h4>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-How should the OpenGL context be identified when creating an associated OpenCL context?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>RESOLVED: by using a (display,context handle) attribute pair to identify
-an arbitrary OpenGL or OpenGL ES context with respect to one of the
-window-system binding layers EGL, GLX, or WGL, or a share group handle
-to identify a CGL share group. If a context is specified, it need not be
-current to the thread calling clCreateContext*.</p></div>
-<div class="paragraph"><p>A previously suggested approach would use a single boolean attribute
-CL_USE_GL_CONTEXT_KHR to allow creating a context associated with the
-currently bound OpenGL context. This may still be implemented as a
-separate extension, and might allow more efficient acquire/release
-behavior in the special case where they are being executed in the same
-thread as the bound GL context used to create the CL context.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-What should the format of an attribute list be?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>After considerable discussion, we think we can live with a list of
-&lt;attribute name,value&gt; pairs terminated by zero. The list is passed as
-<em>cl_context_properties *<em>properties'</em>, where cl_context_properties is
-typedefed to be 'intptr_t</em> in cl.h.</p></div>
-<div class="paragraph"><p>This effectively allows encoding all scalar integer, pointer, and handle
-values in the host API into the argument list and is analogous to the
-structure and type of EGL attribute lists. NULL attribute lists are also
-allowed. Again as for EGL, any attributes not explicitly passed in the
-list will take on a defined default value that does something
-reasonable.</p></div>
-<div class="paragraph"><p>Experience with EGL, GLX, and WGL has shown attribute lists to be a
-sufficiently flexible and general mechanism to serve the needs of
-management calls such as context creation. It is not completely general
-(encoding floating-point and non-scalar attribute values is not
-straightforward), and other approaches were suggested such as opaque
-attribute lists with getter/setter methods, or arrays of varadic
-structures.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-What&#8217;s the behavior of an associated OpenGL or OpenCL context when
-using resources defined by the other associated context, and that
-context is destroyed?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>RESOLVED: OpenCL objects place a
-reference on the data store underlying the corresponding GL object when
-they&#8217;re created. The GL name corresponding to that data store may be
-deleted, but the data store itself remains so long as any CL object has
-a reference to it. However, destroying all GL contexts in the share
-group corresponding to a CL context results in implementation-dependent
-behavior when using a corresponding CL object, up to and including
-program termination.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-How about sharing with D3D?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>Sharing between D3D and OpenCL should use the same attribute list
-mechanism, though obviously with different parameters, and be exposed as
-a similar parallel OpenCL extension. There may be an interaction between
-that extension and this one since it&#8217;s not yet clear if it will be
-possible to create a CL context simultaneously sharing GL and D3D
-objects.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-Under what conditions will context creation fail due to sharing?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>RESOLVED: Several cross-platform failure conditions are described (GL
-context or CGL share group doesn&#8217;t exist, GL context doesn&#8217;t support
-types of GL objects, GL context
-implementation doesn&#8217;t allow sharing), but additional failures may
-result due to implementation-dependent reasons and should be added to
-this extension as such failures are discovered. Sharing between OpenCL
-and OpenGL requires integration at the driver internals level.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-What command queues can <strong>clEnqueueAcquire/ReleaseGLObjects</strong> be placed on?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>RESOLVED: All command queues. This restriction is enforced at context
-creation time. If any device passed to context creation cannot support
-shared CL/GL objects, context creation will fail with a
-CL_INVALID_OPERATION error.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-How can applications determine which command queue to place an Acquire/Release on?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>RESOLVED: The <strong>clGetGLContextInfoKHR</strong> returns either the CL device
-currently corresponding to a specified GL context (typically the display
-it&#8217;s running on), or a list of all the CL devices the specified context
-might run on (potentially useful in multiheaded / "virtual screen"
-environments). This command is not simply placed in <a href="#cl_khr_gl_sharing__memobjs">Creating OpenCL Memory Objects from OpenGL Objects</a>
-because it relies on the same property-list method of specifying a GL
-context introduced by this extension.</p></div>
-<div class="paragraph"><p>If no devices are returned, it means that the GL context exists on an
-older GPU not capable of running OpenCL, but still capable of sharing
-objects between GL running on that GPU and CL running elsewhere.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-What is the meaning of the CL_DEVICES_FOR_GL_CONTEXT_KHR query?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>RESOLVED: The list of all CL devices that may ever be associated with a
-specific GL context. On platforms such as MacOS X, the "virtual screen"
-concept allows multiple GPUs to back a single virtual display. Similar
-functionality might be implemented on other windowing systems, such as a
-transparent heterogenous multiheaded X server. Therefore the exact
-meaning of this query is interpreted relative to the binding layer API
-in use.</p></div>
-</div></div>
-</li>
-</ol></div>
-<div style="page-break-after:always"></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_gl_sharing__memobjs">Creating OpenCL Memory Objects from OpenGL Objects</h3>
-<div class="paragraph"><p>This section describes OpenCL functions that allow applications to use OpenGL buffer, texture and renderbuffer objects as OpenCL memory objects. This allows efficient sharing of data between OpenCL and OpenGL. The OpenCL API may be used to execute kernels that read and/or write memory objects that are also OpenGL objects.</p></div>
-<div class="paragraph"><p>An OpenCL image object may be created from an OpenGL texture or renderbuffer object. An OpenCL buffer object may be created from an OpenGL buffer object.</p></div>
-<div class="paragraph"><p>OpenCL memory objects may be created from OpenGL objects if and only if the OpenCL context has been created from an OpenGL share group object or context. OpenGL share groups and contexts are created using platform specific APIs such as EGL, CGL, WGL, and GLX. On MacOS X, an OpenCL context may be created from an OpenGL share group object using the OpenCL platform extension <strong>cl_apple_gl_sharing</strong>.  On other platforms including Microsoft Windows, Linux/Unix, and others, an OpenCL context may be created from an OpenGL context using the extension <strong>cl_khr_gl_sharing</strong>. Refer to the platform documentation for your OpenCL implementation, or visit the Khronos Registry at <a href="http://www.khronos.org/registry/cl/">http://www.khronos.org/registry/cl/</a> for more information.</p></div>
-<div class="paragraph"><p>Any supported OpenGL object defined within the GL share group object, or the share group associated with the GL context from which the OpenCL context is created, may be shared, with the exception of the default OpenGL objects (i.e. objects named zero), which may not be shared.</p></div>
-<div class="sect3">
-<h4 id="cl_khr_gl_sharing__memobjs-lifetime-of-shared-objects">Lifetime of Shared Objects</h4>
-<div class="paragraph"><p>An OpenCL memory object created from an OpenGL object (hereinafter refered to as a "shared CL/GL object") 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>, <strong>glDeleteTextures,</strong> or <strong>glDeleteRenderbuffers</strong>), subsequent use of the CL buffer or image object will result in undefined behavior, including but not limited to possible CL errors and data corruption, but may not result in program termination.</p></div>
-<div class="paragraph"><p>The CL context and corresponding command-queues are dependent on the existence of the GL share group object, or the share group associated with the GL context from which the CL context is created. If the GL share group object or all GL contexts in the share group are destroyed, any use of the CL context or command-queue(s) will result in undefined behavior, which may include program termination. Applications should destroy the CL command-queue(s) and CL context before destroying the corresponding GL share group or contexts</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_sharing__memobjs-cl-buffer-objects-from-gl-buffer-objects">OpenCL Buffer Objects from OpenGL Buffer Objects</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromGLBuffer</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                            <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                            <span style="color: #008080">GLuint</span> bufobj<span style="color: #990000">,</span>
-                            <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>creates an OpenCL buffer object from an OpenGL buffer object.</p></div>
-<div class="paragraph"><p><em>context</em> is a valid OpenCL context created from an OpenGL context.</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>bufobj</em> is the name of a GL buffer object. The data store of the GL buffer object must have have been previously created by calling <strong>glBufferData</strong>, although its contents need not be initialized. The size of the data store will be used to determine the size of the CL buffer object.</p></div>
-<div class="paragraph"><p><em>errcode_ret</em> will return an appropriate error code as described below. If <em>errcode_ret</em> is NULL, no error code is returned.</p></div>
-<div class="paragraph"><p><strong>clCreateFromGLBuffer</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 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 or was not created from a GL context.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if values specified in <em>flags</em> are not valid.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_GL_OBJECT if <em>bufobj</em> is not a GL buffer object or is a GL buffer object but does not have an existing data store or the size of the buffer is 0.
-</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 size of the GL buffer object data store at the time <strong>clCreateFromGLBuffer</strong> is called will be used as the size of buffer object returned by <strong>clCreateFromGLBuffer</strong>. If the state of a GL buffer object is modified through the GL API (e.g. <strong>glBufferData</strong>) while there exists a corresponding CL buffer object, subsequent use of the CL buffer object will result in undefined behavior.</p></div>
-<div class="paragraph"><p>The <strong>clRetainMemObject</strong> and <strong>clReleaseMemObject</strong> functions can be used to retain and release the buffer object.</p></div>
-<div class="paragraph"><p>The CL buffer object created using clCreateFromGLBuffer can also be used to create a CL 1D image buffer object.</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_sharing__memobjs-cl-image-objects-from-gl-textures">OpenCL Image Objects from OpenGL Textures</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromGLTexture</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                             <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                             <span style="color: #008080">GLenum</span> texture_target<span style="color: #990000">,</span>
-                             <span style="color: #008080">GLint</span> miplevel<span style="color: #990000">,</span>
-                             <span style="color: #008080">GLuint</span> texture<span style="color: #990000">,</span>
-                             <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>creates the following:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-an OpenCL 2D image object from an OpenGL 2D texture object or a single face of an OpenGL cubemap texture object,
-</p>
-</li>
-<li>
-<p>
-an OpenCL 2D image array object from an OpenGL 2D texture array object,
-</p>
-</li>
-<li>
-<p>
-an OpenCL 1D image object from an OpenGL 1D texture object,
-</p>
-</li>
-<li>
-<p>
-an OpenCL 1D image buffer object from an OpenGL texture buffer object,
-</p>
-</li>
-<li>
-<p>
-an OpenCL 1D image array object from an OpenGL 1D texture array object,
-</p>
-</li>
-<li>
-<p>
-an OpenCL 3D image object from an OpenGL 3D texture object.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><em>context</em> is a valid OpenCL context created from an OpenGL context.</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> may be used.</p></div>
-<div class="paragraph"><p><em>texture_target</em> must be one of GL_TEXTURE_1D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_BUFFER, GL_TEXTURE_2D, GL_TEXTURE_2D_ARRAY, GL_TEXTURE_3D, 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 <span class="footnote"><br>[Requires OpenGL 3.1. Alternatively, GL_TEXTURE_RECTANGLE_ARB may be specified if the OpenGL extension <strong>GL_ARB_texture_rectangle</strong> is supported.]<br></span>. <em>texture_target</em> is used only to define the image type of <em>texture</em>. No reference to a bound GL texture object is made or implied by this parameter.</p></div>
-<div class="paragraph"><p><em>miplevel</em> is the mipmap level to be used <span class="footnote"><br>[Implementations may return CL_INVALID_OPERATION for miplevel values &gt; 0.]<br></span>. If <em>texture_target</em> is GL_TEXTURE_BUFFER, <em>miplevel</em> must be 0.</p></div>
-<div class="paragraph"><p><em>texture</em> is the name of a GL 1D, 2D, 3D, 1D array, 2D array, cubemap, rectangle or buffer texture object. The texture object must be a complete texture as per OpenGL rules on texture completeness. The <em>texture</em> format and dimensions defined by OpenGL for the specified <em>miplevel</em> of the texture will be used to create the OpenCL image memory object. Only GL texture objects with an internal format that maps to appropriate image channel order and data type specified in <em>tables 5.5</em> and <em>5.6</em> may be used to create the OpenCL image memory object.</p></div>
-<div class="paragraph"><p><em>errcode_ret</em> will return an appropriate error code as described below. If <em>errcode_ret</em> is NULL, no error code is returned.</p></div>
-<div class="paragraph"><p><strong>clCreateFromGLTexture</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 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 or was not created from a GL context.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if values specified in <em>flags</em> are not valid or if value specified in <em>texture_target</em> is not one of the values specified in the description of <em>texture_target</em>.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_MIP_LEVEL if <em>miplevel</em> is less than the value of <em>level<sub>base</sub></em> (for OpenGL implementations) or zero (for OpenGL ES implementations); or greater than the value of <em>q</em> (for both OpenGL and
-OpenGL ES). <em>level<sub>base</sub></em> and <em>q</em> are defined for the texture in <em>section 3.8.10</em> (Texture Completeness) of the OpenGL 2.1 specification and <em>section 3.7.10</em> of the OpenGL ES 2.0.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_MIP_LEVEL if <em>miplevel</em> is greather than zero and the OpenGL implementation does not support creating from non-zero mipmap levels.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_GL_OBJECT if <em>texture</em> is not a GL texture object whose type matches <em>texture_target</em>, if the specified <em>miplevel</em> of <em>texture</em> is not defined, or if the width or height of the specified <em>miplevel</em> is zero or if the GL texture object is incomplete. * CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the OpenGL texture internal format does not map to a supported OpenCL image format.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_OPERATION if <em>texture</em> is a GL texture object created with a border width value greater than zero.
-</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>If the state of a GL texture object is modified through the GL API (e.g. <strong>glTexImage2D</strong>, <strong>glTexImage3D</strong> or the values of the texture parameters GL_TEXTURE_BASE_LEVEL or GL_TEXTURE_MAX_LEVEL are modified) while there exists a corresponding CL image object, subsequent use of the CL image object will result in undefined behavior.</p></div>
-<div class="paragraph"><p>The <strong>clRetainMemObject</strong> and <strong>clReleaseMemObject</strong> functions can be used to retain and release the image objects.</p></div>
-<div class="sect4">
-<h5 id="cl_khr_gl_sharing__memobjs-list-of-opengl-and-corresponding-opencl-image-formats">List of OpenGL and corresponding OpenCL Image Formats</h5>
-<div class="paragraph"><p>The table below describes the list of OpenGL texture internal formats and the corresponding OpenCL image formats. If a OpenGL texture object with an internal format from the table below is successfully created by OpenGL, then there is guaranteed to be a mapping to one of the corresponding OpenCL image format(s) in that table. Texture objects created with other OpenGL internal formats may (but are not guaranteed to) have a mapping to an OpenCL image format; if such mappings exist, they are guaranteed to preserve all color components, data types, and at least the number of bits/component actually allocated by OpenGL for that format.</p></div>
-<table class="tableblock frame-all grid-all" id="cl_khr_gl_sharing__memobjs-mapping-of-image-formats"
-style="
-width:100%;
-">
-<caption class="title">Table 13. <em>OpenGL internal formats and corresponding OpenCL internal formats</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>GL internal 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">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>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">GL_SRGB8_ALPHA8</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_sRGBA, CL_UNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV</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">GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV</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"></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">GL_RGBA8I, GL_RGBA8I_EXT</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" ><p class="tableblock">GL_RGBA16I, GL_RGBA16I_EXT</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" ><p class="tableblock">GL_RGBA32I, GL_RGBA32I_EXT</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" ><p class="tableblock"></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">GL_RGBA8UI, GL_RGBA8UI_EXT</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">GL_RGBA16UI, GL_RGBA16UI_EXT</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">GL_RGBA32UI, GL_RGBA32UI_EXT</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"></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">GL_RGBA8_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">GL_RGBA16</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">GL_RGBA16_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">GL_RGBA16F, GL_RGBA16F_ARB</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">GL_RGBA32F, GL_RGBA32F_ARB</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"></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">GL_R8</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">GL_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">GL_R16</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">GL_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">GL_R16F</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">GL_R32F</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"></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">GL_R8I</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_R, CL_SIGNED_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">GL_R16I</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" ><p class="tableblock">GL_R32I</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" ><p class="tableblock">GL_R8UI</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">GL_R16UI</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">GL_R32UI</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"></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">GL_RG8</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">GL_RG8_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">GL_RG16</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">GL_RG16_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">GL_RG16F</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">GL_RG32F</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"></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">GL_RG8I</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" ><p class="tableblock">GL_RG16I</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" ><p class="tableblock">GL_RG32I</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" ><p class="tableblock">GL_RG8UI</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">GL_RG16UI</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">GL_RG32UI</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_RG, CL_UNSIGNED_INT32</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_sharing__memobjs-cl-image-objects-from-gl-renderbuffers">OpenCL Image Objects from OpenGL Renderbuffers</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromGLRenderbuffer</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                  <span style="color: #008080">GLuint</span> renderbuffer<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>creates an OpenCL 2D image object from an OpenGL renderbuffer object.</p></div>
-<div class="paragraph"><p><em>context</em> is a valid OpenCL context created from an OpenGL context.</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>renderbuffer</em> is the name of a GL renderbuffer object. The renderbuffer storage must be specified before the image object can be created. The <em>renderbuffer</em> format and dimensions defined by OpenGL will be used to create the 2D image object. Only GL renderbuffers with internal formats that maps to appropriate image channel order and data type specified in <em>tables 5.5</em> and <em>5.6</em> can be used to create the 2D image object.</p></div>
-<div class="paragraph"><p><em>errcode_ret</em> will return an appropriate error code as described below. If <em>errcode_ret</em> is NULL, no error code is returned.</p></div>
-<div class="paragraph"><p><strong>clCreateFromGLRenderbuffer</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 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 or was not created from a GL context.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if values specified in <em>flags</em> are not valid.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_GL_OBJECT if <em>renderbuffer</em> is not a GL renderbuffer object or if the width or height of <em>renderbuffer</em> is zero.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the OpenGL renderbuffer internal format does not map to a supported OpenCL image format.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_OPERATION if <em>renderbuffer</em> is a multi-sample GL renderbuffer 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 class="paragraph"><p>If the state of a GL renderbuffer object is modified through the GL API (i.e. changes to the dimensions or format used to represent pixels of the GL renderbuffer using appropriate GL API calls such as <strong>glRenderbufferStorage</strong>) while there exists a corresponding CL image object, subsequent use of the CL image object will result in undefined behavior.</p></div>
-<div class="paragraph"><p>The <strong>clRetainMemObject</strong> and <strong>clReleaseMemObject</strong> functions can be used to retain and release the image objects.</p></div>
-<div class="paragraph"><p>The table <a href="#cl_khr_gl_sharing__memobjs-mapping-of-image-formats"><em>OpenGL internal formats and corresponding OpenCL internal formats</em></a> describes the list of OpenGL renderbuffer internal formats and the corresponding OpenCL image formats. If an OpenGL renderbuffer object with an internal format from the table is successfully created by OpenGL, then there is guaranteed to be a mapping to one of the corresponding OpenCL image format(s) in that table. Renderbuffer objects created with other OpenGL internal formats may (but are not guaranteed to) have a mapping to an OpenCL image format; if such mappings exist, they are guaranteed to preserve all color components, data types, and at least the number of bits/component actually allocated by OpenGL for that format.</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_sharing__memobjs-querying-gl-object-information-from-a-cl-memory-object">Querying OpenGL object information from an OpenCL memory object</h4>
-<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 object can be queried using the following function.</p></div>
-<div class="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clGetGLObjectInfo</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_mem</span> memobj<span style="color: #990000">,</span>
-                         <span style="color: #008080">cl_gl_object_type</span> <span style="color: #990000">*</span>gl_object_type<span style="color: #990000">,</span>
-                         <span style="color: #008080">GLuint</span> <span style="color: #990000">*</span>gl_object_name<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p><em>gl_object_type</em> returns the type of GL object attached to <em>memobj</em> and can be CL_GL_OBJECT_BUFFER, CL_GL_OBJECT_TEXTURE2D, CL_GL_OBJECT_TEXTURE3D, CL_GL_OBJECT_TEXTURE2D_ARRAY, CL_GL_OBJECT_TEXTURE1D, CL_GL_OBJECT_TEXTURE1D_ARRAY, CL_GL_OBJECT_TEXTURE_BUFFER, or CL_GL_OBJECT_RENDERBUFFER. If <em>gl_object_type</em> is NULL, it is ignored</p></div>
-<div class="paragraph"><p><em>gl_object_name</em> returns the GL object name used to create <em>memobj</em>. If <em>gl_object_name</em> is NULL, it is ignored.</p></div>
-<div class="paragraph"><p><strong>clGetGLObjectInfo</strong> returns CL_SUCCESS if the call was executed successfully. Otherwise, it returns one of the following errors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_INVALID_MEM_OBJECT if <em>memobj</em> is not a valid OpenCL memory object.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_GL_OBJECT if there is no GL object associated with <em>memobj</em>.
-</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 function</p></div>
-<div class="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clGetGLTextureInfo</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_mem</span> memobj<span style="color: #990000">,</span>
-                          <span style="color: #008080">cl_gl_texture_info</span> param_name<span style="color: #990000">,</span>
-                          <span style="color: #008080">size_t</span> param_value_size<span style="color: #990000">,</span>
-                          <span style="color: #009900">void</span> <span style="color: #990000">*</span>param_value<span style="color: #990000">,</span>
-                          <span style="color: #008080">size_t</span> <span style="color: #990000">*</span>param_value_size_ret<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>returns additional information about the GL texture object associated with <em>memobj</em>.</p></div>
-<div class="paragraph"><p><em>param_name</em> specifies what additional information about the GL texture object associated with <em>memobj</em> to query. The list of supported <em>param_name</em> types and the information returned in <em>param_value</em> by <strong>clGetGLTextureInfo</strong> is described in the table below.</p></div>
-<div class="paragraph"><p><em>param_value</em> is a pointer to memory where the result being queried is returned. If <em>param_value</em> is NULL, 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 &gt;= size of return type as described in the table below.</p></div>
-<div class="paragraph"><p><em>param_value_size_ret</em> returns the actual size in bytes of data copied to <em>param_value</em>. If <em>param_value_size_ret</em> is NULL, it is ignored.</p></div>
-<table class="tableblock frame-all grid-all" id="cl_khr_gl_sharing__memobjs-clGetGLTextureInfo-queries"
-style="
-width:100%;
-">
-<caption class="title">Table 14. <em>OpenGL texture info that may be queried with</em> <strong>clGetGLTextureInfo</strong></caption>
-<col style="width:33%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>cl_gl_texture_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_GL_TEXTURE_TARGET</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">GLenum</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">The <em>texture_target</em> argument specified in <strong>clCreateFromGLTexture</strong>.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_GL_MIPMAP_LEVEL</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">GLint</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">The <em>miplevel</em> argument specified in <strong>clCreateFromGLTexture</strong>.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><strong>clGetGLTextureInfo</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_MEM_OBJECT if <em>memobj</em> is not a valid OpenCL memory object.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_GL_OBJECT if there is no GL texture object associated with <em>memobj</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 less than the size of the return type as described in the table above and <em>param_value</em> is not NULL, or if <em>param_value</em> and <em>param_value_size_ret</em> are NULL.
-</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="sect3">
-<h4 id="cl_khr_gl_sharing__memobjs-sharing-memory-objects-that-map-to-gl-objects-between-gl-and-cl-contexts">Sharing memory objects that map to GL objects between GL and CL contexts</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_int</span>  <span style="font-weight: bold"><span style="color: #000000">clEnqueueAcquireGLObjects</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                  <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>is used to acquire OpenCL memory objects that have been created from OpenGL objects. These objects need to be acquired before they can be used by any OpenCL commands queued to a command-queue. The OpenGL 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><em>command_queue</em> is a valid command-queue. All devices used to create the OpenCL context associated with <em>command_queue</em> must support acquiring shared CL/GL objects. This constraint is enforced at context creation time.</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 CL memory objects that correspond to GL objects.</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 NULL, then this particular command does not wait on any event to complete. If <em>event_wait_list</em> is NULL, <em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL, 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</p></div>
-<div class="paragraph"><p><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 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 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 NULL, 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>clEnqueueAcquireGLObjects</strong> returns CL_SUCCESS if the function is executed successfully. If <em>num_objects</em> is 0 and <em>mem_objects</em> is NULL 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 NULL value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_MEM_OBJECT if memory objects in <em>mem_objects</em> are not valid OpenCL memory objects.
-</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 OpenGL context
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_GL_OBJECT if memory objects in <em>mem_objects</em> have not been created from a GL object(s).
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not NULL 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_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 function</p></div>
-<div class="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueReleaseGLObjects</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                 <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                 <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                 <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                 <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>is used to release OpenCL memory objects that have been created from OpenGL objects. These objects need to be released before they can be used by OpenGL. The OpenGL objects are released by the OpenCL context associated with <em>command_queue</em>.</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 CL memory objects that correspond to GL objects.</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  command can be executed. If <em>event_wait_list</em> is NULL, then this particular command does not wait on any event to complete. If <em>event_wait_list</em> is NULL, <em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL, 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 read / write command and can be used to query or queue a wait for the command to complete. <em>event</em> can beNULL 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 NULL, 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>clEnqueueReleaseGLObjects</strong> returns CL_SUCCESS if the function is executed successfully. If <em>num_objects</em> is 0 and <em>mem_objects</em> is NULL 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 NULL value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_MEM_OBJECT if memory objects in <em>mem_objects</em> are not valid OpenCL memory objects.
-</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 OpenGL context
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_GL_OBJECT if memory objects in <em>mem_objects</em> have not been created from a GL object(s).
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not NULL 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_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="sect4">
-<h5 id="cl_khr_gl_sharing__memobjs-synchronizing-opencl-and-opengl-access-to-shared-objects">Synchronizing OpenCL and OpenGL Access to Shared Objects</h5>
-<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. Failure to provide such synchronization may result in race conditions and other undefined behavior including non-portability between implementations.</p></div>
-<div class="paragraph"><p>Prior to calling <strong>clEnqueueAcquireGLObjects</strong>, the application must ensure that any pending GL operations which access the objects specified in <em>mem_objects</em> have completed. This may be accomplished portably by issuing and waiting for completion of a <strong>glFinish</strong> command on all GL contexts with pending references to these objects. Implementations may offer more efficient synchronization methods; for example on some platforms calling <strong>glFlush</strong> may be sufficient, or synchronization may be implicit within a thread, or there may be vendor-specific extensions that enable placing a fence in the GL command stream and waiting for completion of that fence in the CL command queue. Note that no synchronization methods other than <strong>glFinish</strong> are portable between OpenGL implementations at this time.</p></div>
-<div class="paragraph"><p>Similarly, after calling <strong>clEnqueueReleaseGLObjects</strong>, the application is responsible for ensuring that any pending OpenCL operations which access the objects specified in <em>mem_objects</em> have completed prior to executing subsequent GL commands which reference these objects. This may be accomplished portably by calling <strong>clWaitForEvents</strong> with the event object returned by <strong>clEnqueueReleaseGLObjects,</strong> or by calling <strong>clFinish</strong>. As above, some implementations may offer more efficient methods.</p></div>
-<div class="paragraph"><p>The application is responsible for maintaining the proper order of operations if the CL and GL contexts are in separate threads.</p></div>
-<div class="paragraph"><p>If a GL context is bound to a thread other than the one in which <strong>clEnqueueReleaseGLObjects</strong> is called, changes to any of the objects in <em>mem_objects</em> may not be visible to that context without additional steps being taken by the application. For an OpenGL 3.1 (or later) context, the requirements are described in Appendix D ("Shared Objects and Multiple Contexts") of the OpenGL 3.1 Specification. For prior versions of OpenGL, the requirements are implementation-dependent.</p></div>
-<div class="paragraph"><p>Attempting to access the data store of an OpenGL object after it has been acquired by OpenCL and before it has been released will result in undefined behavior. Similarly, attempting to access a shared CL/GL object from OpenCL before it 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 class="sect2">
-<h3 id="cl_khr_gl_event-creating">Creating OpenCL Event Objects from OpenGL Sync Objects</h3>
-<div class="sect3">
-<h4 id="cl_khr_gl_event-overview">Overview</h4>
-<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 sync objects, potentially improving efficiency of sharing images and buffers between the two APIs. The companion <strong>GL_ARB_cl_event</strong> extension provides the complementary functionality of creating an OpenGL sync object from an OpenCL event object.</p></div>
-<div class="paragraph"><p>In addition, this extension modifies the behavior of <strong>clEnqueueAcquireGLObjects</strong> and <strong>clEnqueueReleaseGLObjects</strong> to implicitly guarantee synchronization with an OpenGL context bound in the same thread as the OpenCL context.</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_event-new-procedures-and-functions">New Procedures and 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: #008080">cl_event</span> <span style="font-weight: bold"><span style="color: #000000">clCreateEventFromGLsyncKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                    <span style="color: #008080">GLsync</span> sync<span style="color: #990000">,</span>
-                                    <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">);</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_event-new-tokens">New Tokens</h4>
-<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 monospaced">
-<pre>CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D</pre>
-</div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_event-additions-to-chapter-5">Additions to Chapter 5 of the OpenCL 2.2 Specification</h4>
-<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></div>
-<div class="paragraph"><p>"Event objects can also be used to reflect the status of an OpenGL sync object. The sync object in turn refers to a fence command executing in an OpenGL command stream. This provides another method of coordinating sharing of buffers and images between OpenGL and OpenCL."</p></div>
-<div class="paragraph"><p>Add CL_COMMAND_GL_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.1</em>:</p></div>
-<div class="paragraph"><p>"<strong>5.11.1 Linking Event Objects to OpenGL Synchronization Objects</strong></p></div>
-<div class="paragraph"><p>An event object may be created by linking to an OpenGL <strong>sync object</strong>. Completion of such an event object is equivalent to waiting for completion of the fence command associated with the linked GL sync object.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_event</span> <span style="font-weight: bold"><span style="color: #000000">clCreateEventFromGLsyncKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                    <span style="color: #008080">GLsync</span> sync<span style="color: #990000">,</span>
-                                    <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>creates a linked event object.</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></div>
-<div class="paragraph"><p><em>sync</em> is the name of a sync object in the GL share group associated with <em>context</em>.</p></div>
-<div class="paragraph"><p><strong>clCreateEventFromGLsyncKHR</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 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, or was not created from a GL context.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_GL_OBJECT if <em>sync</em> is not the name of a sync object in the GL share group associated with <em>context</em>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The parameters of an event object linked to a GL sync object will return the following values when queried with <strong>clGetEventInfo</strong>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The CL_EVENT_COMMAND_QUEUE of a linked event is NULL, 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_GL_FENCE_SYNC_OBJECT_KHR, indicating that the event is associated with a GL 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>clCreateEventFromGLsyncKHR</strong> performs an implicit <strong>clRetainEvent</strong> on the returned event object. Creating a linked event object also places a reference on the linked GL sync object. When the event object is deleted, the reference will be removed from the GL sync object.</p></div>
-<div class="paragraph"><p>Events returned from <strong>clCreateEventFromGLsyncKHR</strong> can be used in the <em>event_wait_list</em> argument to <strong>clEnqueueAcquireGLObjects</strong> and CL APIs that take a cl_event as an argument but do not enqueue commands. Passing
-such events to any other CL API that enqueues commands will generate a CL_INVALID_EVENT error."</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_event-additions-to-extension-specification">Additions to the OpenCL Extension Specification</h4>
-<div class="paragraph"><p>Add following the paragraph describing parameter <em>event</em> to <strong>clEnqueueAcquireGLObjects</strong>:</p></div>
-<div class="paragraph"><p>"If an OpenGL context is bound to the current thread, then any OpenGL commands which</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-affect or access the contents of a memory object listed in the <em>mem_objects</em> list, and
-</p>
-</li>
-<li>
-<p>
-were issued on that OpenGL context prior to the call to <strong>clEnqueueAcquireGLObjects</strong>
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p>will complete before execution of any OpenCL commands following the <strong>clEnqueueAcquireGLObjects</strong> which affect or access any of those memory objects. If a non-NULL <em>event</em> object is returned, it will report
-completion only after completion of such OpenGL commands."</p></div>
-<div class="paragraph"><p>Add following the paragraph describing parameter <em>event</em> to <strong>clEnqueueReleaseGLObjects</strong>:</p></div>
-<div class="paragraph"><p>"If an OpenGL context is bound to the current thread, then then any OpenGL commands which</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-affect or access the contents of the memory objects listed in the <em>mem_objects</em> list, and
-</p>
-</li>
-<li>
-<p>
-are issued on that context after the call to <strong>clEnqueueReleaseGLObjects</strong>
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p>will not execute until after execution of any OpenCL commands preceding the</p></div>
-<div class="paragraph"><p><strong>clEnqueueReleaseGLObjects</strong> which affect or access any of those memory objects. If a non-NULL <em>event</em> object is returned, it will report completion before execution of such OpenGL commands."</p></div>
-<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 OpenGL operations which access the objects specified in <em>mem_objects</em> have completed.</p></div>
-<div class="paragraph"><p>If the <strong>cl_khr_gl_event</strong> extension is supported, then the OpenCL implementation will ensure that any such pending OpenGL operations are complete for an OpenGL context bound to the same thread as the OpenCL context. This is referred to as <em>implicit synchronization</em>.</p></div>
-<div class="paragraph"><p>If the <strong>cl_khr_gl_event</strong> extension is supported and the OpenGL context in question supports fence sync objects, completion of OpenGL commands may also be determined by placing a GL fence command after those commands using <strong>glFenceSync</strong>, creating an event from the resulting GL sync object using <strong>clCreateEventFromGLsyncKHR</strong>, and determining completion of that event object via <strong>clEnqueueAcquireGLObjects</strong>. This method may be considerably more efficient than calling <strong>glFinish</strong>, and is referred to as <em>explicit synchronization</em>. Explicit synchronization is most useful when an OpenGL context bound to another thread is accessing the memory objects.</p></div>
-<div class="paragraph"><p>If the <strong>cl_khr_gl_event</strong> extension is not supported, completion of OpenGL commands may be determined by issuing and waiting for completion of a <strong>glFinish</strong> command on all OpenGL 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 method other than <strong>glFinish</strong> is portable between all OpenGL implementations and all OpenCL implementations. While this is the only way to ensure completion that is portable to all platforms, <strong>glFinish</strong> is an expensive operation and its use should be avoided if the <strong>cl_khr_gl_event</strong> extension is supported on a platform."</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_event-issues">Issues</h4>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-How are references between CL events and GL syncs handled?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>PROPOSED: The linked CL event places a single reference on the GL sync object. That reference is removed when the CL event is deleted. A more expensive alternative would be to reflect changes in the CL event reference count through to the GL sync.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-How are linkages to synchronization primitives in other APIs handled?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>UNRESOLVED. We will at least want to have a way to link events to EGL sync objects. There is probably no analogous DX concept. There would be an entry point for each type of synchronization primitive to be linked to, such as clCreateEventFromEGLSyncKHR.</p></div>
-<div class="paragraph"><p>An alternative is a generic clCreateEventFromExternalEvent taking an attribute list. The attribute list would include information defining the type of the external primitive and additional information (GL sync object handle, EGL display and sync object handle, etc.) specific to that type. This allows a single entry point to be reused.</p></div>
-<div class="paragraph"><p>These will probably be separate extensions following the API proposed here.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-Should the CL_EVENT_COMMAND_TYPE correspond to the type of command (fence) or the type of the linked sync object?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>PROPOSED: To the type of the linked sync object.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-Should we support both explicit and implicit synchronization?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>PROPOSED: Yes. Implicit synchronization is suitable when GL and CL are executing in the same application thread. Explicit synchronization is suitable when they are executing in different threads but the expense of glFinish is too high.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-Should this be a platform or device extension?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>PROPOSED: Platform extension. This may result in considerable under-the-hood work to implement the sync&#8594;event semantics using only the public GL API, however, when multiple drivers and devices with different GL support levels coexist in the same runtime.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-Where can events generated from GL syncs be usable?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>PROPOSED: Only with clEnqueueAcquireGLObjects, and attempting to use such an event elsewhere will generate an error. There is no apparent use case for using such events elsewhere, and possibly some cost to supporting it, balanced by the cost of checking the source of events in all other commands accepting them as parameters.</p></div>
-</div></div>
-</li>
-</ol></div>
-<div style="page-break-after:always"></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_dx9_media_sharing">Creating OpenCL Memory Objects from DirectX 9 Media Surfaces</h3>
-<div class="sect3">
-<h4 id="cl_khr_dx9_media_sharing-overview">Overview</h4>
-<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="sect3">
-<h4 id="cl_khr_dx9_media_sharing-new-procedures-and-functions">New Procedures and 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: #008080">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clGetDeviceIDsFromDX9MediaAdapterKHR</span></span><span style="color: #990000">(</span>
-                                    <span style="color: #008080">cl_platform_id</span> platform<span style="color: #990000">,</span>
-                                    <span style="color: #008080">cl_uint</span> num_media_adapters<span style="color: #990000">,</span>
-                                    <span style="color: #008080">cl_dx9_media_adapter_type_khr</span> <span style="color: #990000">*</span>media_adapters_type<span style="color: #990000">,</span>
-                                    <span style="color: #009900">void</span> <span style="color: #990000">*</span>media_adapters<span style="color: #990000">,</span>
-                                    <span style="color: #008080">cl_dx9_media_adapter_set_khr</span> media_adapter_set<span style="color: #990000">,</span>
-                                    <span style="color: #008080">cl_uint</span> num_entries<span style="color: #990000">,</span>
-                                    <span style="color: #008080">cl_device_id</span> <span style="color: #990000">*</span>devices<span style="color: #990000">,</span>
-                                    <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>num_devices<span style="color: #990000">)</span>
-
-<span style="color: #008080">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromDX9MediaSurfaceKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                      <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                      <span style="color: #008080">cl_dx9_media_adapter_type_khr</span> adapter_type<span style="color: #990000">,</span>
-                                      <span style="color: #009900">void</span> <span style="color: #990000">*</span>surface_info<span style="color: #990000">,</span>
-                                      <span style="color: #008080">cl_uint</span> plane<span style="color: #990000">,</span>
-                                      <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span>
-
-<span style="color: #008080">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueAcquireDX9MediaSurfacesKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                           <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                           <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                           <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                           <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span>
-
-<span style="color: #008080">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueReleaseDX9MediaSurfacesKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                           <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                           <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                           <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                           <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_dx9_media_sharing-new-tokens">New Tokens</h4>
-<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 monospaced">
-<pre>CL_ADAPTER_D3D9_KHR         0x2020
-CL_ADAPTER_D3D9EX_KHR       0x2021
-CL_ADAPTER_DXVA_KHR         0x2022</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 monospaced">
-<pre>CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR  0x2023
-CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR        0x2024</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 monospaced">
-<pre>CL_CONTEXT_ADAPTER_D3D9_KHR     0x2025
-CL_CONTEXT_ADAPTER_D3D9EX_KHR   0x2026
-CL_CONTEXT_ADAPTER_DXVA_KHR     0x2027</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 monospaced">
-<pre>CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR   0x2028
-CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR   0x2029</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 monospaced">
-<pre>CL_IMAGE_DX9_MEDIA_PLANE_KHR    0x202A</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 monospaced">
-<pre>CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR   0x202B
-CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR   0x202C</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 monospaced">
-<pre>CL_INVALID_DX9_MEDIA_ADAPTER_KHR    -1010</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 monospaced">
-<pre>CL_INVALID_DX9_MEDIA_SURFACE_KHR    -1011</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 monospaced">
-<pre>CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR   -1012</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 monospaced">
-<pre>CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR   -1013</pre>
-</div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_dx9_media_sharing-additions-to-chapter-4">Additions to Chapter 4 of the OpenCL 2.2 Specification</h4>
-<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>"<em>properties</em> 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 NULL or empty (points to a list whose first value is zero), all attributes take on their default values."</p></div>
-<div class="paragraph"><p>Add the following to <em>table 4.5</em>:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:33%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<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_ADAPTER_<br>
-D3D9_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">IDirect3DDevice9 *</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Specifies an IDirect3DDevice9 to use for D3D9 interop.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_CONTEXT_ADAPTER_<br>
-D3D9EX_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">IDirect3DDeviceEx*</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Specifies an IDirect3DDevice9Ex to use for D3D9 interop.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_CONTEXT_ADAPTER_<br>
-DXVA_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">IDXVAHD_Device *</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Specifies an IDXVAHD_Device to use for DXVA interop.</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_ADAPTER_KHR if any of the values of the properties CL_CONTEXT_ADAPTER_D3D9_KHR, CL_CONTEXT_ADAPTER_D3D9EX_KHR or CL_CONTEXT_ADAPTER_DXVA_KHR is non-NULL and does not specify a valid media adapter with which the <em>cl_device_ids</em> against which this context is to be created may interoperate."
-</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>
-<div class="sect3">
-<h4 id="cl_khr_dx9_media_sharing-additions-to-chapter-5">Additions to Chapter 5 of the OpenCL 2.2 Specification</h4>
-<div class="paragraph"><p>Add to the list of errors for <strong>clGetMemObjectInfo</strong>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_INVALID_DX9_MEDIA_SURFACE_KHR if <em>param_name</em> is CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR and <em>memobj</em> was not created by the function <strong>clCreateFromDX9MediaSurfaceKHR</strong> from a Direct3D9 surface.
-</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"
-style="
-width:100%;
-">
-<col style="width:33%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<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_DX9_MEDIA_<br>
-ADAPTER_TYPE_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_dx9_media_<br>
-adapter_type_khr</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Returns the <em>cl_dx9_media_adapter_type_khr</em> argument value specified when <em>memobj</em> is created using <strong>clCreateFromDX9MediaSurfaceKHR</strong>.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_DX9_MEDIA_<br>
-SURFACE_INFO_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_dx9_surface_info_khr</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Returns the <em>cl_dx9_surface_info_khr</em> argument value specified when <em>memobj</em> is created using <strong>clCreateFromDX9MediaSurfaceKHR</strong>.</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_DX9_MEDIA_SURFACE_KHR if <em>param_name</em> is CL_IMAGE_DX9_MEDIA_PLANE_KHR and <em>image</em> was not created by the function <strong>clCreateFromDX9MediaSurfaceKHR</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"
-style="
-width:100%;
-">
-<col style="width:33%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<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_IMAGE_DX9_MEDIA_<br>
-PLANE_KHR</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">Returns the <em>plane</em> argument value specified when <em>memobj</em> is created using <strong>clCreateFromDX9MediaSurfaceKHR</strong>.</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 monospaced">
-<pre>CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR
-CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR</pre>
-</div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_dx9_media_sharing-sharing-media-surfaces-with-opencl">Sharing Media Surfaces with OpenCL</h4>
-<div class="paragraph"><p>This section discusses OpenCL functions that allow applications to use media surfaces as OpenCL memory objects. This allows efficient sharing of data between OpenCL and media surface APIs. The OpenCL API may be used to execute kernels that read and/or write memory objects that are also media surfaces. An OpenCL image object may be created from a media surface. OpenCL memory objects may be created from media surfaces if and only if the OpenCL context has been created from a media adapter.</p></div>
-<div class="sect4">
-<h5 id="cl_khr_dx9_media_sharing-querying-opencl-devices-corresponding-to-media-adapters">Querying OpenCL Devices corresponding to Media Adapters</h5>
-<div class="paragraph"><p>Media adapters are an abstraction associated with devices that provide media capabilities.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clGetDeviceIDsFromDX9MediaAdapterKHR</span></span><span style="color: #990000">(</span>
-                                    <span style="color: #008080">cl_platform_id</span> platform<span style="color: #990000">,</span>
-                                    <span style="color: #008080">cl_uint</span> num_media_adapters<span style="color: #990000">,</span>
-                                    <span style="color: #008080">cl_dx9_media_adapter_type_khr</span> <span style="color: #990000">*</span>media_adapters_type<span style="color: #990000">,</span>
-                                    <span style="color: #009900">void</span> <span style="color: #990000">*</span>media_adapters<span style="color: #990000">,</span>
-                                    <span style="color: #008080">cl_dx9_media_adapter_set_khr</span> media_adapter_set<span style="color: #990000">,</span>
-                                    <span style="color: #008080">cl_uint</span> num_entries<span style="color: #990000">,</span>
-                                    <span style="color: #008080">cl_device_id</span> <span style="color: #990000">*</span>devices<span style="color: #990000">,</span>
-                                    <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>num_devices<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>queries a media adapter for any associated OpenCL devices. Adapters with associated OpenCL devices can enable media surface sharing between the two.</p></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>num_media_adapters</em> specifies the number of media adapters.</p></div>
-<div class="paragraph"><p><em>media_adapters_type</em> is an array of <em>num_media_adapters</em> entries. Each entry specifies the type of media adapter and must be one of the values described in the table below.</p></div>
-<table class="tableblock frame-all grid-all" id="cl_khr_dx9_media_sharing-media-adapter-types"
-style="
-width:100%;
-">
-<caption class="title">Table 15. <em>cl_dx9_media_adapter_type_khr values</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>cl_dx9_media_adapter_type_khr</strong></th>
-<th class="tableblock halign-left valign-top" ><strong>Type of media adapters</strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_ADAPTER_D3D9_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">IDirect3DDevice9 *</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_ADAPTER_D3D9EX_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">IDirect3DDevice9Ex *</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_ADAPTER_DXVA_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">IDXVAHD_Device *</p></td>
-</tr>
-</tbody>
-</table>
-<table class="tableblock frame-all grid-all" id="cl_khr_dx9_media_sharing-media-adapter-sets"
-style="
-width:100%;
-">
-<caption class="title">Table 16. <em>cl_dx9_media_adapter_set_khr values</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>cl_dx9_media_adapter_set_khr</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_PREFERRED_DEVICES_FOR_<br>
-DX9_MEDIA_ADAPTER_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">The preferred OpenCL devices associated with the media adapter.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_ALL_DEVICES_FOR_MEDIA_<br>
-DX9_ADAPTER_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">All OpenCL devices that may interoperate with the media adapter</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><em>media_adapters</em> is an array of <em>num_media_adapters</em> entries. Each entry specifies the actual adapter whose type is specified by <em>media_adapter_type</em>. The <em>media_adapters</em> must be one of the types described in the table <a href="#cl_khr_dx9_media_sharing-media-adapter-types"><em>cl_dx9_media_adapter_type_khr values</em></a>. <em>media_adapter_set</em> specifies the set of adapters to return and must be one of the values described in the table &lt;&lt;[[cl_khr_dx9_media_sharing-media-adapter-sets,<em>cl_dx9_media_adapter_set_khr values</em>&gt;&gt;.</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 NULL, the <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 that support the list of media adapters specified. The cl_device_id values returned in <em>devices</em> can be used to identify a specific OpenCL device. If <em>devices</em> argument is NULL, this argument is ignored. The number of OpenCL devices returned is the minimum of the value specified by <em>num_entries</em> or the number of OpenCL devices whose type matches <em>device_type</em>.</p></div>
-<div class="paragraph"><p><em>num_devices</em> returns the number of OpenCL devices. If <em>num_devices</em> is NULL, this argument is ignored.</p></div>
-<div class="paragraph"><p><strong>clGetDeviceIDsFromDX9MediaAdapterKHR</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_PLATFORM if <em>platform</em> is not a valid platform.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if <em>num_media_adapters</em> is zero or if <em>media_adapters_type</em> is NULL or if <em>media_adapters</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if any of the entries in <em>media_adapters_type</em> or <em>media_adapters</em> is not a valid value.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if <em>media_adapter_set</em> is not a valid value.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if <em>num_entries</em> is equal to zero and <em>devices</em> is not NULL or if both <em>num_devices</em> and <em>devices</em> are NULL.
-</p>
-</li>
-<li>
-<p>
-CL_DEVICE_NOT_FOUND if no OpenCL devices that correspond to adapters specified in <em>media_adapters</em> and <em>media_adapters_type</em> were found.
-</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="sect4">
-<h5 id="cl_khr_dx9_media_sharing-creating-media-resources-as-opencl-image-objects">Creating Media Resources as OpenCL Image Objects</h5>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromDX9MediaSurfaceKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                      <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                      <span style="color: #008080">cl_dx9_media_adapter_type_khr</span> adapter_type<span style="color: #990000">,</span>
-                                      <span style="color: #009900">void</span> <span style="color: #990000">*</span>surface_info<span style="color: #990000">,</span>
-                                      <span style="color: #008080">cl_uint</span> plane<span style="color: #990000">,</span>
-                                      <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>creates an OpenCL image object from a media surface.</p></div>
-<div class="paragraph"><p><em>context</em> is a valid OpenCL context created from a media adapter.</p></div>
-<div class="paragraph"><p>flags is a bit-field that is used to specify usage information. Refer to <em>table 5.3</em> for a description of flags. 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>adapter_type</em> is a value from enumeration of supported adapters described in the table <a href="#cl_khr_dx9_media_sharing-media-adapter-types"><em>cl_dx9_media_adapter_type_khr values</em></a>. The type of <em>surface_info</em> is determined by the adapter type. The implementation does not need to support all adapter types. This approach provides flexibility to support additional adapter types in the future. Supported adapter types are CL_ADAPTER_D3D9_KHR, CL_ADAPTER_D3D9EX_KHR and CL_ADAPTER_DXVA_KHR.</p></div>
-<div class="paragraph"><p>If <em>adapter_type</em> is CL_ADAPTER_D3D9_KHR, CL_ADAPTER_D3D9EX_KHR and CL_ADAPTER_DXVA_KHR, the <em>surface_info</em> points to the following structure:</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">typedef</span></span> <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">_cl_dx9_surface_info_khr</span>
-<span style="color: #FF0000">{</span>
-    <span style="color: #008080">IDirect3DSurface9</span> <span style="color: #990000">*</span>resource<span style="color: #990000">;</span>
-    <span style="color: #008080">HANDLE</span> shared_handle<span style="color: #990000">;</span>
-<span style="color: #FF0000">}</span> cl_dx9_surface_info_khr<span style="color: #990000">;</span></tt></pre></div></div>
-<div class="paragraph"><p>For DX9 surfaces, we need both the handle to the resource and the resource itself to have a sufficient amount of information to eliminate a copy of the surface for sharing in cases where this is possible. Elimination of the copy is driver dependent. <em>shared_handle</em> may be NULL and this may result in sub-optimal performance.</p></div>
-<div class="paragraph"><p><em>surface_info</em> is a pointer to one of the structures defined in the <em>adapter_type</em> description above passed in as a void *.</p></div>
-<div class="paragraph"><p><em>plane</em> is the plane of resource to share for planar surface formats. For planar formats, we use the plane parameter to obtain a handle to thie specific plane (Y, U or V for example). For non-planar formats used by media, <em>plane</em> must be 0.</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>clCreateFromDX9MediaSurfaceKHR</strong> returns a valid non-zero 2D image object and <em>errcode_ret</em> is set to CL_SUCCESS if the 2D image 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 values specified in <em>flags</em> are not valid or if <em>plane</em> is not a valid plane of <em>resource</em> specified in <em>surface_info</em>.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_DX9_MEDIA_SURFACE_KHR if <em>resource</em> specified in <em>surface_info</em> is not a valid resource or is not associated with <em>adapter_type</em> (e.g., <em>adapter_type</em> is set to CL_ADAPTER_D3D9_KHR and <em>resource</em> is not a Direct3D 9 surface created in D3DPOOL_DEFAULT).
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_DX9_MEDIA_SURFACE_KHR if <em>shared_handle</em> specified in <em>surface_info</em> is not NULL or a valid handle value.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if the texture format of <em>resource</em> is not listed in <a href="#cl_khr_dx9_media_sharing-fourcc-image-formats"><em>YUV FourCC codes and corresponding OpenCL image format</em></a> or <a href="#cl_khr_dx9_media_sharing-d3d-image-formats"><em>Direct3D formats and corresponding OpenCL image formats</em></a>.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_OPERATION if there are no devices in <em>context</em> that support <em>adapter_type</em>.
-</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 width and height of the returned OpenCL 2D image object are determined by the width and height of the plane of resource. The channel type and order of the returned image object is determined by the format and plane of resource and are described in the table <a href="#cl_khr_dx9_media_sharing-fourcc-image-formats"><em>YUV FourCC codes and corresponding OpenCL image format</em></a> or <a href="#cl_khr_dx9_media_sharing-d3d-image-formats"><em>Direct3D formats and corresponding OpenCL image formats</em></a>.</p></div>
-<div class="paragraph"><p>This call will increment the internal media surface count on <em>resource</em>. The internal media surface 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="sect4">
-<h5 id="cl_khr_dx9_media_sharing-querying-media-surface-properties-of-memory-objects-created-from-media-surfaces">Querying Media Surface Properties of Memory Objects created from Media Surfaces</h5>
-<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> CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR, CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR and CL_IMAGE_DX9_MEDIA_PLANE_KHR as described in <em>sections 5.4.3</em> and <em>5.3.6</em>.</p></div>
-</div>
-<div class="sect4">
-<h5 id="cl_khr_dx9_media_sharing-sharing-memory-objects-created-from-media-surfaces-between-a-media-adapter-and-opencl">Sharing Memory Objects created from Media Surfaces between a Media Adapter and OpenCL</h5>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueAcquireDX9MediaSurfacesKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                           <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                           <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                           <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                           <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>is used to acquire OpenCL memory objects that have been created from a media surface. The media surfaces 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 media surfaces 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 media surface is used while it is not currently acquired by OpenCL, the call attempting to use that OpenCL memory object will return CL_DX9_MEDIA_SURFACE_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>clEnqueueAcquireDX9MediaSurfacesKHR</strong> provides the synchronization guarantee that any media adapter API calls involving the interop device(s) used in the OpenCL context made before <strong>clEnqueueAcquireDX9MediaSurfacesKHR</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 media adapter API calls involving the interop device(s) used in the OpenCL context made before <strong>clEnqueueAcquireDX9MediaSurfacesKHR</strong> is called have completed before calling <strong>clEnqueueAcquireDX9MediaSurfacesKHR</strong> <strong>.</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 media surfaces.</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 NULL, then this particular command does not wait on any event to complete. If <em>event_wait_list</em> is NULL, <em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL, 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 NULL 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 NULL, 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>clEnqueueAcquireDX9MediaSurfacesKHR</strong> returns CL_SUCCESS if the function is executed successfully. If <em>num_objects</em> is 0 and <em>mem_objects</em> is NULL 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 NULL value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is NULL.
-</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 media surfaces.
-</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 device that can share the media surface referenced by <em>mem_objects</em>.
-</p>
-</li>
-<li>
-<p>
-CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR if memory objects in <em>mem_objects</em> have previously been acquired using <strong>clEnqueueAcquireDX9MediaSurfacesKHR</strong> but have not been released using <strong>clEnqueueReleaseDX9MediaSurfacesKHR</strong>.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not NULL 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="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueReleaseDX9MediaSurfacesKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                           <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                           <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                           <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                           <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>is used to release OpenCL memory objects that have been created from media surfaces. The media surfaces are released by the OpenCL context associated with <em>command_queue</em>.</p></div>
-<div class="paragraph"><p>OpenCL memory objects created from media surfaces which have been acquired by OpenCL must be released by OpenCL before they may be accessed by the media adapter API. Accessing a media surface 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>clEnqueueReleaseDX9MediaSurfacesKHR</strong> provides the synchronization guarantee that any calls to media adapter APIs involving the interop device(s) used in the OpenCL context made after the call to <strong>clEnqueueReleaseDX9MediaSurfacesKHR</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 media adapter API calls involving the interop device(s) used in the OpenCL context made after <strong>clEnqueueReleaseDX9MediaSurfacesKHR</strong> will not start executing until after event returned by <strong>clEnqueueReleaseDX9MediaSurfacesKHR</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 media surfaces.</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 NULL, then this particular command does not wait on any event to complete. If <em>event_wait_list</em> is NULL, <em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL, 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 NULL 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 NULL, 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>clEnqueueReleaseDX9MediaSurfaceKHR</strong> returns CL_SUCCESS if the function is executed successfully. If <em>num_objects</em> is 0 and &lt;<em>mem_objects</em>&gt; is NULL 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 NULL value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is NULL.
-</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 valid media surfaces.
-</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 media object.
-</p>
-</li>
-<li>
-<p>
-CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR if memory objects in <em>mem_objects</em> have not previously been acquired using <strong>clEnqueueAcquireDX9MediaSurfacesKHR</strong>, or have been released using <strong>clEnqueueReleaseDX9MediaSurfacesKHR</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 NULL and <em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not NULL 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 class="sect4">
-<h5 id="cl_khr_dx9_media_sharing-surface-formats-for-media-surface-sharing">Surface formats for Media Surface Sharing</h5>
-<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 . Using a D3D surface format not listed here is an error. To extend the use of this extension to support media adapters beyond DirectX9 tables similar to the ones in this section will need to be defined for the surface formats supported by the new media adapter. All implementations that support this extension are required to support the NV12 surface format, the other surface formats supported are the same surface formats that the adapter you are sharing with supports as long as they are listed in the table <a href="#cl_khr_dx9_media_sharing-fourcc-image-formats"><em>YUV FourCC codes and corresponding OpenCL image format</em></a> or in the table <a href="#cl_khr_dx9_media_sharing-d3d-image-formats"><em>Direct3D formats and corresponding OpenCL image formats</em></a>.</p></div>
-<table class="tableblock frame-all grid-all" id="cl_khr_dx9_media_sharing-fourcc-image-formats"
-style="
-width:100%;
-">
-<caption class="title">Table 17. <em>YUV FourCC codes and corresponding OpenCL image format</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>FOUR CC code</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">FOURCC(‘N’,’V’,’1’,’2’), Plane 0</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">FOURCC(‘N’,’V’,’1’,’2’), Plane 1</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">FOURCC(‘Y’,’V’,’1’,’2’), Plane 0</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">FOURCC(‘Y’,’V’,’1’,’2’), Plane 1</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">FOURCC(‘Y’,’V’,’1’,’2’), Plane 2</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_R, CL_UNORM_INT8</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>In the table <a href="#cl_khr_dx9_media_sharing-fourcc-image-formats"><em>YUV FourCC codes and corresponding OpenCL image format</em></a> above, NV12 Plane 0 corresponds to the luminance (Y) channel and Plane 1 corresponds to the UV channels. The YV12 Plane 0 corresponds to the Y channel, Plane 1 corresponds to the V channel and Plane 2 corresponds to the U channel. 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 class="tableblock frame-all grid-all" id="cl_khr_dx9_media_sharing-d3d-image-formats"
-style="
-width:100%;
-">
-<caption class="title">Table 18. <em>Direct3D formats and corresponding OpenCL image formats</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>D3D format</strong> <span class="footnote"><br>[Note that D3D9 format names seem to imply that the order of the color channels are switched relative to OpenCL but this is not the case. For example, layout of channels for each pixel for D3DFMT_A32FB32FG32FR32F is the same as CL_RGBA, CL_FLOAT.]<br></span></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">D3DFMT_R32F</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">D3DFMT_R16F</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">D3DFMT_L16</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">D3DFMT_A8</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_A, CL_UNORM_INT8</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">D3DFMT_L8</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"></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">D3DFMT_G32R32F</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">D3DFMT_G16R16F</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">D3DFMT_G16R16</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">D3DFMT_A8L8</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"></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">D3DFMT_A32B32G32R32F</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">D3DFMT_A16B16G16R16F</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">D3DFMT_A16B16G16R16</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">D3DFMT_A8B8G8R8</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">D3DFMT_X8B8G8R8</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">D3DFMT_A8R8G8B8</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">D3DFMT_X8R8G8B8</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_BGRA, CL_UNORM_INT8</p></td>
-</tr>
-</tbody>
-</table>
-<div style="page-break-after:always"></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_d3d10_sharing">Creating OpenCL Memory Objects from Direct3D 10 Buffers and Textures</h3>
-<div class="sect3">
-<h4 id="cl_khr_d3d10_sharing-overview">Overview</h4>
-<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></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d10_sharing-new-procedures-and-functions">New Procedures and 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: #008080">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clGetDeviceIDsFromD3D10KHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_platform_id</span> platform<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_d3d10_device_source_khr</span> d3d_device_source<span style="color: #990000">,</span>
-                                  <span style="color: #009900">void</span> <span style="color: #990000">*</span>d3d_object<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_d3d10_device_set_khr</span> d3d_device_set<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_uint</span> num_entries<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_device_id</span> <span style="color: #990000">*</span>devices<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_uint</span> <span style="color: #990000">*</span>num_devices<span style="color: #990000">)</span>
-
-<span style="color: #008080">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromD3D10BufferKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                  <span style="color: #008080">ID3D10Buffer</span> <span style="color: #990000">*</span>resource<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span>
-
-<span style="color: #008080">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromD3D10Texture2DKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                     <span style="color: #008080">ID3D10Texture2D</span> <span style="color: #990000">*</span>resource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">UINT</span> subresource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span>
-
-<span style="color: #008080">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromD3D10Texture3DKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                     <span style="color: #008080">ID3D10Texture3D</span> <span style="color: #990000">*</span>resource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">UINT</span> subresource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span>
-
-<span style="color: #008080">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueAcquireD3D10ObjectsKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span>
-
-<span style="color: #008080">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueReleaseD3D10ObjectsKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d10_sharing-new-tokens">New Tokens</h4>
-<div class="paragraph"><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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<pre>CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR  -1005</pre>
-</div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d10_sharing-additions-to-chapter-4">Additions to Chapter 4 of the OpenCL 2.2 Specification</h4>
-<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>"<em>properties</em> 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 NULL or empty (points to a list whose first value is zero), all attributes take on their default values."</p></div>
-<div class="paragraph"><p>Add the following to <em>table 4.5</em>:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:40%;">
-<col style="width:20%;">
-<col style="width:40%;">
-<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_<br>
-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.</p>
-<p class="tableblock">The default value is NULL.</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-NULL 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-NULL 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"
-style="
-width:100%;
-">
-<col style="width:40%;">
-<col style="width:20%;">
-<col style="width:40%;">
-<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_<br>
-SHARED_RESOURCES_KHR</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">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="sect3">
-<h4 id="cl_khr_d3d10_sharing-additions-to-chapter-5">Additions to Chapter 5 of the OpenCL 2.2 Specification</h4>
-<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"
-style="
-width:100%;
-">
-<col style="width:40%;">
-<col style="width:20%;">
-<col style="width:40%;">
-<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_<br>
-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"
-style="
-width:100%;
-">
-<col style="width:40%;">
-<col style="width:20%;">
-<col style="width:40%;">
-<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_<br>
-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 monospaced">
-<pre>CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR
-CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR</pre>
-</div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d10_sharing-sharing-memory-objects-with-direct3d-10-resources">Sharing Memory Objects with Direct3D 10 Resources</h4>
-<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="sect4">
-<h5 id="cl_khr_d3d10_sharing-querying-opencl-devices-corresponding-to-direct3d-10-devices">Querying OpenCL Devices Corresponding to Direct3D 10 Devices</h5>
-<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="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clGetDeviceIDsFromD3D10KHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_platform_id</span> platform<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_d3d10_device_source_khr</span> d3d_device_source<span style="color: #990000">,</span>
-                                  <span style="color: #009900">void</span> <span style="color: #990000">*</span>d3d_object<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_d3d10_device_set_khr</span> d3d_device_set<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_uint</span> num_entries<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_device_id</span> <span style="color: #990000">*</span>devices<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_uint</span> <span style="color: #990000">*</span>num_devices<span style="color: #990000">)</span></tt></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 NULL 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 NULL, 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 NULL, 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 NULL, or if both <em>num_devices</em> and <em>devices</em> are NULL.
-</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 class="tableblock frame-all grid-all" id="cl_khr_d3d10_sharing-clGetDeviceIDsFromD3D10KHR-object-type"
-style="
-width:100%;
-">
-<caption class="title">Table 19. <em>Direct3D 10 object types that may be used by</em> <strong>clGetDeviceIDsFromD3D10KHR</strong></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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 class="tableblock frame-all grid-all" id="cl_khr_d3d10_sharing-clGetDeviceIDsFromD3D10KHR-devices"
-style="
-width:100%;
-">
-<caption class="title">Table 20. <em>Sets of devices queriable using</em> <strong>clGetDeviceIDsFromD3D10KHR</strong></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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="sect4">
-<h5 id="cl_khr_d3d10_sharing-lifetime-of-shared-objects">Lifetime of Shared Objects</h5>
-<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="sect4">
-<h5 id="cl_khr_d3d10_sharing-sharing-direct3d-10-buffer-resources-as-opencl-buffer-objects">Sharing Direct3D 10 Buffer Resources as OpenCL Buffer Objects</h5>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromD3D10BufferKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                  <span style="color: #008080">ID3D10Buffer</span> <span style="color: #990000">*</span>resource<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span></tt></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 NULL, 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 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 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="sect4">
-<h5 id="cl_khr_d3d10_sharing-sharing-direct3d-10-texture-and-resources-as-opencl-image-objects">Sharing Direct3D 10 Texture and Resources as OpenCL Image Objects</h5>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromD3D10Texture2DKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                     <span style="color: #008080">ID3D10Texture2D</span> <span style="color: #990000">*</span>resource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">UINT</span> subresource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span></tt></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 NULL, 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 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 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="paragraph"><p></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">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromD3D10Texture3DKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                     <span style="color: #008080">ID3D10Texture3D</span> <span style="color: #990000">*</span>resource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">UINT</span> subresource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span></tt></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 NULL, 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 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 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 class="tableblock frame-all grid-all" id="cl_khr_d3d10_sharing-mapping-of-image-formats"
-style="
-width:100%;
-">
-<caption class="title">Table 21. <em>Direct3D 10 formats and corresponding OpenCL image formats</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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" ><p class="tableblock"></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">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" ><p class="tableblock"></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">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" ><p class="tableblock"></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">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" ><p class="tableblock"></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">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" ><p class="tableblock"></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">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" ><p class="tableblock"></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">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" ><p class="tableblock"></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">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" ><p class="tableblock"></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">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="sect4">
-<h5 id="cl_khr_d3d10_sharing-querying-direct3d-properties-of-memory-objects-created-from-direct3d-10-resources">Querying Direct3D properties of memory objects created from Direct3D 10 resources</h5>
-<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="sect4">
-<h5 id="cl_khr_d3d10_sharing-sharing-memory-objects-created-from-direct3d-10-resources-between-direct3d-10-and-opencl-contexts">Sharing memory objects created from Direct3D 10 resources between Direct3D 10 and OpenCL contexts</h5>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueAcquireD3D10ObjectsKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span></tt></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 NULL, then this particular command does not wait on any event to complete. If <em>event_wait_list</em> is NULL, <em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL, 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 NULL 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 NULL, 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 NULL 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 NULL value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is NULL.
-</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 NULL and <em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not NULL 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="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueReleaseD3D10ObjectsKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span></tt></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 NULL, then this particular command does not wait on any event to complete. If <em>event_wait_list</em> is NULL, <em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL, 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 NULL 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 NULL, 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 NULL 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 NULL value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is NULL.
-</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 NULL and <em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not NULL 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="sect3">
-<h4 id="cl_khr_d3d10_sharing-issues">Issues</h4>
-<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 monospaced">
-<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>"Some implementations may require the resource to be shared on the D3D10 side of the API"</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"><!-- Generator: GNU 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">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromD3D10Texture1D</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                  <span style="color: #008080">ID3D10Texture2D</span> <span style="color: #990000">*</span>resource<span style="color: #990000">,</span>
-                                  <span style="color: #008080">UINT</span> subresource<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span></tt></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 class="sect2">
-<h3 id="cl_khr_d3d11_sharing">Creating OpenCL Memory Objects from Direct3D 11 Buffers and Textures</h3>
-<div class="sect3">
-<h4 id="cl_khr_d3d11_sharing-overview">Overview</h4>
-<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="sect3">
-<h4 id="cl_khr_d3d11_sharing-new-procedures-and-functions">New Procedures and 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: #008080">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clGetDeviceIDsFromD3D11KHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_platform_id</span> platform<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_d3d11_device_source_khr</span> d3d_device_source<span style="color: #990000">,</span>
-                                  <span style="color: #009900">void</span> <span style="color: #990000">*</span>d3d_object<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_d3d11_device_set_khr</span> d3d_device_set<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_uint</span> num_entries<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_device_id</span> <span style="color: #990000">*</span>devices<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_uint</span> <span style="color: #990000">*</span>num_devices<span style="color: #990000">)</span>
-
-<span style="color: #008080">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromD3D11BufferKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                  <span style="color: #008080">ID3D11Buffer</span> <span style="color: #990000">*</span>resource<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span>
-
-<span style="color: #008080">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromD3D11Texture2DKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                     <span style="color: #008080">ID3D11Texture2D</span> <span style="color: #990000">*</span>resource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">UINT</span> subresource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span>
-
-<span style="color: #008080">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromD3D11Texture3DKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                     <span style="color: #008080">ID3D11Texture3D</span> <span style="color: #990000">*</span>resource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">UINT</span> subresource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span>
-
-<span style="color: #008080">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueAcquireD3D11ObjectsKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span>
-
-<span style="color: #008080">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueReleaseD3D11ObjectsKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d11_sharing-new-tokens">New Tokens</h4>
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<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 monospaced">
-<pre>CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR  -1009</pre>
-</div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d11_sharing-additions-to-chapter-4">Additions to Chapter 4 of the OpenCL 2.2 Specification</h4>
-<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>"<em>properties</em> 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 NULL or empty (points to a list whose first value is zero), all attributes take on their default values."</p></div>
-<div class="paragraph"><p>Add the following to <em>table 4.5</em>:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:40%;">
-<col style="width:20%;">
-<col style="width:40%;">
-<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_<br>
-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 NULL.</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-NULL 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-NULL 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"
-style="
-width:100%;
-">
-<col style="width:40%;">
-<col style="width:20%;">
-<col style="width:40%;">
-<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_<br>
-SHARED_RESOURCES_KHR</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">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="sect3">
-<h4 id="cl_khr_d3d11_sharing-additions-to-chapter-5">Additions to Chapter 5 of the OpenCL 2.2 Specification</h4>
-<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"
-style="
-width:100%;
-">
-<col style="width:40%;">
-<col style="width:20%;">
-<col style="width:40%;">
-<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_<br>
-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"
-style="
-width:100%;
-">
-<col style="width:40%;">
-<col style="width:20%;">
-<col style="width:40%;">
-<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_<br>
-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 monospaced">
-<pre>CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR
-CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR</pre>
-</div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_d3d11_sharing-sharing-memory-objects-with-direct3d-11-resources">Sharing Memory Objects with Direct3D 11 Resources</h4>
-<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="sect4">
-<h5 id="cl_khr_d3d11_sharing-querying-opencl-devices-corresponding-to-direct3d-11-devices">Querying OpenCL Devices Corresponding to Direct3D 11 Devices</h5>
-<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="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clGetDeviceIDsFromD3D11KHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_platform_id</span> platform<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_d3d11_device_source_khr</span> d3d_device_source<span style="color: #990000">,</span>
-                                  <span style="color: #009900">void</span> <span style="color: #990000">*</span>d3d_object<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_d3d11_device_set_khr</span> d3d_device_set<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_uint</span> num_entries<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_device_id</span> <span style="color: #990000">*</span>devices<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_uint</span> <span style="color: #990000">*</span>num_devices<span style="color: #990000">)</span></tt></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 NULL 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 NULL, 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 NULL, 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 NULL, or if both <em>num_devices</em> and <em>devices</em> are NULL.
-</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 class="tableblock frame-all grid-all" id="cl_khr_d3d11_sharing-clGetDeviceIDsFromD3D11KHR-object-type"
-style="
-width:100%;
-">
-<caption class="title">Table 22. <em>Direct3D 11 object types that may be used by</em> <strong>clGetDeviceIDsFromD3D11KHR</strong></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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 class="tableblock frame-all grid-all" id="cl_khr_d3d11_sharing-clGetDeviceIDsFromD3D10KHR-devices"
-style="
-width:100%;
-">
-<caption class="title">Table 23. <em>Sets of devices queriable using</em> <strong>clGetDeviceIDsFromD3D11KHR</strong></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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="sect4">
-<h5 id="cl_khr_d3d11_sharing-lifetime-of-shared-objects">Lifetime of Shared Objects</h5>
-<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="sect4">
-<h5 id="cl_khr_d3d11_sharing-sharing-direct3d-11-buffer-resources-as-opencl-buffer-objects">Sharing Direct3D 11 Buffer Resources as OpenCL Buffer Objects</h5>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromD3D11BufferKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                  <span style="color: #008080">ID3D11Buffer</span> <span style="color: #990000">*</span>resource<span style="color: #990000">,</span>
-                                  <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span></tt></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 NULL, 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 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 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="sect4">
-<h5 id="cl_khr_d3d11_sharing-sharing-direct3d-11-texture-and-resources-as-opencl-image-objects">Sharing Direct3D 11 Texture and Resources as OpenCL Image Objects</h5>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromD3D11Texture2DKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                     <span style="color: #008080">ID3D11Texture2D</span> <span style="color: #990000">*</span>resource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">UINT</span> subresource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span></tt></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 NULL, 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 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 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="paragraph"><p></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">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromD3D11Texture3DKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                                     <span style="color: #008080">ID3D11Texture3D</span> <span style="color: #990000">*</span>resource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">UINT</span> subresource<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span></tt></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 NULL, 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 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 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 class="tableblock frame-all grid-all" id="cl_khr_d3d11_sharing-mapping-of-image-formats"
-style="
-width:100%;
-">
-<caption class="title">Table 24. <em>Direct3D 11 formats and corresponding OpenCL image formats</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<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" ><p class="tableblock"></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">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" ><p class="tableblock"></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">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" ><p class="tableblock"></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">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" ><p class="tableblock"></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">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" ><p class="tableblock"></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">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" ><p class="tableblock"></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">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" ><p class="tableblock"></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">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" ><p class="tableblock"></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">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="sect4">
-<h5 id="cl_khr_d3d11_sharing-querying-direct3d-properties-of-memory-objects-created-from-direct3d-11-resources">Querying Direct3D properties of memory objects created from Direct3D 11 resources</h5>
-<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="sect4">
-<h5 id="cl_khr_d3d11_sharing-sharing-memory-objects-created-from-direct3d-11-resources-between-direct3d-11-and-opencl-contexts">Sharing memory objects created from Direct3D 11 resources between Direct3D 11 and OpenCL contexts</h5>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueAcquireD3D11ObjectsKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span></tt></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 NULL, then this particular command does not wait on any event to complete. If <em>event_wait_list</em> is NULL, <em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL, 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 NULL 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 NULL, 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 NULL 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 NULL value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is NULL.
-</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 NULL and <em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not NULL 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="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueReleaseD3D11ObjectsKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                       <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                       <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span></tt></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 NULL, then this particular command does not wait on any event to complete. If <em>event_wait_list</em> is NULL, <em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL, 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 NULL 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 NULL, 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 NULL 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 NULL value or if <em>num_objects</em> &gt; 0 and <em>mem_objects</em> is NULL.
-</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 NULL and <em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not NULL 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>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_gl_depth_images">Sharing OpenGL and OpenGL ES Depth and Depth-Stencil Images</h3>
-<div class="paragraph"><p>This section describes the <strong>cl_khr_gl_depth_images</strong> extension. The <strong>cl_khr_gl_depth_images</strong> extends OpenCL / OpenGL sharing (the cl_khr_gl_sharing_extension) defined in <a href="#cl_khr_gl_sharing__memobjs">Creating OpenCL Memory Objects from OpenGL Objects</a> to allow an OpenCL image to be created from an OpenGL depth or depth-stencil texture.</p></div>
-<div class="sect3">
-<h4 id="cl_khr_gl_depth_images-additions-to-chapter-5">Additions to Chapter 5 of the OpenCL 2.2 Specification</h4>
-<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 depth-stencil texture. Depth images with an image channel order of CL_DEPTH_STENCIL can only be created using the <strong>clCreateFromGLTexture</strong> API.</p></div>
-<div class="paragraph"><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"
-style="
-width:100%;
-">
-<col style="width:100%;">
-<thead>
-<tr>
-<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_STENCIL.</strong> This format can only be used if channel data type = CL_UNORM_INT24 or CL_FLOAT.</p></td>
-</tr>
-</tbody>
-</table>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:50%;">
-<col style="width:50%;">
-<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_UNORM_INT24</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Each channel component is a normalized unsigned 24-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>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 class="tableblock frame-all grid-all" id="cl_khr_gl_depth_images-required-image-formats"
-style="
-width:100%;
-">
-<caption class="title">Table 25. <em>Required Image Formats for</em> <strong>cl_khr_gl_depth_images</strong></caption>
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>num_channels</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>channel_order</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>channel_data_type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>read / write</strong></p></td>
-</tr>
-<tr>
-<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_STENCIL</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_UNORM_INT24<br>
-CL_FLOAT</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">read only</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>For the image format given by channel order of CL_DEPTH_STENCIL and channel data type of CL_UNORM_INT24, the depth is stored as an unsigned normalized 24-bit value.</p></div>
-<div class="paragraph"><p>For the image format given by channel order of CL DEPTH_STENCIL and channel data type of CL_FLOAT, each pixel is two 32-bit values. The depth is stored as a single precision floating-point value followed by the stencil which is stored as a 8-bit integer value.</p></div>
-<div class="paragraph"><p>The stencil value cannot be read or written using the <strong>read_imagef</strong> and <strong>write_imagef</strong> built-in functions in an OpenCL kernel.</p></div>
-<div class="paragraph"><p>Depth image objects with an image channel order equal to CL_DEPTH_STENCIL cannot be used as arguments to clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapImage and clEnqueueFillImage and will return a CL_INVALID_OPERATION error.</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_depth_images-additions-to-extension-specification">Additions to the OpenCL Extension Specification</h4>
-<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 formats and corresponding OpenCL internal formats</a> in the OpenCL extension specification. If an OpenGL texture object with an internal format in this table is 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"
-style="
-width:100%;
-">
-<col style="width:50%;">
-<col style="width:50%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>GL internal 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">GL_DEPTH_COMPONENT32F</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEPTH, CL_FLOAT</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">GL_DEPTH_COMPONENT16</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEPTH, CL_UNORM_INT16</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">GL_DEPTH24_STENCIL8</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEPTH_STENCIL, CL_UNORM_INT24</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">GL_DEPTH32F_STENCIL8</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEPTH_STENCIL, CL_FLOAT</p></td>
-</tr>
-</tbody>
-</table>
-<div style="page-break-after:always"></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_gl_msaa_sharing">Creating OpenCL Memory Obejcts from OpenGL MSAA Textures</h3>
-<div class="paragraph"><p>This extension extends the OpenCL / OpenGL sharing (the cl_khr_gl_sharing_extension) defined in <a href="#cl_khr_gl_sharing__memobjs">Creating OpenCL Memory Objects from OpenGL Objects</a> to allow an OpenCL image to be created from an OpenGL multi-sampled (a.k.a. MSAA) texture (color or depth).</p></div>
-<div class="paragraph"><p>This extension name is <strong>cl_khr_gl_msaa_sharing</strong>. This extension requires <strong>cl_khr_gl_depth_images</strong>.</p></div>
-<div class="sect3">
-<h4 id="cl_khr_gl_msaa_sharing-additions-to-extension-specification">Additions to the OpenCL Extension Specification</h4>
-<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></div>
-<div class="paragraph"><p>If <em>texture_target</em> is GL_TEXTURE_2D_MULTISAMPLE, <strong>clCreateFromGLTexture</strong> creates an OpenCL 2D multi-sample image object from an OpenGL 2D multi-sample texture.</p></div>
-<div class="paragraph"><p>If <em>texture_target</em> is GL_TEXTURE_2D_MULTISAMPLE_ARRAY, <strong>clCreateFromGLTexture</strong> creates an OpenCL 2D multi-sample array image object from an OpenGL 2D multi-sample texture.</p></div>
-<div class="paragraph"><p>Multi-sample OpenCL image objects can only be read from a kernel. Multi-sample OpenCL image objects cannot be used as arguments to clEnqueueReadImage , clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapImage and clEnqueueFillImage and will return a CL_INVALID_OPERATION error.</p></div>
-<div class="paragraph"><p><strong>Add the following entry to the table describing <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"
-style="
-width:100%;
-">
-<col style="width:33%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top" ><strong>cl_gl_texture_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_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>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_msaa_sharing-additions-to-chapter-5">Additions to Chapter 5 of the OpenCL 2.2 Specification</h4>
-<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 <a href="#cl_khr_gl_depth_images-required-image-formats">required image formats for cl_khr_gl_depth_images</a> also support OpenCL images created from a OpenGL multi-sampled color or depth texture.</p></div>
-<div class="paragraph"><p><strong>Update text that describes arg value argument to clSetKernelArg with the following:</strong></p></div>
-<div class="paragraph"><p>"If the argument is a multi-sample 2D image, the <em>arg_value</em> entry must be a pointer to a multi-sample image object. If the argument is a multi-sample 2D depth image, the <em>arg_value</em> entry must be a pointer to a multisample depth image object. If the argument is a multi-sample 2D image array, the <em>arg_value</em> entry must be a pointer to a multi-sample image array object. If the argument is a multi-sample 2D depth image array, the <em>arg_value</em> entry must be a pointer to a multi-sample depth image array object."</p></div>
-<div class="paragraph"><p><strong>Updated error code text for clSetKernelArg is:</strong></p></div>
-<div class="paragraph"><p><strong>Add the following text:</strong></p></div>
-<div class="paragraph"><p>"CL_INVALID_MEM_OBJECT for an argument declared to be a multi-sample image, multi-sample image array, multi-sample depth image or a multi-sample depth image array and the argument value specified in <em>arg_value</em> does not follow the rules described above for a depth memory object or memory array object argument."</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_gl_msaa_sharing-additions-to-chapter-6">Additions to Chapter 6 of the OpenCL 2.2 Specification</h4>
-<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"
-style="
-width:100%;
-">
-<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"><strong>image2d_msaa_t</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 2D multi-sample color image. Refer to <em>section 6.13.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_msaa_t</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 2D multi-sample color image array. Refer to <em>section 6.13.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_msaa_depth_t</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 2D multi-sample depth image. Refer to <em>section 6.13.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_msaa_depth_t</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 2D multi-sample depth image array. Refer to <em>section 6.13.14</em> for a detailed description of the built-in
-functions that use this type.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><strong>Add the following built-in functions to section 6.13.14.3 – BuiltIn Image Sampler-less Read Functions:</strong></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> <span style="font-weight: bold"><span style="color: #000000">read_imagef</span></span><span style="color: #990000">(</span>
-    <span style="color: #008080">image2d_msaa_t</span> image<span style="color: #990000">,</span>
-    <span style="color: #008080">int2</span> coord<span style="color: #990000">,</span>
-    <span style="color: #009900">int</span> sample<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Use the coordinate <em>(coord.x, coord.y)</em> and <em>sample</em> to do an element lookup in the 2D image object specified by <em>image</em>.</p></div>
-<div class="paragraph"><p><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 CL_UNORM_INT8, or CL_UNORM_INT16.</p></div>
-<div class="paragraph"><p><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 CL_SNORM_INT8, or CL_SNORM_INT16.</p></div>
-<div class="paragraph"><p><strong>read_imagef</strong> returns floating-point values for image objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT or CL_FLOAT.</p></div>
-<div class="paragraph"><p>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></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> <span style="font-weight: bold"><span style="color: #000000">read_imagei</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_t</span> image<span style="color: #990000">,</span>
-                 <span style="color: #008080">int2</span> coord<span style="color: #990000">,</span>
-                 <span style="color: #009900">int</span> sample<span style="color: #990000">)</span>
-
-<span style="color: #008080">uint4</span> <span style="font-weight: bold"><span style="color: #000000">read_imageui</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_t</span> image<span style="color: #990000">,</span>
-                   <span style="color: #008080">int2</span> coord<span style="color: #990000">,</span>
-                   <span style="color: #009900">int</span> sample<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Use the coordinate <em>(coord.x, coord.y)</em> and <em>sample</em> to do an element lookup in the 2D image object specified by <em>image</em>.</p></div>
-<div class="paragraph"><p><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></div>
-<div class="paragraph"><p><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></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_SIGNED_INT8,
-</p>
-</li>
-<li>
-<p>
-CL_SIGNED_INT16, and
-</p>
-</li>
-<li>
-<p>
-CL_SIGNED_INT32.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>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></div>
-<div class="paragraph"><p><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></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_UNSIGNED_INT8,
-</p>
-</li>
-<li>
-<p>
-CL_UNSIGNED_INT16, and
-</p>
-</li>
-<li>
-<p>
-CL_UNSIGNED_INT32.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>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></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> <span style="font-weight: bold"><span style="color: #000000">read_imagef</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_t</span> image<span style="color: #990000">,</span>
-                   <span style="color: #008080">int4</span> coord<span style="color: #990000">,</span>
-                   <span style="color: #009900">int</span> sample<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Use <em>coord.xy</em> and <em>sample</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></div>
-<div class="paragraph"><p><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 CL_UNORM_INT8, or CL_UNORM_INT16.</p></div>
-<div class="paragraph"><p><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 CL_SNORM_INT8, or CL_SNORM_INT16.</p></div>
-<div class="paragraph"><p><strong>read_imagef</strong> returns floating-point values for image objects created with <em>image_channel_data_type</em> set to CL_HALF_FLOAT or CL_FLOAT.</p></div>
-<div class="paragraph"><p>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></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> <span style="font-weight: bold"><span style="color: #000000">read_imagei</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_t</span> image<span style="color: #990000">,</span>
-                 <span style="color: #008080">int4</span> coord<span style="color: #990000">,</span>
-                 <span style="color: #009900">int</span> sample<span style="color: #990000">)</span>
-
-<span style="color: #008080">uint4</span> <span style="font-weight: bold"><span style="color: #000000">read_imageui</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_t</span> image<span style="color: #990000">,</span>
-                   <span style="color: #008080">int4</span> coord<span style="color: #990000">,</span>
-                   <span style="color: #009900">int</span> sample<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Use <em>coord.xy</em> and <em>sample</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></div>
-<div class="paragraph"><p><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></div>
-<div class="paragraph"><p><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></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_SIGNED_INT8,
-</p>
-</li>
-<li>
-<p>
-CL_SIGNED_INT16, and
-</p>
-</li>
-<li>
-<p>
-CL_SIGNED_INT32.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>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></div>
-<div class="paragraph"><p><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></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_UNSIGNED_INT8,
-</p>
-</li>
-<li>
-<p>
-CL_UNSIGNED_INT16, and
-</p>
-</li>
-<li>
-<p>
-CL_UNSIGNED_INT32.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>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></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">read_imagef</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_depth_t</span> image<span style="color: #990000">,</span>
-                  <span style="color: #008080">int2</span> coord<span style="color: #990000">,</span>
-                  <span style="color: #009900">int</span> sample<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Use the coordinate <em>(coord.x, coord.y)</em> and <em>sample</em> to do an element lookup in the 2D depth image object specified by <em>image</em>.</p></div>
-<div class="paragraph"><p><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 CL_UNORM_INT16 or CL_UNORM_INT24.</p></div>
-<div class="paragraph"><p><strong>read_imagef</strong> returns a floating-point value for depth image objects created with <em>image_channel_data_type</em> set to CL_FLOAT.</p></div>
-<div class="paragraph"><p>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></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">read_imagef</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaaa_depth_t</span> image<span style="color: #990000">,</span>
-                  <span style="color: #008080">int4</span> coord<span style="color: #990000">,</span>
-                  <span style="color: #009900">int</span> sample<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Use <em>coord.xy</em> and <em>sample</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></div>
-<div class="paragraph"><p><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 CL_UNORM_INT16 or CL_UNORM_INT24.</p></div>
-<div class="paragraph"><p><strong>read_imagef</strong> returns a floating-point value for depth image objects created with <em>image_channel_data_type</em> set to CL_FLOAT.</p></div>
-<div class="paragraph"><p>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></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">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. sample identifies the sample position in the multi-sample image.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p><strong>For best performance, we recommend that <em>sample</em> be a literal value so it is known at compile time and the OpenCL compiler can perform appropriate optimizations for multi-sample reads on the device</strong>.</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 class="paragraph"><p><strong>Add the following built-in functions to section 6.13.14.5 – BuiltIn Image Query Functions:</strong></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">get_image_width</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_width</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_width</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_depth_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_width</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_depth_t</span> image<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the image width in pixels.</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">get_image_height</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_height</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_height</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_depth_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_height</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_depth_t</span> image<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the image height in pixels.</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">get_image_channel_data_type</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_channel_data_type</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_channel_data_type</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_depth_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_channel_data_type</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_depth_t</span> image<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the channel data 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: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_channel_order</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_channel_order</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_channel_order</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_depth_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_channel_order</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_depth_t</span> image<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the image channel order.</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> <span style="font-weight: bold"><span style="color: #000000">get_image_dim</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #008080">int2</span> <span style="font-weight: bold"><span style="color: #000000">get_image_dim</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #008080">int2</span> <span style="font-weight: bold"><span style="color: #000000">get_image_dim</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_depth_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #008080">int2</span> <span style="font-weight: bold"><span style="color: #000000">get_image_dim</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_depth_t</span> image<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>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></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">size_t</span> <span style="font-weight: bold"><span style="color: #000000">get_image_array_size</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_depth_t</span> image<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the number of images in the 2D 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">get_image_num_samples</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_num_samples</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_num_samples</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_msaa_depth_t</span> image<span style="color: #990000">)</span>
-
-<span style="color: #009900">int</span> <span style="font-weight: bold"><span style="color: #000000">get_image_num_samples</span></span><span style="color: #990000">(</span><span style="color: #008080">image2d_array_msaa_depth_t</span> image<span style="color: #990000">)</span></tt></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 class="sect2">
-<h3 id="cl_khr_initialize_memory">Local and Private Memory Initialization</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></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="sect3">
-<h4 id="cl_khr_initialize_memory-additions-to-chapter-4">Additions to Chapter 4 of the OpenCL 2.2 Specification</h4>
-<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"
-style="
-width:100%;
-">
-<col style="width:33%;">
-<col style="width:22%;">
-<col style="width:44%;">
-<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_<br>
-INITIALIZE_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_context_memory_<br>
-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:<br>
-<br>
-CL_CONTEXT_MEMORY_<br>
-INITIALIZE_LOCAL_KHR – Initialize local memory to zeros.<br>
-<br>
-CL_CONTEXT_MEMORY_<br>
-INITIALIZE_PRIVATE_KHR – Initialize private memory to zeros.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_initialize_memory-additions-to-chapter-6">Additions to Chapter 6 of the OpenCL 2.2 Specification</h4>
-<div class="paragraph"><p>Updates to <em>section 6.9</em> – Restrictions</p></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></div>
-<div style="page-break-after:always"></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_terminate_context">Terminating OpenCL contexts</h3>
-<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="sect3">
-<h4 id="cl_khr_terminate_context-additions-to-chapter-4">Additions to Chapter 4 of the OpenCL 2.2 Specification</h4>
-<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"
-style="
-width:100%;
-">
-<col style="width:33%;">
-<col style="width:22%;">
-<col style="width:44%;">
-<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_<br>
-CAPABILITY_KHR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_device_terminate_<br>
-capability_khr</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:<br>
-<br>
-CL_DEVICE_TERMINATE_CAPABILITY_<br>
-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"
-style="
-width:100%;
-">
-<col style="width:33%;">
-<col style="width:22%;">
-<col style="width:44%;">
-<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_<br>
-TERMINATE_KHR</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">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>A new function is added. The function</p></div>
-<div class="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clTerminateContextKHR</span></span><span style="color: #990000">(</span>cl <span style="color: #008080">context</span> context<span style="color: #990000">)</span></tt></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></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></div>
-<div class="paragraph"><p><strong>clTerminateContextKHR</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_CONTEXT if <em>context</em> is not a valid OpenCL 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>
-</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 class="sect2">
-<h3 id="cl_khr_spir">SPIR 1.2 Binaries</h3>
-<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="sect3">
-<h4 id="cl_khr_spir-additions-to-chapter-4">Additions to Chapter 4 of the OpenCL 2.2 Specification</h4>
-<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"
-style="
-width:100%;
-">
-<col style="width:28%;">
-<col style="width:14%;">
-<col style="width:57%;">
-<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_<br>
-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 “1.2” in this query implies that SPIR version 1.2 is supported by the implementation.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_spir-additions-to-chapter-5">Additions to Chapter 5 of the OpenCL 2.2 Specification</h4>
-<div class="paragraph"><p><strong>Additions to <em>section 5.8.1</em> – Creating Program Objects:</strong></p></div>
-<div class="paragraph"><p>"<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."</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"
-style="
-width:100%;
-">
-<col style="width:28%;">
-<col style="width:14%;">
-<col style="width:57%;">
-<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_<br>
-BINARY_TYPE</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_program_<br>
-binary_type</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_PROGRAM_BINARY_TYPE_INTERMEDIATE – An intermediate (non-source) representation for the program is loaded as a binary. The program must be further processed with clCompileProgram or clBuildProgram.</p>
-<p class="tableblock">If processed with clCompileProgram, the result will be a binary of type CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT or CL_PROGRAM_BINARY_TYPE_LIBRARY. If processed with clBuildProgram, 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> – Compiler Options:</strong></p></div>
-<div class="paragraph"><p>"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."</p></div>
-<div class="paragraph"><p><strong>Additions to <em>section 5.9.3</em> – Kernel Object Queries:</strong></p></div>
-<div class="paragraph"><p>Modify following text in clGetKernelArgInfo from:</p></div>
-<div class="paragraph"><p>"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>."</p></div>
-<div class="paragraph"><p>to:</p></div>
-<div class="paragraph"><p>"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>."</p></div>
-<div style="page-break-after:always"></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_icd-opencl">OpenCL Installable Client Driver (ICD)</h3>
-<div class="sect3">
-<h4 id="cl_khr_icd-overview">Overview</h4>
-<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>If this extension is supported by an implementation, the string <strong>cl_khr_icd</strong> will be present in the CL_PLATFORM_EXTENSIONS string described in <em>table</em> <em>4.1</em>.</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_icd-inferring-vendors-from-function-call-arguments">Inferring Vendors from Function Call Arguments</h4>
-<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"><!-- Generator: 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">_cl_</span><span style="color: #990000">&lt;</span>object<span style="color: #990000">&gt;</span>
-<span style="color: #FF0000">{</span>
-    <span style="font-weight: bold"><span style="color: #0000FF">struct</span></span> <span style="color: #008080">_cl_icd_dispatch</span> <span style="color: #990000">*</span>dispatch<span style="color: #990000">;</span>
-    <span style="font-style: italic"><span style="color: #9A1900">// ... remainder of internal data</span></span>
-<span style="color: #FF0000">}</span><span style="color: #990000">;</span></tt></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 <span class="monospaced">_cl_icd_dispatch</span> 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>A link to source code which defines the entries in the function table structure <span class="monospaced">_cl_icd_dispatch</span> is available in the Sample Code section of this document. The order of the functions in <span class="monospaced">_cl_icd_dispatch</span> is determined by the ICD Loader&#8217;s source. The ICD Loader&#8217;s source&#8217;s <span class="monospaced">_cl_icd_dispatch</span> 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="sect3">
-<h4 id="cl_khr_icd-icd-data">ICD Data</h4>
-<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="sect3">
-<h4 id="cl_khr_icd-icd-loader-vendor-enumeration-on-windows">ICD Loader Vendor Enumeration on Windows</h4>
-<div class="paragraph"><p>To enumerate Vendor ICDs on Windows, the ICD Loader scans the values in the registry key <span class="monospaced">HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors</span>. For each value in this key which has DWORD data set to 0, the ICD Loader opens the dynamic link library specified by the name of the value using LoadLibraryA.</p></div>
-<div class="paragraph"><p>For example, if the registry contains the following value</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>[HKEY_LOCAL_MACHINE\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 library <span class="monospaced">"c:\vendor a\vndra_ocl.dll"</span>.</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_icd-icd-loader-vendor-enumeration-on-linux">ICD Loader Vendor Enumeration on Linux</h4>
-<div class="paragraph"><p>To enumerate vendor ICDs on Linux, the ICD Loader scans the files in the path <span class="monospaced">/etc/OpenCL/vendors</span>. 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 monospaced">
-<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 monospaced">
-<pre>libVendorAOpenCL.so</pre>
-</div></div>
-<div class="paragraph"><p>then the ICD Loader will load the library <span class="monospaced">"libVendorAOpenCL.so"</span>.</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_icd-icd-loader-vendor-enumeration-on-android">ICD Loader Vendor Enumeration on Android</h4>
-<div class="paragraph"><p>To enumerate vendor ICDs on Android, the ICD Loader scans the files in the path <span class="monospaced">/system/vendor/Khronos/OpenCL/vendors</span>. 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 monospaced">
-<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 monospaced">
-<pre>libVendorAOpenCL.so</pre>
-</div></div>
-<div class="paragraph"><p>then the ICD Loader will load the library <span class="monospaced">"libVendorAOpenCL.so"</span>.</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_icd-adding-a-vendor-library">Adding a Vendor Library</h4>
-<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="sect3">
-<h4 id="cl_khr_icd-new-procedures-and-functions">New Procedures and 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: #008080">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clIcdGetPlatformIDsKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_uint</span> num_entries<span style="color: #990000">,</span>
-                              <span style="color: #008080">cl_platform_id</span> <span style="color: #990000">*</span>platforms<span style="color: #990000">,</span>
-                              <span style="color: #008080">cl_uint</span> <span style="color: #990000">*</span>num_platforms<span style="color: #990000">);</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_icd-new-tokens">New Tokens</h4>
-<div class="paragraph"><p>Accepted as <em>param_name</em> to the function <strong>clGetPlatformInfo</strong></p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<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 monospaced">
-<pre>CL_PLATFORM_NOT_FOUND_KHR   -1001</pre>
-</div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_icd-additions-to-chapter-4">Additions to Chapter 4 of the OpenCL 2.2 Specification</h4>
-<div class="paragraph"><p>In section 4.1, replace the description of the return values of clGetPlatformIDs 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 &lt;num_entries&gt; is equal to zero and &lt;platforms&gt; is not NULL or if both &lt;num_platforms&gt; and &lt;platforms&gt; are NULL."</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="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clIcdGetPlatformIDsKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_uint</span> num_entries<span style="color: #990000">,</span>
-                              <span style="color: #008080">cl_platform_id</span> <span style="color: #990000">*</span>platforms<span style="color: #990000">,</span>
-                              <span style="color: #008080">cl_uint</span> <span style="color: #990000">*</span>num_platforms<span style="color: #990000">);</span></tt></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 NULL, 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 NULL, 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 NULL, 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 NULL or if both <em>num_platforms</em> and <em>platforms</em> are NULL."</p></div>
-<div class="paragraph"><p>Add the following to <em>table 4.1</em>:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:40%;">
-<col style="width:20%;">
-<col style="width:40%;">
-<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="sect3">
-<h4 id="cl_khr_icd-source-code">Source Code</h4>
-<div class="paragraph"><p>The official source for the ICD loader is available at the Khronos website. The complete <span class="monospaced">_cl_icd_dispatch</span> 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="sect3">
-<h4 id="cl_khr_icd-issues">Issues</h4>
-<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 NULL 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 NULL 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 NULL objects passed to the OpenCL functions?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>RESOLVED: The ICD loader will check for NULL objects passed to the OpenCL functions without trying to dereference the NULL objects for obtaining the ICD dispatch table. On detecting a NULL 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 style="page-break-after:always"></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_subgroups">Subgroups</h3>
-<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="sect3">
-<h4 id="cl_khr_subgroups-additions-to-chapter-6-of-the-opencl-2.0-specification">Additions to Chapter 6 of the OpenCL 2.0 C Specification</h4>
-<div class="sect4">
-<h5 id="cl_khr_subgroups-additions-to-section-6.13.1-work-item-functions">Additions to section 6.13.1 – Work Item Functions</h5>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:50%;">
-<col style="width:50%;">
-<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.<br>
-<br>
-This number will be constant for the duration of a work group’s execution. If the kernel is executed with a non-uniform work group size <span class="footnote"><br>[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.]<br></span> in 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.<br>
-<br>
-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.<br>
-<br>
-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="sect4">
-<h5 id="cl_khr_subgroups-additions-to-section-6.13.8-synchronization-functions">Additions to section 6.13.8 – Synchronization Functions</h5>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:50%;">
-<col style="width:50%;">
-<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>void <strong>sub_group_barrier</strong> (cl_mem_fence_flags <em>flags</em>)<br>
-void <strong>sub_group_barrier</strong> (<br>
-cl_mem_fence_flags <em>flags</em>, memory_scope <em>scope</em>)</p></div></div></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.<br>
-<br>
-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.<br>
-<br>
-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.<br>
-<br>
-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.<br>
-<br>
-The flags argument specifies the memory address space and can be set to a combination of the following values:<br>
-<br>
-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.<br>
-<br>
-CLK_GLOBAL_MEM_FENCE – 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.<br>
-<br>
-CLK_IMAGE_MEM_FENCE – 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="sect4">
-<h5 id="cl_khr_subgroups-additions-to-section-6.13.11-atomic-functions">Additions to section 6.13.11 – Atomic Functions</h5>
-<div class="paragraph"><p>Add the following new value to the enumerated type <span class="monospaced">memory_scope</span> defined in <em>section 6.13.11.4</em>.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>memory_scope_sub_group</pre>
-</div></div>
-<div class="paragraph"><p>The <span class="monospaced">memory_scope_sub_group</span> specifies that the memory ordering constraints given by <span class="monospaced">memory_order</span> 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="sect4">
-<h5 id="cl_khr_subgroups-additions-to-section-6.13.15-work-group-functions">Additions to section 6.13.15 – Work Group Functions</h5>
-<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 <span class="monospaced">gentype</span> to indicate the built-in data types <span class="monospaced">half</span> <span class="footnote"><br>[Only if the <strong>cl_khr_fp16</strong> extension is supported.]<br></span>, <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> or <span class="monospaced">double</span> <span class="footnote"><br>[Only if double precision is supported.]<br></span> as the type for the arguments.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:50%;">
-<col style="width:50%;">
-<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.<br>
-<br>
-<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.<br>
-<br>
-The scan order is defined by increasing 1D linear global 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.<br>
-<br>
-The scan order is defined by increasing 1D linear global ID within the subgroup.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect4">
-<h5 id="cl_khr_subgroups-additions-to-section-6.13.16-pipe-functions">Additions to section 6.13.16 – Pipe Functions</h5>
-<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 <span class="monospaced">gentype</span> to indicate the built-in OpenCL C scalar or vector integer or floating-point data types <span class="footnote"><br>[The half scalar and vector types can only be used if the <strong>cl_khr_fp16</strong> extension is supported. The double scalar and vector types can only be used if double precision is supported.]<br></span> 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"
-style="
-width:100%;
-">
-<col style="width:50%;">
-<col style="width:50%;">
-<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>)<br>
-<br>
-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.<br>
-<br>
-The reserved pipe entries are referred to by indices that go from 0 &#8230; <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>)<br>
-<br>
-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="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">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.</td>
-</tr></table>
-</div>
-</div>
-<div class="sect4">
-<h5 id="cl_khr_subgroups-additions-to-section-6.13.17.6-enqueuing-kernels-kernel-query-functions">Additions to section 6.13.17.6 – Enqueuing Kernels (Kernel Query Functions)</h5>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:50%;">
-<col style="width:50%;">
-<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));<br>
-<br></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;));</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.<br>
-<br>
-<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>
-<br>
-uint <strong>get_kernel_max_sub_group_size_for_ndrange</strong> (<br>
-const ndrange_t <em>ndrange</em>,<br>
-void (^block)(local void *, &#8230;));</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 class="sect2">
-<h3 id="cl_khr_mipmap_image">Mipmaps</h3>
-<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="sect3">
-<h4 id="cl_khr_mipmap_image-additions-to-chapter-5">Additions to Chapter 5 of the OpenCL 2.2 Specification</h4>
-<div class="sect4">
-<h5 id="cl_khr_mipmap_image-additions-to-section-5.3">Additions to section 5.3 – Image Objects</h5>
-<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 NULL 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="sect4">
-<h5 id="cl_khr_mipmap_image-additions-to-section-5.7">Additions to section 5.7 – Sampler Objects</h5>
-<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"
-style="
-width:100%;
-">
-<col style="width:50%;">
-<col style="width:16%;">
-<col style="width:33%;">
-<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_KHR</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="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">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.</td>
-</tr></table>
-</div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_mipmap_image-additions-to-creating-opencl-memory-objects-from-opengl-objects">Additions to <a href="#cl_khr_gl_sharing__memobjs">Creating OpenCL Memory Objects from OpenGL Objects</a></h4>
-<div class="paragraph"><p>If both the <strong><span class="monospaced">cl_khr_mipmap_image</span></strong> and <strong><span class="monospaced">cl_khr_gl_sharing</span></strong> extensions are supported by the OpenCL device, the <strong><span class="monospaced">cl_khr_gl_sharing</span></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="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">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.</td>
-</tr></table>
-</div>
-<div style="page-break-after:always"></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_egl_image">Creating OpenCL Memory Objects from EGL Images</h3>
-<div class="sect3">
-<h4 id="cl_khr_egl_image-overview">Overview</h4>
-<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 from EGLImages.</p></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_egl_image-new-procedures-and-functions">New Procedures and 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: #008080">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromEGLImageKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                               <span style="color: #008080">CLeglDisplayKHR</span> display<span style="color: #990000">,</span>
-                               <span style="color: #008080">CLeglImageKHR</span> image<span style="color: #990000">,</span>
-                               <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                               <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_egl_image_properties_khr</span> <span style="color: #990000">*</span>properties<span style="color: #990000">,</span>
-                               <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">);</span>
-
-<span style="color: #008080">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueAcquireEGLObjectsKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span>
-
-<span style="color: #008080">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueReleaseEGLObjectsKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_egl_image-new-tokens">New Tokens</h4>
-<div class="paragraph"><p>New error codes:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>CL_EGL_RESOURCE_NOT_ACQUIRED_KHR    -1092
-CL_INVALID_EGL_OBJECT_KHR           -1093</pre>
-</div></div>
-<div class="paragraph"><p>New command types:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR  0x202D
-CL_COMMAND_RELEASE_EGL_OBJECTS_KHR  0x202E</pre>
-</div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_egl_image-additions-to-chapter-5">Additions to Chapter 5 of the OpenCL 2.2 Specification</h4>
-<div class="paragraph"><p>In section 5.2.4, add the following text after the paragraph defining clCreateImage:</p></div>
-<div class="paragraph"><p>"The function</p></div>
-<div class="paragraph"><p></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">cl_mem</span> <span style="font-weight: bold"><span style="color: #000000">clCreateFromEGLImageKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                               <span style="color: #008080">CLeglDisplayKHR</span> display<span style="color: #990000">,</span>
-                               <span style="color: #008080">CLeglImageKHR</span> image<span style="color: #990000">,</span>
-                               <span style="color: #008080">cl_mem_flags</span> flags<span style="color: #990000">,</span>
-                               <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_egl_image_properties_khr</span> <span style="color: #990000">*</span>properties<span style="color: #990000">,</span>
-                               <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">);</span></tt></pre></div></div>
-<div class="paragraph"><p>creates an EGLImage target of type cl_mem from the EGLImage source provided as <em>image</em>.</p></div>
-<div class="paragraph"><p><em>display</em> should be of type EGLDisplay, cast into the type CLeglDisplayKHR.</p></div>
-<div class="paragraph"><p><em>image</em> should be of type EGLImageKHR, cast into the type CLeglImageKHR. Assuming no errors are generated in this function, the resulting image object will be an EGLImage target of the specified EGLImage <em>image</em>. The resulting cl_mem is an image object which may be used normally by all OpenCL operations. This maps to an image2d_t type in OpenCL kernel code.</p></div>
-<div class="paragraph"><p><em>flags</em> is a bit-field that is used to specify usage information about the memory object being created.</p></div>
-<div class="paragraph"><p>The possible values for <em>flags</em> are: CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY and CL_MEM _READ_WRITE.</p></div>
-<div class="paragraph"><p>For OpenCL 1.2 <em>flags</em> also accepts: CL_MEM_HOST_WRITE_ONLY, CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_NO_ACCESS.</p></div>
-<div class="paragraph"><p>This extension only requires support for CL_MEM _READ_ONLY, and for OpenCL 1.2 CL_MEM_HOST_NO_ACCESS. For OpenCL 1.1, a CL_INVALID_OPERATION will be returned for images which do not support host mapping.</p></div>
-<div class="paragraph"><p>If the value passed in <em>flags</em> is not supported by the OpenCL implementation it will return CL_INVALID_VALUE. The accepted <em>flags</em> may be dependent upon the texture format used.</p></div>
-<div class="paragraph"><p><em>properties</em> specifies a list of property names and their corresponding values. Each property name is immediately followed by the corresponding desired value. The list is terminated with 0. No properties are currently supported with this version of the extension. <em>properties</em> can be NULL.</p></div>
-<div class="paragraph"><p><strong>clCreateFromEGLImageKHR</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 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 OpenCL context.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if <em>properties</em> contains invalid values, if <em>display</em> is not a valid display object or if <em>flags</em> are not in the set defined above.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_EGL_OBJECT_KHR if <em>image</em> is not a valid EGLImage object.
-</p>
-</li>
-<li>
-<p>
-CL_IMAGE_FORMAT_NOT_SUPPORTED if the OpenCL implementation is not able to create a cl_mem compatible with the provided CLeglImageKHR for an implementation-dependent reason (this could be caused by, but not limited to, reasons such as unsupported texture formats, etc).
-</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>
-<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_INVALID_OPERATION if there are no devices in <em>context</em> that support images (i.e. CL_DEVICE_IMAGE_SUPPORT specified in table 4.3 is CL_FALSE) or if the flags passed are not supported for that image type.
-</p>
-</li>
-</ul></div>
-<div class="sect4">
-<h5 id="cl_khr_egl_image-lifetime-of-shared-objects">Lifetime of Shared Objects</h5>
-<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></div>
-<div class="paragraph"><p>"Any EGLImage siblings exist in any client API context"</p></div>
-<div class="paragraph"><p>For OpenCL this means that while the application retains a reference on the cl_mem (the EGL sibling), the image remains valid.</p></div>
-</div>
-<div class="sect4">
-<h5 id="cl_khr_egl_image-synchronizing-opengl-and-egl-access-to-shared-objects">Synchronizing OpenCL and EGL Access to Shared Objects</h5>
-<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. Failure to provide such synchronization may result in race conditions and other undefined behavior including non-portability between implementations.</p></div>
-<div class="paragraph"><p>Prior to calling clEnqueueAcquireEGLObjectsKHR, the application must ensure that any pending operations which access the objects specified in mem_objects have completed. This may be accomplished in a portable way by ceasing all client operations on the resource, and issuing and waiting for completion of a glFinish command on all GL contexts with pending references to these objects. Implementations may offer more efficient synchronization methods, such as synchronization primitives or fence operations.</p></div>
-<div class="paragraph"><p>Similarly, after calling clEnqueueReleaseEGLImageObjects, the application is responsible for ensuring that any pending OpenCL operations which access the objects specified in mem_objects have completed prior to executing subsequent commands in other APIs which reference these objects. This may be accomplished in a portable way by calling clWaitForEvents with the event object returned by clEnqueueReleaseGLObjects, or by calling clFinish. As above, some implementations may offer more efficient methods.</p></div>
-<div class="paragraph"><p>Attempting to access the data store of an EGLImage object after it has been acquired by OpenCL and before it has been released will result in undefined behavior. Similarly, attempting to access a shared EGLImage object from OpenCL before it has been acquired by the OpenCL command queue or after it has been released, will result in undefined behavior.</p></div>
-</div>
-<div class="sect4">
-<h5 id="cl_khr_egl_image-sharing-memory-objects-created-from-egl-resources-between-egldisplays-and-opencl-contexts">Sharing memory objects created from EGL resources between EGLDisplays and OpenCL contexts</h5>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueAcquireEGLObjectsKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>is used to acquire OpenCL memory objects that have been created from EGL resources. The EGL 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 EGL 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 EGL resource is used while it is not currently acquired by OpenCL, the call attempting to use that OpenCL memory object will return CL_EGL_RESOURCE_NOT_ACQUIRED_KHR.</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 EGL resources, within the context associate with command_queue.</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 NULL, then this particular command does not wait on any event to complete. If <em>event_wait_list</em> is NULL, <em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL, 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 NULL 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.</p></div>
-<div class="paragraph"><p><strong>clEnqueueAcquireEGLObjectsKHR</strong> returns CL_SUCCESS if the function is executed successfully. If <em>num_objects</em> is 0 and <em>mem_objects</em> is NULL 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 NULL value or if num_objects &gt; 0 and mem_objects is NULL.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_MEM_OBJECT if memory objects in <em>mem_objects</em> are not valid OpenCL memory objects in the context associated with <em>command_queue</em>.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_EGL_OBJECT_KHR if memory objects in <em>mem_objects</em> have not been created from EGL 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_EVENT_WAIT_LIST if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not NULL 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_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 function</p></div>
-<div class="paragraph"><p></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">cl_int</span> <span style="font-weight: bold"><span style="color: #000000">clEnqueueReleaseEGLObjectsKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_command_queue</span> command_queue<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_uint</span> num_objects<span style="color: #990000">,</span>
-                                     <span style="font-weight: bold"><span style="color: #0000FF">const</span></span> <span style="color: #008080">cl_mem</span> <span style="color: #990000">*</span>mem_objects<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_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">cl_event</span> <span style="color: #990000">*</span>event_wait_list<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_event</span> <span style="color: #990000">*</span>event<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>is used to release OpenCL memory objects that have been created from EGL resources. The EGL objects are released by the OpenCL context associated with &lt;command_queue&gt;.</p></div>
-<div class="paragraph"><p>OpenCL memory objects created from EGL resources which have been acquired by OpenCL must be released by OpenCL before they may be accessed by EGL or by EGL client APIs. Accessing a EGL 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><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 EGL resources, within the context associate with command_queue.</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 NULL, then this particular command does not wait on any event to complete. If <em>event_wait_list</em> is NULL, <em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL, 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 NULL 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.</p></div>
-<div class="paragraph"><p><strong>clEnqueueReleaseEGLObjectsKHR</strong> returns CL_SUCCESS if the function is executed successfully. If <em>num_objects</em> is 0 and <em>mem_objects</em> is NULL 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 NULL value or if num_objects &gt; 0 and mem_objects is NULL.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_MEM_OBJECT if memory objects in <em>mem_objects</em> are not valid OpenCL memory objects in the context associated with <em>command_queue</em>.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_EGL_OBJECT_KHR if memory objects in <em>mem_objects</em> have not been created from EGL 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_EVENT_WAIT_LIST if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or <em>event_wait_list</em> is not NULL 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_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>
-<div class="sect3">
-<h4 id="cl_khr_egl_image-issues">Issues</h4>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-This extension does not support reference counting of the images, so the onus is on the application to behave sensibly and not release the underlying cl_mem object while the EGLImage is still being used.
-</p>
-</li>
-<li>
-<p>
-In order to ensure data integrity, the application is responsible for synchronizing access to shared CL/EGL image objects by their respective APIs. Failure to provide such synchronization may result in race conditions and other undefined behavior. This may be accomplished by calling clWaitForEvents with the event objects returned by any OpenCL commands which use the shared image object or by calling clFinish.
-</p>
-</li>
-<li>
-<p>
-Currently CL_MEM_READ_ONLY is the only supported flag for <em>flags</em>.
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>RESOLVED: Implementation will now return an error if writing to a shared object that is not supported rather than disallowing it entirely.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-Currently restricted to 2D image objects.
-</p>
-</li>
-<li>
-<p>
-What should happen for YUV color-space conversion, multi plane images, and chroma-siting, and channel mapping?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>RESOLVED: YUV is no longer explicitly described in this extension. Before this removal the behavior was dependent on the platform. This extension explicitly leaves the YUV layout to the platform and EGLImage source extension (i.e. is implementation specific). Colorspace conversion must be applied by the application using a color conversion matrix.</p></div>
-<div class="paragraph"><p>The expected extension path if YUV color-space conversion is to be supported is to introduce a YUV image type and provide overloaded versions of the read_image built-in functions.</p></div>
-<div class="paragraph"><p>Getting image information for a YUV image should return the original image size (non quantized size) when all of Y U and V are present in the image. If the planes have been separated then the actual dimensionality of the separated plane should be reported. For example with YUV 4:2:0 (NV12) with a YUV image of 256x256, the Y only image would return 256x256 whereas the UV only image would return 128x128.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-Should an attribute list be used instead?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>RESOLVED: function has been changed to use an attribute list.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-What should happen for EGLImage extensions which introduce formats without a mapping to an OpenCL image channel data type or channel order?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>RESOLVED: This extension does not define those formats. It is expected that as additional EGL extensions are added to create EGL images from other sources, an extension to CL will be introduced where needed to represent those image types.</p></div>
-</div></div>
-</li>
-<li>
-<p>
-What are the guarantees to synchronization behavior provided by the implementation?
-</p>
-<div class="openblock">
-<div class="content">
-<div class="paragraph"><p>The basic portable form of synchronization is to use a clFinish, as is the case for GL interop. In addition implementations which support the synchronization extensions cl_khr_egl_event and EGL_KHR_cl_event can interoperate more efficiently as described in those extensions.</p></div>
-</div></div>
-</li>
-</ol></div>
-<div style="page-break-after:always"></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_egl_event">Creating OpenCL Event Objects from EGL Sync Objects</h3>
-<div class="sect3">
-<h4 id="cl_khr_egl_event-overview">Overview</h4>
-<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></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_egl_event-new-procedures-and-functions">New Procedures and 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: #008080">cl_event</span> <span style="font-weight: bold"><span style="color: #000000">clCreateEventFromEGLSyncKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                     <span style="color: #008080">CLeglSyncKHR</span> sync<span style="color: #990000">,</span>
-                                     <span style="color: #008080">CLeglDisplayKHR</span> display<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">);</span></tt></pre></div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_egl_event-new-tokens">New Tokens</h4>
-<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 monospaced">
-<pre>CL_INVALID_EGL_OBJECT_KHR               -1093</pre>
-</div></div>
-<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 monospaced">
-<pre>CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR    0x202F</pre>
-</div></div>
-</div>
-<div class="sect3">
-<h4 id="cl_khr_egl_event-additions-to-chapter-5">Additions to Chapter 5 of the OpenCL 2.2 Specification</h4>
-<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></div>
-<div class="paragraph"><p>"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."</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="paragraph"><p></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">cl_event</span> <span style="font-weight: bold"><span style="color: #000000">clCreateEventFromEGLSyncKHR</span></span><span style="color: #990000">(</span><span style="color: #008080">cl_context</span> context<span style="color: #990000">,</span>
-                                     <span style="color: #008080">CLeglSyncKHR</span> sync<span style="color: #990000">,</span>
-                                     <span style="color: #008080">CLeglDisplayKHR</span> display<span style="color: #990000">,</span>
-                                     <span style="color: #008080">cl_int</span> <span style="color: #990000">*</span>errcode_ret<span style="color: #990000">)</span></tt></pre></div></div>
-<div class="paragraph"><p>creates a linked event object.</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></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 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, or was not created from a GL 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>
-</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></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The CL_EVENT_COMMAND_QUEUE of a linked event is NULL, 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="sect3">
-<h4 id="cl_khr_egl_event-additions-to-extension-specification">Additions to the OpenCL Extension Specification</h4>
-<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="sect3">
-<h4 id="cl_khr_egl_event-issues">Issues</h4>
-<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 class="sect2">
-<h3 id="cl_khr_priority_hints">Priority Hints</h3>
-<div class="paragraph"><p>This section describes the <strong>cl_khr_priority_hints</strong> extension. This extension adds priority hints for OpenCL, but does not specify the scheduling behavior or minimum guarantees. It is expected that the the user guides associated with each implementation which supports this extension will describe the scheduling behavior guarantees.</p></div>
-<div class="sect3">
-<h4 id="cl_khr_priority_hints-host-side-api-modifications">Host-side API modifications</h4>
-<div class="paragraph"><p>The function <strong><span class="monospaced">clCreateCommandQueueWithProperties</span></strong> (Section 5.1) is extended to support a priority value as part of the <em>properties</em> argument.</p></div>
-<div class="paragraph"><p>The priority property applies to OpenCL command queues that belong to the same OpenCL context.</p></div>
-<div class="paragraph"><p>The properties field accepts the <span class="monospaced">CL_QUEUE_PRIORITY_KHR</span> property, with a value of type cl_queue_priority_khr, which can be one of:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">CL_QUEUE_PRIORITY_HIGH_KHR</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">CL_QUEUE_PRIORITY_MED_KHR</span>
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">CL_QUEUE_PRIORITY_LOW_KHR</span>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <span class="monospaced">CL_QUEUE_PRIORITY_KHR</span> is not specified then the default priority is <span class="monospaced">CL_QUEUE_PRIORITY_MED_KHR</span>.</p></div>
-<div class="paragraph"><p>To the error section for <strong><span class="monospaced">clCreateCommandQueueWithProperties</span></strong>, the following is added:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">CL_INVALID_QUEUE_PROPERTIES</span> if the <span class="monospaced">CL_QUEUE_PRIORITY_KHR</span> property is specified and the queue is a <span class="monospaced">CL_QUEUE_ON_DEVICE</span>.
-</p>
-</li>
-</ul></div>
-<div style="page-break-after:always"></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_throttle_hints">Throttle Hints</h3>
-<div class="paragraph"><p>This section describes the <strong>cl_khr_throttle_hints</strong> extension. This extension adds throttle hints for OpenCL, but does not specify the throttling behavior or minimum guarantees. It is expected that the user guide associated with each implementation which supports this extension will describe the throttling behavior guarantees.</p></div>
-<div class="paragraph"><p>Note that the throttle hint is orthogonal to functionality defined in <strong>cl_khr_priority_hints</strong> extension. For example, a task may have high priority (<span class="monospaced">CL_QUEUE_PRIORITY_HIGH_KHR</span>) but should at the same time be executed at an optimized throttle setting (<span class="monospaced">CL_QUEUE_THROTTLE_LOW</span>).</p></div>
-<div class="sect3">
-<h4 id="cl_khr_throttle_hints-host-side-api-modifications">Host-side API modifications</h4>
-<div class="paragraph"><p>The function <strong><span class="monospaced">clCreateCommandQueueWithProperties</span></strong> (Section 5.1) is extended to support a new <span class="monospaced">CL_QUEUE_THROTTLE_KHR</span> value as part of the <em>properties</em> argument.</p></div>
-<div class="paragraph"><p>The properties field accepts the following values:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">CL_QUEUE_THROTTLE_HIGH_KHR</span> (full throttle, i.e., OK to consume more energy)
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">CL_QUEUE_THROTTLE_MED_KHR</span> (normal throttle)
-</p>
-</li>
-<li>
-<p>
-<span class="monospaced">CL_QUEUE_THROTTLE_LOW_KHR</span> (optimized/lowest energy consumption)
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If <span class="monospaced">CL_QUEUE_THROTTLE_KHR</span> is not specified then the default priority is <span class="monospaced">CL_QUEUE_THROTTLE_MED_KHR</span>.</p></div>
-<div class="paragraph"><p>To the error section for <strong><span class="monospaced">clCreateCommandQueueWithProperties</span></strong>, the following is added:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<span class="monospaced">CL_INVALID_QUEUE_PROPERTIES</span> if the <span class="monospaced">CL_QUEUE_THROTTLE_KHR</span> property is specified and the queue is a <span class="monospaced">CL_QUEUE_ON_DEVICE</span>.
-</p>
-</li>
-</ul></div>
-<div style="page-break-after:always"></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="cl_khr_subgroup_named_barrier">Named Barriers for Subgroups</h3>
-<div class="paragraph"><p>This section describes the <strong>cl_khr_subgroup_named_barrier</strong> extension. This extension adds barrier operations that cover subsets of an OpenCL work-group.  Only the OpenCL API changes are described in this section.  Please refer to the SPIR-V specification for information about using subgroups named barriers in the SPIR-V intermediate representation, and to the OpenCL C++ specification for descriptions of the subgroup named barrier built-in functions in the OpenCL C++ kernel language.</p></div>
-<div class="paragraph"><p>Add to <em>table 4.3</em>:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:33%;">
-<col style="width:16%;">
-<col style="width:50%;">
-<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_MAX_NAMED_<br>
-BARRIER_COUNT_KHR</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 named barriers in a work-group for any given kernel-instance running on the device. The minimum value is 8.</p></td>
-</tr>
-</tbody>
-</table>
-</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>
-<div class="sectionbody">
-<div class="paragraph"><p>The following features are added to OpenCL 2.2:</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>
-</li>
-</ul></div>
-</div>
-</div>
-</div>
-<div id="footnotes"><hr></div>
-<div id="footer">
-<div id="footer-text">
-Version v2.2-3<br>
-Last updated
- 2017-05-12 11:30:20 PDT
-</div>
-</div>
-</body>
-</html>
diff --git a/specs/opencl-2.2-extension.pdf b/specs/opencl-2.2-extension.pdf
deleted file mode 100644
index 4cc0d8b..0000000
--- a/specs/opencl-2.2-extension.pdf
+++ /dev/null
Binary files differ
diff --git a/specs/opencl-2.2.html b/specs/opencl-2.2.html
deleted file mode 100644
index 04ff2d3..0000000
--- a/specs/opencl-2.2.html
+++ /dev/null
@@ -1,20557 +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 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 Specification</h1>
-<span id="author">Khronos OpenCL Working Group</span><br>
-<span id="revnumber">version v2.2-3</span>
-<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>
-<div class="paragraph"><p><strong>Acknowledgements</strong></p></div>
-<div class="paragraph"><p>The OpenCL 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="paragraph"><p>Chuck Rose, Adobe<br>
-Eric Berdahl, Adobe<br>
-Shivani Gupta, Adobe<br>
-Bill Licea Kane, AMD<br>
-Ed Buckingham, AMD<br>
-Jan Civlin, AMD<br>
-Laurent Morichetti, AMD<br>
-Mark Fowler, AMD<br>
-Marty Johnson, AMD<br>
-Michael Mantor, AMD<br>
-Norm Rubin, AMD<br>
-Ofer Rosenberg, AMD<br>
-Brian Sumner, AMD<br>
-Victor Odintsov, AMD<br>
-Aaftab Munshi, Apple<br>
-Abe Stephens, Apple<br>
-Alexandre Namaan, Apple<br>
-Anna Tikhonova, Apple<br>
-Chendi Zhang, Apple<br>
-Eric Bainville, Apple<br>
-David Hayward, Apple<br>
-Giridhar Murthy, Apple<br>
-Ian Ollmann, Apple<br>
-Inam Rahman, Apple<br>
-James Shearer, Apple<br>
-MonPing Wang, Apple<br>
-Tanya Lattner, Apple<br>
-Mikael Bourges-Sevenier, Aptina<br>
-Anton Lokhmotov, ARM<br>
-Dave Shreiner, ARM<br>
-Hedley Francis, ARM<br>
-Robert Elliott, ARM<br>
-Scott Moyers, ARM<br>
-Tom Olson, ARM<br>
-Anastasia Stulova, ARM<br>
-Christopher Thompson-Walsh, Broadcom<br>
-Holger Waechtler, Broadcom<br>
-Norman Rink, Broadcom<br>
-Andrew Richards, Codeplay<br>
-Maria Rovatsou, Codeplay<br>
-Alistair Donaldson, Codeplay<br>
-Alastair Murray, Codeplay<br>
-Stephen Frye, Electronic Arts<br>
-Eric Schenk, Electronic Arts<br>
-Daniel Laroche, Freescale<br>
-David Neto, Google<br>
-Robin Grosman, Huawei<br>
-Craig Davies, Huawei<br>
-Brian Horton, IBM<br>
-Brian Watt, IBM<br>
-Gordon Fossum, IBM<br>
-Greg Bellows, IBM<br>
-Joaquin Madruga, IBM<br>
-Mark Nutter, IBM<br>
-Mike Perks, IBM<br>
-Sean Wagner, IBM<br>
-Jon Parr, Imagination Technologies<br>
-Robert Quill, Imagination Technologies<br>
-James McCarthy, Imagination Technologie<br>
-Aaron Kunze, Intel<br>
-Aaron Lefohn, Intel<br>
-Adam Lake, Intel<br>
-Alexey Bader, Intel<br>
-Allen Hux, Intel<br>
-Andrew Brownsword, Intel<br>
-Andrew Lauritzen, Intel<br>
-Bartosz Sochacki, Intel<br>
-Ben Ashbaugh, Intel<br>
-Brian Lewis, Intel<br>
-Geoff Berry, Intel<br>
-Hong Jiang, Intel<br>
-Jayanth Rao, Intel<br>
-Josh Fryman, Intel<br>
-Larry Seiler, Intel<br>
-Mike MacPherson, Intel<br>
-Murali Sundaresan, Intel<br>
-Paul Lalonde, Intel<br>
-Raun Krisch, Intel<br>
-Stephen Junkins, Intel<br>
-Tim Foley, Intel<br>
-Timothy Mattson, Intel<br>
-Yariv Aridor, Intel<br>
-Michael Kinsner, Intel<br>
-Kevin Stevens, Intel<br>
-Jon Leech, Khronos<br>
-Benjamin Bergen, Los Alamos National Laboratory<br>
-Roy Ju, Mediatek<br>
-Bor-Sung Liang, Mediatek<br>
-Rahul Agarwal, Mediatek<br>
-Michal Witaszek, Mobica<br>
-JenqKuen Lee, NTHU<br>
-Amit Rao, NVIDIA<br>
-Ashish Srivastava, NVIDIA<br>
-Bastiaan Aarts, NVIDIA<br>
-Chris Cameron, NVIDIA<br>
-Christopher Lamb, NVIDIA<br>
-Dibyapran Sanyal, NVIDIA<br>
-Guatam Chakrabarti, NVIDIA<br>
-Ian Buck, NVIDIA<br>
-Jaydeep Marathe, NVIDIA<br>
-Jian-Zhong Wang, NVIDIA<br>
-Karthik Raghavan Ravi, NVIDIA<br>
-Kedar Patil, NVIDIA<br>
-Manjunath Kudlur, NVIDIA<br>
-Mark Harris, NVIDIA<br>
-Michael Gold, NVIDIA<br>
-Neil Trevett, NVIDIA<br>
-Richard Johnson, NVIDIA<br>
-Sean Lee, NVIDIA<br>
-Tushar Kashalikar, NVIDIA<br>
-Vinod Grover, NVIDIA<br>
-Xiangyun Kong, NVIDIA<br>
-Yogesh Kini, NVIDIA<br>
-Yuan Lin, NVIDIA<br>
-Mayuresh Pise, NVIDIA<br>
-Allan Tzeng, QUALCOMM<br>
-Alex Bourd, QUALCOMM<br>
-Anirudh Acharya, QUALCOMM<br>
-Andrew Gruber, QUALCOMM<br>
-Andrzej Mamona, QUALCOMM<br>
-Benedict Gaster, QUALCOMM<br>
-Bill Torzewski, QUALCOMM<br>
-Bob Rychlik, QUALCOMM<br>
-Chihong Zhang, QUALCOMM<br>
-Chris Mei, QUALCOMM<br>
-Colin Sharp, QUALCOMM<br>
-David Garcia, QUALCOMM<br>
-David Ligon, QUALCOMM<br>
-Jay Yun, QUALCOMM<br>
-Lee Howes, QUALCOMM<br>
-Richard Ruigrok, QUALCOMM<br>
-Robert J. Simpson, QUALCOMM<br>
-Sumesh Udayakumaran, QUALCOMM<br>
-Vineet Goel, QUALCOMM<br>
-Lihan Bin, QUALCOMM<br>
-Vlad Shimanskiy, QUALCOMM<br>
-Jian Liu, QUALCOMM<br>
-Tasneem Brutch, Samsung<br>
-Yoonseo Choi, Samsung<br>
-Dennis Adams, Sony<br>
-Pr-Anders Aronsson, Sony<br>
-Jim Rasmusson, Sony<br>
-Thierry Lepley, STMicroelectronics<br>
-Anton Gorenko, StreamComputing<br>
-Jakub Szuppe, StreamComputing<br>
-Vincent Hindriksen, StreamComputing<br>
-Alan Ward, Texas Instruments<br>
-Yuan Zhao, Texas Instruments<br>
-Pete Curry, Texas Instruments<br>
-Simon McIntosh-Smith, University of Bristol<br>
-James Price, University of Bristol<br>
-Paul Preney, University of Windsor<br>
-Shane Peelar, University of Windsor<br>
-Brian Hutsell, Vivante<br>
-Mike Cai, Vivante<br>
-Sumeet Kumar, Vivante<br>
-Wei-Lun Kao, Vivante<br>
-Xing Wang, Vivante<br>
-Jeff Fifield, Xilinx<br>
-Hem C. Neema, Xilinx<br>
-Henry Styles, Xilinx<br>
-Ralph Wittig, Xilinx<br>
-Ronan Keryell, Xilinx<br>
-AJ Guillon, YetiWare Inc<br></p></div>
-<div style="page-break-after:always"></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_introduction">1. Introduction</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Modern processor architectures have embraced parallelism as an important
-pathway to increased performance. Facing technical challenges with
-higher clock speeds in a fixed power envelope, Central Processing Units
-(CPUs) now improve performance by adding multiple cores. Graphics
-Processing Units (GPUs) have also evolved from fixed function rendering
-devices into programmable parallel processors. As todays computer
-systems often include highly parallel CPUs, GPUs and other types of
-processors, it is important to enable software developers to take full
-advantage of these heterogeneous processing platforms.
-<br>
-<br>
-Creating applications for heterogeneous parallel processing platforms is
-challenging as traditional programming approaches for multi-core CPUs
-and GPUs are very different. CPU-based parallel programming models are
-typically based on standards but usually assume a shared address space
-and do not encompass vector operations. General purpose GPU
-programming models address complex memory hierarchies and vector
-operations but are traditionally platform-, vendor- or
-hardware-specific. These limitations make it difficult for a developer
-to access the compute power of heterogeneous CPUs, GPUs and other types
-of processors from a single, multi-platform source code base. More than
-ever, there is a need to enable software developers to effectively take
-full advantage of heterogeneous processing platforms  from high
-performance compute servers, through desktop computer systems to
-handheld devices - that include a diverse mix of parallel CPUs, GPUs and
-other processors such as DSPs and the Cell/B.E. processor.
-<br>
-<br>
-<strong>OpenCL</strong> (Open Computing Language) is an open royalty-free standard for
-general purpose parallel programming across CPUs, GPUs and other
-processors, giving software developers portable and efficient access to
-the power of these heterogeneous processing platforms.
-<br>
-<br>
-OpenCL supports a wide range of applications, ranging from embedded and
-consumer software to HPC solutions, through a low-level,
-high-performance, portable abstraction. By creating an efficient,
-close-to-the-metal programming interface, OpenCL will form the
-foundation layer of a parallel computing ecosystem of
-platform-independent tools, middleware and applications. OpenCL is
-particularly suited to play an increasingly significant role in emerging
-interactive graphics applications that combine general parallel compute
-algorithms with graphics rendering pipelines.
-<br>
-<br>
-OpenCL consists of an API for coordinating parallel computation across
-heterogeneous processors; and a cross-platform intermediate language
-with a well-specified computation environment. The OpenCL standard:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Supports both data- and
-task-based parallel programming models
-</p>
-</li>
-<li>
-<p>
-Utilizes a portable and
-self-contained intermediate representation with support for parallel
-execution
-</p>
-</li>
-<li>
-<p>
-Defines consistent
-numerical requirements based on IEEE 754
-</p>
-</li>
-<li>
-<p>
-Defines a configuration
-profile for handheld and embedded devices
-</p>
-</li>
-<li>
-<p>
-Efficiently interoperates
-with OpenGL, OpenGL ES and other graphics APIs
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>This document begins with an overview of basic concepts and the
-architecture of OpenCL, followed by a detailed description of its
-execution model, memory model and synchronization support. It then
-discusses the OpenCL__platform and runtime API. Some examples are given
-that describe sample compute use-cases and how they would be written in
-OpenCL. The specification is divided into a core specification that any
-OpenCL compliant implementation must support; a handheld/embedded
-profile which relaxes the OpenCL compliance requirements for handheld
-and embedded devices; and a set of optional extensions that are likely
-to move into the core specification in later revisions of the OpenCL
-specification.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_glossary">2. Glossary</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>Application</strong>: The combination of the program running on the host and
-OpenCL devices.
-<br>
-<br>
-<strong>Acquire semantics</strong>: One of the memory order semantics defined for
-synchronization operations.  Acquire semantics apply to atomic
-operations that load from memory.  Given two units of execution, <strong>A</strong> and
-<strong>B</strong>, acting on a shared atomic object <strong>M</strong>, if <strong>A</strong> uses an atomic load of
-<strong>M</strong> with acquire semantics to synchronize-with an atomic store to <strong>M</strong> by
-<strong>B</strong> that used release semantics, then <strong>A</strong>'s atomic load will occur before
-any subsequent operations by <strong>A</strong>.  Note that the memory orders
-<em>release</em>, <em>sequentially consistent</em>, and <em>acquire_release</em> all include
-<em>release semantics</em> and effectively pair with a load using acquire
-semantics.
-<br>
-<br>
-<strong>Acquire release semantics</strong>: A memory order semantics for
-synchronization operations (such as atomic operations) that has the
-properties of both acquire and release memory orders. It is used with
-read-modify-write operations.
-<br>
-<br>
-<strong>Atomic operations</strong>: Operations that at any point, and from any
-perspective, have either occurred completely, or not at all. Memory
-orders associated with atomic operations may constrain the visibility of
-loads and stores with respect to the atomic operations (see <em>relaxed
-semantics</em>, <em>acquire semantics</em>, <em>release semantics</em> or <em>acquire release
-semantics</em>).
-<br>
-<br>
-<strong>Blocking and Non-Blocking Enqueue API calls</strong>: A <em>non-blocking enqueue
-API call</em> places a <em>command</em> on a <em>command-queue</em> and returns
-immediately to the host. The <em>blocking-mode enqueue API calls</em> do not
-return to the host until the command has completed.
-<br>
-<br>
-<strong>Barrier</strong>: There are three types of <em>barriers</em>  a command-queue barrier,
-a work-group barrier and a sub-group barrier.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The OpenCL API provides a
-function to enqueue a <em>command-queue</em> <em>barrier</em> command. This <em>barrier</em>
-command ensures that all previously enqueued commands to a command-queue
-have finished execution before any following <em>commands</em> enqueued in the
-<em>command-queue</em> can begin execution.
-</p>
-</li>
-<li>
-<p>
-The OpenCL kernel
-execution model provides built-in <em>work-group barrier</em> functionality.
-This <em>barrier</em> built-in function can be used by a <em>kernel</em> executing on
-a <em>device</em> to perform synchronization between <em>work-items</em> in a
-<em>work-group</em> executing the <em>kernel</em>. All the <em>work-items</em> of a
-<em>work-group</em> must execute the <em>barrier</em> construct before any are allowed
-to continue execution beyond the <em>barrier</em>.
-</p>
-</li>
-<li>
-<p>
-The OpenCL kernel
-execution model provides built-in <em>sub-group barrier</em> functionality.
-This <em>barrier</em> built-in function can be used by a <em>kernel</em> executing on
-a <em>device</em> to perform synchronization between <em>work-items</em> in a
-<em>sub-group</em> executing the <em>kernel</em>. All the <em>work-items</em> of a
-<em>sub-group</em> must execute the <em>barrier</em> construct before any are allowed
-to continue execution beyond the <em>barrier</em>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><strong>Buffer Object</strong>: A memory object that stores a linear collection of
-bytes. Buffer objects are accessible using a pointer in a <em>kernel</em>
-executing on a <em>device</em>. Buffer objects can be manipulated by the host
-using OpenCL API calls. A <em>buffer object</em> encapsulates the following
-information:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Size in bytes.
-</p>
-</li>
-<li>
-<p>
-Properties that describe
-usage information and which region to allocate from.
-</p>
-</li>
-<li>
-<p>
-Buffer data.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><strong>Built-in Kernel</strong>: A <em>built-in kernel</em> is a <em>kernel</em> that is executed on
-an OpenCL <em>device</em> or <em>custom device</em> by fixed-function hardware or in
-firmware. <em>Applications</em> can query the <em>built-in kernels</em> supported by
-a <em>device</em> or <em>custom device</em>. A <em>program object</em> can only contain
-<em>kernels</em> written in OpenCL C or <em>built-in kernels</em> but not both. See
-also <em>Kernel</em> and <em>Program</em>.
-<br>
-<br>
-<strong>Child kernel</strong>: see <em>device-side enqueue.</em>
-<br>
-<br>
-<strong>Command</strong>: The OpenCL operations that are submitted to a <em>command-queue</em>
-for execution. For example, OpenCL commands issue kernels for execution
-on a compute device, manipulate memory objects, etc.
-<br>
-<br>
-<strong>Command-queue</strong>: An object that holds <em>commands</em> that will be executed on
-a specific <em>device</em>. The <em>command-queue</em> is created on a specific
-<em>device</em> in a <em>context</em>. <em>Commands</em> to a <em>command-queue</em> are queued
-in-order but may be executed in-order or out-of-order. <em>Refer to
-In-order Execution_and_Out-of-order Execution</em>.
-<br>
-<br>
-<strong>Command-queue Barrier</strong>. See <em>Barrier</em>.
-<br>
-<br>
-<strong>Command synchronization</strong>: Constraints on the order that commands are
-launched for execution on a device defined in terms of the
-synchronization points that occur between commands in host
-command-queues and between commands in device-side command-queues. See
-<em>synchronization points</em>.
-<br>
-<br>
-<strong>Complete</strong>: The final state in the six state model for the execution of
-a command. The transition into this state occurs is signaled through
-event objects or callback functions associated with a command.
-<br>
-<br>
-<strong>Compute Device Memory</strong>: This refers to one or more memories attached
-to the compute device.
-<br>
-<br>
-<strong>Compute Unit</strong>: An OpenCL <em>device</em> has one or more <em>compute units</em>. A
-<em>work-group</em> executes on a single <em>compute unit</em>. A <em>compute unit</em> is
-composed of one or more <em>processing elements</em> and <em>local memory</em>. A
-<em>compute unit</em> may also include dedicated texture filter units that can
-be accessed by its processing elements.
-<br>
-<br>
-<strong>Concurrency</strong>: A property of a system in which a set of tasks in a system
-can remain active and make progress at the same time. To utilize
-concurrent execution when running a program, a programmer must identify
-the concurrency in their problem, expose it within the source code, and
-then exploit it using a notation that supports concurrency.
-<br>
-<br>
-<strong>Constant Memory</strong>: A region of <em>global memory</em> that remains constant
-during the execution of a <em>kernel</em>. The <em>host</em> allocates and
-initializes memory objects placed into <em>constant memory</em>.</p></div>
-<div class="paragraph"><p><strong>Context</strong>: The environment within which the kernels execute and the
-domain in which synchronization and memory management is defined. The
-<em>context</em> includes a set of <em>devices</em>, the memory accessible to those
-<em>devices</em>, the corresponding memory properties and one or more
-<em>command-queues</em> used to schedule execution of a <em>kernel(s)</em> or
-operations on <em>memory objects</em>.
-<br>
-<br>
-<strong>Control flow</strong>: The flow of instructions executed by a work-item.
-Multiple logically related work items may or may not execute the same
-control flow. The control flow is said to be <em>converged</em> if all the
-work-items in the set execution the same stream of instructions. In a
-<em>diverged</em> control flow, the work-items in the set execute different
-instructions. At a later point, if a diverged control flow becomes
-converged, it is said to be a re-converged control flow.
-<br>
-<br>
-<strong>Converged control flow</strong>: see <strong>control flow</strong>.
-<br>
-<br>
-<strong>Custom Device</strong>: An OpenCL <em>device</em> that fully implements the OpenCL
-Runtime but does not support <em>programs</em> written in OpenCL C.  A custom
-device may be specialized non-programmable hardware that is very power
-efficient and performant for directed tasks or hardware with limited
-programmable capabilities such as specialized DSPs. Custom devices are
-not OpenCL conformant. Custom devices may support an online compiler.  
-Programs for custom devices can be created using the OpenCL runtime APIs
-that allow OpenCL programs to be created from source (if an online
-compiler is supported) and/or binary, or from <em>built-in
-kernels_supported by the _device</em>.  See also <em>Device</em>.
-<br>
-<br>
-<strong>Data Parallel Programming Model</strong>: Traditionally, this term refers to a
-programming model where concurrency is expressed as instructions from a
-single program applied to multiple elements within a set of data
-structures.  The term has been generalized in OpenCL to refer to a model
-wherein a set of  instructions from a single program are applied
-concurrently to each point within an abstract domain of indices.
-<br>
-<br>
-<strong>Data race</strong>: The execution of a program contains a data race if it
-contains two actions in different work items or host threads where (1)
-one action modifies a memory location and the other action reads or
-modifies the same memory location, and (2) at least one of these actions
-is not atomic, or the corresponding memory scopes are not inclusive, and
-(3) the actions are global actions unordered by the
-global-happens-before relation or are local actions unordered by the
-local-happens before relation.
-<br>
-<br>
-<strong>Deprecation</strong>: existing features are marked as deprecated if their usage is not recommended as that feature is being de-emphasized, superseded and may be removed from a future version of the specification.[BA2] 
-<br>
-<br>
-<strong>Device</strong>: A <em>device</em> is a collection of <em>compute units</em>. A
-<em>command-queue</em> is used to queue <em>commands</em> to a <em>device</em>. Examples of
-<em>commands</em> include executing <em>kernels</em>, or reading and writing <em>memory
-objects</em>. OpenCL devices typically correspond to a GPU, a multi-core
-CPU, and other processors such as DSPs and the Cell/B.E. processor.
-<br>
-<br>
-<strong>Device-side enqueue</strong>: A mechanism whereby a kernel-instance is enqueued
-by a kernel-instance running on a device without direct involvement by
-the host program. This produces <em>nested parallelism</em>; i.e. additional
-levels of concurrency are nested inside a running kernel-instance. The
-kernel-instance executing on a device (the <em>parent kernel</em>) enqueues a
-kernel-instance (the <em>child kernel</em>) to a device-side command queue.
-Child and parent kernels execute asynchronously though a parent kernel
-does not complete until all of its child-kernels have completed.
-<br>
-<br>
-<strong>Diverged control flow</strong>: see <em>control flow</em>.
-<br>
-<br>
-<strong>Ended</strong>: The fifth state in the six state model for the execution of a
-command. The transition into this state occurs when execution of a
-command has ended. When a Kernel-enqueue command ends, all of the
-work-groups associated with that command have finished their execution.
-<br>
-<br>
-<strong>Event Object</strong>: An <em>event</em> <em>object_encapsulates the status of an
-operation such as a _command</em>. It can be used to synchronize operations
-in a context.
-<br>
-<br>
-<strong>Event Wait List</strong>: An <em>event wait list</em> is a list of <em>event objects</em> that
-can be used to control when a particular <em>command</em> begins execution.
-<br>
-<br>
-<strong>Fence</strong>: A memory ordering operation without an associated atomic
-object. A fence can use the <em>acquire semantics, release semantics</em>, or
-<em>acquire release semantics</em>.
-<br>
-<br>
-<strong>Framework</strong>: A software system that contains the set of components to
-support software development and execution. A <em>framework</em> typically
-includes libraries, APIs, runtime systems, compilers, etc.
-<br>
-<br>
-<strong>Generic address space</strong>: An address space that include the <em>private</em>,
-<em>local</em>, and <em>global</em> address spaces available to a device. The generic
-address space supports conversion of pointers to and from private, local
-and global address spaces, and hence lets a programmer write a single
-function that at compile time can take arguments from any of the three
-named address spaces.
-<br>
-<br>
-<strong>Global Happens before</strong>: see <em>happens before</em>.
-<br>
-<br>
-<strong>Global ID</strong>: A <em>global ID</em> is used to uniquely identify a <em>work-item</em> and
-is derived from the number of <em>global work-items</em> specified when
-executing a <em>kernel</em>. The <em>global ID</em> is a N-dimensional value that
-starts at (0, 0,  0). See also <em>Local ID</em>.
-<br>
-<br>
-<strong>Global Memory</strong>: A memory region accessible to all <em>work-items</em> executing
-in a <em>context</em>. It is accessible to the <em>host</em> using <em>commands</em> such as
-read, write and map. <em>Global memory</em> is included within the <em>generic
-address space</em> that includes the private and local address spaces.
-<br>
-<br>
-<strong>GL share group</strong>: A <em>GL share group</em> object manages shared OpenGL or
-OpenGL ES resources
-such as textures, buffers, framebuffers, and renderbuffers and is
-associated with one or more GL context objects. The <em>GL share group</em> is
-typically an opaque object and not directly accessible.
-<br>
-<br>
-<strong>Handle</strong>: An opaque type that references an <em>object</em> allocated by
-OpenCL. Any operation on an <em>object</em> occurs by reference to that
-objects handle.
-<br>
-<br>
-<strong>Happens before</strong>: An ordering relationship between operations that
-execute on multiple units of execution. If an operation A happens-before
-operation B then A must occur before B; in particular, any value written
-by A will be visible to B.We define two separate happens before
-relations: <em>global-happens-before</em> and <em>local-happens-before</em>. These are
-defined in section 3.3.6.
-<br>
-<br>
-<strong>Host</strong>: The <em>host</em> interacts with the <em>context</em> using the OpenCL API.
-<br>
-<br>
-<strong>Host-thread</strong>: the unit of execution that executes the statements in the
-Host program.
-<br>
-<br>
-<strong>Host pointer</strong>: A pointer to memory that is in the virtual address space
-on the <em>host</em>.
-<br>
-<br>
-<strong>Illegal</strong>: Behavior of a system that is explicitly not allowed and will
-be reported as an error when encountered by OpenCL.
-<br>
-<br>
-<strong>Image Object</strong>: A <em>memory object</em> that stores a two- or three-
-dimensional structured array. Image data can only be accessed with read
-and write functions. The read functions use a <em>sampler</em>.
-<br>
-<br>
-The <em>image object</em> encapsulates the following information:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Dimensions of the image.
-</p>
-</li>
-<li>
-<p>
-Description of each
-element in the image.
-</p>
-</li>
-<li>
-<p>
-Properties that describe
-usage information and which region to allocate from.
-</p>
-</li>
-<li>
-<p>
-Image data.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The elements of an image are selected from a list of predefined image
-formats.
-<br>
-<br>
-<strong>Implementation Defined</strong>: Behavior that is explicitly allowed to vary
-between conforming implementations of OpenCL. An OpenCL implementor is
-required to document the implementation-defined behavior.
-<br>
-<br>
-<strong>Independent Forward Progress</strong>: If an entity supports independent forward
-progress, then if it is otherwise not dependent on any actions due to be
-performed by any other entity (for example it does not wait on a lock
-held by, and thus that must be released by, any other entity), then its
-execution cannot be blocked by the execution of any other entity in the
-system (it will not be starved). Work items in a subgroup, for example,
-typically do not support independent forward progress, so one work item
-in a subgroup may be completely blocked (starved) if a different work
-item in the same subgroup enters a spin loop.
-<br>
-<br>
-<strong>In-order Execution</strong>: A model of execution in OpenCL where the <em>commands</em>
-in a <em>command-queue_ are executed in order of submission with each
-_command</em> running to completion before the next one begins. See
-Out-of-order Execution.
-<br>
-<br>
-<strong>Intermediate Language</strong>: A lower-level language that may be used to
-create programs. SPIR-V is a required IL for OpenCL 2.2 runtimes.
-Additional ILs may be accepted on an implementation-defined basis.
-<br>
-<br>
-<strong>Kernel</strong>: A <em>kernel</em> is a function declared in a <em>program</em> and executed
-on an OpenCL <em>device</em>. A <em>kernel</em> is identified by the kernel or
-kernel qualifier applied to any function defined in a <em>program</em>.
-<br>
-<br>
-<strong>Kernel-instance</strong>: The work carried out by an OpenCL program occurs
-through the execution of kernel-instances on devices. The kernel
-instance is the <em>kernel object</em>, the values associated with the
-arguments to the kernel, and the parameters that define the <em>NDRange</em>
-index space.
-<br>
-<br>
-<strong>Kernel Object</strong>: A <em>kernel object</em> encapsulates a specific <em>kernel
-function declared in a <em>program</em> and the argument values to be used when
-executing this </em>kernel function.
-<br>
-<br>
-<strong>Kernel Language</strong>: A language that is used to create source code for kernel.
-Supported kernel languages include OpenCL C, OpenCL C++, and OpenCL dialect of SPIR-V.
-<br>
-<br>
-<strong>Launch</strong>: The transition of a command from the <em>submitted</em> state to the
-<em>ready</em> state. See <em>Ready</em>.
-<br>
-<br>
-<strong>Local ID</strong>: A <em>local ID</em> specifies a unique <em>work-item ID</em> within a given
-<em>work-group</em> that is executing a <em>kernel</em>. The <em>local ID</em> is a
-N-dimensional value that starts at (0, 0,  0). See also <em>Global ID</em>.
-<br>
-<br>
-<strong>Local Memory</strong>: A memory region associated with a <em>work-group</em> and
-accessible only by <em>work-items</em> in that <em>work-group</em>. <em>Local memory</em> is
-included within the <em>generic address space</em> that includes the private
-and global address spaces.
-<br>
-<br>
-<strong>Marker</strong>: A <em>command</em> queued in a <em>command-queue</em> that can be used to
-tag all <em>commands</em> queued before the <em>marker</em> in the <em>command-queue</em>.
-The <em>marker</em> command returns an <em>event</em> which can be used by the
-<em>application</em> to queue a wait on the marker event i.e. wait for all
-commands queued before the <em>marker</em> command to complete.
-<br>
-<br>
-<strong>Memory Consistency Model</strong>: Rules that define which values are observed
-when multiple units of execution load data from any shared memory plus
-the synchronization operations that constrain the order of memory
-operations and define synchronization relationships. The memory
-consistency model in OpenCL is based on the memory model from the ISO
-C11 programming language.
-<br>
-<br>
-<strong>Memory Objects</strong>: A <em>memory object</em> is a handle to a reference counted
-region of <em>global memory</em>. Also see_Buffer Object_and_Image Object_.
-<br>
-<br>
-<strong>Memory Regions (or Pools)</strong>: A distinct address space in OpenCL. <em>Memory
-regions</em> may overlap in physical memory though OpenCL will treat them as
-logically distinct. The <em>memory regions</em> are denoted as <em>private</em>,
-<em>local</em>, <em>constant,</em> and <em>global</em>.
-<br>
-<br>
-<strong>Memory Scopes</strong>: These memory scopes define a hierarchy of visibilities
-when analyzing the ordering constraints of memory operations. They are
-defined by the values of the memory_scope enumeration constant. Current
-values are <strong>memory_scope_work_item</strong>(memory constraints only apply to a
-single work-item and in practice apply only to image operations)<strong>,
-memory_scope_sub_group</strong> (memory-ordering constraints only apply to
-work-items executing in a sub-group), <strong>memory_scope_work_group</strong>
-(memory-ordering constraints only apply to work-items executing in a
-work-group), <strong>memory_scope_device</strong> (memory-ordering constraints only
-apply to work-items executing on a single device) and
-<strong>memory_scope_all_svm_devices</strong> (memory-ordering constraints only apply
-to work-items executing across multiple devices and when using shared
-virtual memory).
-<br>
-<br>
-<strong>Modification Order</strong>:All modifications to a particular atomic object M
-occur in some particular <strong>total order</strong>, called the <strong>modification
-order</strong> of M. If A and B are modifications of an atomic object M, and A
-happens-before B, then A shall precede B in the modification order of M.
-Note that the modification order of an atomic object M is independent of
-whether M is in local or global memory.
-<br>
-<br>
-<strong>Nested Parallelism</strong>: See <em>device-side enqueue</em>.
-<br>
-<br>
-<strong>Object</strong>: Objects are abstract representation of the resources that can
-be manipulated by the OpenCL API. Examples include <em>program objects</em>,
-<em>kernel objects</em>, and <em>memory objects</em>.
-<br>
-<br>
-<strong>Out-of-Order Execution</strong>: A model of execution in which <em>commands</em> placed
-in the <em>work queue</em> may begin and complete execution in any order
-consistent with constraints imposed by <em>event wait
-lists_and_command-queue barrier</em>. See <em>In-order Execution</em>.
-<br>
-<br>
-<strong>Parent device</strong>: The OpenCL <em>device</em> which is partitioned to create
-<em>sub-devices</em>. Not all <em>parent devices_are _root devices</em>. A <em>root
-device</em> might be partitioned and the <em>sub-devices</em> partitioned again.
-In this case, the first set of <em>sub-devices</em> would be <em>parent devices</em>
-of the second set, but not the <em>root devices</em>. Also see <em>device</em>,
-<em>parent device</em> and <em>root device</em>.
-<br>
-<br>
-<strong>Parent kernel</strong>: see <em>device-side enqueue</em>.
-<br>
-<br>
-<strong>Pipe</strong>: The <em>pipe</em> memory object conceptually is an ordered sequence of
-data items. A pipe has two endpoints: a write endpoint into which data
-items are inserted, and a read endpoint from which data items are
-removed. At any one time, only one kernel instance may write into a
-pipe, and only one kernel instance may read from a pipe. To support the
-producer consumer design pattern, one kernel instance connects to the
-write endpoint (the producer) while another kernel instance connects to
-the reading endpoint (the consumer).
-<br>
-<br>
-<strong>Platform</strong>: The <em>host</em> plus a collection of <em>devices</em> managed by the
-OpenCL <em>framework</em> that allow an application to share <em>resources</em> and
-execute <em>kernels</em> on <em>devices</em> in the <em>platform</em>.
-<br>
-<br>
-<strong>Private Memory</strong>: A region of memory private to a <em>work-item</em>. Variables
-defined in one <em>work-items</em> <em>private memory</em> are not visible to another
-<em>work-item</em>.
-<br>
-<br>
-<strong>Processing Element</strong>: A virtual scalar processor. A work-item may
-execute on one or more processing elements.
-<br>
-<br>
-<strong>Program</strong>: An OpenCL <em>program</em> consists of a set of <em>kernels</em>.
-<em>Programs</em> may also contain auxiliary functions called by the <em>_kernel
-functions and constant data.
-<br>
-<br>
-<strong>Program Object</strong>: A _program object</em> encapsulates the following
-information:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A reference to an
-associated <em>context</em>.
-</p>
-</li>
-<li>
-<p>
-A <em>program</em> source or
-binary.
-</p>
-</li>
-<li>
-<p>
-The latest successfully
-built program executable, the list of <em>devices</em> for which the program
-executable is built, the build options used and a build log.
-</p>
-</li>
-<li>
-<p>
-The number of <em>kernel
-objects</em> currently attached.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><strong>Queued</strong>: The first state in the six state model for the execution of a
-command. The transition into this state occurs when the command is
-enqueued into a command-queue.
-<br>
-<br>
-<strong>Ready</strong>: The third state in the six state model for the execution of a
-command. The transition into this state occurs when pre-requisites
-constraining execution of a command have been met; i.e. the command has
-been launched. When a Kernel-enqueue command is launched, work-groups
-associated with the command are placed in a devices work-pool from
-which they are scheduled for execution.
-<br>
-<br>
-<strong>Re-converged Control Flow</strong>: see <em>control flow</em>.
-<br>
-<br>
-<strong>Reference Count</strong>: The life span of an OpenCL object is determined by its
-<em>reference count_an internal count of the number of references to the
-object. When you create an object in OpenCL, its _reference count</em> is
-set to one. Subsequent calls to the appropriate <em>retain</em> API (such as
-clRetainContext, clRetainCommandQueue) increment the <em>reference count</em>.
-Calls to the appropriate <em>release</em> API (such as clReleaseContext,
-clReleaseCommandQueue) decrement the <em>reference count</em>.
-Implementations may also modify the <em>reference count</em>, e.g. to track
-attached objects or to ensure correct operation of in-progress or
-scheduled activities. The object becomes inaccessible to host code when
-the number of <em>release</em> operations performed matches the number of
-<em>retain</em> operations plus the allocation of the object. At this point the
-reference count may be zero but this is not guaranteed.
-<br>
-<br>
-<strong>Relaxed Consistency</strong>: A memory consistency model in which the contents
-of memory visible to different <em>work-items</em> or <em>commands</em> may be
-different except at a <em>barrier</em> or other explicit synchronization
-points.
-<br>
-<br>
-<strong>Relaxed Semantics</strong>: A memory order semantics for atomic operations that
-implies no order constraints. The operation is <em>atomic</em> but it has no
-impact on the order of memory operations.
-<br>
-<br>
-<strong>Release Semantics</strong>: One of the memory order semantics defined for
-synchronization operations.  Release semantics apply to atomic
-operations that store to memory.  Given two units of execution, <strong>A</strong> and
-<strong>B</strong>, acting on a shared atomic object <strong>M</strong>, if <strong>A</strong> uses an atomic store
-of <strong>M</strong> with release semantics to synchronize-with an atomic load to <strong>M</strong>
-by <strong>B*that used acquire semantics, then *A*s atomic store will occur
-<em>after</em> any prior operations by *A</strong>. Note that the memory orders
-<em>acquire</em>, <em>sequentialy consistent</em>, and <em>acquire_release</em> all include
-<em>acquire semantics</em> and effectively pair with a store using release
-semantics.
-<br>
-<br>
-<strong>Remainder work-groups</strong>: When the work-groups associated with a
-kernel-instance are defined, the sizes of a work-group in each dimension
-may not evenly divide the size of the NDRange in the corresponding
-dimensions. The result is a collection of work-groups on the boundaries
-of the NDRange that are smaller than the base work-group size. These are
-known as <em>remainder work-groups</em>.
-<br>
-<br>
-<strong>Running</strong>: The fourth state in the six state model for the execution of
-a command. The transition into this state occurs when the execution of
-the command starts. When a Kernel-enqueue command starts, one or more
-work-groups associated with the command start to execute.
-<br>
-<br>
-<strong>Root device</strong>: A <em>root device</em> is an OpenCL <em>device</em> that has not been
-partitioned. Also see <em>device</em>, <em>parent device</em> and <em>root device</em>.
-<br>
-<br>
-<strong>Resource</strong>: A class of <em>objects</em> defined by OpenCL. An instance of a
-<em>resource</em> is an <em>object</em>. The most common <em>resources</em> are the
-<em>context</em>, <em>command-queue</em>, <em>program objects</em>, <em>kernel objects</em>, and
-<em>memory objects</em>. Computational resources are hardware elements that
-participate in the action of advancing a program counter. Examples
-include the <em>host</em>, <em>devices</em>, <em>compute units</em> and <em>processing
-elements</em>.
-<br>
-<br>
-<strong>Retain</strong>, Release: 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 remove an <em>object</em>
-before all instances that use this <em>object</em> have finished. Refer to
-<em>Reference Count</em>.
-<br>
-<br>
-<strong>Sampler</strong>: An <em>object</em> that describes how to sample an image when the
-image is read in the <em>kernel</em>. The image read functions take a
-<em>sampler</em> as an argument. The <em>sampler</em> specifies the image
-addressing-mode i.e. how out-of-range image coordinates are handled, the
-filter mode, and whether the input image coordinate is a normalized or
-unnormalized value.
-<br>
-<br>
-<strong>Scope inclusion</strong>: Two actions <strong>A</strong> and <strong>B</strong> are defined to have an
-inclusive scope if they have the same scope <strong>P</strong> such that: (1) if <strong>P</strong> is
-memory_scope_sub_group, and <strong>A</strong> and <strong>B</strong> are executed by work-items
-within the same sub-group, or (2) if <strong>P</strong> is memory_scope_work_group, and
-<strong>A</strong> and <strong>B</strong> are executed by work-items within the same work-group, or
-(3) if <strong>P</strong> is memory_scope_device, and <strong>A</strong> and <strong>B</strong> are executed by
-work-items on the same device, or (4) if <strong>P</strong> is
-memory_scope_all_svm_devices, if <strong>A</strong> and <strong>B</strong> are executed by host
-threads or by work-items on one or more devices that can share SVM
-memory with each other and the host process.
-<br>
-<br>
-<strong>Sequenced before</strong>: A relation between evaluations executed by a single
-unit of execution. Sequenced-before is an asymmetric, transitive,
-pair-wise relation that induces a partial order between evaluations.
-Given any two evaluations A and B, if A is sequenced-before B, then the
-execution of A shall precede the execution of B.
-<br>
-<br>
-<strong>Sequential consistency</strong>: Sequential consistency interleaves the steps
-executed by each unit of execution. Each access to a memory location
-sees the last assignment to that location in that interleaving.
-<br>
-<br>
-<strong>Sequentially consistent semantics</strong>: One of the memory order semantics
-defined for synchronization operations. When using
-sequentially-consistent synchronization operations, the loads and stores
-within one unit of execution appear to execute in program order (i.e.,
-the sequenced-before order), and loads and stores from different units
-of execution appear to be simply interleaved.
-<br>
-<br>
-<strong>Shared Virtual Memory (SVM)</strong>: An address space exposed to both the host
-and the devices within a context. SVM causes addresses to be meaningful
-between the host and all of the devices within a context and therefore
-supports the use of pointer based data structures in OpenCL kernels. It
-logically extends a portion of the global memory into the host address
-space therefore giving work-items access to the host address space.
-There are three types of SVM in OpenCL <strong>Coarse-Grained buffer SVM</strong>:
-Sharing occurs at the granularity of regions of OpenCL buffer memory
-objects. <strong>Fine-Grained buffer SVM</strong>: Sharing occurs at the granularity
-of individual loads/stores into bytes within OpenCL buffer memory
-objects. <strong>Fine-Grained system SVM</strong>: Sharing occurs at the granularity of
-individual loads/stores into bytes occurring anywhere within the host
-memory.
-<br>
-<br>
-<strong>SIMD</strong>: Single Instruction Multiple Data. A programming model where a
-<em>kernel</em> is executed concurrently on multiple <em>processing elements</em> each
-with its own data and a shared program counter. All <em>processing
-elements</em> execute a strictly identical set of instructions.
-<br>
-<br>
-<strong>Specialization constants</strong>: 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. Application might provide values for
-the specialization constants that will be used when SPIR-V program is
-built. Specialization constants that do not receive a value from an
-application shall use default value as defined in SPIR-V specification.
-<br>
-<br>
-<strong>SPMD</strong>: Single Program Multiple Data. A programming model where a
-<em>kernel</em> is executed concurrently on multiple <em>processing elements</em> each
-with its own data and its own program counter. Hence, while all
-computational resources run the same <em>kernel</em> they maintain their own
-instruction counter and due to branches in a <em>kernel</em>, the actual
-sequence of instructions can be quite different across the set of
-<em>processing elements</em>.
-<br>
-<br>
-<strong>Sub-device</strong>: An OpenCL <em>device</em> can be partitioned into multiple
-<em>sub-devices</em>. The new <em>sub-devices</em> alias specific collections of
-compute units within the parent <em>device</em>, according to a partition
-scheme. The <em>sub-devices</em> may be used in any situation that their
-parent <em>device</em> may be used. Partitioning a <em>device</em> does not destroy
-the parent <em>device</em>, which may continue to be used along side and
-intermingled with its child <em>sub-devices</em>. Also see <em>device</em>, <em>parent
-device</em> and <em>root device</em>.
-<br>
-<br>
-<strong>Sub-group</strong>: Sub-groups are an implementation-dependent grouping of
-work-items within a work-group.   The size and number of sub-groups is
-implementation-defined.
-<br>
-<br>
-<strong>Sub-group Barrier</strong>. See <em>Barrier</em>.
-<br>
-<br>
-<strong>Submitted</strong>: The second state in the six state model for the execution
-of a command. The transition into this state occurs when the command is
-flushed from the command-queue and submitted for execution on the
-device. Once submitted, a programmer can assume a command will execute
-once its prerequisites have been met.
-<br>
-<br>
-<strong>SVM Buffer</strong>: A memory allocation enabled to work with Shared Virtual
-Memory (SVM). Depending on how the SVM buffer is created, it can be a
-coarse-grained or fine-grained SVM buffer. Optionally it may be wrapped
-by a Buffer Object. See <em>Shared Virtual Memory (SVM)</em>.
-<br>
-<br>
-<strong>Synchronization</strong>: Synchronization refers to mechanisms that constrain
-the order of execution and the visibility of memory operations between
-two or more units of execution.
-<br>
-<br>
-<strong>Synchronization operations</strong>: Operations that define memory order
-constraints in a program. They play a special role in controlling how
-memory operations in one unit of execution (such as work-items or, when
-using SVM a host thread) are made visible to another. Synchronization
-operations in OpenCL include <em>atomic operations</em> and <em>fences</em>.
-<br>
-<br>
-<strong>Synchronization point</strong>: A synchronization point between a pair of
-commands (A and B) assures that results of command A happens-before
-command B is launched (i.e. enters the ready state) .
-<br>
-<br>
-<strong>Synchronizes with</strong>: A relation between operations in two different
-units of execution that defines a memory order constraint in global
-memory (<em>global-synchronizes-with</em>) or local memory
-(<em>local-synchronizes-with</em>).
-<br>
-<br>
-<strong>Task Parallel Programming Model</strong>: A programming model in which
-computations are expressed in terms of multiple concurrent tasks
-executing in one or more <em>command-queues</em>. The concurrent tasks can be
-running different <em>kernels</em>.
-<br>
-<br>
-<strong>Thread-safe</strong>: An OpenCL API call is considered to be <em>thread-safe</em> if
-the internal state as managed by OpenCL remains consistent when called
-simultaneously by multiple <em>host</em> threads. OpenCL API calls that are
-<em>thread-safe</em> allow an application to call these functions in multiple
-<em>host</em> threads without having to implement mutual exclusion across these
-<em>host</em> threads i.e. they are also re-entrant-safe.
-<br>
-<br>
-<strong>Undefined</strong>: The behavior of an OpenCL API call, built-in function used
-inside a <em>kernel</em> or execution of a <em>kernel</em> that is explicitly not
-defined by OpenCL. A conforming implementation is not required to
-specify what occurs when an undefined construct is encountered in
-OpenCL.
-<br>
-<br>
-<strong>Unit of execution</strong>: a generic term for a process, OS managed thread
-running on the host (a host-thread), kernel-instance, host program,
-work-item or any other executable agent that advances the work
-associated with a program.
-<br>
-<br>
-<strong>Work-group</strong>: A collection of related <em>work-items</em> that execute on a
-single <em>compute unit</em>. The <em>work-items</em> in the group execute the same
-<em>kernel-instance</em> and share <em>local</em> <em>memory</em> and <em>work-group functions</em>.
-<br>
-<br>
-<strong>Work-group Barrier</strong>. See <em>Barrier</em>.
-<br>
-<br>
-<strong>Work-group Function</strong>: A function that carries out collective operations
-across all the work-items in a work-group. Available collective
-operations are a barrier, reduction, broadcast, prefix sum, and
-evaluation of a predicate. A work-group function must occur within a
-<em>converged control flow</em>; i.e. all work-items in the work-group must
-encounter precisely the same work-group function.
-<br>
-<br>
-<strong>Work-group Synchronization</strong>: Constraints on the order of execution for
-work-items in a single work-group.
-<br>
-<br>
-<strong>Work-pool</strong>: A logical pool associated with a device that holds commands
-and work-groups from kernel-instances that are ready to execute. OpenCL
-does not constrain the order that commands and work-groups are scheduled
-for execution from the work-pool; i.e. a programmer must assume that
-they could be interleaved. There is one work-pool per device used by
-all command-queues associated with that device. The work-pool may be
-implemented in any manner as long as it assures that work-groups placed
-in the pool will eventually execute.
-<br>
-<br>
-<strong>Work-item</strong>: One of a collection of parallel executions of a <em>kernel</em>
-invoked on a <em>device</em> by a <em>command</em>. A <em>work-item</em> is executed by one
-or more <em>processing elements</em> as part of a <em>work-group</em> executing on a
-<em>compute unit</em>. A <em>work-item</em> is distinguished from other work-items by
-its <em>global ID</em> or the combination of its <em>work-group</em> ID and its <em>local
-ID</em> within a <em>work-group</em>.</p></div>
-<div class="paragraph"><p> </p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_the_opencl_architecture">3. The OpenCL Architecture</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>OpenCL</strong> is an open industry standard for programming a heterogeneous
-collection of CPUs, GPUs and other discrete computing devices organized
-into a single platform. It is more than a language. OpenCL is a
-framework for parallel programming and includes a language, API,
-libraries and a runtime system to support software development. Using
-OpenCL, for example, a programmer can write general purpose programs
-that execute on GPUs without the need to map their algorithms onto a 3D
-graphics API such as OpenGL or DirectX.
-<br>
-<br>
-The target of OpenCL is expert programmers wanting to write portable yet
-efficient code. This includes library writers, middleware vendors, and
-performance oriented application programmers. Therefore OpenCL provides
-a low-level hardware abstraction plus a framework to support programming
-and many details of the underlying hardware are exposed.
-<br>
-<br>
-To describe the core ideas behind OpenCL, we will use a hierarchy of
-models:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Platform Model
-</p>
-</li>
-<li>
-<p>
-Memory Model
-</p>
-</li>
-<li>
-<p>
-Execution Model
-</p>
-</li>
-<li>
-<p>
-Programming Model
-</p>
-</li>
-</ul></div>
-<div class="sect2">
-<h3 id="_platform_model">3.1. Platform Model</h3>
-<div class="paragraph"><p>The Platform model for OpenCL is defined in <em>figure 3.1</em>. The model
-consists of a <strong>host</strong> connected to one or more <strong>OpenCL devices</strong>. An OpenCL
-device is divided into one or more <strong>compute units</strong> (CUs) which are further
-divided into one or more <strong>processing elements</strong> (PEs). Computations on a
-device occur within the processing elements.
-<br>
-<br>
-An OpenCL application is implemented as both host code and device kernel
-code.  The host code portion of an OpenCL application runs on a host
-processor according to the models native to the host platform. The
-OpenCL application host code submits the kernel code as commands from
-the host to OpenCL devices.  An OpenCL device executes the commands
-computation on the processing elements within the device. 
-<br>
-<br>
-An OpenCL device has considerable latitude on how computations are
-mapped onto the devices processing elements.  When processing elements
-within a compute unit execute the same sequence of statements across the
-processing elements, the control flow is said to be <em>converged.</em>
-Hardware optimized for executing a single stream of instructions over
-multiple processing elements is well suited to converged control
-flows. When the control flow varies from one processing element to
-another, it is said to be <em>diverged.</em> While a kernel always begins
-execution with a converged control flow, due to branching statements
-within a kernel, converged and diverged control flows may occur within a
-single kernel. This provides a great deal of flexibility in the
-algorithms that can be implemented with OpenCL.
-<br>
-<br></p></div>
-<div class="paragraph"><p><span class="image">
-<img src="opencl22-API_files/image004_new.png" alt="opencl22-API_files/image004_new.png" width="320" height="180">
-</span></p></div>
-<div class="paragraph"><p><strong>Figure 3.1</strong>: <em>Platform model &#8230; one host plus one or more compute devices each
-with one or more compute units composed of one or more processing elements</em>.
-<br>
-<br>
-Programmers provide programs in the form of SPIR-V source binaries,
-OpenCL C or OpenCL C++ source strings or implementation-defined binary objects. The
-OpenCL platform provides a compiler to translate program input of either
-form into executable program objects. The device code compiler may be
-<em>online</em> or <em>offline</em>. An <em>online</em> <em>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 be able to load and execute a
-previously compiled device program executable.
-<br>
-<br>
-OpenCL defines two kinds of platform profiles: a <em>full profile</em> and a
-reduced-functionality <em>embedded profile</em>. A full profile platform must
-provide an online compiler for all its devices. An embedded platform
-may provide an online compiler, but is not required to do so.
-<br>
-<br>
-A device may expose special purpose functionality as a <em>built-in
-function</em>. The platform provides APIs for enumerating and invoking the
-built-in functions offered by a device, but otherwise does not define
-their construction or semantics. A <em>custom device</em> supports only
-built-in functions, and cannot be programmed via a kernel language.
-<br>
-<br>
-All device types support the OpenCL execution model, the OpenCL memory
-model, and the APIs used in OpenCL to manage devices.
-<br>
-<br>
-The platform model is an abstraction describing how OpenCL views the
-hardware. The relationship between the elements of the platform model
-and the hardware in a system may be a fixed property of a device or it
-may be a dynamic feature of a program dependent on how a compiler
-optimizes code to best utilize physical hardware.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_execution_model">3.2. Execution Model</h3>
-<div class="paragraph"><p>The OpenCL execution model is defined in terms of two distinct units of
-execution: <strong>kernels</strong> that execute on one or more OpenCL devices and a
-<strong>host program</strong> that executes on the host. With regard to OpenCL, the
-kernels are where the "work" associated with a computation occurs. This
-work occurs through <strong>work-items</strong> that execute in groups (<strong>work-groups</strong>).
-<br>
-<br>
-A kernel executes within a well-defined context managed by the host.
-The context defines the environment within which kernels execute. It
-includes the following resources:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Devices</strong>: One or
-more devices exposed by the OpenCL platform.
-</p>
-</li>
-<li>
-<p>
-<strong>Kernel Objects</strong>:The
-OpenCL functions with their associated argument values that run on
-OpenCL devices.
-</p>
-</li>
-<li>
-<p>
-<strong>Program Objects</strong>:The
-program source and executable that implement the kernels.
-</p>
-</li>
-<li>
-<p>
-<strong>Memory
-Objects</strong>:Variables visible to the host and the OpenCL devices.
-Instances of kernels operate on these objects as they execute.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The host program uses the OpenCL API to create and manage the context.
-Functions from the OpenCL API enable the host to interact with a device
-through a <em>command-queue</em>. Each command-queue is associated with a
-single device. The commands placed into the command-queue fall into
-one of three types:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Kernel-enqueue commands</strong>:
-Enqueue a kernel for execution on a device.
-</p>
-</li>
-<li>
-<p>
-<strong>Memory commands</strong>:
-Transfer data between the host and device memory, between memory
-objects, or map and unmap memory objects from the host address space.
-</p>
-</li>
-<li>
-<p>
-<strong>Synchronization
-commands</strong>: Explicit synchronization points that define order constraints
-between commands.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>In addition to commands submitted from the host command-queue, a kernel
-running on a device can enqueue commands to a device-side command queue.
-This results in <em>child kernels</em> enqueued by a kernel executing on a
-device (the <em>parent kernel</em>). Regardless of whether the command-queue
-resides on the host or a device, each command passes through six states.</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-<strong>Queued</strong>: The command is enqueued to a command-queue. A
-command may reside in the queue until it is flushed either explicitly (a
-call to clFlush) or implicitly by some other command.
-</p>
-</li>
-<li>
-<p>
-<strong>Submitted</strong>: The command is flushed from the command-queue and
-submitted for execution on the device. Once flushed from the
-command-queue, a command will execute after any prerequisites for
-execution are met.
-</p>
-</li>
-<li>
-<p>
-<strong>Ready</strong>: All prerequisites constraining execution of a command
-have been met. The command, or for a kernel-enqueue command the
-collection of work groups associated with a command, is placed in a
-device work-pool from which it is scheduled for execution.
-</p>
-</li>
-<li>
-<p>
-<strong>Running</strong>: Execution of the command starts. For the case of a
-kernel-enqueue command, one or more work-groups associated with the
-command start to execute.
-</p>
-</li>
-<li>
-<p>
-<strong>Ended</strong>: Execution of a command ends. When a Kernel-enqueue
-command ends, all of the work-groups associated with that command have
-finished their execution. <em>Immediate side effects</em>, i.e. those
-associated with the kernel but not necessarily with its child kernels,
-are visible to other units of execution. These side effects include
-updates to values in global memory.
-</p>
-</li>
-<li>
-<p>
-<strong>Complete</strong>: The command and its child commands have finished
-execution and the status of the event object, if any, associated with
-the command is set to CL_COMPLETE.
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p>The execution states and the transitions between them are summarized in
-Figure 3-2. These states and the concept of a device work-pool are
-conceptual elements of the execution model. An implementation of OpenCL
-has considerable freedom in how these are exposed to a program. Five of
-the transitions, however, are directly observable through a profiling
-interface. These profiled states are shown in Figure 3-2.</p></div>
-<div class="paragraph"><p><span class="image">
-<img src="opencl22-API_files/image006.jpg" alt="image">
-</span></p></div>
-<div class="paragraph"><p><strong>Figure 3-2: The states and transitions between states defined in the
-OpenCL execution model. A subset of these transitions is exposed
-through the profiling interface (see section 5.14).</strong></p></div>
-<div class="paragraph"><p>Commands communicate their status through <em>Event objects</em>. Successful
-completion is indicated by setting the event status associated with a
-command to CL_COMPLETE. Unsuccessful completion results in abnormal
-termination of the command which is indicated by setting the event
-status to a negative value. In this case, the command-queue associated
-with the abnormally terminated command and all other command-queues in
-the same context may no longer be available and their behavior is
-implementation defined.
-<br>
-<br>
-A command submitted to a device will not launch until prerequisites that
-constrain the order of commands have been resolved. These
-prerequisites have three sources:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-They may arise from
-commands submitted to a command-queue that constrain the order in which
-commands are launched. For example, commands that follow a command queue
-barrier will not launch until all commands prior to the barrier are
-complete.
-</p>
-</li>
-<li>
-<p>
-The second source of
-prerequisites is dependencies between commands expressed through events.
-A command may include an optional list of events. The command will wait
-and not launch until all the events in the list are in the state CL
-COMPLETE. By this mechanism, event objects define order constraints
-between commands and coordinate execution between the host and one or
-more devices.
-</p>
-</li>
-<li>
-<p>
-The third source of
-prerequisities can be the presence of non-trivial C initializers or C<span class="monospaced">
-constructors for program scope global variables. In this case, OpenCL
-C/C</span> compiler shall generate program initialization kernels that
-perform C initialization or C<span class="monospaced"> construction. These kernels must be
-executed by OpenCL runtime on a device before any kernel from the same
-program can be executed on the same device. The ND-range for any program
-initialization kernel is (1,1,1). When multiple programs are linked
-together, the order of execution of program initialization kernels
-that belong to different programs is undefined.
-<br>
-<br>
-Program clean up may result in the execution of one or more program
-clean up kernels by the OpenCL runtime. This is due to the presence of
-non-trivial C\</span> destructors for program scope variables. The ND-range
-for executing any program clean up kernel is (1,1,1). The order of
-execution of clean up kernels from different programs (that are linked
-together) is undefined.
-<br>
-<br>
-Note that C initializers, C<span class="monospaced"> constructors, or C</span> destructors for
-program scope variables cannot use pointers to coarse grain and fine
-grain SVM allocations.
-<br>
-<br>
-A command may be submitted to a device and yet have no visible side effects
-outside of waiting on and satisfying event dependences. Examples include
-markers, kernels executed over ranges of no work-items or copy
-operations with zero sizes. Such commands may pass directly from the
-<em>ready</em> state to the <em>ended</em> state.
-<br>
-<br>
-Command execution can be blocking or non-blocking. Consider a sequence
-of OpenCL commands. For blocking commands, the OpenCL API functions
-that enqueue commands don&#8217;t return until the command has completed.
-Alternatively, OpenCL functions that enqueue non-blocking commands
-return immediately and require that a programmer defines dependencies
-between enqueued commands to ensure that enqueued commands are not
-launched before needed resources are available. In both cases, the
-actual execution of the command may occur asynchronously with execution
-of the host program.
-<br>
-<br>
-Commands within a single command-queue execute relative to each other in
-one of two modes:
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>In-order Execution</strong>:
-Commands and any side effects associated with commands appear to the
-OpenCL application as if they execute in the same order they are
-enqueued to a command-queue.
-</p>
-</li>
-<li>
-<p>
-<strong>Out-of-order Execution</strong>:
-Commands execute in any order constrained only by explicit
-synchronization points (e.g. through command queue barriers) or explicit
-dependencies on events.
-<br>
-<br>
-Multiple command-queues can be present within a single context.
-Multiple command-queues execute commands independently. Event objects
-visible to the host program can be used to define synchronization points
-between commands in multiple command queues. If such synchronization
-points are established between commands in multiple command-queues, an
-implementation must assure that the command-queues progress concurrently
-and correctly account for the dependencies established by the
-synchronization points. For a detailed explanation of synchronization
-points, see section 3.2.4.
-<br>
-<br>
-The core of the OpenCL execution model is defined by how the kernels
-execute. When a kernel-enqueue command submits a kernel for execution,
-an index space is defined. The kernel, the argument values associated
-with the arguments to the kernel, and the parameters that define the
-index space define a <em>kernel-instance</em>. When a kernel-instance executes
-on a device, the kernel function executes for each point in the defined
-index space. Each of these executing kernel functions is called a
-<em>work-item</em>. The work-items associated with a given kernel-instance are
-managed by the device in groups called <em>work-groups</em>. These work-groups
-define a coarse grained decomposition of the Index space. Work-groups
-are further divided into <em>sub-groups</em>, which provide an additional level
-of control over execution.
-<br>
-<br>
-Work-items have a global ID based on their coordinates within the Index
-space. They can also be defined in terms of their work-group and the
-local ID within a work-group. The details of this mapping are described
-in the following section.
-</p>
-</li>
-</ul></div>
-<div class="sect3">
-<h4 id="_execution_model_mapping_work_items_onto_an_ndrange">3.2.1. Execution Model: Mapping work-items onto an NDRange</h4>
-<div class="paragraph"><p>The index space supported by OpenCL is called an NDRange. An NDRange is
-an N-dimensional index space, where N is one, two or three. The NDRange
-is decomposed into work-groups forming blocks that cover the Index
-space. An NDRange is defined by three integer arrays of length N:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The extent of the index
-space (or global size) in each dimension.
-</p>
-</li>
-<li>
-<p>
-An offset index F
-indicating the initial value of the indices in each dimension (zero by
-default).
-</p>
-</li>
-<li>
-<p>
-The size of a work-group
-(local size) in each dimension.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Each work-items global ID is an N-dimensional tuple. The global ID
-components are values in the range from F, to F plus the number of
-elements in that dimension minus one.
-<br>
-<br>
-If a kernel is created from OpenCL C 2.0 or SPIR-V, the size of work-groups
-in an NDRange (the local size) need not be the same for all work-groups.
-In this case, any single dimension for which the global size is not
-divisible by the local size will be partitioned into two regions. One
-region will have work-groups that have the same number of work items as
-was specified for that dimension by the programmer (the local size). The
-other region will have work-groups with less than the number of work
-items specified by the local size parameter in that dimension (the
-<em>remainder work-groups</em>). Work-group sizes could be non-uniform in
-multiple dimensions, potentially producing work-groups of up to 4
-different sizes in a 2D range and 8 different sizes in a 3D range.
-<br>
-<br>
-Each work-item is assigned to a work-group and given a local ID to
-represent its position within the work-group. A work-item&#8217;s local ID is
-an N-dimensional tuple with components in the range from zero to the
-size of the work-group in that dimension minus one.
-<br>
-<br>
-Work-groups are assigned IDs similarly. The number of work-groups in
-each dimension is not directly defined but is inferred from the local
-and global NDRanges provided when a kernel-instance is enqueued. A
-work-group&#8217;s ID is an N-dimensional tuple with components in the range 0
-to the ceiling of the global size in that dimension divided by the local
-size in the same dimension. As a result, the combination of a
-work-group ID and the local-ID within a work-group uniquely defines a
-work-item. Each work-item is identifiable in two ways; in terms of a
-global index, and in terms of a work-group index plus a local index
-within a work group.
-<br>
-<br>
-For example, consider the 2-dimensional index space in figure 3-3. We
-input the index space for the work-items (G<sub>x</sub>, G<sub>y</sub>), the size of each
-work-group (S<sub>x</sub>, S<sub>y</sub>) and the global ID offset (F<sub>x</sub>, F<sub>y</sub>). The
-global indices define an G<sub>x</sub>by G<sub>y</sub> index space where the total number
-of work-items is the product of G<sub>x</sub> and G<sub>y</sub>. The local indices define
-an S<sub>x</sub> by S<sub>y</sub> index space where the number of work-items in a single
-work-group is the product of S<sub>x</sub> and S<sub>y</sub>. Given the size of each
-work-group and the total number of work-items we can compute the number
-of work-groups. A 2-dimensional index space is used to uniquely identify
-a work-group. Each work-item is identified by its global ID (<em>g</em><sub>x</sub>,
-<em>g</em><sub>y</sub>) or by the combination of the work-group ID (<em>w</em><sub>x</sub>, <em>w</em><sub>y</sub>), the
-size of each work-group (S<sub>x</sub>,S<sub>y</sub>) and the local ID (s<sub>x</sub>, s<sub>y</sub>) inside
-the work-group such that
-<br></p></div>
-<div class="paragraph"><p>&#160; &#160; &#160; &#160; (g<sub>x</sub> , g<sub>y</sub>) = (w<sub>x</sub> * S<sub>x</sub> + s<sub>x</sub> + F<sub>x</sub>, w<sub>y</sub> * S<sub>y</sub> + s<sub>y</sub> + F<sub>y</sub>)
-<br>
-<br>
-The number of work-groups can be computed as:
-<br></p></div>
-<div class="paragraph"><p>&#160; &#160; &#160; &#160; (W<sub>x</sub>, W<sub>y</sub>) = (ceil(G<sub>x</sub> / S<sub>x</sub>),ceil( G<sub>y</sub> / S<sub>y</sub>))
-<br>
-<br>
-Given a global ID and the work-group size, the work-group ID for a
-work-item is computed as:
-<br></p></div>
-<div class="paragraph"><p>&#160; &#160; &#160; &#160; (w<sub>x</sub>, w<sub>y</sub>) = ( (g<sub>x</sub>  s<sub>x</sub>  F<sub>x</sub>) / S<sub>x</sub>, (g<sub>y</sub>  s<sub>y</sub>  F<sub>y</sub>) /
-S<sub>y</sub> )</p></div>
-<div class="paragraph"><p><span class="image">
-<img src="opencl22-API_files/image007.jpg" alt="image">
-</span></p></div>
-<div class="paragraph"><p><strong>Figure 3-3: An example of an NDRange index space showing work-items,
-their global IDs and their mapping onto the pair of work-group and local
-IDs. In this case, we assume that in each dimension, the size of the
-work-group evenly divides the global NDRange size (i.e. all work-groups
-have the same size) and that the offset is equal to zero.</strong>
-<br>
-<br>
-Within a work-group work-items may be divided into sub-groups. The
-mapping of work-items to sub-groups is implementation-defined and may be
-queried at runtime. While sub-groups may be used in multi-dimensional
-work-groups, each sub-group is 1-dimensional and any given work-item may
-query which sub-group it is a member of.
-<br>
-<br>
-Work items are mapped into sub-groups through a combination of
-compile-time decisions and the parameters of the dispatch. The mapping
-to sub-groups is invariant for the duration of a kernels execution,
-across dispatches of a given kernel with the same work-group dimensions,
-between dispatches and query operations consistent with the dispatch
-parameterization, and from one work-group to another within the dispatch
-(excluding the trailing edge work-groups in the presence of non-uniform
-work-group sizes). In addition, all sub-groups within a work-group will
-be the same size, apart from the sub-group with the maximum index which
-may be smaller if the size of the work-group is not evenly divisible by
-the size of the sub-groups.
-<br>
-<br>
-In the degenerate case, a single sub-group must be supported for each
-work-group. In this situation all sub-group scope functions are
-equivalent to their work-group level equivalents.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_execution_model_execution_of_kernel_instances">3.2.2. Execution Model: Execution of kernel-instances</h4>
-<div class="paragraph"><p>The work carried out by an OpenCL program occurs through the execution
-of kernel-instances on compute devices. To understand the details of
-OpenCLs execution model, we need to consider how a kernel object moves
-from the kernel-enqueue command, into a command-queue, executes on a
-device, and completes.
-<br>
-<br>
-A kernel-object is defined from a function within the program object and
-a collection of arguments connecting the kernel to a set of argument
-values. The host program enqueues a kernel-object to the command queue
-along with the NDRange, and the work-group decomposition. These define
-a <em>kernel-instance</em>. In addition, an optional set of events may be
-defined when the kernel is enqueued. The events associated with a
-particular kernel-instance are used to constrain when the
-kernel-instance is launched with respect to other commands in the queue
-or to commands in other queues within the same context.
-<br>
-<br>
-A kernel-instance is submitted to a device. For an in-order command
-queue, the kernel instances appear to launch and then execute in that
-same order; where we use the term appear to emphasize that when there
-are no dependencies between commands and hence differences in the order
-that commands execute cannot be observed in a program, an implementation
-can reorder commands even in an in-order command queue. For an out of
-order command-queue, kernel-instances wait to be launched until:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Synchronization commands
-enqueued prior to the kernel-instance are satisfied.
-</p>
-</li>
-<li>
-<p>
-Each of the events in an
-optional event list defined when the kernel-instance was enqueued are
-set to CL_COMPLETE.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Once these conditions are met, the kernel-instance is launched and the
-work-groups associated with the kernel-instance are placed into a pool
-of ready to execute work-groups. This pool is called a <em>work-pool</em>.
-The work-pool may be implemented in any manner as long as it assures
-that work-groups placed in the pool will eventually execute. The
-device schedules work-groups from the work-pool for execution on the
-compute units of the device. The kernel-enqueue command is complete when
-all work-groups associated with the kernel-instance end their execution,
-updates to global memory associated with a command are visible globally,
-and the device signals successful completion by setting the event
-associated with the kernel-enqueue command to CL_COMPLETE.
-<br>
-<br>
-While a command-queue is associated with only one device, a single
-device may be associated with multiple command-queues all feeding into
-the single work-pool. A device may also be associated with command
-queues associated with different contexts within the same platform,
-again all feeding into the single work-pool. The device will pull
-work-groups from the work-pool and execute them on one or several
-compute units in any order; possibly interleaving execution of
-work-groups from multiple commands. A conforming implementation may
-choose to serialize the work-groups so a correct algorithm cannot assume
-that work-groups will execute in parallel. There is no safe and
-portable way to synchronize across the independent execution of
-work-groups since once in the work-pool, they can execute in any order.
-<br>
-<br>
-The work-items within a single sub-group execute concurrently but not
-necessarily in parallel (i.e. they are not guaranteed to make
-independent forward progress). Therefore, only high-level
-synchronization constructs (e.g. sub-group functions such as barriers)
-that apply to all the work-items in a sub-group are well defined and
-included in OpenCL.
-<br>
-<br>
-Sub-groups execute concurrently within a given work-group and with
-appropriate device support (<em>see Section__4.2</em>) may make independent
-forward progress with respect to each other, with respect to host
-threads and with respect to any entities external to the OpenCL system
-but running on an OpenCL device, even in the absence of work-group
-barrier operations. In this situation, sub-groups are able to internally
-synchronize using barrier operations without synchronizing with each
-other and may perform operations that rely on runtime dependencies on
-operations other sub-groups perform.
-<br>
-<br>
-The work-items within a single work-group execute concurrently but are
-only guaranteed to make independent progress in the presence of
-sub-groups and device support. In the absence of this capability, only
-high-level synchronization constructs (e.g. work-group functions such as
-barriers) that apply to all the work-items in a work-group are well
-defined and included in OpenCL for synchronization within the
-work-group.
-<br>
-<br>
-In the absence of synchronization functions (e.g. a barrier), work-items
-within a sub-group may be serialized. In the presence of sub -group
-functions, work-items within a sub -group may be serialized before any
-given sub -group function, between dynamically encountered pairs of sub
--group functions and between a work-group function and the end of the
-kernel.
-<br>
-<br>
-In the absence of independent forward progress of constituent
-sub-groups, work-items within a work-group may be serialized before,
-after or between work-group synchronization functions.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_execution_model_device_side_enqueue">3.2.3. Execution Model: Device-side enqueue</h4>
-<div class="paragraph"><p>Algorithms may need to generate additional work as they execute. In
-many cases, this additional work cannot be determined statically; so the
-work associated with a kernel only emerges at runtime as the
-kernel-instance executes. This capability could be implemented in logic
-running within the host program, but involvement of the host may add
-significant overhead and/or complexity to the application control
-flow. A more efficient approach would be to nest kernel-enqueue
-commands from inside other kernels. This <strong>nested parallelism</strong> can be
-realized by supporting the enqueuing of kernels on a device without
-direct involvement by the host program; so-called <strong>device-side
-enqueue</strong>.
-<br>
-<br>
-Device-side kernel-enqueue commands are similar to host-side
-kernel-enqueue commands. The kernel executing on a device (the <strong>parent
-kernel</strong>) enqueues a kernel-instance (the <strong>child kernel</strong>) to a
-device-side command queue. This is an out-of-order command-queue and
-follows the same behavior as the out-of-order command-queues exposed to
-the host program. Commands enqueued to a device side command-queue
-generate and use events to enforce order constraints just as for the
-command-queue on the host. These events, however, are only visible to
-the parent kernel running on the device. When these prerequisite
-events take on the value CL_COMPLETE, the work-groups associated with
-the child kernel are launched into the devices work pool. The device
-then schedules them for execution on the compute units of the device.
-Child and parent kernels execute asynchronously. However, a parent will
-not indicate that it is complete by setting its event to CL_COMPLETE
-until all child kernels have ended execution and have signaled
-completion by setting any associated events to the value CL_COMPLETE.
-Should any child kernel complete with an event status set to a negative
-value (i.e. abnormally terminate), the parent kernel will abnormally
-terminate and propagate the childs negative event value as the value of
-the parents event. If there are multiple children that have an event
-status set to a negative value, the selection of which childs negative
-event value is propagated is implementation-defined.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_execution_model_synchronization">3.2.4. Execution Model: Synchronization</h4>
-<div class="paragraph"><p>Synchronization refers to mechanisms that constrain the order of
-execution between two or more units of execution. Consider the
-following three domains of synchronization in OpenCL:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Work-group
-synchronization: Constraints on the order of execution for work-items in
-a single work-group
-</p>
-</li>
-<li>
-<p>
-Sub-group synchronization:
-Contraints on the order of execution for work-items in a single
-sub-group
-</p>
-</li>
-<li>
-<p>
-Command synchronization:
-Constraints on the order of commands launched for execution
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Synchronization across all work-items within a single work-group is
-carried out using a <em>work-group function</em>. These functions carry out
-collective operations across all the work-items in a work-group.
-Available collective operations are: barrier, reduction, broadcast,
-prefix sum, and evaluation of a predicate. A work-group function must
-occur within a converged control flow; i.e. all work-items in the
-work-group must encounter precisely the same work-group function. For
-example, if a work-group function occurs within a loop, the work-items
-must encounter the same work-group function in the same loop
-iterations. All the work-items of a work-group must execute the
-work-group function and complete reads and writes to memory before any
-are allowed to continue execution beyond the work-group function.
-Work-group functions that apply between work-groups are not provided in
-OpenCL since OpenCL does not define forward-progress or ordering
-relations between work-groups, hence collective synchronization
-operations are not well defined.
-<br>
-<br>
-Synchronization across all work-items within a single sub-group is
-carried out using a <em>sub-group function</em>. These functions carry out
-collective operations across all the work-items in a sub-group.
-Available collective operations are: barrier, reduction, broadcast,
-prefix sum, and evaluation of a predicate. A sub-group function must
-occur within a converged control flow; i.e. all work-items in the
-sub-group must encounter precisely the same sub-group function. For
-example, if a work-group function occurs within a loop, the work-items
-must encounter the same sub-group function in the same loop iterations.
-All the work-items of a sub-group must execute the sub-group function
-and complete reads and writes to memory before any are allowed to
-continue execution beyond the sub-group function. Synchronization
-between sub-groups must either be performed using work-group functions,
-or through memory operations. Using memory operations for sub-group
-synchronization should be used carefully as forward progress of
-sub-groups relative to each other is only supported optionally by OpenCL
-implementations.
-<br>
-<br>
-Command synchronization is defined in terms of distinct <strong>synchronization
-points</strong>. The synchronization points occur between commands in host
-command-queues and between commands in device-side command-queues. The
-synchronization points defined in OpenCL include:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Launching a command:</strong> A
-kernel-instance is launched onto a device after all events that kernel
-is waiting-on have been set to CL_COMPLETE.
-</p>
-</li>
-<li>
-<p>
-<strong>Ending a command:</strong> Child
-kernels may be enqueued such that they wait for the parent kernel to
-reach the <em>end</em> state before they can be launched. In this case, the
-ending of the parent command defines a synchronization point.
-</p>
-</li>
-<li>
-<p>
-<strong>Completion of a command:</strong>
-A kernel-instance is complete after all of the work-groups in the kernel
-and all of its child kernels have completed. This is signaled to the
-host, a parent kernel or other kernels within command queues by setting
-the value of the event associated with a kernel to CL_COMPLETE.
-</p>
-</li>
-<li>
-<p>
-<strong>Blocking Commands:</strong> A
-blocking command defines a synchronization point between the unit of
-execution that calls the blocking API function and the enqueued command
-reaching the complete state.
-</p>
-</li>
-<li>
-<p>
-<strong>Command-queue barrier:</strong>
-The command-queue barrier ensures that all previously enqueued commands
-have completed before subsequently enqueued commands can be launched.
-</p>
-</li>
-<li>
-<p>
-<strong>clFinish:</strong> This function
-blocks until all previously enqueued commands in the command queue have
-completed after which clFinish defines a synchronization point and the
-clFinish function returns.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>A synchronization point between a pair of commands (A and B) assures
-that results of command A happens-before command B is launched. This
-requires that any updates to memory from command A complete and are made
-available to other commands before the synchronization point completes.
-Likewise, this requires that command B waits until after the
-synchronization point before loading values from global memory. The
-concept of a synchronization point works in a similar fashion for
-commands such as a barrier that apply to two sets of commands. All the
-commands prior to the barrier must complete and make their results
-available to following commands. Furthermore, any commands following
-the barrier must wait for the commands prior to the barrier before
-loading values and continuing their execution.
-<br>
-<br>
-These <em>happens-before</em> relationships are a fundamental part of the
-OpenCL memory model. When applied at the level of commands, they are
-straightforward to define at a language level in terms of ordering
-relationships between different commands. Ordering memory operations
-inside different commands, however, requires rules more complex than can
-be captured by the high level concept of a synchronization point.
-These rules are described in detail in section 3.3.6.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_execution_model_categories_of_kernels">3.2.5. Execution Model: Categories of Kernels</h4>
-<div class="paragraph"><p>The OpenCL execution model supports three types of kernels:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>OpenCL kernels</strong> are
-managed by the OpenCL API as kernel-objects associated with kernel
-functions within program-objects. OpenCL kernels are provided via a
-kernel language.
-All OpenCL implementations must support OpenCL kernels supplied in the
-standard SPIR-V intermediate language with the appropriate environment
-specification, and the OpenCL C programming language defined in earlier
-versions of the OpenCL specification. Implementations must also support
-OpenCL kernels in
-SPIR-V intermediate language.  SPIR-V binaries nay be
-generated from an
-OpenCL kernel language or by a third party compiler from an
-alternative input.
-</p>
-</li>
-<li>
-<p>
-<strong>Native kernels</strong> are
-accessed through a host function pointer. Native kernels are queued for
-execution along with OpenCL kernels on a device and share memory objects
-with OpenCL kernels. For example, these native kernels could be
-functions defined in application code or exported from a library. The
-ability to execute native kernels is optional within OpenCL and the
-semantics of native kernels are implementation-defined. The OpenCL API
-includes functions to query capabilities of a device(s) and determine if
-this capability is supported.
-</p>
-</li>
-<li>
-<p>
-<strong>Built-in kernels</strong> are tied
-to particular device and are not built at runtime from source code in a
-program object. The common use of built in kernels is to expose
-fixed-function hardware or firmware associated with a particular OpenCL
-device or custom device. The semantics of a built-in kernel may be
-defined outside of OpenCL and hence are implementation defined.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>All three types of kernels are manipulated through the OpenCL command
-queues and must conform to the synchronization points defined in the
-OpenCL execution model.</p></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_memory_model">3.3. Memory Model</h3>
-<div class="paragraph"><p>The OpenCL memory model describes the structure, contents, and behavior
-of the memory exposed by an OpenCL platform as an OpenCL program runs.
-The model allows a programmer to reason about values in memory as the
-host program and multiple kernel-instances execute.
-<br>
-<br>
-An OpenCL program defines a context that includes a host, one or more
-devices, command-queues, and memory exposed within the context.
-Consider the units of execution involved with such a program. The host
-program runs as one or more host threads managed by the operating system
-running on the host (the details of which are defined outside of
-OpenCL). There may be multiple devices in a single context which all
-have access to memory objects defined by OpenCL. On a single device,
-multiple work-groups may execute in parallel with potentially
-overlapping updates to memory. Finally, within a single work-group,
-multiple work-items concurrently execute, once again with potentially
-overlapping updates to memory.
-<br>
-<br>
-The memory model must precisely define how the values in memory as seen
-from each of these units of execution interact so a programmer can
-reason about the correctness of OpenCL programs. We define the memory
-model in four parts.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Memory regions: The
-distinct memories visible to the host and the devices that share a
-context.
-</p>
-</li>
-<li>
-<p>
-Memory objects: The
-objects defined by the OpenCL API and their management by the host and
-devices.
-</p>
-</li>
-<li>
-<p>
-Shared Virtual Memory: A
-virtual address space exposed to both the host and the devices within a
-context.
-</p>
-</li>
-<li>
-<p>
-Consistency Model: Rules
-that define which values are observed when multiple units of execution
-load data from memory plus the atomic/fence operations that constrain
-the order of memory operations and define synchronization relationships.
-</p>
-</li>
-</ul></div>
-<div class="sect3">
-<h4 id="_memory_model_fundamental_memory_regions">3.3.1. Memory Model: Fundamental Memory Regions</h4>
-<div class="paragraph"><p>Memory in OpenCL is divided into two parts.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Host Memory:</strong> The memory
-directly available to the host. The detailed behavior of host memory is
-defined outside of OpenCL. Memory objects move between the Host and the
-devices through functions within the OpenCL API or through a shared
-virtual memory interface.
-</p>
-</li>
-<li>
-<p>
-<strong>Device Memory:</strong> Memory
-directly available to kernels executing on OpenCL devices.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Device memory consists of four named address spaces or <em>memory regions</em>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Global Memory:</strong> This
-memory region permits read/write access to all work-items in all
-work-groups running on any device within a context. Work-items can read
-from or write to any element of a memory object. Reads and writes to
-global memory may be cached depending on the capabilities of the device.
-</p>
-</li>
-<li>
-<p>
-<strong>Constant Memory</strong>: A
-region of global memory that remains constant during the execution of a
-kernel-instance. The host allocates and initializes memory objects
-placed into constant memory.
-</p>
-</li>
-<li>
-<p>
-<strong>Local Memory</strong>: A memory
-region local to a work-group. This memory region can be used to allocate
-variables that are shared by all work-items in that work-group.
-</p>
-</li>
-<li>
-<p>
-<strong>Private Memory</strong>: A region
-of memory private to a work-item. Variables defined in one work-items
-private memory are not visible to another work-item.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The memory regions and their relationship to the OpenCL Platform model
-are summarized in figure 3-4. Local and private memories are always
-associated with a particular device. 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
-<br>
-<br>
-To understand memory in OpenCL, it is important to appreciate the
-relationships between these named address spaces.   The four named
-address spaces available to a device are disjoint meaning they do not
-overlap.   This is a logical relationship, however, and an
-implementation may choose to let these disjoint named address spaces
-share physical memory.
-<br>
-<br>
-Programmers often need functions callable from kernels where the
-pointers manipulated by those functions can point to multiple named
-address spaces. This saves a programmer from the error-prone and
-wasteful practice of creating multiple copies of functions; one for each
-named address space. Therefore the global, local and private address
-spaces belong to a single <em>generic address space</em>. This is closely
-modeled after the concept of a generic address space used in the
-embedded C standard (ISO/IEC 9899:1999). Since they all belong to a
-single generic address space, the following properties are supported for
-pointers to named address spaces in device memory:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A pointer to the generic
-address space can be cast to a pointer to a global, local or private
-address space
-</p>
-</li>
-<li>
-<p>
-A pointer to a global,
-local or private address space can be cast to a pointer to the generic
-address space.
-</p>
-</li>
-<li>
-<p>
-A pointer to a global,
-local or private address space can be implicitly converted to a pointer
-to the generic address space, but the converse is not allowed.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The constant address space is disjoint from the generic address space.
-<br>
-<br>
-The addresses of memory associated with memory objects in Global memory
-are not preserved between kernel instances, between a device and the
-host, and between devices. In this regard global memory acts as a global
-pool of memory objects rather than an address space. This restriction is
-relaxed when shared virtual memory (SVM) is used.
-<br>
-<br>
-SVM causes addresses to be meaningful between the host and all of the
-devices within a context hence supporting the use of pointer based data
-structures in OpenCL kernels. It logically extends a portion of the
-global memory into the host address space giving work-items access to
-the host address space. On platforms with hardware support for a shared
-address space between the host and one or more devices, SVM may also
-provide a more efficient way to share data between devices and the host.
-Details about SVM are presented in section 3.3.3.</p></div>
-<div class="paragraph"><p><span class="image">
-<img src="opencl22-API_files/image008.jpg" alt="image">
-</span></p></div>
-<div class="paragraph"><p><strong>Figure 3-4: The named address spaces exposed in an OpenCL Platform.
-Global and Constant memories are shared between the one or more devices
-within a context, while local and private memories are associated with a
-single device. Each device may include an optional cache to support
-efficient access to their view of the global and constant address
-spaces.</strong></p></div>
-<div class="paragraph"><p>A programmer may use the features of the memory consistency model
-(section 3.3.4) to manage safe access to global memory from multiple
-work-items potentially running on one or more devices. In addition, when
-using shared virtual memory (SVM), the memory consistency model may also
-be used to ensure that host threads safely access memory locations in
-the shared memory region.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_memory_model_memory_objects">3.3.2. Memory Model: Memory Objects</h4>
-<div class="paragraph"><p>The contents of global memory are <em>memory objects</em>. A memory object is
-a handle to a reference counted region of global memory. Memory objects
-use the OpenCL type <em>cl_mem</em> and fall into three distinct classes.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Buffer</strong>: A memory object
-stored as a block of contiguous memory and used as a general purpose
-object to hold data used in an OpenCL program. The types of the values
-within a buffer may be any of the built in types (such as int, float),
-vector types, or user-defined structures. The buffer can be
-manipulated through pointers much as one would with any block of memory
-in C.
-</p>
-</li>
-<li>
-<p>
-<strong>Image</strong>: An image memory
-object holds one, two or three dimensional images. The formats are
-based on the standard image formats used in graphics applications. An
-image is an opaque data structure managed by functions defined in the
-OpenCL API. To optimize the manipulation of images stored in the
-texture memories found in many GPUs, OpenCL kernels have traditionally
-been disallowed from both reading and writing a single image. In OpenCL
-2.0, however, we have relaxed this restriction by providing
-synchronization and fence operations that let programmers properly
-synchronize their code to safely allow a kernel to read and write a
-single image.
-</p>
-</li>
-<li>
-<p>
-<strong>Pipe</strong>: The <em>pipe</em> memory
-object conceptually is an ordered sequence of data items. A pipe has
-two endpoints: a write endpoint into which data items are inserted, and
-a read endpoint from which data items are removed. At any one time,
-only one kernel instance may write into a pipe, and only one kernel
-instance may read from a pipe. To support the producer consumer design
-pattern, one kernel instance connects to the write endpoint (the
-producer) while another kernel instance connects to the reading endpoint
-(the consumer).
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Memory objects are allocated by host APIs. The host program can provide
-the runtime with a pointer to a block of continuous memory to hold the
-memory object when the object is created (CL_MEM_USE_HOST_PTR).
-Alternatively, the physical memory can be managed by the OpenCL runtime
-and not be directly accessible to the host program.
-<br>
-<br>
-Allocation and access to memory objects within the different memory
-regions varies between the host and work-items running on a device.
-This is summarized in table 3.1 which__describes whether the kernel or
-the host can allocate from a memory region, the type of allocation
-(static at compile time vs. dynamic at runtime) and the type of access
-allowed (i.e. whether the kernel or the host can read and/or write to a
-memory region).</p></div>
-<div style="page-break-after:always"></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:80%;
-">
-<col style="width:20%;">
-<col style="width:20%;">
-<col style="width:20%;">
-<col style="width:20%;">
-<col style="width:20%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Global</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Constant</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Local</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Private</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" rowspan="2" ><p class="tableblock">Host</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Dynamic Allocation</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Dynamic Allocation</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Dynamic Allocation</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">No Allocation</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Read/Write access to buffers and images but not pipes</p></td>
-<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">No access</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">No access</p></td>
-</tr>
-<tr>
-<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. 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. 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>
-</table>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><strong>Table 3 1: The different memory regions in
-OpenCL and how memory objects are allocated and accessed by the host and
-by an executing instance of a kernel. For the case of kernels, we
-distinguish between the behavior of local memory with respect to a
-kernel (self) and its child kernels.</strong></p></div>
-<div class="paragraph"><p>Once allocated, a memory object is made available to kernel-instances
-running on one or more devices. In addition to shared virtual memory
-(section 3.3.3) there are three basic ways to manage the contents of
-buffers between the host and devices.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Read/Write/Fill
-commands</strong>: The data associated with a memory object is explicitly read
-and written between the host and global memory regions using commands
-enqueued to an OpenCL command queue.
-</p>
-</li>
-<li>
-<p>
-<strong>Map/Unmap commands</strong>: Data
-from the memory object is mapped into a contiguous block of memory
-accessed through a host accessible pointer. The host program enqueues a
-<em>map</em> command on block of a memory object before it can be safely
-manipulated by the host program. When the host program is finished
-working with the block of memory, the host program enqueues an <em>unmap</em>
-command to allow a kernel-instance to safely read and/or write the
-buffer.**
-</p>
-</li>
-<li>
-<p>
-<strong>Copy commands:</strong> The data
-associated with a memory object is copied between two buffers, each of
-which may reside either on the host or on the device.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>In both cases, the commands to transfer data between devices and the
-host can be blocking or non-blocking operations. The OpenCL function
-call for a blocking memory transfer returns once the associated memory
-resources on the host can be safely reused. For a non-blocking memory
-transfer, the OpenCL function call returns as soon as the command is
-enqueued.
-<br>
-<br>
-Memory objects are bound to a context and hence can appear in multiple
-kernel-instances running on more than one physical device. The OpenCL
-platform must support a large range of hardware platforms including
-systems that do not support a single shared address space in hardware;
-hence the ways memory objects can be shared between kernel-instances is
-restricted. The basic principle is that multiple read operations on
-memory objects from multiple kernel-instances that overlap in time are
-allowed, but mixing overlapping reads and writes into the same memory
-objects from different kernel instances is only allowed when fine
-grained synchronization is used with shared virtual memory (see section
-3.3.3).
-<br>
-<br>
-When global memory is manipulated by multiple kernel-instances running
-on multiple devices, the OpenCL runtime system must manage the
-association of memory objects with a given device. In most cases the
-OpenCL runtime will implicitly associate a memory object with a device.
-A kernel instance is naturally associated with the command queue to
-which the kernel was submitted. Since a command-queue can only access a
-single device, the queue uniquely defines which device is involved with
-any given kernel-instance; hence defining a clear association between
-memory objects, kernel-instances and devices. Programmers may
-anticipate these associations in their programs and explicitly manage
-association of memory objects with devices in order to improve
-performance.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_memory_model_shared_virtual_memory">3.3.3. Memory Model: Shared Virtual Memory</h4>
-<div class="paragraph"><p>OpenCL extends the global memory region into the host memory region
-through a shared virtual memory (SVM) mechanism. There are three types
-of SVM in OpenCL</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>Coarse-Grained buffer
-SVM</strong>: Sharing occurs at the granularity of regions of OpenCL buffer
-memory objects. Consistency is enforced at synchronization points and
-with map/unmap commands to drive updates between the host and the
-device. This form of SVM is similar to non-SVM use of memory; however,
-it lets kernel-instances share pointer-based data structures (such as
-linked-lists) with the host program. Program scope global variables are
-treated as per-device coarse-grained SVM for addressing and sharing
-purposes.
-</p>
-</li>
-<li>
-<p>
-<strong>Fine-Grained buffer
-SVM</strong>: Sharing occurs at the granularity of individual loads/stores into
-bytes within OpenCL buffer memory objects. Loads and stores may be
-cached. This means consistency is guaranteed at synchronization points.
-If the optional OpenCL atomics are supported, they can be used to
-provide fine-grained control of memory consistency.
-</p>
-</li>
-<li>
-<p>
-<strong>Fine-Grained system SVM</strong>:
-Sharing occurs at the granularity of individual loads/stores into bytes
-occurring anywhere within the host memory. Loads and stores may be
-cached so consistency is guaranteed at synchronization points. If the
-optional OpenCL atomics are supported, they can be used to provide
-fine-grained control of memory consistency.
-</p>
-</li>
-</ul></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 1. <strong>A summary of shared virtual memory (SVM) options in OpenCL</strong></caption>
-<col style="width:20%;">
-<col style="width:20%;">
-<col style="width:20%;">
-<col style="width:20%;">
-<col style="width:20%;">
-<tbody>
-<tr>
-<td class="tableblock halign-center valign-top" ><p class="tableblock"></p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">Granularity of sharing</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">Memory Allocation</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">Mechanisms to enforce Consistency</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">Explicit updates
-between host and device</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">Non-SVM buffers</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">OpenCL Memory objects(buffer)</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">clCreateBuffer</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">Host synchronization points on the same or between
-devices.</p></td>
-<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">Coarse-Grained buffer SVM</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">OpenCL Memory objects (buffer)</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">clSVMAlloc</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">Host synchronization points
-between devices</p></td>
-<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">Bytes within OpenCL Memory objects (buffer)</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">clSVMAlloc</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">Synchronization points plus atomics (if supported)</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">No</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">Fine-Grained system SVM</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">Bytes within Host memory (system)</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">Host memory allocation mechanisms (e.g. malloc)</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">Synchronization points plus atomics (if
-supported)</p></td>
-<td class="tableblock halign-center valign-top" ><p class="tableblock">No</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>Coarse-Grained buffer SVM is required in the core OpenCL specification.
-The two finer grained approaches are optional features in OpenCL. The
-various SVM mechanisms to access host memory from the work-items
-associated with a kernel instance are summarized in table 3-2.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_memory_model_memory_consistency_model">3.3.4. Memory Model: Memory Consistency Model</h4>
-<div class="paragraph"><p>The OpenCL memory model tells programmers what they can expect from an
-OpenCL implementation; which memory operations are guaranteed to happen
-in which order and which memory values each read operation will return.
-The memory model tells compiler writers which restrictions they must
-follow when implementing compiler optimizations; which variables they
-can cache in registers and when they can move reads or writes around a
-barrier or atomic operation. The memory model also tells hardware
-designers about limitations on hardware optimizations; for example, when
-they must flush or invalidate hardware caches.
-<br>
-<br>
-The memory consistency model in OpenCL is based on the memory model from
-the ISO C11 programming language. To help make the presentation more
-precise and self-contained, we include modified paragraphs taken
-verbatim from the ISO C11 international standard. When a paragraph is
-taken or modified from the C11 standard, it is identified as such along
-with its original location in the C11 standard.
-<br>
-<br>
-For programmers, the most intuitive model is the <em>sequential
-consistency</em> memory model. Sequential consistency interleaves the steps
-executed by each of the units of execution. Each access to a memory
-location sees the last assignment to that location in that
-interleaving. While sequential consistency is relatively
-straightforward for a programmer to reason about, implementing
-sequential consistency is expensive. Therefore, OpenCL implements a
-relaxed memory consistency model; i.e. it is possible to write programs
-where the loads from memory violate sequential consistency. Fortunately,
-if a program does not contain any races and if the program only uses
-atomic operations that utilize the sequentially consistent memory order
-(the default memory ordering for OpenCL), OpenCL programs appear to
-execute with sequential consistency.
-<br>
-<br>
-Programmers can to some degree control how the memory model is relaxed by choosing the memory order for synchronization operations. The precise semantics of synchronization and the memory orders are formally defined in section 3.3.6. Here, we give a high level description of how these memory orders apply to atomic operations on atomic objects shared between units of execution. OpenCL memory_order choices are based on those from the ANSI C11 standard memory model. They are specified in certain OpenCL functions through the following enumeration constants:</p></div>
-<div class="ulist"><ul>
-<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 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>
-</li>
-<li>
-<p>
-<strong>memory_order_acquire</strong>: A
-synchronization operation (fence or atomic) that has acquire semantics
-"acquires" side-effects from a release operation that synchronises with
-it: if an acquire synchronises with a release, the acquiring unit of
-execution will see all side-effects preceding that release (and possibly
-subsequent side-effects.) As part of carefully-designed protocols,
-programmers can use an "acquire" to safely observe the work of another
-unit of execution.
-</p>
-</li>
-<li>
-<p>
-<strong>memory_order_release</strong>: A
-synchronization operation (fence or atomic operation) that has release
-semantics "releases" side effects to an acquire operation that
-synchronises with it. All side effects that precede the release are
-included in the release. As part of carefully-designed protocols,
-programmers can use a "release" to make changes made in one unit of
-execution visible to other units of execution.
-</p>
-</li>
-</ul></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">In general, no acquire must <em>always</em> synchronise with any
-particular release. However, synchronisation can be forced by certain
-executions. See 3.3.6.2 for detailed rules for when synchronisation
-must occur.</td>
-</tr></table>
-</div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>memory_order_acq_rel</strong>: A
-synchronization operation with acquire-release semantics has the
-properties of both the acquire and release memory orders. It is
-typically used to order read-modify-write operations.
-</p>
-</li>
-<li>
-<p>
-<strong>memory_order_seq_cst</strong>:
-The loads and stores of each unit of execution appear to execute in
-program (i.e., sequenced-before) order, and the loads and stores from
-different units of execution appear to be simply interleaved.
-<br>
-<br>
-Regardless of which memory_order is specified, resolving constraints on
-memory operations across a heterogeneous platform adds considerable
-overhead to the execution of a program. An OpenCL platform may be able
-to optimize certain operations that depend on the features of the memory
-consistency model by restricting the scope of the memory operations.
-Distinct memory scopes are defined by the values of the memory_scope
-enumeration constant:
-</p>
-</li>
-<li>
-<p>
-<strong>memory_scope_work_item</strong>:
-memory-ordering constraints only apply within the
-work-item.<span class="footnote"><br>[This value for memory_scope can only be used with atomic_work_item_fence with flags set
-to LCK_IMAGE_MEM_FENCE.]<br></span>.
-</p>
-</li>
-<li>
-<p>
-<strong>memory_scope_sub_group</strong>:memory-ordering constraints only apply within
-the sub-group.
-</p>
-</li>
-<li>
-<p>
-<strong>memory_scope_work_group</strong>:
-memory-ordering constraints only apply to work-items executing within a
-single work-group.
-</p>
-</li>
-<li>
-<p>
-<strong>memory_scope_device:</strong>
-memory-ordering constraints only apply to work-items executing on a
-single device
-</p>
-</li>
-<li>
-<p>
-<strong>memory_scope_all_svm_devices</strong>: memory-ordering constraints apply to
-work-items executing across multiple devices and (when using SVM) the
-host. A release performed with <strong>memory_scope_all_svm_devices</strong> to a
-buffer that does not have the CL_MEM_SVM_ATOMICS flag set will commit to
-at least <strong>memory_scope_device</strong> visibility, with full synchronization of
-the buffer at a queue synchronization point (e.g. an OpenCL event).
-<br>
-<br>
-These memory scopes define a hierarchy of visibilities when analyzing
-the ordering constraints of memory operations. For example if a
-programmer knows that a sequence of memory operations will only be
-associated with a collection of work-items from a single work-group (and
-hence will run on a single device), the implementation is spared the
-overhead of managing the memory orders across other devices within the
-same context. This can substantially reduce overhead in a program. All
-memory scopes are valid when used on global memory or local memory. For
-local memory, all visibility is constrained to within a given work-group
-and scopes wider than <strong>memory_scope_work_group</strong> carry no additional
-meaning.
-<br>
-<br>
-In the following subsections (leading up to section 3.4), we will
-explain the synchronization constructs and detailed rules needed to use
-OpenCLs relaxed memory models. It is important to appreciate,
-however, that many programs do not benefit from relaxed memory models.
-Even expert programmers have a difficult time using atomics and fences
-to write correct programs with relaxed memory models. A large number of
-OpenCL programs can be written using a simplified memory model. This is
-accomplished by following these guidelines.
-</p>
-</li>
-<li>
-<p>
-Write programs that manage
-safe sharing of global memory objects through the synchronization points
-defined by the command queues.
-</p>
-</li>
-<li>
-<p>
-Restrict low level
-synchronization inside work-groups to the work-group functions such as
-barrier.
-</p>
-</li>
-<li>
-<p>
-If you want sequential
-consistency behavior with system allocations or fine-grain SVM buffers
-with atomics support, use only memory_order_seq_cst operations with the
-scope memory_scope_all_svm_devices.
-</p>
-</li>
-<li>
-<p>
-If you want sequential
-consistency behavior when not using system allocations or fine-grain SVM
-buffers with atomics support, use only memory_order_seq_cst operations
-with the scope memory_scope_device or memory_scope_all_svm_devices.
-</p>
-</li>
-<li>
-<p>
-Ensure your program has no
-races.
-<br>
-<br>
-If these guidelines are followed in your OpenCL programs, you can skip
-the detailed rules behind the relaxed memory models and go directly to
-section 3.4.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="_memory_model_overview_of_atomic_and_fence_operations">3.3.5. Memory Model: Overview of atomic and fence operations</h4>
-<div class="paragraph"><p>The OpenCL 2.0 specification defines a number of <em>synchronization
-operations</em> that are used to define memory order constraints in a
-program. They play a special role in controlling how memory operations
-in one unit of execution (such as work-items or, when using SVM a host
-thread) are made visible to another. There are two types of
-synchronization operations in OpenCL; <em>atomic operations</em> and <em>fences</em>.
-<br>
-<br>
-Atomic operations are indivisible. They either occur completely or not
-at all. These operations are used to order memory operations between
-units of execution and hence they are parameterized with the
-memory_order and memory_scope parameters defined by the OpenCL memory
-consistency model. The atomic operations for OpenCL kernel languages
-are similar to the corresponding operations defined
-by the C11 standard.
-<br>
-<br>
-The OpenCL 2.0 atomic operations apply to variables of an atomic type (a
-subset of those in the C11 standard) including atomic versions of the
-int, uint, long, ulong, float, double, half, intptr_t, uintptr_t,
-size_t, and ptrdiff_t types. However, support for some of these atomic
-types depends on support for the corresponding regular types.
-<br>
-<br>
-An atomic operation on one or more memory locations is either an acquire
-operation, a release operation, or both an acquire and release
-operation. An atomic operation without an associated memory location is
-a fence and can be either an acquire fence, a release fence, or both an
-acquire and release fence. In addition, there are relaxed atomic
-operations, which do not have synchronization properties, and atomic
-read-modify-write operations, which have special characteristics. [C11
-standard, Section 5.1.2.4, paragraph 5, modified]
-<br>
-<br>
-The orders memory_order_acquire (used for reads), memory_order_release
-(used for writes), and memory_order_acq_rel (used for read-modify-write
-operations) are used for simple communication between units of execution
-using shared variables. Informally, executing a memory_order_release on
-an atomic object A makes all previous side effects visible to any unit
-of execution that later executes a memory_order_acquire on A. The orders
-memory_order_acquire, memory_order_release, and memory_order_acq_rel do
-not provide sequential consistency for race-free programs because they
-will not ensure that atomic stores followed by atomic loads become
-visible to other threads in that order.
-<br>
-<br>
-The fence operation is atomic_work_item_fence, which includes a
-memory_order argument as well as the memory_scope and cl_mem_fence_flags
-arguments. Depending on the memory_order argument, this operation:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-has no effects, if
-memory_order_relaxed;
-</p>
-</li>
-<li>
-<p>
-is an acquire fence, if
-memory_order_acquire;
-</p>
-</li>
-<li>
-<p>
-is a release fence, if
-memory_order_release;
-</p>
-</li>
-<li>
-<p>
-is both an acquire fence
-and a release fence, if memory_order_acq_rel;
-</p>
-</li>
-<li>
-<p>
-is a
-sequentially-consistent fence with both acquire and release semantics,
-if memory_order_seq_cst.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>If specified, the cl_mem_fence_flags argument must be
-CLK_IMAGE_MEM_FENCE, CLK_GLOBAL_MEM_FENCE, CLK_LOCAL_MEM_FENCE, or
-CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE.
-<br>
-<br>
-The atomic_work_item_fence(CLK_IMAGE_MEM_FENCE) built-in function must
-be
-<br>
-<br>
-used to make sure that sampler-less writes are visible to later reads by
-the same work-item. Without use of the atomic_work_item_fence 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_work_item_fence, it is not guaranteed that those
-previous writes are visible to the work-item.
-<br>
-<br>
-The synchronization operations in OpenCL can be parameterized by a
-memory_scope. Memory scopes control the extent that an atomic operation
-or fence is visible with respect to the memory model. These memory
-scopes may be used when performing atomic operations and fences on
-global memory and local memory. When used on global memory visibility
-is bounded by the capabilities of that memory. When used on a
-fine-grained non-atomic SVM buffer, a coarse-grained SVM buffer, or a
-non-SVM buffer, operations parameterized with
-memory_scope_all_svm_devices will behave as if they were parameterized
-with memory_scope_device. When used on local memory, visibility is
-bounded by the work-group and, as a result, memory_scope with wider
-visibility than memory_scope_work_group will be reduced to
-memory_scope_work_group.</p></div>
-<div class="paragraph"><p>Two actions <strong>A</strong> and <strong>B</strong> are defined to have an inclusive scope if they
-have the same scope <strong>P</strong> such that:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>P</strong> is memory_scope_sub_group and <strong>A</strong> and <strong>B</strong> are executed by
-work-items within the same sub-group.
-</p>
-</li>
-<li>
-<p>
-<strong>P</strong> is memory_scope_work_group and <strong>A</strong> and <strong>B</strong> are executed by
-work-items within the same work-group.
-</p>
-</li>
-<li>
-<p>
-<strong>P</strong> is memory_scope_device and <strong>A</strong> and <strong>B</strong> are executed by
-work-items on the same device when <strong>A</strong> and <strong>B</strong> apply to an SVM
-allocation or <strong>A</strong> and <strong>B</strong> are executed by work-items in the same kernel
-or one of its children when <strong>A</strong> and <strong>B</strong> apply to a cl_mem buffer.
-</p>
-</li>
-<li>
-<p>
-<strong>P</strong> is memory_scope_all_svm_devices if <strong>A</strong> and <strong>B</strong> are
-executed by host threads or by work-items on one or more devices that
-can share SVM memory with each other and the host process.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="_memory_model_memory_ordering_rules">3.3.6. Memory Model: Memory Ordering Rules</h4>
-<div class="paragraph"><p>Fundamentally, the issue in a memory model is to understand the
-orderings in time of modifications to objects in memory. Modifying an
-object or calling a function that modifies an object are side effects,
-i.e. changes in the state of the execution environment. Evaluation of an
-expression in general includes both value computations and initiation of
-side effects. Value computation for an lvalue expression includes
-determining the identity of the designated object. [C11 standard,
-Section 5.1.2.3, paragraph 2, modified]
-<br>
-<br>
-We assume that the OpenCL kernel language and host
-programming languages have a sequenced-before relation between the
-evaluations executed by a single unit of execution. This
-sequenced-before relation is an asymmetric, transitive, pair-wise
-relation between those evaluations, which induces a partial order among
-them. Given any two evaluations <strong>A</strong> and <strong>B</strong>, if <strong>A</strong> is sequenced-before
-<strong>B</strong>, then the execution of <strong>A</strong> shall precede the execution of <strong>B</strong>.
-(Conversely, if <strong>A</strong> is sequenced-before <strong>B</strong>, then <strong>B</strong> is sequenced-after
-<strong>A</strong>.) If <strong>A</strong> is not sequenced-before or sequenced-after <strong>B</strong>, then <strong>A</strong>
-and <strong>B</strong> are unsequenced. Evaluations <strong>A</strong> and <strong>B</strong> are indeterminately
-sequenced when <strong>A</strong> is either sequenced-before or sequenced-after <strong>B</strong>,
-but it is unspecified which. [C11 standard, Section 5.1.2.3, paragraph
-3, modified]
-<br>
-<br>
-NOTE: sequenced-before is a partial order of the operations executed by
-a single unit of execution (e.g. a host thread or work-item). It
-generally corresponds to the source program order of those operations,
-and is partial because of the undefined argument evaluation order of
-OpenCLs kernel C language.
-<br>
-<br>
-In an OpenCL kernel language, the value of an object
-visible to a work-item W at a particular point is the initial value of
-the object, a value stored in the object by W, or a value stored in the
-object by another work-item or host thread, according to the rules
-below. Depending on details of the host programming language, the value
-of an object visible to a host thread may also be the value stored in
-that object by another work-item or host thread. [C11 standard, Section
-5.1.2.4, paragraph 2, modified]
-<br>
-<br>
-Two expression evaluations conflict if one of them modifies a memory
-location and the other one reads or modifies the same memory location. [C11 standard, Section 5.1.2.4, paragraph 4]
-<br>
-<br>
-All modifications to a particular atomic object <strong>M</strong> occur in some
-particular total order, called the modification order of <strong>M</strong>. If <strong>A</strong> and
-<strong>B</strong> are modifications of an atomic object <strong>M</strong>, and <strong>A</strong> happens-before
-<strong>B</strong>, then <strong>A</strong> shall precede <strong>B</strong> in the modification order of <strong>M</strong>, which
-is defined below. Note that the modification order of an atomic object
-<strong>M</strong> is independent of whether <strong>M</strong> is in local or global memory. [C11
-standard, Section 5.1.2.4, paragraph 7, modified]
-<br>
-<br>
-A release sequence begins with a release operation <strong>A</strong> on an atomic
-object <strong>M</strong> and is the maximal contiguous sub-sequence of side effects
-in the modification order of <strong>M</strong>, where the first operation is <strong>A</strong> and
-every subsequent operation either is performed by the same work-item or
-host thread that performed the release or is an atomic
-read-modify-write operation. [C11 standard, Section 5.1.2.4, paragraph
-10, modified]
-<br>
-<br>
-OpenCLs local and global memories are disjoint. Kernels may access both
-kinds of memory while host threads may only access global memory.
-Furthermore, the <em>flags</em> argument of OpenCLs work_group_barrier
-function specifies which memory operations the function will make
-visible: these memory operations can be, for example, just the ones to
-local memory, or the ones to global memory, or both. Since the
-visibility of memory operations can be specified for local memory
-separately from global memory, we define two related but independent
-relations, <em>global-synchronizes-with</em> and <em>local-synchronizes-with</em>.
-Certain operations on global memory may global-synchronize-with other
-operations performed by another work-item or host thread. An example is
-a release atomic operation in one work- item that
-global-synchronizes-with an acquire atomic operation in a second
-work-item. Similarly, certain atomic operations on local objects in
-kernels can local-synchronize- with other atomic operations on those
-local objects. [C11 standard, Section 5.1.2.4, paragraph 11, modified]
-<br>
-<br>
-We define two separate happens-before relations: global-happens-before
-and local-happens-before.</p></div>
-<div class="paragraph"><p>A global memory action <strong>A</strong> global-happens-before a global memory action
-*B*__if</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>A</strong> is sequenced before
-<strong>B</strong>, or
-</p>
-</li>
-<li>
-<p>
-<strong>A</strong>
-global-synchronizes-with <strong>B</strong>, or
-</p>
-</li>
-<li>
-<p>
-For some global memory
-action <strong>C</strong>, <strong>A</strong> global-happens-before <strong>C</strong> and <strong>C</strong> global-happens-before
-<strong>B</strong>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>A local memory action <strong>A</strong> local-happens-before a local memory action
-*B*__if</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>A</strong> is sequenced before
-<strong>B</strong>, or
-</p>
-</li>
-<li>
-<p>
-<strong>A</strong>
-local-synchronizes-with <strong>B</strong>, or
-</p>
-</li>
-<li>
-<p>
-For some local memory
-action <strong>C</strong>, <strong>A</strong> local-happens-before <strong>C</strong> and <strong>C</strong> local-happens-before
-<strong>B</strong>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>An OpenCL implementation shall ensure that no program execution
-demonstrates a cycle in either the local-happens-before relation or
-the global-happens-before relation.
-<br>
-<br>
-NOTE: The global- and local-happens-before relations are critical to
-defining what values are read and when data races occur. The
-global-happens-before relation, for example, defines what global memory
-operations definitely happen before what other global memory operations.
-If an operation <strong>A</strong> global-happens-before operation <strong>B</strong> then <strong>A</strong> must
-occur before <strong>B</strong>; in particular, any write done by <strong>A</strong> will be visible
-to <strong>B</strong>. The local-happens-before relation has similar properties for
-local memory. Programmers can use the local- and global-happens-before
-relations to reason about the order of program actions.
-<br>
-<br>
-A visible side effect <strong>A</strong> on a global object <strong>M</strong> with respect to a value
-computation <strong>B</strong> of <strong>M</strong> satisfies the conditions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>A</strong> global-happens-before
-<strong>B</strong>, and
-</p>
-</li>
-<li>
-<p>
-there is no other side
-effect <strong>X</strong> to <strong>M</strong> such that <strong>A</strong> global-happens-before <strong>X</strong> and <strong>X</strong>
-global-happens-before <strong>B</strong>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>We define visible side effects for local objects <strong>M</strong> similarly. The
-value of a non-atomic scalar object <strong>M</strong>, as determined by evaluation
-<strong>B</strong>, shall be the value stored by the visible side effect <strong>A</strong>. [C11
-standard, Section 5.1.2.4, paragraph 19, modified]
-<br>
-<br>
-The execution of a program contains a data race if it contains two
-conflicting actions A and B in different units of execution, and</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-(1) at least one of <strong>A</strong> or
-<strong>B</strong> is not atomic, or <strong>A</strong> and <strong>B</strong> do not have inclusive memory scope,
-and
-</p>
-</li>
-<li>
-<p>
-(2) the actions are global
-actions unordered by the global-happens-before relation or are local
-actions unordered by the local-happens-before relation.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Any such data race results in undefined behavior. [C11 standard, Section
-5.1.2.4, paragraph 25, modified]
-<br>
-<br>
-We also define the visible sequence of side effects on local and global
-atomic objects. The remaining paragraphs of this subsection define this
-sequence for a global atomic object <strong>M</strong>; the visible sequence of side
-effects for a local atomic object is defined similarly by using the
-local-happens-before relation.
-<br>
-<br>
-The visible sequence of side effects on a global atomic object <strong>M</strong>, with
-respect to a value computation <strong>B</strong> of <strong>M</strong>, is a maximal contiguous
-sub-sequence of side effects in the modification order of <strong>M</strong>, where the
-first side effect is visible with respect to <strong>B</strong>, and for every side
-effect, it is not the case that <strong>B</strong> global-happens-before it. The value
-of*M*, as determined by evaluation <strong>B</strong>, shall be the value stored by
-some operation in the visible sequence of <strong>M</strong> with respect to <strong>B</strong>. [C11
-standard, Section 5.1.2.4, paragraph 22, modified]
-<br>
-<br>
-If an operation <strong>A</strong> that modifies an atomic object <strong>M</strong> global-happens
-before an operation <strong>B</strong> that modifies <strong>M</strong>, then <strong>A</strong> shall be earlier
-than <strong>B</strong> in the modification order of <strong>M</strong>. This requirement is known as
-write-write coherence.
-<br>
-<br>
-If a value computation <strong>A</strong> of an atomic object <strong>M</strong> global-happens-before
-a value computation <strong>B</strong> of <strong>M</strong>, and <strong>A</strong> takes its value from a side
-effect <strong>X</strong> on <strong>M</strong>, then the value computed by <strong>B</strong> shall either equal the
-value stored by <strong>X</strong>, or be the value stored by a side effect <strong>Y</strong> on <strong>M</strong>,
-where <strong>Y</strong> follows <strong>X</strong> in the modification order of <strong>M</strong>. This requirement
-is known as read-read coherence. [C11 standard, Section 5.1.2.4,
-paragraph 22, modified]
-<br>
-<br>
-If a value computation <strong>A</strong> of an atomic object <strong>M</strong> global-happens-before
-an operation <strong>B</strong> on <strong>M</strong>, then <strong>A</strong> shall take its value from a side
-effect <strong>X</strong> on <strong>M</strong>, where <strong>X</strong> precedes <strong>B</strong> in the modification order of
-<strong>M</strong>. This requirement is known as read-write coherence.
-<br>
-<br>
-If a side effect <strong>X</strong> on an atomic object <strong>M</strong> global-happens-before a
-value computation <strong>B</strong> of <strong>M</strong>, then the evaluation <strong>B</strong> shall take its
-value from <strong>X</strong> or from a side effect <strong>Y</strong> that follows <strong>X*in the
-modification order of *M</strong>. This requirement is known as write-read
-coherence.</p></div>
-<div class="sect4">
-<h5 id="_memory_ordering_rules_atomic_operations">Memory Ordering Rules: Atomic Operations</h5>
-<div class="paragraph"><p>This and following sections describe how different program actions in
-kernel C code and the host program contribute to the local- and
-global-happens-before relations. This section discusses ordering rules
-for OpenCL 2.0s atomic operations.</p></div>
-<div class="paragraph"><p>Section 3.2.3 defined the enumerated type memory_order.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-For memory_order_relaxed,
-no operation orders memory.
-</p>
-</li>
-<li>
-<p>
-For memory_order_release,
-memory_order_acq_rel, and memory_order_seq_cst, a store operation
-performs a release operation on the affected memory location.
-</p>
-</li>
-<li>
-<p>
-For memory_order_acquire,
-memory_order_acq_rel, and memory_order_seq_cst, a load operation
-performs an acquire operation on the affected memory location. [C11
-standard, Section 7.17.3, paragraphs 2-4, modified]
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Certain built-in functions synchronize with other built-in functions
-performed by another unit of execution. This is true for pairs of
-release and acquire operations under specific circumstances. An atomic
-operation <strong>A</strong> that performs a release operation on a global object <strong>M</strong>
-global-synchronizes-with an atomic operation <strong>B</strong> that performs an
-acquire operation on <strong>M</strong> and reads a value written by any side effect in
-the release sequence headed by <strong>A</strong>. A similar rule holds for atomic
-operations on objects in local memory: an atomic operation <strong>A</strong> that
-performs a release operation on a local object <strong>M</strong>
-local-synchronizes-with an atomic operation <strong>B</strong> that performs an acquire
-operation on <strong>M</strong> and reads a value written by any side effect in the
-release sequence headed by <strong>A</strong>. [C11 standard, Section 5.1.2.4,
-paragraph 11, modified]
-<br>
-<br>
-NOTE: Atomic operations specifying memory_order_relaxed are relaxed only
-with respect to memory ordering. Implementations must still guarantee
-that any given atomic access to a particular atomic object be
-indivisible with respect to all other atomic accesses to that object.
-<br>
-<br>
-There shall exist a single total order <strong>S</strong> for all memory_order_seq_cst
-operations that is consistent with the modification orders for all
-affected locations, as well as the appropriate global-happens-before and
-local-happens-before orders for those locations, such that each
-memory_order_seq operation <strong>B</strong> that loads a value from an atomic object
-<strong>M</strong> in global or local memory observes one of the following values:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-the result of the last
-modification <strong>A</strong> of <strong>M</strong> that precedes <strong>B</strong> in <strong>S</strong>, if it exists, or
-</p>
-</li>
-<li>
-<p>
-if <strong>A</strong> exists, the result
-of some modification of <strong>M</strong> in the visible sequence of side effects
-with respect to <strong>B</strong> that is not memory_order_seq_cst and that does not
-happen before <strong>A</strong>, or
-</p>
-</li>
-<li>
-<p>
-if <strong>A</strong> does not exist, the
-result of some modification of <strong>M</strong> in the visible sequence of side
-effects with respect to <strong>B</strong> that is not memory_order_seq_cst. [C11
-standard, Section 7.17.3, paragraph 6, modified]
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Let X and Y be two memory_order_seq_cst operations. If X
-local-synchronizes-with or global-synchronizes-with Y then X both
-local-synchronizes-with Y and global-synchronizes-with Y.
-<br>
-<br>
-If the total order <strong>S</strong> exists, the following rules hold:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-For an atomic operation
-<strong>B</strong> that reads the value of an atomic object <strong>M</strong>, if there is a
-memory_order_seq_cst fence <strong>X</strong> sequenced-before <strong>B</strong>, then <strong>B</strong> observes
-either the last memory_order_seq_cst modification of <strong>M</strong> preceding <strong>X</strong>
-in the total order <strong>S</strong> or a later modification of <strong>M</strong> in its
-modification order. [C11 standard, Section 7.17.3, paragraph 9]
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-For atomic operations <strong>A</strong>
-and <strong>B</strong> on an atomic object <strong>M</strong>, where <strong>A</strong> modifies <strong>M</strong> and <strong>B</strong> takes
-its value, if there is a memory_order_seq_cst fence <strong>X</strong> such that <strong>A</strong> is
-sequenced-before <strong>X</strong> and <strong>B</strong> follows <strong>X</strong> in <strong>S</strong>, then <strong>B</strong> observes
-either the effects of <strong>A</strong> or a later modification of <strong>M</strong> in its
-modification order. [C11 standard, Section 7.17.3, paragraph 10]
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-For atomic operations <strong>A</strong>
-and <strong>B</strong> on an atomic object <strong>M</strong>, where <strong>A*modifies *M</strong> and <strong>B</strong> takes its
-value, if there are memory_order_seq_cst fences <strong>X</strong> and <strong>Y</strong> such that
-<strong>A</strong> is sequenced-before <strong>X</strong>, <strong>Y</strong> is sequenced-before <strong>B</strong>, and <strong>X</strong>
-precedes <strong>Y</strong> in <strong>S</strong>, then <strong>B</strong> observes either the effects of <strong>A</strong> or a
-later modification of <strong>M</strong> in its modification order. [C11 standard,
-Section 7.17.3, paragraph 11]
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-For atomic operations <strong>A</strong>
-and <strong>B</strong> on an atomic object <strong>M</strong>, if there are memory_order_seq_cst
-fences <strong>X</strong> and <strong>Y</strong> such that <strong>A</strong> is sequenced-before <strong>X</strong>, <strong>Y</strong> is
-sequenced-before <strong>B</strong>, and <strong>X</strong> precedes <strong>Y</strong> in <strong>S</strong>, then <strong>B</strong> occurs later
-than <strong>A</strong> in the modification order of <strong>M</strong>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">memory_order_seq_cst ensures sequential consistency only for a
-program that is (1) free of data races, and (2) exclusively uses
-memory_order_seq_cst synchronization operations. Any use of weaker
-ordering will invalidate this guarantee unless extreme care is used. In
-particular, memory_order_seq_cst fences ensure a total order only for
-the fences themselves. Fences cannot, in general, be used to restore
-sequential consistency for atomic operations with weaker ordering
-specifications.
-<br>
-<br>
-Atomic read-modify-write operations should always read the last value
-(in the modification order) stored before the write associated with the
-read-modify-write operation. [C11 standard, Section 7.17.3, paragraph
-12]</td>
-</tr></table>
-</div>
-<div class="paragraph"><p><span class="underline">Implementations should ensure that no "out-of-thin-air" values are computed that circularly depend on their own computation.</span></p></div>
-<div class="paragraph"><p>Note: Under the rules described above, and independent to the previously
-footnoted C++ issue, it is known that <em>x == y == 42</em> is a valid final
-state in the following problematic example:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>global atomic_int x = ATOMIC_VAR_INIT(0);
-
-local atomic_int y = ATOMIC_VAR_INIT(0);
-
-
-unit_of_execution_1:
-
-... [execution not reading or writing x or y, leading up to:]
-
-int t = atomic_load_explicit(&amp;y, memory_order_acquire);
-
-atomic_store_explicit(&amp;x, t, memory_order_release);
-
-
-unit_of_execution_2:
-
-... [execution not reading or writing x or y, leading up to:]
-
-int t = atomic_load_explicit(&amp;x, memory_order_acquire);
-
-atomic_store_explicit(&amp;y, t,
-memory_order_release);link:#_msocom_6[[BA6]] </pre>
-</div></div>
-<div class="paragraph"><p>This is not useful behavior and implementations should not exploit this
-phenomenon. It should be expected that in the future this may be
-disallowed by appropriate updates to the memory model description by the
-OpenCL committee.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Implementations should make atomic stores visible to atomic loads within
-a reasonable amount of time. [C11 standard, Section 7.17.3, paragraph
-16]</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>As long as the following conditions are met, a host program sharing SVM
-memory with a kernel executing on one or more OpenCL devices may use
-atomic and synchronization operations to ensure that its assignments,
-and those of the kernel, are visible to each other:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-Either fine-grained buffer or fine-grained system SVM must be
-used to share memory. While coarse-grained buffer SVM allocations may
-support atomic operations, visibility on these allocations is not
-guaranteed except at map and unmap operations.
-</p>
-</li>
-<li>
-<p>
-The optional OpenCL 2.0 SVM atomic-controlled visibility
-specified by provision of the CL_MEM_SVM_ATOMICS flag must be supported
-by the device and the flag provided to the SVM buffer on allocation.
-</p>
-</li>
-<li>
-<p>
-The host atomic and synchronization operations must be
-compatible with those of an OpenCL kernel language. This
-requires that the size and representation of the data types that the
-host atomic operations act on be consistent with the OpenCL kernel language atomic
-types.
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>If these conditions are met, the host operations will apply at
-all_svm_devices scope.</p></div>
-</div>
-<div class="sect4">
-<h5 id="_memory_ordering_rules_fence_operations">Memory Ordering Rules: Fence Operations</h5>
-<div class="paragraph"><p>This section describes how the OpenCL 2.0 fence operations contribute to
-the local- and global-happens-before relations.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><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.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>A global release fence <strong>A</strong> global-synchronizes-with a global acquire
-fence <strong>B</strong> if there exist atomic operations <strong>X</strong> and <strong>Y</strong>, both operating
-on some global atomic object <strong>M</strong>, such that <strong>A</strong> is sequenced-before <strong>X</strong>,
-<strong>X</strong> modifies <strong>M</strong>, <strong>Y</strong> is sequenced-before <strong>B</strong>, <strong>Y</strong> reads the value
-written by <strong>X</strong> or a value written by any side effect in the hypothetical
-release sequence <strong>X</strong> would head if it were a release operation, and that
-the scopes of <strong>A</strong>, <strong>B</strong> are inclusive. [C11 standard, Section 7.17.4,
-paragraph 2, modified.]</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>A global release fence <strong>A</strong> global-synchronizes-with an atomic operation
-<strong>B</strong> that performs an acquire operation on a global atomic object <strong>M</strong> if
-there exists an atomic operation <strong>X</strong> such that <strong>A</strong> is sequenced-before
-<strong>X</strong>, <strong>X</strong> modifies <strong>M</strong>, <strong>B</strong> reads the value written by <strong>X</strong> or a value
-written by any side effect in the hypothetical release sequence <strong>X</strong>
-would head if it were a release operation, and the scopes of <strong>A</strong> and <strong>B</strong>
-are inclusive. [C11 standard, Section 7.17.4, paragraph 3, modified.]</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>An atomic operation <strong>A</strong> that is a release operation on a global atomic
-object <strong>M</strong> global-synchronizes-with a global acquire fence <strong>B</strong> if there
-exists some atomic operation <strong>X</strong> on <strong>M</strong> such that <strong>X</strong> is
-sequenced-before <strong>B</strong> and reads the value written by <strong>A</strong> or a value
-written by any side effect in the release sequence headed by <strong>A</strong>, and
-the scopes of <strong>A</strong> and <strong>B</strong> are inclusive. [C11 standard, Section 7.17.4,
-paragraph 4, modified.]</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>A local release fence <strong>A</strong> local-synchronizes-with a local acquire fence
-<strong>B</strong> if there exist atomic operations <strong>X</strong> and <strong>Y</strong>, both operating on some
-local atomic object <strong>M</strong>, such that <strong>A</strong> is sequenced-before <strong>X</strong>, <strong>X</strong>
-modifies <strong>M</strong>, <strong>Y</strong> is sequenced-before <strong>B</strong>, and <strong>Y</strong> reads the value
-written by <strong>X</strong> or a value written by any side effect in the hypothetical
-release sequence <strong>X</strong> would head if it were a</p></div>
-<div class="paragraph"><p>release operation, and the scopes of <strong>A</strong> and <strong>B</strong> are inclusive. [C11
-standard, Section 7.17.4, paragraph 2, modified.]</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>A local release fence <strong>A</strong> local-synchronizes-with an atomic operation
-<strong>B</strong> that performs an acquire operation on a local atomic object <strong>M</strong> if
-there exists an atomic operation <strong>X</strong> such that <strong>A</strong> is sequenced-before
-<strong>X</strong>, <strong>X</strong> modifies <strong>M</strong>, and <strong>B</strong> reads the value written by <strong>X</strong> or a value
-written by any side effect in the hypothetical release sequence <strong>X</strong>
-would head if it were a release operation, and</p></div>
-<div class="paragraph"><p>the scopes of <strong>A</strong> and <strong>B</strong> are inclusive. [C11 standard, Section 7.17.4,
-paragraph 3, modified.]</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>An atomic operation <strong>A</strong> that is a release operation on a local atomic
-object <strong>M</strong> local-synchronizes-with a local acquire fence <strong>B</strong> if there
-exists some atomic operation <strong>X</strong> on <strong>M</strong> such that <strong>X</strong> is
-sequenced-before <strong>B</strong> and reads the value written by <strong>A</strong> or a value
-written by any side effect in the release sequence headed by <strong>A</strong>, and
-the scopes of <strong>A</strong> and <strong>B</strong> are inclusive. [C11 standard, Section 7.17.4,
-paragraph 4, modified.]</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Let <strong>X</strong> and <strong>Y</strong> be two work item fences that each have both the
-CLK_GLOBAL_MEM_FENCE and CLK_LOCAL_MEM_FENCE flags set. <strong>X</strong>
-global-synchronizes-with <strong>Y</strong> and <strong>X</strong> local synchronizes with <strong>Y</strong> if the
-conditions required for <strong>X</strong> to global-synchronize with <strong>Y</strong> are met, the
-conditions required for <strong>X</strong> to local-synchronize-with <strong>Y</strong> are met, or
-both sets of conditions are met.</p></div>
-</div>
-<div class="sect4">
-<h5 id="_memory_ordering_rules_work_group_functions">Memory Ordering Rules: Work-group Functions</h5>
-<div class="paragraph"><p>The OpenCL kernel execution model includes collective operations across
-the work-items within a single work-group. These are called work-group
-functions. Besides the work-group barrier function, they include the
-scan, reduction and pipe work-group functions described in the SPIR-V IL
-specifications . We will first discuss the work-group barrier. The other
-work-group functions are discussed afterwards.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The barrier function provides a mechanism for a kernel to synchronize
-the work-items within a single work-group: informally, each work-item of
-the work-group must execute the barrier before any are allowed to
-proceed. It also orders memory operations to a specified combination of
-one or more address spaces such as local memory or global memory, in a
-similar manner to a fence.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>To precisely specify the memory ordering semantics for barrier, we need
-to distinguish between a dynamic and a static instance of the call to a
-barrier. A call to a barrier can appear in a loop, for example, and each
-execution of the same static barrier call results in a new dynamic
-instance of the barrier that will independently synchronize a
-work-groups work-items.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>A work-item executing a dynamic instance of a barrier results in two
-operations, both fences, that are called the entry and exit fences.
-These fences obey all the rules for fences specified elsewhere in this
-chapter as well as the following:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The entry fence is a
-release fence with the same flags and scope as requested for the
-barrier.
-</p>
-</li>
-<li>
-<p>
-The exit fence is an
-acquire fence with the same flags and scope as requested for the
-barrier.
-</p>
-</li>
-<li>
-<p>
-For each work-item the
-entry fence is sequenced before the exit fence.
-</p>
-</li>
-<li>
-<p>
-If the flags have
-CLK_GLOBAL_MEM_FENCE set then for each work-item the entry fence
-global-synchronizes-with the exit fence of all other work-items in the
-same work-group.
-</p>
-</li>
-<li>
-<p>
-If the flags have
-CLK_LOCAL_MEM_FENCE set then for each work-item the entry fence
-local-synchronizes-with the exit fence of all other work-items in the
-same work-group.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The other work-group functions include such functions as
-work_group_all() and work_group_broadcast() and are described in the
-kernel language and IL specifications. The use of these work-group
-functions implies sequenced-before relationships between statements
-within the execution of a single work-item in order to satisfy data
-dependencies. For example, a work item that provides a value to a
-work-group function must behave as if it generates that value before
-beginning execution of that work-group function. Furthermore, the
-programmer must ensure that all work items in a work group must execute
-the same work-group function call site, or dynamic work-group function
-instance.</p></div>
-</div>
-<div class="sect4">
-<h5 id="_memory_ordering_rules_sub_group_functions">Memory Ordering Rules: Sub-group Functions</h5>
-<div class="paragraph"><p>The OpenCL kernel execution model includes collective operations across
-the work-items within a single sub-group. These are called sub-group
-functions. Besides the sub-group-barrier function, they include the
-scan, reduction and pipe sub-group functions described in the SPIR-V IL
-specification. We will first discuss the sub-group barrier. The other
-sub-group functions are discussed afterwards.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The barrier function provides a mechanism for a kernel to synchronize
-the work-items within a single sub-group: informally, each work-item of
-the sub-group must execute the barrier before any are allowed to
-proceed. It also orders memory operations to a specified combination of
-one or more address spaces such as local memory or global memory, in a
-similar manner to a fence.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>To precisely specify the memory ordering semantics for barrier, we need
-to distinguish between a dynamic and a static instance of the call to a
-barrier. A call to a barrier can appear in a loop, for example, and each
-execution of the same static barrier call results in a new dynamic
-instance of the barrier that will independently synchronize a
-sub-groups work-items.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>A work-item executing a dynamic instance of a barrier results in two
-operations, both fences, that are called the entry and exit fences.
-These fences obey all the rules for fences specified elsewhere in this
-chapter as well as the following:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The entry fence is a
-release fence with the same flags and scope as requested for the
-barrier.
-</p>
-</li>
-<li>
-<p>
-The exit fence is an
-acquire fence with the same flags and scope as requested for the
-barrier.
-</p>
-</li>
-<li>
-<p>
-For each work-item the
-entry fence is sequenced before the exit fence.
-</p>
-</li>
-<li>
-<p>
-If the flags have
-CLK_GLOBAL_MEM_FENCE set then for each work-item the entry fence
-global-synchronizes-with the exit fence of all other work-items in the
-same sub-group.
-</p>
-</li>
-<li>
-<p>
-If the flags have
-CLK_LOCAL_MEM_FENCE set then for each work-item the entry fence
-local-synchronizes-with the exit fence of all other work-items in the
-same sub-group.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The other sub-group functions include such functions as sub_group_all()
-and sub_group_broadcast() and are described in OpenCL kernel
-languages specifications. The use of these sub-group functions
-implies sequenced-before relationships between statements within the
-execution of a single work-item in order to satisfy data dependencies.
-For example, a work item that provides a value to a sub-group function
-must behave as if it generates that value before beginning execution of
-that sub-group function. Furthermore, the programmer must ensure that
-all work items in a sub-group must execute the same sub-group function
-call site, or dynamic sub-group function instance.</p></div>
-</div>
-<div class="sect4">
-<h5 id="_memory_ordering_rules_host_side_and_device_side_commands">Memory Ordering Rules: Host-side and Device-side Commands</h5>
-<div class="paragraph"><p>This section describes how the OpenCL API functions associated with
-command-queues contribute to happens-before relations. There are two
-types of command queues and associated API functions in OpenCL 2.0;
-<em>host command-queues</em> and <em>device command-queues</em>. The interaction of
-these command queues with the memory model are for the most part
-equivalent. In a few cases, the rules only applies to the host
-command-queue. We will indicate these special cases by specifically
-denoting the host command-queue in the memory ordering rule. SVM memory
-consistency in such instances is implied only with respect to
-synchronizing host commands.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Memory ordering rules in this section apply to all memory objects
-(buffers, images and pipes) as well as to SVM allocations where no
-earlier, and more fine-grained, rules apply.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>In the remainder of this section, we assume that each command <strong>C</strong>
-enqueued onto a command-queue has an associated event object <strong>E</strong> that
-signals its execution status, regardless of whether <strong>E*was returned to
-the unit of execution that enqueued *C</strong>. We also distinguish between
-the API function call that enqueues a command <strong>C</strong> and creates an event
-<strong>E</strong>, the execution of <strong>C</strong>, and the completion of <strong>C</strong>(which marks the
-event <strong>E</strong> as complete).</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The ordering and synchronization rules for API commands are defined as
-following:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-If an API function call <strong>X</strong> enqueues a command <strong>C</strong>, then <strong>X</strong>
-global-synchronizes-with <strong>C</strong>. For example, a host API function to
-enqueue a kernel global-synchronizes-with the start of that
-kernel-instances execution, so that memory updates sequenced-before the
-enqueue kernel function call will global-happen-before any kernel reads
-or writes to those same memory locations. For a device-side enqueue,
-global memory updates sequenced before <strong>X</strong> happens-before <strong>C</strong> reads or
-writes to those memory locations only in the case of fine-grained SVM.
-</p>
-</li>
-<li>
-<p>
-If <strong>E</strong> is an event upon which a command <strong>C</strong> waits, then <strong>E</strong>
-global-synchronizes-with <strong>C</strong>. In particular, if <strong>C</strong> waits on an event
-<strong>E</strong> that is tracking the execution status of the command <strong>C1</strong>, then
-memory operations done by <strong>C1</strong> will global-happen-before memory
-operations done by <strong>C</strong>. As an example, assume we have an OpenCL program
-using coarse-grain SVM sharing that enqueues a kernel to a host
-command-queue to manipulate the contents of a region of a buffer that
-the host thread then accesses after the kernel completes. To do this,
-the host thread can call clEnqueueMapBuffer to enqueue a blocking-mode
-map command to map that buffer region, specifying that the map command
-must wait on an event signaling the kernels completion. When
-clEnqueueMapBuffer returns, any memory operations performed by the
-kernel to that buffer region will global- happen-before subsequent
-memory operations made by the host thread.
-</p>
-</li>
-<li>
-<p>
-If a command <strong>C</strong> has an event <strong>E</strong> that signals its completion,
-then <strong>C</strong> global- synchronizes-with <strong>E</strong>.
-</p>
-</li>
-<li>
-<p>
-For a command <strong>C</strong> enqueued to a host-side command queue, if <strong>C</strong>
-has an event <strong>E</strong> that signals its completion, then <strong>E</strong> global-
-synchronizes-with an API call <strong>X</strong> that waits on <strong>E</strong>. For example, if a
-host thread or kernel-instance calls the wait-for-events function on
-<strong>E</strong>(e.g. the clWaitForEvents function called from a host thread)<strong>,*then
-*E</strong> global-synchronizes-with that wait-for-events function call.
-</p>
-</li>
-<li>
-<p>
-If commands <strong>C</strong> and <strong>C1</strong> are enqueued in that sequence onto an
-in-order command-queue, then the event (including the event implied
-between <strong>C</strong> and <strong>C1*due to the in-order queue) signaling *C*s
-completion global-synchronizes-with *C1</strong>. Note that in OpenCL 2.0, only
-a host command-queue can be configured as an in-order queue.
-</p>
-</li>
-<li>
-<p>
-If an API call enqueues a marker command <strong>C</strong> with an empty list
-of events upon which <strong>C</strong> should wait, then the events of all commands
-enqueued prior to <strong>C</strong> in the command-queue global-synchronize-with*C*.
-</p>
-</li>
-<li>
-<p>
-If a host API call enqueues a command-queue barrier command <strong>C</strong>
-with an empty list of events on which <strong>C</strong> should wait, then the events
-of all commands enqueued prior to <strong>C</strong> in the command-queue
-global-synchronize-with <strong>C</strong>. In addition, the event signaling the
-completion of <strong>C</strong> global-synchronizes-with all commands enqueued after
-<strong>C</strong> in the command-queue.
-</p>
-</li>
-<li>
-<p>
-If a host thread executes a clFinish call <strong>X</strong>, then the events
-of all commands enqueued prior to <strong>X</strong> in the command-queue
-global-synchronizes-with <strong>X</strong>.
-</p>
-</li>
-<li>
-<p>
-The start of a kernel-instance <strong>K</strong> global-synchronizes-with all
-operations in the work items of <strong>K</strong>. Note that this includes the
-execution of any atomic operations by the work items in a program using
-fine-grain SVM.
-</p>
-</li>
-<li>
-<p>
-All operations of all work items of a kernel-instance <strong>K</strong>
-global-synchronizes-with the event signaling the completion of <strong>K</strong>. Note
-that this also includes the execution of any atomic operations by the
-work items in a program using fine-grain SVM.
-</p>
-</li>
-<li>
-<p>
-If a callback procedure <strong>P</strong> is registered on an event <strong>E</strong>, then <strong>E</strong>
-global-synchronizes-with all operations of <strong>P</strong>. Note that callback
-procedures are only defined for commands within host command-queues.
-</p>
-</li>
-<li>
-<p>
-If <strong>C</strong> is a command that waits for an event <strong>E</strong>'s completion, and
-API function call <strong>X</strong> sets the status of a user event <strong>E</strong>'s status to
-CL_COMPLETE (for example, from a host thread using a
-clSetUserEventStatus function), then <strong>X</strong> global-synchronizes-with <strong>C</strong>.
-</p>
-</li>
-<li>
-<p>
-If a device enqueues a command <strong>C</strong> with the
-CLK_ENQUEUE_FLAGS_WAIT_KERNEL flag, then the end state of the parent
-kernel instance global-synchronizes with <strong>C</strong>.
-</p>
-</li>
-<li>
-<p>
-If a work-group enqueues a command <strong>C</strong> with the
-CLK_ENQUEUE_FLAGS_WAIT_WORK_GROUP flag, then the end state of the
-work-group global-synchronizes with <strong>C</strong>.
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>When using an out-of-order command queue, a wait on an event or a marker
-or command-queue barrier command can be used to ensure the correct
-ordering of dependent commands. In those cases, the wait for the event
-or the marker or barrier command will provide the necessary
-global-synchronizes-with relation.</p></div>
-<div class="paragraph"><p>In this situation:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-access to shared locations
-or disjoint locations in a single cl_mem object when using atomic
-operations from different kernel instances enqueued from the host such
-that one or more of the atomic operations is a write is
-implementation-defined and correct behavior is not guaranteed except
-at synchronization points.
-</p>
-</li>
-<li>
-<p>
-access to shared locations
-or disjoint locations in a single cl_mem object when using atomic
-operations from different kernel instances consisting of a parent kernel
-and any number of child kernels enqueued by that kernel is guaranteed
-under the memory ordering rules described earlier in this section.
-</p>
-</li>
-<li>
-<p>
-access to shared locations
-or disjoint locations in a single program scope global variable,
-coarse-grained SVM allocation or fine-grained SVM allocation when using
-atomic operations from different kernel instances enqueued from the host
-to a single device is guaranteed under the memory ordering rules
-described earlier in this section.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>If fine-grain SVM is used but without support for the OpenCL 2.0 atomic
-operations, then the host and devices can concurrently read the same
-memory locations and can concurrently update non-overlapping memory
-regions, but attempts to update the same memory locations are
-undefined. Memory consistency is guaranteed at the OpenCL
-synchronization points without the need for calls to clEnqueueMapBuffer
-and clEnqueueUnmapMemObject. For fine-grained SVM buffers it is
-guaranteed that at synchronization points only values written by the
-kernel will be updated. No writes to fine-grained SVM buffers can be
-introduced that were not in the original program.
- </p></div>
-<div class="paragraph"><p>In the remainder of this section, we discuss a few points regarding the
-ordering rules for commands with a host command queue.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The OpenCL 1.2 standard describes a synchronization point as a
-kernel-instance or host program location where the contents of memory
-visible to different work-items or command-queue commands are the same.
-It also says that waiting on an event and a command-queue barrier are
-synchronization points between commands in command- queues. Four of the
-rules listed above (2, 4, 7, and 8) cover these OpenCL synchronization
-points.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>A map operation (clEnqueueMapBuffer or clEnqueueMapImage) performed on a
-non-SVM buffer or a coarse-grained SVM buffer is allowed to overwrite
-the entire target region with the latest runtime view of the data as
-seen by the command with which the map operation synchronizes, whether
-the values were written by the executing kernels or not. Any values
-that were changed within this region by another kernel or host thread
-while the kernel synchronizing with the map operation was executing may
-be overwritten by the map operation.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Access to non-SVM cl_mem buffers and coarse-grained SVM allocations is
-ordered at synchronization points between host commands. In the presence
-of an out-of-order command queue or a set of command queues mapped to
-the same device, multiple kernel instances may execute concurrently on
-the same device.</p></div>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_the_opencl_framework">3.4. The OpenCL Framework</h3>
-<div class="paragraph"><p>The OpenCL framework allows applications to use a host and one or more
-OpenCL devices as a single heterogeneous parallel computer system. The
-framework contains the following components:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-OpenCL Platform layer: The
-platform layer allows the host program to discover OpenCL devices and
-their capabilities and to create contexts.
-</p>
-</li>
-<li>
-<p>
-OpenCL Runtime: The
-runtime allows the host program to manipulate contexts once they have
-been created.
-</p>
-</li>
-<li>
-<p>
-OpenCL Compiler: The
-OpenCL compiler creates program executables that contain OpenCL kernels.
-SPIR-V intermediate language, OpenCL C, OpenCL C++, and OpenCL C language versions from earlier
-OpenCL specifications are supported by the compiler. Other input
-languages may be supported by some implementations.
-</p>
-</li>
-</ul></div>
-<div class="sect3">
-<h4 id="_opencl_framework_mixed_version_support">3.4.1. OpenCL Framework: Mixed Version Support</h4>
-<div class="paragraph"><p>OpenCL supports devices with different capabilities under a single
-platform. This includes devices which conform to different versions of
-the OpenCL specification. There are three version identifiers to
-consider for an OpenCL system: the platform version, the version of a
-device, and the version(s) of the kernel language or IL supported on a
-device.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The platform version indicates the version of the OpenCL runtime that is
-supported. This includes all of the APIs that the host can use to
-interact with resources exposed by the OpenCL runtime; including
-contexts, memory objects, devices, and command queues.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The device version is an indication of the device&#8217;s capabilities
-separate from the runtime and compiler as represented by the device info
-returned by <strong>clGetDeviceInfo</strong>. Examples of attributes associated with
-the device version are resource limits (e.g., minimum size of local
-memory per compute unit) and extended functionality (e.g., list of
-supported KHR extensions). The version returned corresponds to the
-highest version of the OpenCL specification for which the device is
-conformant, but is not higher than the platform version.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The language version for a device represents the OpenCL programming
-language features a developer can assume are supported on a given
-device. The version reported is the highest version of the language
-supported.</p></div>
-<div class="paragraph"><p>Backwards compatibility is an important goal for the OpenCL standard.
-Backwards compatibility is expected such that a device will consume
-earlier versions of the SPIR-V and OpenCL C programming languages with
-the following minimum requirements:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-An OpenCL 1.x device must support at least one 1.x version of
-the OpenCL C programming language.
-</p>
-</li>
-<li>
-<p>
-An OpenCL 2.0 device must support all the requirements of an
-OpenCL 1.x device in addition to the OpenCL C 2.0 programming language.
-If multiple language versions are supported, the compiler defaults to
-using the highest OpenCL 1.x language version supported for the device
-(typically OpenCL 1.2). To utilize the OpenCL 2.0 Kernel programming
-language, a programmer must specifically set the appropriate compiler
-flag (-cl-std=CL2.0). The language version must not be higher than the
-platform version, but may exceed the device version (see section
-5.8.4.5).
-</p>
-</li>
-<li>
-<p>
-An OpenCL 2.1 device must support all the requirements of an
-OpenCL 2.0 device in addition to the SPIR-V intermediate language at
-version 1.0 or above. Intermediate language versioning is encoded as
-part of the binary object and no flags are required to be passed to the
-compiler.
-</p>
-</li>
-<li>
-<p>
-An OpenCL 2.2 device must support all the requirements of an
-OpenCL 2.0 device in addition to the SPIR-V intermediate language at
-version 1.2 or above. Intermediate language
-is encoded as a part of the binary
-object and no flags are required to be passed to the compiler.
-</p>
-</li>
-</ol></div>
-</div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_the_opencl_platform_layer">4. The OpenCL Platform Layer</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This section describes the OpenCL platform layer which implements
-platform-specific features that allow applications to query OpenCL
-devices, device configuration information, and to create OpenCL contexts
-using one or more devices.</p></div>
-<div class="sect2">
-<h3 id="_querying_platform_info">4.1. Querying Platform Info</h3>
-<div class="paragraph"><p>The list of platforms available can be obtained using the following
-function.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetPlatformIDs(cl_uint num_entries,
-                        cl_platform_id *platforms,
-                        cl_uint *num_platforms)</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._If _platforms</em> is not NULL, the <em>num_entries</em> must be
-greater than zero.
-<br>
-<br>
-<em>platforms</em> returns a list of OpenCL platforms found. The
-cl_platform_id values returned in <em>platforms_can be used to identify a
-specific OpenCL platform. If _platforms</em> argument is NULL, 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.
-<br>
-<br>
-<em>num_platforms</em> returns the number of OpenCL platforms available. If
-<em>num_platforms</em> is NULL, this argument is ignored.
-<br>
-<br>
-<strong>clGetPlatformIDs</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_VALUE if
-<em>num_entries</em> is equal to zero and <em>platforms</em> is not NULL or if both
-<em>num_platforms</em> and <em>platforms</em> are NULL.
-</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 monospaced">
-<pre>cl_int clGetPlatformInfo(cl_platform_id platform,
-                         cl_platform_info param_name,
-                         size_t param_value_size,
-                         void *param_value,
-                         size_t *param_value_size_ret)</pre>
-</div></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>gets specific information about the OpenCL platform. The information
-that can be queried using <strong>clGetPlatformInfo</strong> is specified in <em>table
-4.1</em>.
-<br>
-<br>
-<em>platform</em> refers to the platform ID returned by <strong>clGetPlatformIDs</strong> or
-can be NULL. If <em>platform</em> is NULL, the behavior is
-implementation-defined.
-<br>
-<br>
-<em>param_name</em> is an enumeration constant that identifies the platform
-information being queried. It can be one of the following values as
-specified in <em>table 4.1</em>.
-<br>
-<br>
-<em>param_value</em> is a pointer to memory location where appropriate values
-for a given <em>param_name</em> as specified in <em>table</em> <em>4.1</em> will be
-returned. If <em>param_value</em> is NULL, it is ignored.
-<br>
-<br>
-<em>param_value_size</em> specifies the size in bytes of memory pointed to by
-<em>param_value</em>. This size in bytes must be &gt;= size of return type
-specified in <em>table 4.1.</em>
-<br>
-<br>
-<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 NULL, it is
-ignored.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 2. <em>OpenCL Platform Queries</em></caption>
-<col style="width:50%;">
-<col style="width:10%;">
-<col style="width:40%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_platform_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return Type</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"><strong>CL_PLATFORM_PROFILE</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">char[]<span class="footnote"><br>[A null terminated string is returned by OpenCL query function calls if the return type of the information being queried is a char[].]<br></span></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:
-<br>
-<br>
-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).
-<br>
-<br>
-EMBEDDED_PROFILE - if the
-CL_PLATFORM_VERSION
-char[]
-implementation supports the OpenCL
-embedded profile. The embedded profile
-is defined to be a subset for each version
-of OpenCL. The embedded profile for
-OpenCL 2.2 is described in <em>section 7</em>.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PLATFORM_VERSION</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">OpenCL version string. Returns the
-OpenCL version supported by the
-implementation. This version string has
-the following format:
-<br>
-<br>
-<em>OpenCL&lt;space&gt;&lt;major_version.minor_
-version&gt;&lt;space&gt;&lt;platform-specific
-information&gt;</em>
-<br>
-<br>
-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>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">char[]</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Platform name string.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PLATFORM_VENDOR</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">Platform vendor string.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PLATFORM_EXTENSIONS</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 a space separated list of extension
-names (the extension names themselves
-do not contain any spaces) supported by
-the platform. Each extension that is
-supported by all devices associated with
-this platform must be reported here.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PLATFORM_HOST_TIMER_RESOLUTION</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Returns the resolution
-of the host timer in nanoseconds as used by <strong>clGetDeviceAndHostTimer</strong>.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><strong>clGetPlatformInfo</strong> returns CL_SUCCESS if the function is executed
-successfully. Otherwise, it returns one of the following
-errors.<span class="footnote"><br>[The OpenCL specification does not describe the order of precedence for error codes returned by API calls.]<br></span>:</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>param_name</em> is not one of the supported values or if size in bytes
-specified by <em>param_value_size</em> is &lt; size of return type as specified in
-<em>table 4.1</em> and <em>param_value</em> is not a NULL value.
-</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="_querying_devices">4.2. Querying Devices</h3>
-<div class="paragraph"><p>The list of devices available on a platform can be obtained using the
-following function.<span class="footnote"><br>[<strong>clGetDeviceIDs</strong> may returnal all or a subset of the actual physical devices present in the platform and that maths <em>device_type</em>]<br></span>.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetDeviceIDs(cl_platform_id platform,
-                      cl_device_type device_type,
-                      cl_uint num_entries,
-                      cl_device_id * devices,
-                      cl_uint *num_devices)</pre>
-</div></div>
-<div class="paragraph"><p><em>platform</em> refers to the platform ID returned by <strong>clGetPlatformIDs</strong> or
-can be NULL. If <em>platform</em> is NULL, the behavior is
-implementation-defined.</p></div>
-<div class="paragraph"><p><em>device_type</em> is a bitfield that identifies the type of OpenCL device.
-The <em>device_type</em> can be used to query specific OpenCL devices or all
-OpenCL devices available. The valid values for <em>device_type</em> are
-specified in <em>table 4.2</em>.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:50%;">
-<col style="width:50%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_device_type</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"><strong>CL_DEVICE_TYPE_CPU</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">An OpenCL device that is the host processor. The
-host processor runs the OpenCL implementations and is a single or
-multi-core CPU.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DEVICE_TYPE_GPU</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">An OpenCL device that is a GPU. By this we mean
-that the device can also be used to accelerate a 3D API such as OpenGL
-or DirectX.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DEVICE_TYPE_ACCELERATOR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Dedicated OpenCL accelerators (for
-example the IBM CELL Blade). These devices communicate with the host
-processor using a peripheral interconnect such as PCIe.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DEVICE_TYPE_CUSTOM</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Dedicated accelerators that do not support
-programs written in an OpenCL kernel language,</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DEVICE_TYPE_DEFAULT</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">The default OpenCL device in the system.
-The default device cannot be a <strong>CL_DEVICE_TYPE_CUSTOM</strong> device.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DEVICE_TYPE_ALL</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">All OpenCL devices available in the system except
-<strong>CL_DEVICE_TYPE_CUSTOM</strong> devices..</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><em>num_entries</em> is the number of cl_device_id entries that can be added to
-<em>devices._If _devices</em> is not NULL, the <em>num_entries</em> must be greater
-than zero.
-<br>
-<br>
-<em>devices</em> returns a list of OpenCL devices found. The cl_device_id
-values returned in <em>devices_can be used to identify a specific OpenCL
-device. If _devices</em> argument is NULL, this argument is ignored. The
-number of OpenCL devices returned is the minimum of the value specified
-by <em>num_entries</em> or the number of OpenCL devices whose type matches
-<em>device_type</em>.
-<br>
-<br>
-<em>num_devices</em> returns the number of OpenCL devices available that match
-<em>device_type</em>. If <em>num_devices</em> is NULL, this argument is ignored.</p></div>
-<div class="paragraph"><p><strong>clGetDeviceIDs</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_PLATFORM if
-<em>platform</em> is not a valid platform.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_DEVICE_TYPE if
-<em>device_type</em> is not a valid value.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if
-<em>num_entries</em> is equal to zero and <em>devices</em> is not NULL or if both
-<em>num_devices</em> and <em>devices</em> are NULL.
-</p>
-</li>
-<li>
-<p>
-CL_DEVICE_NOT_FOUND if no
-OpenCL devices that matched <em>device_type</em> were found.
-</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 application can query specific capabilities of the OpenCL device(s)
-returned by <strong>clGetDeviceIDs</strong>. This can be used by the application to
-determine which device(s) to use.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetDeviceInfo(cl_device_id device,
-                       cl_device_info param_name,
-                       size_t param_value_size,
-                       void *param_value,
-                       size_t *param_value_size_ret)</pre>
-</div></div>
-<div class="paragraph"><p>gets specific information about an OpenCL device.
-<br>
-<br>
-<em>device</em> may be a device returned by <strong>clGetDeviceIDs</strong> or a sub-device
-created by <strong>clCreateSubDevices</strong>. If <em>device</em> is a sub-device, the
-specific information for the sub-device will be returned. The
-information that can be queried using <strong>clGetDeviceInfo</strong> is specified in
-<em>table 4.3</em>.
-<br>
-<br>
-<em>param_name</em> is an enumeration constant that identifies the device
-information being queried. It can be one of the following values as
-specified in <em>table 4.3</em>.
-<br>
-<br>
-<em>param_value</em> is a pointer to memory location where appropriate values
-for a given <em>param_name</em> as specified in <em>table</em> <em>4.3</em> will be
-returned. If <em>param_value</em> is NULL, it is ignored.
-<br>
-<br>
-<em>param_value_size</em> specifies the size in bytes of memory pointed to by
-<em>param_value</em>. This size in bytes must be &gt;= size of return type
-specified in <em>table 4.3.</em>
-<br>
-<br>
-<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 NULL, it is
-ignored.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 3. <em>OpenCL Device Queries</em></caption>
-<col style="width:30%;">
-<col style="width:20%;">
-<col style="width:50%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_device_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return Type</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">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:
-<br>
-<br>
-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>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_VENDOR_ID</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">A unique device vendor identifier. An example of a unique device identifier could be the PCIe ID.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_MAX_ COMPUTE_UNITS</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 number of parallel compute
-units on the OpenCL device. A work-group executes on a single compute
-unit. The minimum value is 1.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEIVCE_MAX_ WORK_ITEM_DIMENSIONS</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 dimensions that specify the global and
-local work-item IDs used by the data parallel execution model. (Refer to
-<strong>clEnqueueNDRangeKernel</strong>). The minimum value is 3 for devices that are
-not of type CL_DEVICE_TYPE_CUSTOM.</p></td>
-</tr>
-<tr>
-<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>.
-<br>
-<br>
-Returns n size_t entries, where n is the
-value returned by the query for
-CL_DEVICE_MAX_WORK_ITEM_DIMEN
-SIONS.
-<br>
-<br>
-The minimum value is (1, 1, 1) for devices
-that are not of type
-CL_DEVICE_TYPE_CUSTOM .</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_MAX_ WORK_GROUP_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">Maximum number of work-items in a
-work-group that a device is capable of
-executing on a single compute unit, for any
-given kernel-instance running on the
-device. (Refer also to
-<strong>clEnqueueNDRangeKernel and CL_KERNEL_WORK_GROUP_SIZE</strong> ). The minimum value is 1.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_PREFERRED_ VECTOR_WIDTH_CHAR
-<br>
-<br>
-CL_DEVICE_PREFERRED_
-VECTOR_WIDTH_SHORT
-<br>
-<br>
-CL_DEVICE_PREFERRED_
-VECTOR_WIDTH_INT
-<br>
-<br>
-CL_DEVICE_PREFERRED_
-VECTOR_WIDTH_LONG
-<br>
-<br>
-CL_DEVICE_PREFERRED_
-VECTOR_WIDTH_FLOAT
-<br>
-<br>
-CL_DEVICE_PREFERRED_
-VECTOR_WIDTH_DOUBLE
-<br>
-<br>
-CL_DEVICE_PREFERRED_
-VECTOR_WIDTH_HALF</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">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.
-<br>
-<br>
-If double precision is not supported,CL_DEVICE_PREFERRED_VECTOR_WIDTH_
-DOUBLE must return 0.
-<br>
-<br>
-If the <strong>cl_khr_fp16</strong> extension is not supported,
-CL_DEVICE_PREFERRED_VECTOR_WIDTH_
-HALF must return 0.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_NATIVE_ VECTOR_WIDTH_CHAR
-<br>
-<br>
-CL_DEVICE_NATIVE_
-VECTOR_WIDTH_SHORT
-<br>
-<br>
-CL_DEVICE_NATIVE_
-VECTOR_WIDTH_INT
-<br>
-<br>
-CL_DEVICE_NATIVE_
-VECTOR_WIDTH_LONG
-<br>
-<br>
-CL_DEVICE_NATIVE_
-VECTOR_WIDTH_FLOAT
-<br>
-<br>
-CL_DEVICE_NATIVE_
-VECTOR_WIDTH_DOUBLE
-<br>
-<br>
-CL_DEVICE_NATIVE_
-VECTOR_WIDTH_HALF</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 native ISA vector width. The
-vector width is defined as the number of
-scalar elements that can be stored in the
-vector.
-<br>
-<br>
-If double precision is not supported,
-CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE must return 0.
-<br>
-<br>
-If the <strong>cl_khr_fp16</strong> extension is not supported,
-CL_DEVICE_NATIVE_VECTOR_WIDTH_
-HALF must return 0.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_MAX_ CLOCK_FREQUENCY</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">Clock frequency of the device in MHz. The
-meaning of this value is implementation-
-defined. For devices with multiple clock
-domains, the clock frequency for any of the
-clock domains may be returned. For
-devices that dynamically change frequency
-for power or thermal reasons, the returned
-clock frequency may be any valid
-frequency.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_ADDRESS_BITS</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 default compute device address
-space size of the global address space specified as an unsigned integer
-value in bits. Currently supported values are 32 or 64 bits.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_MAX_ MEM_ALLOC_SIZE</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Max size of memory object
-allocation in bytes. The minimum value is max (min(1024*1024*1024,
-1/4<sup>th</sup> of <strong>CL_DEVICE_GLOBAL_MEM_SIZE</strong>), 32*1024*1024) for devices that
-are not of type CL_DEVICE_TYPE_CUSTOM.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_IMAGE_ SUPPORT</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_TRUE if images are supported
-by the OpenCL device and CL_FALSE otherwise.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_MAX_ READ_IMAGE_ARGS</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">Max number of image objects
-arguments of a kernel declared with the read_only qualifier. The
-minimum value is 128 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_ WRITE_IMAGE_ARGS</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">Max number of image objects
-arguments of a kernel declared with the write_only qualifier. The
-minimum value is 64 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_ READ_WRITE_IMAGE_ARGS<span class="footnote"><br>[NOTE: <strong>CL_DEVICE_MAX_WRITE_IMAGE_ARGS</strong> is only there for backward compatibility.
-<strong>CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS</strong> should be used instead.]<br></span></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">Max number of image objects arguments
-of a kernel declared with the
-write_only or read_write qualifier.
-The minimum value is 64 if
-CL_DEVICE_IMAGE_SUPPORT is
-CL_TRUE .</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_IL_VERSION</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 can be
-supported by <strong>clCreateProgramWithIL</strong> for this device. Returns a
-space-separated list of IL version strings of the form
-&lt;IL_Prefix&gt;_&lt;Major_Version&gt;.&lt;Minor_Version&gt;. For OpenCL 2.2, SPIR-V is
-a required IL prefix.</p></td>
-</tr>
-<tr>
-<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.
-<br>
-<br>
-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.
-<br>
-<br>
-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.
-<br>
-<br>
-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.
-<br>
-<br>
-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.
-<br>
-<br>
-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.
-<br>
-<br>
-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.
-<br>
-<br>
-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.
-<br>
-<br>
-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.
-<br>
-<br>
-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.
-<br>
-<br>
-This query specifies the minimum
-alignment in pixels of the host_ptr
-specified to <strong>clCreateBuffer</strong>.
-<br>
-<br>
-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>
-<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 pipe objects
-that can be passed as arguments to a kernel. The minimum value is 16.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_PIPE_ MAX_ACTIVE_RESERVATIONS</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 reservations that can be
-active for a pipe per work-item in a kernel. A work-group reservation
-is counted as one reservation per work-item. The minimum value is 1.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_PIPE_ MAX_PACKET_SIZE</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 size of pipe
-packet in bytes. The minimum value is 1024 bytes.</p></td>
-</tr>
-<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.
-<br>
-<br>
-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>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_MEM_ BASE_ADDR_ALIGN</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">Alignment requirement (in
-bits) for sub-buffer offsets. The minimum value is the size (in bits) of
-the largest OpenCL built-in data type supported by the device (long16 in
-FULL profile,
-long16 or int16 in EMBEDDED profile) for devices that are
-not of type CL_DEVICE_TYPE_CUSTOM.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_SINGLE_ FP_CONFIG<span class="footnote"><br>[The optional rounding modes should be included as a device capability only if it is supported natively. All explicit
-conversion functions with specific rounding modes must still operate correctly.]<br></span></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 floating-point
-capability of the device. This is a bit-field
-that describes one or more of the following values:
-CL_FP_DENORM – denorms are supported
-<br>
-<br>
-CL_FP_INF_NAN – INF and quiet NaNs are
-supported.
-<br>
-<br>
-CL_FP_ROUND_TO_NEAREST– round to
-nearest even rounding mode supported
-<br>
-<br>
-CL_FP_ROUND_TO_ZERO – round to zero
-rounding mode supported
-<br>
-<br>
-CL_FP_ROUND_TO_INF – round to positive
-and negative infinity rounding modes
-supported
-<br>
-<br>
-CL_FP_FMA – IEEE754-2008 fused multiply-
-add is supported.
-<br>
-<br>
-CL_FP_CORRECTLY_ROUNDED_DIVIDE
-_SQRT – divide and sqrt are correctly rounded
-as defined by the IEEE754 specification.
-<br>
-<br>
-CL_FP_SOFT_FLOAT – Basic floating-point
-operations (such as addition, subtraction,
-multiplication) are implemented in software.
-<br>
-<br>
-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.
-<br>
-<br>
-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<span class="footnote"><br>[The optional rounding modes should be included as a device capability only if it is supported natively. All explicit
-conversion functions with specific rounding modes must still operate correctly.]<br></span></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:
-<br>
-<br>
-CL_FP_DENORM – denorms are supported
-<br>
-<br>
-CL_FP_INF_NAN – INF and NaNs are
-supported.
-<br>
-<br>
-CL_FP_ROUND_TO_NEAREST – round to
-nearest even rounding mode supported.
-<br>
-<br>
-CL_FP_ROUND_TO_ZERO – round to zero
-rounding mode supported.
-<br>
-<br>
-CL_FP_ROUND_TO_INF – round to
-positive and negative infinity rounding
-modes supported.
-<br>
-<br>
-CP_FP_FMA – IEEE754-2008 fused
-multiply-add is supported.
-<br>
-<br>
-CL_FP_SOFT_FLOAT – Basic floating-point
-operations (such as addition, subtraction,
-multiplication) are implemented in software.
-Double precision is an optional feature so
-the mandated minimum double precision
-floating-point capability is 0.
-If double precision is supported by the
-device, then the minimum double precision
-floating-point capability must be:
-CL_FP_FMA |
-CL_FP_ROUND_TO_NEAREST |
-CL_FP_INF_NAN |
-CL_FP_DENORM .</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_GLOBAL_ MEM_CACHE_TYPE</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_device_mem_
-cache_type</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Type of global memory cache supported.
-Valid values are:
-CL_NONE,
-CL_READ_ONLY_CACHE and
-CL_READ_WRITE_CACHE .</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_GLOBAL_ MEM_CACHELINE_SIZE</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">Size of global memory
-cache line in bytes.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_GLOBAL_ MEM_CACHE_
-SIZE</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Size of global memory cache in
-bytes.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_GLOBAL_ MEM_SIZE</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Size of global device memory in
-bytes.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_MAX_ CONSTANT_BUFFER_SIZE</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Max size in bytes of a constant
-buffer allocation. The minimum value is 64 KB for devices that are not
-of type CL_DEVICE_TYPE_CUSTOM.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_MAX_ CONSTANT_ARGS</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">Max number of arguments
-declared with the __constant qualifier in a kernel. The minimum value
-is 8 for devices that are not of type CL_DEVICE_TYPE_CUSTOM.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_MAX_ GLOBAL_VARIABLE_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">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.
-<br>
-<br>
-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>
-<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
-preferred total size, in bytes, of all program variables in the global
-address space. This is a performance hint. An implementation may place
-such variables in storage with optimized device access. This query
-returns the capacity of such storage. The minimum value is 0.</p></td>
-</tr>
-<tr>
-<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">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 .
-<br>
-<br>
-For custom devices, CL_NONE can also be
-returned indicating no local memory
-support.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_LOCAL_ MEM_SIZE</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Size of local memory region in
-bytes. The minimum value is 32 KB for devices that are not of type
-CL_DEVICE_TYPE_CUSTOM.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_ERROR_ CORRECTION_SUPPORT</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_TRUE if the device implements
-error correction for all accesses to compute device memory (global and
-constant). Is CL_FALSE if the device does not implement such error
-correction.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_PROFILING_ TIMER_RESOLUTION</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">Describes the resolution of device
-timer. This is measured in nanoseconds. Refer to <em>section 5.14</em> for
-details.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_ENDIAN_LITTLE</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_TRUE if the OpenCL device is a
-little endian device and CL_FALSE
-otherwise</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_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_TRUE if the device is available
-and CL_FALSE otherwise. A device is considered to be available if the
-device can be expected to successfully execute commands enqueued to the
-device.</p></td>
-</tr>
-<tr>
-<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.
-<br>
-<br>
-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.
-<br>
-<br>
-This can be CL_FALSE for the embedded
-platform profile only.
-<br>
-<br>
-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:
-<br>
-<br>
-CL_EXEC_KERNEL –
-The OpenCL device
-can execute OpenCL kernels.
-<br>
-<br>
-CL_EXEC_NATIVE_KERNEL – The OpenCL
-device can execute native kernels.
-<br>
-<br>
-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<span class="footnote"><br>[CL_DEVICE_QUEUE_PROPERTIES is deprecated and replaced by
-CL_DEVICE_QUEUE_ON_HOST_PROPERTIES.]<br></span></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">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:
-<br>
-<br>
-CL_QUEUE_OUT_OF_ORDER_EXEC_
-MODE_ENABLE
-<br>
-<br>
-CL_QUEUE_PROFILING_ENABLE
-<br>
-<br>
-These properties are described in table 5.1.
-<br>
-<br>
-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>
-<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">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:
-<br>
-<br>
-CL_QUEUE_OUT_OF_ORDER_EXEC_
-MODE_ENABLE
-<br>
-<br>
-CL_QUEUE_PROFILING_ENABLE
-<br>
-<br>
-These properties are described in table 5.1.
-The mandated minimum capability is:
-CL_QUEUE_OUT_OF_ORDER_EXEC_
-MODE_ENABLE |
-CL_QUEUE_PROFILING_ENABLE .</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_QUEUE_ ON_DEVICE_PREFERRED_ SIZE</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 size of the device queue in bytes
-preferred by the implementation.
-Applications should use this size for the
-device queue to ensure good performance.
-<br>
-<br>
-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>
-<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 max. size of the device queue in bytes.
-<br>
-<br>
-The minimum value is 256 KB for the full
-profile and 64 KB for the embedded profile</p></td>
-</tr>
-<tr>
-<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.
-<br>
-<br>
-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>
-<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 events in use by
-a device queue. These refer to events
-returned by the enqueue_ built-in
-functions to a device queue or user events
-returned by the create_user_event
-built-in function that have not been
-released.
-<br>
-<br>
-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>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">char[]</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A semi-colon separated list of
-built-in kernels supported by the device. An empty string is returned
-if no built-in kernels are supported by the device.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_PLATFORM</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_platform_id</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">The platform associated with this
-device.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_NAME</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">Device name string.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_VENDOR</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">Vendor name string.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DRIVER_VERSION</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">OpenCL software driver version string.
-Follows a vendor-specific format.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_PROFILE<span class="footnote"><br>[The platform profile returns the profile that is implemented by the OpenCL framework. If the platform profile
-returned is FULL_PROFILE, the OpenCL framework will support devices that are FULL_PROFILE and may also
-support devices that are EMBEDDED_PROFILE. The compiler must be available for all devices i.e.
-CL_DEVICE_COMPILER_AVAILABLE is CL_TRUE. If the platform profile returned is
-EMBEDDED_PROFILE, then devices that are only EMBEDDED_PROFILE are supported.]<br></span></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">[OpenCL profile string. Returns the profile
-name supported by the device. The profile
-name returned can be one of the following
-strings:
-<br>
-<br>
-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).
-<br>
-<br>
-EMBEDDED_PROFILE - if the device supports the OpenCL embedded profile.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_VERSION</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">OpenCL version string. Returns the
-OpenCL version supported by the device.
-This version string has the following
-format:
-<br>
-<br>
-<em>OpenCL&lt;space&gt;&lt;major_version.minor_v
-ersion&gt;&lt;space&gt;&lt;vendor-specific
-information&gt;</em>
-<br>
-<br>
-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>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">char[]</p></td>
-<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:
-<br>
-<br>
-<em>OpenCL&lt;space&gt;C&lt;space&gt;&lt;major_versio
-n.minor_version&gt;&lt;space&gt;&lt;vendor-
-specific information&gt;</em>
-<br>
-<br>
-The major_version.minor_version value
-returned must be 2.0 if
-CL_DEVICE_VERSION is OpenCL 2.0.
-<br>
-<br>
-The major_version.minor_version value
-returned must be 1.2 if
-CL_DEVICE_VERSION is OpenCL 1.2.
-<br>
-<br>
-The major_version.minor_version value
-returned must be 1.1 if
-CL_DEVICE_VERSION is OpenCL 1.1.
-<br>
-<br>
-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>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_EXTENSIONS</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 a space separated list of extension
-names (the extension 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:
-<br>
-<br>
-<strong>cl_khr_int64_base_atomics
-cl_khr_int64_extended_atomics
-cl_khr_fp16
-cl_khr_gl_sharing
-cl_khr_gl_event
-cl_khr_d3d10_sharing
-cl_khr_dx9_media_sharing
-cl_khr_d3d11_sharing
-cl_khr_gl_depth_images
-cl_khr_gl_msaa_sharing
-cl_khr_initialize_memory
-cl_khr_terminate_context
-cl_khr_spir
-cl_khr_srgb_image_writes</strong>
-<br>
-<br>
-<strong>The following approved Khronos extension
-names must be returned by all devices that
-support OpenCL C 2.0:</strong>
-<br>
-<br>
-<strong>cl_khr_byte_addressable_store
-cl_khr_fp64 (for backward compatibility if
-double precision is supported)
-cl_khr_3d_image_writes
-cl_khr_image2d_from_buffer
-cl_khr_depth_images</strong>
-<br>
-<br>
-Please refer to the OpenCL 2.0 Extension
-Specification for a detailed description of
-these extensions.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_PRINTF_ 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">Maximum size in bytes of the
-internal buffer that holds the output of printf calls from a kernel.
-The minimum value for the FULL profile is 1 MB.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_PREFERRED_ INTEROP_USER_SYNC</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_TRUE if the devices preference is for the
-user to be responsible for synchronization, when sharing memory objects
-between OpenCL and other APIs such as DirectX, CL_FALSE if the device /
-implementation has a performant path for performing synchronization of
-memory object shared between OpenCL and other APIs such as DirectX.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_PARENT_ DEVICE</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_device_id</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Returns the cl_device_id of
-the parent device to which this sub-device belongs. If <em>device</em> is a
-root-level device, a NULL value is returned.</p></td>
-</tr>
-<tr>
-<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.
-<br>
-<br>
-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>. The is an array of
-cl_device_partition_property values drawn
-from the following list:
-<br>
-<br>
-CL_DEVICE_PARTITION_EQUALLY
-CL_DEVICE_PARTITION_BY_COUNTS
-CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN
-<br>
-<br>
-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>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_PARTITION_ AFFINITY_DOMAIN</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_device_affinity_ domain</p></td>
-<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:
-<br>
-<br>
-CL_DEVICE_AFFINITY_DOMAIN_NUMA
-CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE
-CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE
-CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE
-CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE
-CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITI
-ONABLE
-<br>
-<br>
-If the device does not support any affinity
-domains, a value of 0 will be returned.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_PARTITION_ TYPE</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 properties argument specified
-in <strong>clCreateSubDevices</strong> if device is a sub-
-device. In the case where the properties
-argument to <strong>clCreateSubDevices</strong> is
-CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN ,
-CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITI
-ONABLE , the affinity domain used to
-perform the partition will be returned. This
-can be one of the following values:
-<br>
-<br>
-CL_DEVICE_AFFINITY_DOMAIN_NUMA
-CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE
-CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE
-CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE
-CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE
-<br>
-<br>
-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
-<em>param_value</em> points to.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_REFERENCE_ COUNT</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 <em>device</em> reference
-count. If the device is a root-level device, a reference count of one
-is returned.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_SVM_ CAPABILITIES</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_device_svm_ capabilities</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Describes the various shared virtual
-memory (a.k.a. SVM) memory allocation
-types the device supports. 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:
-<br>
-<br>
-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>.
-<br>
-<br>
-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>.
-<br>
-<br>
-CL_DEVICE_SVM_FINE_GRAIN_SYSTEM
-– Support for sharing the host’s entire
-virtual memory including memory
-allocated using <strong>malloc</strong>. Memory
-consistency is guaranteed at
-synchronization points.
-<br>
-<br>
-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.
-<br>
-<br>
-The mandated minimum capability is
-CL_DEVICE_SVM_COARSE_GRAIN_BUFFER.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_PREFERRED_ PLATFORM_ATOMIC_ 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">Returns the value representing the
-preferred alignment in bytes for OpenCL 2.0 fine-grained SVM atomic
-types. This query can return 0 which indicates that the preferred
-alignment is aligned to the natural size of the type.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_PREFERRED_ GLOBAL_ATOMIC_ 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">Returns the value representing the
-preferred alignment in bytes for OpenCL 2.0 atomic types to global
-memory. This query can return 0 which indicates that the preferred
-alignment is aligned to the natural size of the type.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_PREFERRED_ LOCAL_ATOMIC_ 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">Returns the
-value representing the preferred alignment in bytes for OpenCL 2.0
-atomic types to local memory. This query can return 0 which indicates
-that the preferred alignment is aligned to the natural size of the type.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_MAX_ NUM_SUB_GROUPS</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 sub-groups
-in a work-group that a device is capable of executing on a single
-compute unit, for any given kernel-instance running on the device. The
-minimum value is 1. (Refer also to <strong>clGetKernelSubGroupInfo</strong>.)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_DEVICE_SUB_ GROUP_INDEPENDENT_ FORWARD_PROGRESS</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_TRUE
-if this device supports independent forward progress of sub-groups,
-CL_FALSE otherwise. If cl_khr_subgroups is supported by the device this
-must return CL_TRUE.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>The device queries described in <em>table 4.3</em> should return the same
-information for a root-level device i.e. a device returned by
-<strong>clGetDeviceIDs</strong> and any sub-devices created from this device except for
-the following queries:</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="literalblock">
-<div class="content monospaced">
-<pre>CL_DEVICE_GLOBAL_MEM_CACHE_SIZE
-CL_DEVICE_BUILT_IN_KERNELS
-CL_DEVICE_PARENT_DEVICE
-CL_DEVICE_PARTITION_TYPE
-CL_DEVICE_REFERENCE_COUNT</pre>
-</div></div>
-<div class="paragraph"><p><strong>clGetDeviceInfo</strong> returns CL_SUCCESS if the function is executed
-successfully. Otherwise, it returns one of the following errors:</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_INVALID_DEVICE if
-<em>device</em> is not valid.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if
-<em>param_name</em> is not one of the supported values or if size in bytes
-specified by <em>param_value_size_is &lt; size of return type as specified in
-_table 4.3</em> and <em>param_value</em> is not a NULL value or if <em>param_name</em> is
-a value that is available as an extension and the corresponding
-extension is 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 class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetDeviceAndHostTimer(cl_device_id device,
-                               cl_ulong* device_timestamp,
-                               cl_ulong* host_timestamp)</pre>
-</div></div>
-<div class="paragraph"><p>Returns a reasonably synchronized pair of timestamps from the device
-timer and the host timer as seen by <em>device</em>. Implementations may need
-to execute this query with a high latency in order to provide reasonable
-synchronization of the timestamps. The host timestamp and device
-timestamp returned by this function and <strong>clGetHostTimer</strong> each have an
-implementation defined timebase. The timestamps will always be in their
-respective timebases regardless of which query function is used. The
-timestamp returned from <strong>clGetEventProfilingInfo</strong> for an event on a
-device and a device timestamp queried from the same device will always
-be in the same timebase.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>device</em> is a device returned by <strong>clGetDeviceIDs</strong>.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>device_timestamp</em> will be updated with the value of the device timer in
-nanoseconds. The resolution of the timer is the same as the device
-profiling timer returned by *clGetDeviceInfo*and the
-CL_DEVICE_PROFILING_TIMER_RESOLUTION query.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>host_timestamp</em> will be updated with the value of the host timer in
-nanoseconds at the closest possible point in time to that at which
-<em>device_timer</em> was returned. The resolution of the timer may be queried
-via <strong>clGetPlatformInfo</strong> and the flag CL_PLATFORM_HOST_TIMER_RESOLUTION.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><strong>clGetDeviceAndHostTimer</strong> will return CL_SUCCESS with a time value in
-<em>host_timestamp</em> if provided. 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 a valid OpenCL device.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if
-<em>host_timestamp</em> or _device_timestamp_is NULL.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetHostTimer(cl_device_id device,
-                      cl_ulong* host_timestamp)</pre>
-</div></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Return the current value of the host clock as seen by <em>device</em>. This
-value is in the same timebase as the host_timestamp returned from
-<strong>clGetDeviceAndHostTimer</strong>. The implementation will return with as low a
-latency as possible to allow a correlation with a subsequent application
-sampled time. The host timestamp and device timestamp returned by this
-function and <strong>clGetDeviceAndHostTimer</strong> each have an implementation
-defined timebase. The timestamps will always be in their respective
-timebases regardless of which query function is used. The timestamp
-returned from <strong>clGetEventProfilingInfo</strong> for an event on a device and a
-device timestamp queried from the same device will always be in the same
-timebase.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>device</em> is a device returned by <strong>clGetDeviceIDs</strong>.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>host_timestamp</em> will be updated with the value of the current timer in
-nanoseconds. The resolution of the timer may be queried via
-<strong>clGetPlatformInfo</strong> and the flag CL_PLATFORM_HOST_TIMER_RESOLUTION.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><strong>clGetHostTimer</strong> will return CL_SUCCESS with a time value in
-<em>host_timestamp</em> if provided. 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 a valid OpenCL device.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if
-_host_timestamp_is NULL.
-</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="_partitioning_a_device">4.3. Partitioning a Device</h3>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clCreateSubDevices(cl_device_id in_device,
-                          const cl_device_partition_property *properties,
-                          cl_uint num_devices,
-                          cl_device_id *out_devices,
-                          cl_uint *num_devices_ret)</pre>
-</div></div>
-<div class="paragraph"><p>creates an array of sub-devices that each reference a non-intersecting
-set of compute units within in_device, according to a partition scheme
-given by <em>properties</em>. The output sub-devices may be used in every way
-that the root (or parent) device can be used, including creating
-contexts, building programs, further calls to <strong>clCreateSubDevices</strong> and
-creating command-queues. When a command-queue is created against a
-sub-device, the commands enqueued on the queue are executed only on the
-sub-device.</p></div>
-<div class="paragraph"><p><em>in_device</em> is the device to be partitioned.</p></div>
-<div class="paragraph"><p><em>properties</em> specifies how <em>in_device</em> is to be partition described by a
-partition name and its corresponding value. Each partition name is
-immediately followed by the corresponding desired value. The list is
-terminated with 0. The list of supported partitioning schemes is
-described in <em>table 4.4</em>. Only one of the listed partitioning schemes
-can be specified in <em>properties</em>.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 4. <em>List of supported partition schemes by</em> <strong>clCreateSubDevices</strong></caption>
-<col style="width:30%;">
-<col style="width:20%;">
-<col style="width:50%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_device_partition_property enum</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Partition value</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"><strong>CL_DEVICE_PARTITION_ EQUALLY</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">Split the aggregate device
-into as many smaller aggregate devices as can be created, each
-containing <em>n</em> compute units. The value <em>n</em> is passed as the value
-accompanying this property. If <em>n</em> does not divide evenly into
-CL_DEVICE_PARTITION_MAX_COMPUTE_UNITS, then the remaining compute units
-are not used.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DEVICE_PARTITION_ BY_COUNTS</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 property is followed by a
-CL_DEVICE_PARTITION_BY_COUNTS_LIST_END
-terminated list of compute 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.
-<br>
-<br>
-The number of non-zero count entries in the list may
-not exceed
-CL_DEVICE_PARTITION_MAX_SUB_DEVICES.
-<br>
-<br>
-The total number of compute units specified may not
-exceed
-CL_DEVICE_PARTITION_MAX_COMPUTE_UNITS .</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DEVICE_PARTITION_ BY_AFFINITY_DOMAIN</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_device_affinity_ domain</p></td>
-<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:
-<br>
-<br>
-CL_DEVICE_AFFINITY_DOMAIN_NUMA – Split the
-device into sub-devices comprised of compute units
-that share a NUMA node.
-<br>
-<br>
-CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE –
-Split the device into sub-devices comprised of
-compute units that share a level 4 data cache.
-<br>
-<br>
-CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE –
-Split the device into sub-devices comprised of
-compute units that share a level 3 data cache.
-<br>
-<br>
-CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE –
-Split the device into sub-devices comprised of
-compute units that share a level 2 data cache.
-<br>
-<br>
-CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE –
-Split the device into sub-devices comprised of
-compute units that share a level 1 data cache.
-<br>
-<br>
-CL_DEVICE_AFFINITY_ DOMAIN_NEXT_ PARTITIO
-NABLE – 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.
-<br>
-<br>
-The user may determine what happened by calling
-clGetDeviceInfo( CL_DEVICE_PARTITION_TYPE )
-on the sub-devices.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><em>num_devices</em> is the size of memory pointed to by <em>out_devices</em>
-specified as the number of cl_device_id entries.</p></div>
-<div class="paragraph"><p><em>out_devices</em> is the buffer where the OpenCL sub-devices will be
-returned. If <em>out_devices_is NULL, this argument is ignored. If
-_out_devices</em> is not NULL, <em>num_devices</em> must be greater than or equal
-to the number of sub-devices that <em>device</em> may be partitioned into
-according to the partitioning scheme specified in <em>properties</em>.</p></div>
-<div class="paragraph"><p><em>num_devices_ret</em> returns the number of sub-devices that <em>device</em> may be
-partitioned into according to the partitioning scheme specified in
-<em>properties</em>. If <em>num_devices_ret</em> is NULL, it is ignored.</p></div>
-<div class="paragraph"><p><strong>clCreateSubDevices</strong> returns CL_SUCCESS if the partition is created
-successfully. Otherwise, it returns a NULL value with the following
-error values returned in <em>errcode_ret</em>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_INVALID_DEVICE if
-<em>in_device</em> is not valid.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if values
-specified in <em>properties</em> are not valid or if values specified in
-<em>properties</em> are valid but not supported by the device.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if
-<em>out_devices</em> is not NULL and <em>num_devices</em> is less than the number of
-sub-devices created by the partition scheme.
-</p>
-</li>
-<li>
-<p>
-CL_DEVICE_PARTITION_FAILED
-if the partition name is supported by the implementation but in_device
-could not be further partitioned.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_DEVICE_PARTITION_COUNT if the partition name specified in
-<em>properties</em> is CL_DEVICE_PARTITION_BY_COUNTS and the number of
-sub-devices requested exceeds CL_DEVICE_PARTITION_MAX_SUB_DEVICES or the
-total number of compute units requested exceeds
-CL_DEVICE_PARTITION_MAX_COMPUTE_UNITS for <em>in_device</em>, or the number of
-compute units requested for one or more sub-devices is less than zero or
-the number of sub-devices requested exceeds
-CL_DEVICE_PARTITION_MAX_COMPUTE_UNITS for <em>in_device</em>.
-</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>A few examples that describe how to specify partition properties in
-<em>properties</em> argument to <strong>clCreateSubDevices</strong> are given below:</p></div>
-<div class="paragraph"><p>To partition a device containing 16 compute units into two sub-devices,
-each containing 8 compute units, pass the following in <em>properties</em>:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>{ CL_DEVICE_PARTITION_EQUALLY, 8, 0 }</pre>
-</div></div>
-<div class="paragraph"><p>To partition a device with four compute units into two sub-devices with
-one sub-device containing 3 compute units and the other sub-device 1
-compute unit, pass the following in properties argument:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>{ CL_DEVICE_PARTITION_BY_COUNTS,
-  3, 1, CL_DEVICE_PARTITION_BY_COUNTS_LIST_END, 0 }</pre>
-</div></div>
-<div class="paragraph"><p>To split a device along the outermost cache line (if any), pass the
-following in properties argument:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>{ CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN,
-  CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE,
-  0 }</pre>
-</div></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clRetainDevice(cl_device_id device)</pre>
-</div></div>
-<div class="paragraph"><p>increments the <em>device</em> reference count if <em>device</em> is a valid
-sub-device created by a call to <strong>clCreateSubDevices</strong>. If <em>device</em> is a
-root level device i.e. a cl_device_id returned by <strong>clGetDeviceIDs</strong>, the
-<em>device</em> reference count remains unchanged. <strong>clRetainDevice</strong> returns
-CL_SUCCESS if the function is executed successfully or the device is a
-root-level device. 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 a valid sub-device created by a call to
-<strong>clCreateSubDevices</strong>.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clReleaseDevice(cl_device_id device)</pre>
-</div></div>
-<div class="paragraph"><p>decrements the <em>device</em> reference count if device is a valid sub-device
-created by a call to <strong>clCreateSubDevices</strong>. If <em>device</em> is a root level
-device i.e. a cl_device_id returned by <strong>clGetDeviceIDs</strong>, the <em>device</em>
-reference count remains unchanged. <strong>clReleaseDevice</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 a valid sub-device created by a call to
-<strong>clCreateSubDevices</strong>.
-</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>After the <em>device</em> reference count becomes zero and all the objects
-attached to <em>device</em> (such as command-queues) are released, the <em>device</em>
-object is deleted. Using this function to release a reference that was
-not obtained by creating the object or by calling <strong>clRetainDevice</strong>
-causes undefined behavior.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_contexts">4.4. Contexts</h3>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_context clCreateContext(const cl_context_properties *properties,
-                           cl_uint num_devices,
-                           const cl_device_id *devices,
-                           void(CL_CALLBACK *pfn_notify)
-                               (const char *errinfo,
-                               const void *private_info,
-                               size_t cb,
-                               void *user_data),
-                           void *user_data,
-                           cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p>creates an OpenCL context. An OpenCL context is created with one or
-more devices. Contexts are used by the OpenCL runtime for managing
-objects such as command-queues, memory, program and kernel objects and
-for executing kernels on one or more devices specified in the context.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>properties_specifies a list of context property names 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 _table 4.5.</em> <em>properties</em> can be
-NULL in which case the platform that is selected is
-implementation-defined.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 5. <em>List of supported properties by</em> <strong>clCreateContext</strong></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_context_properties enum</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Property value</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"><strong>CL_CONTEXT_PLATFORM</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_platform_id</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Specifies the platform to use.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_CONTEXT_INTEROP_ USER_SYNC</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">Specifies whether the user is
-responsible for synchronization
-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.
-<br>
-<br>
-If CL_CONTEXT_INTEROP_USER_
-SYNC is not specified, a default of
-CL_FALSE is assumed.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><em>num_devices</em> is the number of devices specified in the <em>devices</em>
-argument.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>devices</em> is a pointer to a list of unique deviceslink<span class="footnote"><br>[Duplicate devices specified in <em>devices</em> are ignored.]<br></span>
-returned by <strong>clGetDeviceIDs</strong> or sub-devices created by
-<strong>clCreateSubDevices</strong> for a platform.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>pfn_notify</em> is a callback function that can be registered by the
-application. This callback function will be used by the OpenCL
-implementation to report information on errors during context creation
-as well as errors that occur at runtime in this context. This callback
-function may be called asynchronously by the OpenCL implementation. It
-is the applications responsibility to ensure that the callback function
-is thread-safe. The parameters to this callback function are:</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<em>errinfo</em> is a pointer to
-an error string.
-</p>
-</li>
-<li>
-<p>
-<em>private_info</em> and <em>cb</em>
-represent a pointer to binary data that is returned by the OpenCL
-implementation that can be used to log additional information helpful in
-debugging the error.
-</p>
-</li>
-<li>
-<p>
-<em>user_data</em> is a pointer
-to user supplied data.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>If <em>pfn_notify</em> is NULL, no callback function is registered.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">There are a number of cases where error notifications need to be
-delivered due to an error that occurs outside a context. Such
-notifications may not be delivered through the <em>pfn_notify</em> callback.
- Where these notifications go is implementation-defined.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>user_data</em> will be passed as the <em>user_data</em> argument when <em>pfn_notify</em>
-is called. <em>user_data</em> can be NULL.</p></div>
-<div class="paragraph"><p> </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> </p></div>
-<div class="paragraph"><p><strong>clCreateContext</strong> returns a valid non-zero context and <em>errcode_ret</em> is
-set to CL_SUCCESS if the context is created successfully. Otherwise, it
-returns a NULL value with the following error values returned in
-<em>errcode_ret</em>:</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_INVALID_PLATFORM if
-<em>properties_is NULL and no platform could be selected or if platform
-value specified in _properties</em> is not a valid platform.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_INVALID_PROPERTY if
-context property name in <em>properties</em> is not a supported property name,
-if the value specified for a supported property name is not valid, or if
-the same property name is specified more than once.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if
-_devices_is NULL.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if
-_num_devices_is equal to zero.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if
-<em>pfn_notify</em> is NULL but <em>user_data</em> is not NULL.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_INVALID_DEVICE if
-<em>devices</em> contains an invalid device.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_DEVICE_NOT_AVAILABLE if
-a device in <em>devices</em> is currently not available even though the device
-was returned by <strong>clGetDeviceIDs</strong>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_OUT_OF_RESOURCES if
-there is a failure to allocate resources required by the OpenCL
-implementation on the device.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<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<span class="footnote"><br>[<strong>clCreateContextfromType</strong> may return all or a subset of the actual physical devices present in the platform and
-that match device_type.]<br></span></p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_context clCreateContextFromType(const cl_context_properties *properties,
-                                   cl_device_type device_type,
-                                   void(CL_CALLBACK *pfn_notify)
-                                       (const char *errinfo,
-                                        const void *private_info,
-                                        size_t cb,
-                                        void *user_data),
-                                   void *user_data,
-                                   cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p>creates an OpenCL context from a device type that identifies the
-specific device(s) to use. Only devices that are returned by
-<strong>clGetDeviceIDs</strong> for <em>device_type</em> are used to create the context. The
-context does not reference any sub-devices that may have been created
-from these devices.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>properties_specifies a list of context property names and their
-corresponding values. Each property name is immediately followed by the
-corresponding desired value. The list of supported properties is
-described in _table 4.5</em>. <em>properties</em> can also be NULL in which case
-the platform that is selected is implementation-defined.</p></div>
-<div class="paragraph"><p><em>device_type</em> is a bit-field that identifies the type of device and is
-described in <em>table 4.2</em> in <em>section 4.2</em>.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>pfn_notify</em> and <em>user_data</em> are described in <strong>clCreateContext</strong>.</p></div>
-<div class="paragraph"><p> </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> </p></div>
-<div class="paragraph"><p><strong>clCreateContextFromType</strong> returns a valid non-zero context and
-<em>errcode_ret</em> is set to CL_SUCCESS if the context is created
-successfully. Otherwise, it returns a NULL value with the following
-error values returned in <em>errcode_ret</em>:</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_INVALID_PLATFORM if
-<em>properties_is NULL and no platform could be selected or if platform
-value specified in _properties</em> is not a valid platform.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_PROPERTY if
-context property name in <em>properties</em> is not a supported property name,
-if the value specified for a supported property name is not valid, or if
-the same property name is specified more than once.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if
-<em>pfn_notify</em> is NULL but <em>user_data</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_DEVICE_TYPE if
-<em>device_type</em> is not a valid value.
-</p>
-</li>
-<li>
-<p>
-CL_DEVICE_NOT_AVAILABLE if
-no devices that match <em>device_type</em> and property values specified in
-<em>properties</em> are currently available.
-</p>
-</li>
-<li>
-<p>
-CL_DEVICE_NOT_FOUND if no
-devices that match <em>device_type</em> and property values specified in
-<em>properties</em> were found.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clRetainContext(cl_context context)</pre>
-</div></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>increments the <em>context</em> reference count. <strong>clRetainContext</strong> returns
-CL_SUCCESS if the function is executed successfully. Otherwise, it
-returns one of the following errors:</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_INVALID_CONTEXT if
-<em>context</em> is not a valid OpenCL context.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_OUT_OF_RESOURCES if
-there is a failure to allocate resources required by the OpenCL
-implementation on the device.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<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> </p></div>
-<div class="paragraph"><p><strong>clCreateContext*and*clCreateContextFromType</strong> perform an implicit
-retain. This is very helpful for 3<sup>rd</sup> party libraries, which typically
-get a context passed to them by the application. However, it is
-possible that the application may delete the context without informing
-the library. Allowing functions to attach to (i.e. retain) and release
-a context solves the problem of a context being used by a library no
-longer being valid.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clReleaseContext(cl_context context)</pre>
-</div></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>decrements the <em>context</em> reference count. <strong>clReleaseContext</strong> returns
-CL_SUCCESS if the function is executed successfully. Otherwise, it
-returns one of the following errors:</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_INVALID_CONTEXT if
-<em>context</em> is not a valid OpenCL context.
-</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> </p></div>
-<div class="paragraph"><p>After the <em>context</em> reference count becomes zero and all the objects
-attached to <em>context</em> (such as memory objects, command-queues) are
-released, the <em>context</em> is deleted. Using this function to release a
-reference that was not obtained by creating the object or by calling
-*clRetainContext*causes undefined behavior.
-The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetContextInfo(cl_context context,
-                        cl_context_info param_name,
-                        size_t param_value_size,
-                        void *param_value,
-                        size_t *param_value_size_ret)</pre>
-</div></div>
-<div class="paragraph"><p>can be used to query information about a context.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>context</em> specifies the OpenCL context being queried.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>param_name</em> is an enumeration constant that specifies the information
-to query.</p></div>
-<div class="paragraph"><p> </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 NULL, it is ignored.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>param_value_size</em> specifies the size in bytes of memory pointed to by
-<em>param_value</em>. This size must be greater than or equal to the size of
-return type as described in <em>table 4.6</em>.</p></div>
-<div class="paragraph"><p> </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 NULL, it is
-ignored.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The list of supported <em>param_name_values and the information returned in
-_param_value</em> by <strong>clGetContextInfo</strong> is described in <em>table 4.6</em>.</p></div>
-<div class="paragraph"><div class="title">List of supported param_names</div><p>by <strong>clGetContextInfo</strong></p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_context_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return Type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Information returned in param_value</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_CONTEXT_ REFERENCE_COUNT</strong> <span class="footnote"><br>[The reference count returned should be considered immediately stale. It is unsuitable for general use in
-applications. This feature is provided for identifying memory leaks.]<br></span></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">Return the <em>context</em> reference
-count.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_CONTEXT_NUM_DEVICES</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">Return the number of devices in <em>context</em>.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_CONTEXT_DEVICES</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_device_id[]</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return the list of devices and
-sub-devices in <em>context</em>.</p></td>
-</tr>
-<tr>
-<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>.
-<br>
-<br>
-If the <em>properties</em> argument specified
-in <strong>clCreateContext</strong> or
-<strong>clCreateContextFromType</strong> used
-to create <em>context</em> is not NULL , the
-implementation must return the
-values specified in the properties
-argument.
-<br>
-<br>
-If the <em>properties</em> argument specified
-in <strong>clCreateContext</strong> or
-<strong>clCreateContextFromType</strong> used
-to create <em>context</em> is NULL , 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 a context
-property value of 0 (where 0 is used
-to terminate the context properties
-list) in the memory that
-<em>param_value</em> points to.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><strong>clGetContextInfo</strong> returns CL_SUCCESS if the function is executed
-successfully. Otherwise, it returns one of the following errors:</p></div>
-<div class="paragraph"><p> </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>param_name</em> is not one of the supported values or if size in bytes
-specified by <em>param_value_size_is &lt; size of return type as specified in
-_table 4.6</em> and <em>param_value</em> is not a NULL value.
-</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> </p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_the_opencl_runtime">5. The OpenCL Runtime</h2>
-<div class="sectionbody">
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>In this section we describe the API calls that manage OpenCL objects
-such as command-queues, memory objects, program objects, kernel objects
-for kernel functions in a program and calls that allow you to enqueue
-commands to a command-queue such as executing a kernel, reading, or
-writing a memory object.</p></div>
-<div class="sect2">
-<h3 id="_command_queues">5.1. Command Queues</h3>
-<div class="paragraph"><p>OpenCL objects such as memory, program and kernel objects are created
-using a context. Operations on these objects are performed using a
-command-queue. The command-queue can be used to queue a set of
-operations (referred to as commands) in order. Having multiple
-command-queues allows applications to queue multiple independent
-commands without requiring synchronization. Note that this should work
-as long as these objects are not being shared. Sharing of objects
-across multiple command-queues will require the application to perform
-appropriate synchronization. This is described in <em>Appendix A</em>.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_command_queue clCreateCommandQueueWithProperties(
-    cl_context context,
-    cl_device_id device,
-    const cl_queue_properties *properties,
-    cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p>creates a host or device command-queue on a specific 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  or
-be a root device with the same device type as specified when <em>context</em>
-is created using *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>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 6. <em>List of supported cl_queue_properties values and description</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Queue Properties</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Property Value</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"><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
-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>
-CL_QUEUE_ON_DEVICE – Indicates that this is a device queue. If
-<br>
-<br>
-CL_QUEUE_ON_DEVICE is set, CL_QUEUE_OUT_OF_ORDER_ EXEC_MODE_ENABLE<span class="footnote"><br>[Only out-of-order device queues are supported.]<br></span>: must also be set.
-<br>
-<br>
-CL_QUEUE_ ON_DEVICE_DEFAULT<span class="footnote"><br>[The application must create the default device queue if any kernels containing calls to get_default_queue are
-enqueued. There can only be one default device queue for each device within a context.
-clCreateCommandQueueWithProperties with CL_QUEUE_PROPERTIES set to CL_QUEUE_ON_DEVICE or
-CL_QUEUE_ON_DEVICE_DEFAULT will return the default device queue that has already been created and
-increment its retain count by 1.]<br></span>:–indicates that this is the default device
-queue. This can only be used with CL_QUEUE_ON_DEVICE.
-<br>
-<br>
-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.
-<br>
-<br>
-This can only be specified if CL_QUEUE_ON_DEVICE is set in CL_QUEUE_PROPERTIES.
-This must be a value &#8656; CL_DEVICE_QUEUE_ ON_DEVICE_MAX_SIZE.
-<br>
-<br>
-For best performance, this should be &#8656; CL_DEVICE_QUEUE_ ON_DEVICE_PREFERRED_SIZE.
-<br>
-<br>
-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>
-</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>clCreateCommandQueueWithProperties</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
-_context_is not a valid context.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_DEVICE if
-<em>device_is not a valid device or is not associated with _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 class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clSetDefaultDeviceCommandQueue(cl_context context,
-                                      cl_device_id device,
-                                      cl_command_queue command_queue)</pre>
-</div></div>
-<div class="paragraph"><p>replaces the default command queue on the <em>device</em>.</p></div>
-<div class="paragraph"><p><strong>clSetDefaultDeviceCommandQueue</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_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_COMMAND_QUEUE if <em>command_queue</em> is not a valid command-queue for <em>device</em>.
-</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><strong>clSetDefaultDeviceCommandQueue</strong> may be used to replace a default device
-command queue created with <strong>clCreateCommandQueueWithProperties</strong> and the
-CL_QUEUE_ON_DEVICE_DEFAULT flag.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clRetainCommandQueue(cl_command_queue command_queue)</pre>
-</div></div>
-<div class="paragraph"><p>increments the <em>command_queue</em> reference count. <strong>clRetainCommandQueue</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_COMMAND_QUEUE if <em>command_queue</em> is not a valid command-queue.
-</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><strong>clCreateCommandQueueWithProperties</strong> performs an implicit retain. This
-is very helpful for 3<sup>rd</sup> party libraries, which typically get a
-command-queue passed to them by the application. However, it is
-possible that the application may delete the command-queue without
-informing the library. Allowing functions to attach to (i.e. retain)
-and release a command-queue solves the problem of a command-queue being
-used by a library no longer being valid.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clReleaseCommandQueue(cl_command_queue command_queue)</pre>
-</div></div>
-<div class="paragraph"><p>decrements the <em>command_queue</em> reference count. <strong>clReleaseCommandQueue</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_COMMAND_QUEUE if <em>command_queue</em> is not a valid command-queue.
-</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>After the <em>command_queue</em> reference count becomes zero and all commands
-queued to <em>command_queue</em> have finished (eg. kernel-instances, memory
-object updates etc.), the command-queue is deleted.</p></div>
-<div class="paragraph"><p><strong>clReleaseCommandQueue</strong> performs an implicit flush to issue any
-previously queued OpenCL commands in <em>command_queue</em>. Using this
-function to release a reference that was not obtained by creating the
-object or by calling <strong>clRetainCommandQueue</strong> causes undefined behavior.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetCommandQueueInfo(cl_command_queue command_queue,
-                             cl_command_queue_info param_name,
-                             size_t param_value_size,
-                             void *param_value,
-                             size_t *param_value_size_ret)</pre>
-</div></div>
-<div class="paragraph"><p>can be used to query information about a command-queue.</p></div>
-<div class="paragraph"><p><em>command_queue</em> specifies the command-queue being queried.</p></div>
-<div class="paragraph"><p><em>param_name</em> specifies the information to query.</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 NULL, 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 &gt;= size of return type
-as described in <em>table 5.2</em>. If <em>param_value</em> is NULL, it is ignored.</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 NULL, it is
-ignored.</p></div>
-<div class="paragraph"><p>The list of supported <em>param_name_values and the information returned in
-_param_value</em> by <strong>clGetCommandQueueInfo</strong> is described in <em>table 5.2</em>.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 7. <em>List of supported param_names by clGetCommandQueueInfo</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_command_queue_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return Type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Information returned in
-param_value</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_QUEUE_CONTEXT</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_context</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return the context specified when the
-command-queue is created.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_QUEUE_DEVICE</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_device_id</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return the device specified when the
-command-queue is created.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">*CL_QUEUE_REFERENCE_COUNT<span class="footnote"><br>[The reference count returned should be considered immediately stale. It is unsuitable for general use in
-applications. This feature is provided for identifying memory leaks.]<br></span>:</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">Return the command-queue reference count.</p></td>
-</tr>
-<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">Return the currently specified properties for the
-command-queue. These properties are specified by the value associated
-with the CL_COMMAND_QUEUE_ PROPERTIES passed in <em>properties</em> argument in
-<strong>clCreateCommandQueueWithProperties.</strong></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">Return the currently specified size for the
-device command-queue. This query is only supported for device command
-queues.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_QUEUE_DEVICE_DEFAULT</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_command_queue</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return the current default
-command queue for the underlying device.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><strong>clGetCommandQueueInfo</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_COMMAND_QUEUE if <em>command_queue</em> is not a valid command-queue.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if <em>param_name</em> is not one of the supported values or if size in bytes
-specified by <em>param_value_size_is &lt; size of return type as specified in
-_table 5.2</em> and <em>param_value</em> is not a NULL value.
-</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><strong>NOTE</strong></p></div>
-<div class="paragraph"><p>It is possible that a device(s) becomes unavailable after a context and
-command-queues that use this device(s) have been created and commands
-have been queued to command-queues. In this case the behavior of OpenCL
-API calls that use this context (and command-queues) are considered to
-be implementation-defined. The user callback function, if specified,
-when the context is created can be used to record appropriate
-information in the <em>errinfo</em>, <em>private_info</em> arguments passed to the
-callback function when the device becomes unavailable.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_buffer_objects">5.2. Buffer Objects</h3>
-<div class="paragraph"><p>A <em>buffer</em> object stores a one-dimensional collection of elements.
-Elements of a <em>buffer</em> object can be a scalar data type (such as an int,
-float), vector data type, or a user-defined structure.</p></div>
-<div class="sect3">
-<h4 id="_creating_buffer_objects">5.2.1. Creating Buffer Objects</h4>
-<div class="paragraph"><p>A <strong>buffer object</strong> is created using the following function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_mem clCreateBuffer(cl_context context,
-                      cl_mem_flags flags,
-                      size_t size,
-                      void *host_ptr,
-                      cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p><em>context</em> is a valid OpenCL context used to create the buffer object.</p></div>
-<div class="paragraph"><p><em>flags</em> is a bit-field that is used to specify allocation and usage
-information such as the memory arena that should be used to allocate the
-buffer object and how it will be used. <em>Table 5.3</em> describes the
-possible values for <em>flags</em>. If value specified for <em>flags</em> is 0, the
-default is used which is CL_MEM_READ_WRITE.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 8. <em>List of supported cl_mem_flags values</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_mem_flags</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"><strong>CL_MEM_READ_WRITE</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">This flag specifies that the memory object will be read
-and written by a kernel. This is the default.</p></td>
-</tr>
-<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.
-<br>
-<br>
-Reading from a buffer or image object created with
-CL_MEM_WRITE_ONLY inside a kernel is undefined.
-<br>
-<br>
-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.
-<br>
-<br>
-Writing to a buffer or image object created with
-CL_MEM_READ_ONLY inside a kernel is undefined.
-<br>
-<br>
-CL_MEM_READ_WRITE or CL_MEM_WRITE_ONLY
-and CL_MEM_READ_ONLY are mutually exclusive.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_USE_HOST_PTR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">This flag is valid only if host_ptr is not NULL. 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.
-<br>
-<br>
-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.
-<br>
-<br>
-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.
-<br>
-<br>
-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>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">This flag is valid only if host_ptr is not NULL. If
-specified, it indicates that the application wants the
-OpenCL implementation to allocate memory for the
-memory object and copy the 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 clCreateBuffer or
-clCreateImage operation returns.
-<br>
-<br>
-CL_MEM_COPY_HOST_PTR and
-CL_MEM_USE_HOST_PTR are mutually exclusive.
-<br>
-<br>
-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>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_HOST_WRITE_ONLY</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">This flag specifies that the host will only
-write to the memory object (using OpenCL APIs that enqueue a write or a
-map for write). This can be used to optimize write access from the host
-(e.g. enable write-combined allocations for memory objects for devices
-that communicate with the host over a system bus such as PCIe).</p></td>
-</tr>
-<tr>
-<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).
-<br>
-<br>
-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.
-<br>
-<br>
-CL_MEM_HOST_WRITE_ONLY or
-CL_MEM_HOST_READ_ONLY and
-CL_MEM_HOST_NO_ACCESS are mutually
-exclusive.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><em>size</em> is the size in bytes of the buffer memory object to be allocated.</p></div>
-<div class="paragraph"><p><em>host_ptr</em> is a pointer to the buffer data that may already be allocated
-by the application. The size of the buffer that <em>host_ptr</em> points to
-must be &gt;= <em>size</em> bytes.</p></div>
-<div class="paragraph"><p>The user is responsible for ensuring that data passed into and out of
-OpenCL images are natively aligned relative to the start of the buffer
-as per kernel language or IL requirements. OpenCL buffers created with
-CL_MEM_USE_HOST_PTR need to provide an appropriately aligned host memory
-pointer that is aligned to the data types used to access these buffers
-in a kernel(s).</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>If <strong>clCreateBuffer</strong> is called with a pointer returned by <strong>clSVMAlloc</strong> as
-its <em>host_ptr</em> argument, and CL_MEM_USE_HOST_PTR is set in its <em>flags</em>
-argument, <strong>clCreateBuffer</strong> will succeed and return a valid non-zero
-buffer object as long as the <em>size</em> argument to <strong>clCreateBuffer</strong> is no
-larger than the <em>size</em> argument passed in the original <strong>clSVMAlloc</strong>
-call. The new buffer object returned has the shared memory as the
-underlying storage. Locations in the buffers underlying shared memory
-can be operated on using atomic operations to the devices level of
-support as defined in the memory model.</p></div>
-<div class="paragraph"><p><strong>clCreateBuffer</strong> returns a valid non-zero buffer object and
-<em>errcode_ret</em> is set to CL_SUCCESS if the buffer 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 _context_is not a valid context.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if values specified in <em>flags_are not valid as defined in _table 5.3</em>.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_BUFFER_SIZE if <em>size</em> is 0<span class="footnote"><br>[Implementations may return CL_INVALID_BUFFER_SIZE if size is greater than
-CL_DEVICE_MAX_MEM_ALLOC_SIZE value specified in <em>table 4.3</em> for all devices in context. ]<br></span>:.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_HOST_PTR if <em>host_ptr</em> is NULL and CL_MEM_USE_HOST_PTR or CL_MEM_COPY_HOST_PTR are
-set in <em>flags</em> or if <em>host_ptr</em> is not NULL but CL_MEM_COPY_HOST_PTR or
-CL_MEM_USE_HOST_PTR are not set in <em>flags</em>.
-</p>
-</li>
-<li>
-<p>
-CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for buffer 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 class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_mem clCreateSubBuffer(cl_mem buffer,
-                         cl_mem_flags flags,
-                         cl_buffer_create_type buffer_create_type,
-                         const void *buffer_create_info,
-                         cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p>can be used to create a new buffer object (referred to as a sub-buffer
-object) from an existing buffer object.</p></div>
-<div class="paragraph"><p><em>buffer</em> must be a valid buffer object and cannot be a sub-buffer
-object.</p></div>
-<div class="paragraph"><p><em>flags</em> is a bit-field that is used to specify allocation and usage
-information about the sub-buffer memory object being created and is
-described in <em>table 5.3</em>. 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>. 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>. If CL_MEM_COPY_HOST_PTR is specified in the memory
-access qualifier values associated with <em>buffer</em> it does not imply any
-additional copies when the sub-buffer is created from <em>buffer</em>. If the
-CL_MEM_HOST_WRITE_ONLY, CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_NO_ACCESS
-values are not specified in <em>flags</em>, they are inherited from the
-corresponding memory access qualifiers associated with <em>buffer</em>.</p></div>
-<div class="paragraph"><p><em>buffer_create_type_and _buffer_create_info</em> describe the type of buffer
-object to be created. The list of supported values for
-<em>buffer_create_type</em> and corresponding descriptor that
-<em>buffer_create_info</em> points to is described in <em>table 5.4</em>.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 9. <em>List of supported names and values in clCreateSubBuffer</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_buffer_create_type</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"><strong>CL_BUFFER_CREATE_TYPE_REGION</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Create a buffer object that represents a specific
-region in buffer.
-<br>
-<br>
-buffer_create_info is a pointer to the following
-structure:
-typedef struct _cl_buffer_region {
-size_t origin;
-size_t size;
-} cl_buffer_region;
-<br>
-<br>
-(origin, size) defines the offset and size in bytes in
-buffer.
-<br>
-<br>
-If buffer is created with
-CL_MEM_USE_HOST_PTR, the host_ptr
-associated with the buffer object returned is
-host_ptr + origin.
-<br>
-<br>
-The buffer object returned references the data store
-allocated for buffer and points to a specific region
-given by (origin, size) in this data store.
-<br>
-<br>
-CL_INVALID_VALUE is returned in errcode_ret if
-the region specified by (origin, size) is out of
-bounds in buffer.
-<br>
-<br>
-CL_INVALID_BUFFER_SIZE if size is 0.
-<br>
-<br>
-CL_MISALIGNED_SUB_BUFFER_OFFSET is
-returned in errcode_ret if there are no devices in
-context associated with buffer for which the origin
-value is aligned to the
-CL_DEVICE_MEM_BASE_ADDR_ALIGN value.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><strong>clCreateSubBuffer</strong> returns CL_SUCCESS if the function is executed
-successfully. Otherwise, it returns one of the following errors in
-<em>errcode_ret</em>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_INVALID_MEM_OBJECT if
-<em>buffer</em> is not a valid buffer object or is a sub-buffer object.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if
-<em>buffer</em> was created with CL_MEM_WRITE_ONLY and <em>flags</em> specifies
-CL_MEM_READ_WRITE or CL_MEM_READ_ONLY, or if <em>buffer</em> was created with
-CL_MEM_READ_ONLY and <em>flags</em> specifies CL_MEM_READ_WRITE or
-CL_MEM_WRITE_ONLY, or if <em>flags</em> specifies CL_MEM_USE_HOST_PTR or
-CL_MEM_ALLOC_HOST_PTR or CL_MEM_COPY_HOST_PTR.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if
-<em>buffer</em> was created with CL_MEM_HOST_WRITE_ONLY and <em>flags</em> specify
-CL_MEM_HOST_READ_ONLY, or if <em>buffer</em> was created with
-CL_MEM_HOST_READ_ONLY and <em>flags</em> specify CL_MEM_HOST_WRITE_ONLY, or if
-<em>buffer</em> was created with CL_MEM_HOST_NO_ACCESS and <em>flags</em> specify
-CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_WRITE_ONLY.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if value
-specified in _buffer_create_type_is not valid.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_VALUE if
-value(s) specified in <em>buffer_create_info</em> (for a given
-<em>buffer_create_type</em>) is not valid or if <em>buffer_create_info</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_BUFFER_SIZE if <em>size</em> is 0.
-</p>
-</li>
-<li>
-<p>
-CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for sub-buffer 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 class="paragraph"><p>NOTE:</p></div>
-<div class="paragraph"><p>Concurrent reading from, writing to and copying between both a buffer
-object and its sub-buffer object(s) is undefined. Concurrent reading
-from, writing to and copying between overlapping sub-buffer objects
-created with the same buffer object is undefined. Only reading from
-both a buffer object and its sub-buffer objects or reading from multiple
-overlapping sub-buffer objects is defined.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_reading_writing_and_copying_buffer_objects">5.2.2. Reading, Writing and Copying Buffer Objects</h4>
-<div class="paragraph"><p>The following functions enqueue commands to read from a buffer object to
-host memory or write to a buffer object from host memory.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueReadBuffer(cl_command_queue command_queue,
-                           cl_mem buffer,
-                           cl_bool blocking_read,
-                           size_t offset,
-                           size_t size,
-                           void *ptr,
-                           cl_uint num_events_in_wait_list,
-                           const cl_event *event_wait_list,
-                           cl_event *event)</pre>
-</div></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueWriteBuffer(cl_command_queue command_queue,
-                            cl_mem buffer,
-                            cl_bool blocking_write,
-                            size_t offset,
-                            size_t size,
-                            const void *ptr,
-                            cl_uint num_events_in_wait_list,
-                            const cl_event *event_wait_list,
-                            cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p><em>command_queue</em> is a valid host command-queue in which the read / write
-command will be queued. <em>command_queue</em> and <em>buffer</em> must be created
-with the same OpenCL context.</p></div>
-<div class="paragraph"><p><em>buffer</em> refers to a valid buffer object.</p></div>
-<div class="paragraph"><p><em>blocking_read</em> and <em>blocking_write</em> indicate if the read and write
-operations are <em>blocking</em> or <em>non-blocking</em>.</p></div>
-<div class="paragraph"><p>If <em>blocking_read</em> is CL_TRUE i.e. the read command is blocking,
-<strong>clEnqueueReadBuffer</strong> does not return until the buffer data has been
-read and copied into memory pointed to by <em>ptr</em>.</p></div>
-<div class="paragraph"><p>If <em>blocking_read</em> is CL_FALSE i.e. the read command is non-blocking,
-<strong>clEnqueueReadBuffer</strong> queues a non-blocking read command and returns.
-The contents of the buffer that <em>ptr</em> points to cannot be used until the
-read command has completed. The <em>event</em> argument returns an event
-object which can be used to query the execution status of the read
-command. When the read command has completed, the contents of the
-buffer that _ptr_points to__can be used by the application.</p></div>
-<div class="paragraph"><p>If <em>blocking_write_is CL_TRUE, the OpenCL implementation copies the data
-referred to by _ptr</em> and enqueues the write operation in the
-command-queue. The memory pointed to by <em>ptr</em> can be reused by the
-application after the <strong>clEnqueueWriteBuffer</strong> call returns.</p></div>
-<div class="paragraph"><p>If <em>blocking_write</em> is CL_FALSE, the OpenCL implementation will use
-<em>ptr</em> to perform a non-blocking write. As the write is non-blocking the
-implementation can return immediately. The memory pointed to by <em>ptr</em>
-cannot be reused by the application after the call returns. The <em>event</em>
-argument returns an event object which can be used to query the
-execution status of the write command. When the write command has
-completed, the memory pointed to by <em>ptr</em> can then be reused by the
-application.</p></div>
-<div class="paragraph"><p><em>offset</em> is the offset in bytes in the buffer object to read from or
-write to.</p></div>
-<div class="paragraph"><p><em>size</em> is the size in bytes of data being read or written.</p></div>
-<div class="paragraph"><p><em>ptr</em> is the pointer to buffer in host memory where data is to be read
-into or to be written from.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</p></div>
-<div class="paragraph"><p><em>event</em> returns an event object that identifies this particular read /
-write command and can be used to query or queue a wait for this
-particular command to complete. <em>event</em> can be NULL 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 NULL, 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>clEnqueueReadBuffer</strong> and <strong>clEnqueueWriteBuffer</strong> return 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_COMMAND_QUEUE if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_CONTEXT if the context associated with <em>command_queue</em> and <em>buffer</em> are not the same or
-if the context associated with <em>command_queue</em> and events in
-<em>event_wait_list</em> are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>buffer</em> is not a valid buffer object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if the
-region being read or written specified by (<em>offset</em>, <em>size</em>) is out of
-bounds or if <em>ptr</em> is a NULL value.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_MISALIGNED_SUB_BUFFER_OFFSET if <em>buffer</em> is a sub-buffer object and
-<em>offset</em> specified when the sub-buffer object is created is not aligned
-to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with
-<em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read and write
-operations are blocking and the execution status of any of the events in
-<em>event_wait_list</em> is a negative integer value.
-</p>
-</li>
-<li>
-<p>
-     CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for data store associated with <em>buffer</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_INVALID_OPERATION if
-<strong>clEnqueueReadBuffer</strong> is called on <em>buffer</em> which has been created with
-CL_MEM_HOST_WRITE_ONLY or CL_MEM_HOST_NO_ACCESS.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-<strong>clEnqueueWriteBuffer</strong> is called on <em>buffer</em> which has been created with
-CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_NO_ACCESS.
-</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 following functions enqueue commands to read a 2D or 3D rectangular
-region from a buffer object to host memory or write a 2D or 3D
-rectangular region to a buffer object from host memory.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueReadBufferRect(cl_command_queue command_queue,
-                               cl_mem buffer,
-                               cl_bool blocking_read,
-                               const size_t *buffer_origin,
-                               const size_t *host_origin,
-                               const size_t *region,
-                               size_t buffer_row_pitch,
-                               size_t buffer_slice_pitch,
-                               size_t host_row_pitch,
-                               size_t host_slice_pitch,
-                               void *ptr,
-                               cl_uint num_events_in_wait_list,
-                               const cl_event *event_wait_list,
-                               cl_event *event)</pre>
-</div></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueWriteBufferRect(cl_command_queue command_queue,
-                                cl_mem buffer,
-                                cl_bool blocking_write,
-                                const size_t *buffer_origin,
-                                const size_t *host_origin,
-                                const size_t *region,
-                                size_t buffer_row_pitch,
-                                size_t buffer_slice_pitch,
-                                size_t host_row_pitch,
-                                size_t host_slice_pitch,
-                                const void *ptr,
-                                cl_uint num_events_in_wait_list,
-                                const cl_event *event_wait_list,
-                                cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p><em>command_queue</em> refers is a valid host command-queue in which the read /
-write command will be queued. <em>command_queue</em> and <em>buffer</em> must be
-created with the same OpenCL context.</p></div>
-<div class="paragraph"><p><em>buffer</em> refers to a valid buffer object.</p></div>
-<div class="paragraph"><p><em>blocking_read</em> and <em>blocking_write</em> indicate if the read and write
-operations are <em>blocking</em> or <em>non-blocking</em>.</p></div>
-<div class="paragraph"><p>If <em>blocking_read</em> is CL_TRUE i.e. the read command is blocking,
-<strong>clEnqueueReadBufferRect</strong> does not return until the buffer data has been
-read and copied into memory pointed to by <em>ptr</em>.</p></div>
-<div class="paragraph"><p>If <em>blocking_read</em> is CL_FALSE i.e. the read command is non-blocking,
-<strong>clEnqueueReadBufferRect</strong> queues a non-blocking read command and
-returns. The contents of the buffer that <em>ptr</em> points to cannot be used
-until the read command has completed. The <em>event</em> argument returns an
-event object which can be used to query the execution status of the read
-command. When the read command has completed, the contents of the
-buffer that _ptr_points to__can be used by the application.</p></div>
-<div class="paragraph"><p>If <em>blocking_write_is CL_TRUE, the OpenCL implementation copies the data
-referred to by _ptr</em> and enqueues the write operation in the
-command-queue. The memory pointed to by <em>ptr</em> can be reused by the
-application after the <strong>clEnqueueWriteBufferRect</strong> call returns.</p></div>
-<div class="paragraph"><p>If <em>blocking_write</em> is CL_FALSE, the OpenCL implementation will use
-<em>ptr</em> to perform a non-blocking write. As the write is non-blocking the
-implementation can return immediately. The memory pointed to by <em>ptr</em>
-cannot be reused by the application after the call returns. The <em>event</em>
-argument returns an event object which can be used to query the
-execution status of the write command. When the write command has
-completed, the memory pointed to by <em>ptr</em> can then be reused by the
-application.</p></div>
-<div class="paragraph"><p><em>buffer_origin</em> defines the (<em>x</em>, <em>y</em>, <em>z</em>) offset in the memory region
-associated with <em>buffer</em>. For a 2D rectangle region, the <em>z</em> value
-given by <em>buffer_origin</em>[2] should be 0. The offset in bytes is
-computed as <em>buffer_origin</em>[2] * <em>buffer_slice_pitch</em><br>
-<em>buffer_origin</em>[1] * <em>buffer_row_pitch</em> + <em>buffer_origin</em>[0].</p></div>
-<div class="paragraph"><p><em>host_origin</em> defines the (<em>x</em>, <em>y</em>, <em>z</em>) offset in the memory region
-pointed to by <em>ptr</em>. For a 2D rectangle region, the <em>z</em> value given by
-<em>host_origin</em>[2] should be 0. The offset in bytes is computed as
-<em>host_origin</em>[2] * <em>host_slice_pitch</em> + <em>host_origin</em>[1] *
-<em>host_row_pitch</em> + <em>host_origin</em>[0].</p></div>
-<div class="paragraph"><p><em>region_defines the_</em>(<em>width</em> in bytes, <em>height</em> in rows_,_ <em>depth_in
-slices) of the 2D or 3D rectangle being read or written. For a 2D
-rectangle copy, the _depth</em> value given by <em>region</em>[2] should be 1. The
-values in region cannot be 0.</p></div>
-<div class="paragraph"><p><em>buffer_row_pitch</em> is the length of each row in bytes to be used for the
-memory region associated with <em>buffer</em>. If <em>buffer_row_pitch</em> is 0,
-<em>buffer_row_pitch</em> is computed as <em>region</em>[0].</p></div>
-<div class="paragraph"><p><em>buffer_slice_pitch</em> is the length of each 2D slice in bytes to be used
-for the memory region associated with <em>buffer</em>. If <em>buffer_slice_pitch</em>
-is 0, <em>buffer_slice_pitch</em> is computed as <em>region</em>[1] *
-<em>buffer_row_pitch</em>.</p></div>
-<div class="paragraph"><p><em>host_row_pitch</em> is the length of each row in bytes to be used for the
-memory region pointed to by <em>ptr</em>. If <em>host_row_pitch</em> is 0,
-<em>host_row_pitch</em> is computed as <em>region</em>[0].</p></div>
-<div class="paragraph"><p><em>host_slice_pitch</em> is the length of each 2D slice in bytes to be used
-for the memory region pointed to by <em>ptr</em>. If <em>host_slice_pitch</em> is 0,
-<em>host_slice_pitch</em> is computed as <em>region</em>[1] * <em>host_row_pitch</em>.</p></div>
-<div class="paragraph"><p><em>ptr</em> is the pointer to buffer in host memory where data is to be read
-into or to be written from.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</p></div>
-<div class="paragraph"><p><em>event</em> returns an event object that identifies this particular read /
-write command and can be used to query or queue a wait for this
-particular command to complete. <em>event</em> can be NULL 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 NULL, 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>clEnqueueReadBufferRect</strong> and <strong>clEnqueueWriteBufferRect</strong> return
-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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if the
-context associated with <em>command_queue</em> and <em>buffer</em> are not the same or
-if the context associated with <em>command_queue</em> and events in
-<em>event_wait_list</em> are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>buffer</em> is not a valid buffer object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if the
-region being read or written specified by (<em>buffer_origin</em>, <em>region,
-buffer_row_pitch, buffer_slice_pitch</em>) is out of bounds.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if <em>ptr</em>
-is a NULL value.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if any
-<em>region</em> array element is 0.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>buffer_row_pitch</em> is not 0 and is less than <em>region</em>[0].
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>host_row_pitch</em> is not 0 and is less than <em>region</em>[0].
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>buffer_slice_pitch</em> is not 0 and is less than <em>region</em>[1] *
-<em>buffer_row_pitch</em> and not a multiple of <em>buffer_row_pitch</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>host_slice_pitch</em> is not 0 and is less than <em>region</em>[1] *
-<em>host_row_pitch</em> and not a multiple of <em>host_row_pitch</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_MISALIGNED_SUB_BUFFER_OFFSET if <em>buffer</em> is a sub-buffer object and
-<em>offset</em> specified when the sub-buffer object is created is not aligned
-to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with
-<em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read and write
-operations are blocking and the execution status of any of the events in
-<em>event_wait_list</em> is a negative integer value.

-</p>
-</li>
-<li>
-<p>
-     CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for data store associated with <em>buffer</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_INVALID_OPERATION if
-<strong>clEnqueueReadBufferRect</strong> is called on <em>buffer</em> which has been created
-with CL_MEM_HOST_WRITE_ONLY or CL_MEM_HOST_NO_ACCESS.
-</p>
-</li>
-<li>
-<p>
-     CL_INVALID_OPERATION if
-<strong>clEnqueueWriteBufferRect</strong> is called on <em>buffer</em> which has been created
-with CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_NO_ACCESS.
-</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>NOTE:</p></div>
-<div class="paragraph"><p>Calling <strong>clEnqueueReadBuffer</strong> to read a region of the buffer object with
-the <em>ptr</em> argument value set to <em>host_ptr</em> + <em>offset</em>, where <em>host_ptr</em>
-is a pointer to the memory region specified when the buffer object being
-read is created with CL_MEM_USE_HOST_PTR, must meet the following
-requirements in order to avoid undefined behavior:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-All commands that use this buffer object or a memory object (buffer or
-image) created from this buffer object have finished execution before
-the read command begins execution.
-</p>
-</li>
-<li>
-<p>
-The buffer object or memory objects created from this buffer object
-are not mapped.
-</p>
-</li>
-<li>
-<p>
-The buffer object or memory objects created from this buffer object
-are not used by any command-queue until the read command has finished
-execution.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Calling <strong>clEnqueueReadBufferRect</strong> to read a region of the buffer object
-with the <em>ptr</em> argument value set to <em>host_ptr</em> and <em>host_origin</em>,
-<em>buffer_origin</em> values are the same, where <em>host_ptr</em> is a pointer to
-the memory region specified when the buffer object being read is created
-with CL_MEM_USE_HOST_PTR, must meet the same requirements given above
-for <strong>clEnqueueReadBuffer</strong>.</p></div>
-<div class="paragraph"><p>Calling <strong>clEnqueueWriteBuffer</strong> to update the latest bits in a region of
-the buffer object with the <em>ptr</em> argument value set to <em>host_ptr</em><br>
-<em>offset</em>, where <em>host_ptr</em> is a pointer to the memory region specified
-when the buffer object being written is created with
-CL_MEM_USE_HOST_PTR, must meet the following requirements in order to
-avoid undefined behavior:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The host memory region given by (<em>host_ptr</em> + <em>offset</em>, <em>cb</em>) contains
-the latest bits when the enqueued write command begins execution.
-</p>
-</li>
-<li>
-<p>
-The buffer object or memory objects created from this buffer object
-are not mapped.
-</p>
-</li>
-<li>
-<p>
-The buffer object or memory objects created from this buffer object
-are not used by any command-queue until the write command has finished
-execution.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Calling*clEnqueueWriteBufferRect* to update the latest bits in a region
-of the buffer object with the <em>ptr</em> argument value set to <em>host_ptr</em> and
-<em>host_origin</em>, <em>buffer_origin</em> values are the same, where <em>host_ptr</em> is
-a pointer to the memory region specified when the buffer object being
-written is created with CL_MEM_USE_HOST_PTR, must meet the following
-requirements in order to avoid undefined behavior:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The host memory region given by (<em>buffer_origin region</em>) contains the
-latest bits when the enqueued write command begins execution.
-</p>
-</li>
-<li>
-<p>
-The buffer object or memory objects created from this buffer object
-are not mapped.
-</p>
-</li>
-<li>
-<p>
-The buffer object or memory objects created from this buffer object
-are not used by any command-queue until the write command has finished
-execution.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueCopyBuffer(cl_command_queue command_queue,
-                           cl_mem src_buffer,
-                           cl_mem dst_buffer,
-                           size_t src_offset,
-                           size_t dst_offset,
-                           size_t size,
-                           cl_uint num_events_in_wait_list,
-                           const cl_event *event_wait_list,
-                           cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to copy a buffer object identified by <em>src_buffer</em> to
-another buffer object identified by <em>dst_buffer</em>.</p></div>
-<div class="paragraph"><p><em>command_queue</em> refers to a host command-queue in which the copy command
-will be queued. The OpenCL context associated with <em>command_queue</em>,
-<em>src_buffer</em> and <em>dst_buffer</em> must be the same.</p></div>
-<div class="paragraph"><p><em>src_offset</em> refers to the offset where to begin copying data from
-<em>src_buffer</em>.</p></div>
-<div class="paragraph"><p><em>dst_offset</em> refers to the offset where to begin copying data into
-<em>dst_buffer</em>.</p></div>
-<div class="paragraph"><p><em>size</em> refers to the size in bytes to copy.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</p></div>
-<div class="paragraph"><p><em>event</em> returns an event object that identifies this particular copy
-command and can be used to query or queue a wait for this particular
-command to complete. <em>event</em> can be NULL 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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead. If the
-<em>event_wait_list</em> and the <em>event</em> arguments are not NULL, 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>clEnqueueCopyBuffer</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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if the
-context associated with <em>command_queue</em>, <em>src_buffer</em> and <em>dst_buffer</em>
-are not the same or if the context associated with <em>command_queue</em> and
-events in <em>event_wait_list</em> are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>src_buffer</em> and <em>dst_buffer</em> are not valid buffer objects.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>src_offset</em>, <em>dst_offset</em>, <em>size</em>, <em>src_offset</em> + <em>size</em> or
-<em>dst_offset</em> + <em>size</em> require accessing elements outside the
-<em>src_buffer</em> and <em>dst_buffer</em> buffer objects respectively.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_MISALIGNED_SUB_BUFFER_OFFSET if <em>src_buffer</em> is a sub-buffer object
-and <em>offset</em> specified when the sub-buffer object is created is not
-aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated
-with <em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     
-CL_MISALIGNED_SUB_BUFFER_OFFSET if <em>dst_buffer</em> is a sub-buffer object
-and <em>offset</em> specified when the sub-buffer object is created is not
-aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated
-with <em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_MEM_COPY_OVERLAP if
-<em>src_buffer</em> and <em>dst_buffer</em> are the same buffer or sub-buffer object
-and the source and destination regions overlap or if <em>src_buffer</em> and
-<em>dst_buffer</em> are different sub-buffers of the same associated buffer
-object and they overlap. The regions overlap if <em>src_offset</em> &#8656;
-<em>dst_offset</em> &#8656; <em>src_offset</em> + <em>size</em>  1 or if <em>dst_offset</em> &#8656;
-<em>src_offset</em> &#8656; <em>dst_offset</em> + <em>size</em>  1.
-</p>
-</li>
-<li>
-<p>
-     CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for data store associated with <em>src_buffer</em> or <em>dst_buffer</em>.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueCopyBufferRect(cl_command_queue command_queue,
-                               cl_mem src_buffer,
-                               cl_mem dst_buffer,
-                               const size_t *src_origin,
-                               const size_t *dst_origin,
-                               const size_t *region,
-                               size_t src_row_pitch,
-                               size_t src_slice_pitch,
-                               size_t dst_row_pitch,
-                               size_t dst_slice_pitch,
-                               cl_uint num_events_in_wait_list,
-                               const cl_event *event_wait_list,
-                               cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to copy a 2D or 3D rectangular region from the buffer
-object identified by <em>src_buffer_to a 2D or 3D region in the buffer
-object identified by _dst_buffer</em>. Copying begins at the source offset
-and destination offset which are computed as described below in the
-description for <em>src_origin</em> and <em>dst_origin</em>. Each byte of the
-region&#8217;s width is copied from the source offset to the destination
-offset. After copying each width, the source and destination offsets
-are incremented by their respective source and destination row pitches.
-After copying each 2D rectangle, the source and destination offsets are
-incremented by their respective source and destination slice pitches.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">If <em>src_buffer</em> and <em>dst_buffer</em> are the same buffer object,
-<em>src_row_pitch</em> must equal <em>dst_row_pitch</em> and <em>src_slice_pitch</em> must
-equal <em>dst_slice_pitch</em>.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p><em>command_queue</em> refers to the host command-queue in which the copy
-command will be queued. The OpenCL context associated with
-<em>command_queue</em>, <em>src_buffer</em> and <em>dst_buffer</em> must be the same.</p></div>
-<div class="paragraph"><p><em>src_origin</em> defines the (<em>x</em>, <em>y</em>, <em>z</em>) offset in the memory region
-associated with <em>src_buffer</em>. For a 2D rectangle region, the <em>z</em> value
-given by <em>src_origin</em>[2] should be 0. The offset in bytes is computed
-as <em>src_origin</em>[2] * <em>src_slice_pitch</em> + <em>src_origin</em>[1] *
-<em>src_row_pitch</em> + <em>src_origin</em>[0].</p></div>
-<div class="paragraph"><p><em>dst_origin</em> defines the (<em>x</em>, <em>y</em>, <em>z</em>) offset in the memory region
-associated with <em>dst_buffer</em>. For a 2D rectangle region, the <em>z</em> value
-given by <em>dst_origin</em>[2] should be 0. The offset in bytes is computed
-as <em>dst_origin</em>[2] * <em>dst_slice_pitch</em> + <em>dst_origin</em>[1] *
-<em>dst_row_pitch</em> + <em>dst_origin</em>[0].</p></div>
-<div class="paragraph"><p><em>region_defines the_</em>(<em>width</em> in bytes, <em>height</em> in rows_,_ <em>depth_in
-slices) of the 2D or 3D rectangle being copied. For a 2D rectangle, the
-_depth</em> value given by <em>region</em>[2] should be 1. The values in region
-cannot be 0.</p></div>
-<div class="paragraph"><p><em>src_row_pitch</em> is the length of each row in bytes to be used for the
-memory region associated with <em>src_buffer</em>. If <em>src_row_pitch</em> is 0,
-<em>src_row_pitch</em> is computed as <em>region</em>[0].</p></div>
-<div class="paragraph"><p><em>src_slice_pitch</em> is the length of each 2D slice in bytes to be used for
-the memory region associated with <em>src_buffer</em>. If <em>src_slice_pitch</em> is
-0, <em>src_slice_pitch</em> is computed as <em>region</em>[1] * <em>src_row_pitch</em>.</p></div>
-<div class="paragraph"><p><em>dst_row_pitch</em> is the length of each row in bytes to be used for the
-memory region associated with <em>dst_buffer</em>. If <em>dst_row_pitch</em> is 0,
-<em>dst_row_pitch</em> is computed as <em>region</em>[0].</p></div>
-<div class="paragraph"><p><em>dst_slice_pitch</em> is the length of each 2D slice in bytes to be used for
-the memory region associated with <em>dst_buffer</em>. If <em>dst_slice_pitch</em> is
-0, <em>dst_slice_pitch</em> is computed as <em>region</em>[1] * <em>dst_row_pitch</em>.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</p></div>
-<div class="paragraph"><p><em>event</em> returns an event object that identifies this particular copy
-command and can be used to query or queue a wait for this particular
-command to complete. <em>event</em> can be NULL 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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead. If the
-<em>event_wait_list</em> and the <em>event</em> arguments are not NULL, 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>clEnqueueCopyBufferRect</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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if the
-context associated with <em>command_queue</em>, <em>src_buffer</em> and <em>dst_buffer</em>
-are not the same or if the context associated with <em>command_queue</em> and
-events in <em>event_wait_list</em> are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>src_buffer</em> and <em>dst_buffer</em> are not valid buffer objects.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-(<em>src_origin, region, src_row_pitch, src_slice_pitch</em>) or (<em>dst_origin,
-region, dst_row_pitch, dst_slice_pitch</em>) require accessing elements
-outside the <em>src_buffer</em> and <em>dst_buffer</em> buffer objects respectively.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if any
-<em>region</em> array element is 0.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>src_row_pitch</em> is not 0 and is less than <em>region</em>[0].
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>dst_row_pitch</em> is not 0 and is less than <em>region</em>[0].
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>src_slice_pitch</em> is not 0 and is less than <em>region</em>[1] *
-<em>src_row_pitch</em> or if <em>src_slice_pitch</em> is not 0 and is not a multiple
-of <em>src_row_pitch</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>dst_slice_pitch</em> is not 0 and is less than <em>region</em>[1] *
-<em>dst_row_pitch</em> or if <em>dst_slice_pitch</em> is not 0 and is not a multiple
-of <em>dst_row_pitch</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>src_buffer</em> and <em>dst_buffer</em> are the same buffer object and
-<em>src_slice_pitch</em> is not equal to <em>dst_slice_pitch</em> and <em>src_row_pitch</em>
-is not equal to <em>dst_row_pitch</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_MEM_COPY_OVERLAP if
-<em>src_buffer</em> and <em>dst_buffer</em> are the same buffer or sub-buffer object
-and the source and destination regions overlap or if <em>src_buffer</em> and
-<em>dst_buffer</em> are different sub-buffers of the same associated buffer
-object and they overlap. Refer to Appendix D for details on how to
-determine if source and destination regions overlap.
-</p>
-</li>
-<li>
-<p>
-     
-CL_MISALIGNED_SUB_BUFFER_OFFSET if <em>src_buffer</em> is a sub-buffer object
-and <em>offset</em> specified when the sub-buffer object is created is not
-aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated
-with <em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_MISALIGNED_SUB_BUFFER_OFFSET if <em>dst_buffer</em> is a sub-buffer object
-and <em>offset</em> specified when the sub-buffer object is created is not
-aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated
-with <em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for data store associated with <em>src_buffer</em> or <em>dst_buffer</em>.
-</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="sect3">
-<h4 id="_filling_buffer_objects">5.2.3. Filling Buffer Objects</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueFillBuffer(cl_command_queue command_queue,
-                           cl_mem buffer,
-                           const void *pattern,
-                           size_t pattern_size,
-                           size_t offset,
-                           size_t size,
-                           cl_uint num_events_in_wait_list,
-                           const cl_event *event_wait_list,
-                           cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to fill a buffer object with a pattern of a given
-pattern size. The usage information which indicates whether the memory
-object can be read or written by a kernel and/or the host and is given
-by the cl_mem_flags argument value specified when <em>buffer</em> is created is
-ignored by <strong>clEnqueueFillBuffer</strong>.</p></div>
-<div class="paragraph"><p><em>command_queue</em> refers to the host command-queue in which the fill
-command will be queued. The OpenCL context associated with
-<em>command_queue</em> and <em>buffer</em> must be the same.</p></div>
-<div class="paragraph"><p><em>buffer</em> is a valid buffer object.</p></div>
-<div class="paragraph"><p><em>pattern</em> is a pointer to the data pattern of size <em>pattern_size</em> in
-bytes. <em>pattern</em> will be used to fill a region in <em>buffer</em> starting at
-<em>offset</em> and is <em>size</em> bytes in size. The data pattern must be a scalar
-or vector integer or floating-point data type supported by OpenCL as
-described in <em>sections 6.1.1</em> and <em>6.1.2</em>. For example, if <em>buffer</em> is
-to be filled with a pattern of float4 values, then <em>pattern</em> will be a
-pointer to a cl_float4 value and <em>pattern_size</em> will be
-sizeof(cl_float4). The maximum value of <em>pattern_size</em> is the size of
-the largest integer or floating-point vector data type supported by the
-OpenCL device. The memory associated with <em>pattern</em> can be reused or
-freed after the function returns.</p></div>
-<div class="paragraph"><p><em>offset</em> is the location in bytes of the region being filled in <em>buffer</em>
-and must be a multiple of <em>pattern_size</em>.</p></div>
-<div class="paragraph"><p><em>size</em> is the size in bytes of region being filled in <em>buffer</em> and must
-be a multiple of <em>pattern_size</em>.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</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 NULL 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. <strong>clEnqueueBarrierWithWaitList</strong> can be used
-instead. If the <em>event_wait_list</em> and the <em>event</em> arguments are not
-NULL, 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>clEnqueueFillBuffer</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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if the
-context associated with <em>command_queue</em> and <em>buffer</em> are not the same or
-if the context associated with <em>command_queue</em> and events in
-<em>event_wait_list</em> are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>buffer</em> is not a valid buffer object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>offset</em> or <em>offset</em> + <em>size</em> require accessing elements outside the
-<em>buffer</em> buffer object respectively.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>pattern</em> is NULL or if <em>pattern_size</em> is 0 or if <em>pattern_size</em> is not
-one of {1, 2, 4, 8, 16, 32, 64, 128}.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>offset</em> and <em>size</em> are not a multiple of <em>pattern_size</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_MISALIGNED_SUB_BUFFER_OFFSET if <em>buffer</em> is a sub-buffer object and
-offset specified when the sub-buffer object is created is not aligned to
-CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with <em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     
-CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for data store associated with <em>buffer</em>.
-</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="sect3">
-<h4 id="_mapping_buffer_objects">5.2.4. Mapping Buffer Objects</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>void clEnqueueMapBuffer(cl_command_queue command_queue,
-                        cl_mem buffer,
-                        cl_bool blocking_map,
-                        cl_map_flags map_flags,
-                        size_t offset,
-                        size_t size,
-                        cl_uint num_events_in_wait_list,
-                        const cl_event *event_wait_list,
-                        cl_event *event,
-                        cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to map a region of the buffer object given by
-<em>buffer</em> into the host address space and returns a pointer to this
-mapped region.</p></div>
-<div class="paragraph"><p><em>command_queue</em> must be a valid host command-queue.</p></div>
-<div class="paragraph"><p><em>blocking_map</em> indicates if the map operation is <em>blocking</em> or
-<em>non-blocking</em>.</p></div>
-<div class="paragraph"><p>If <em>blocking_map</em> is CL_TRUE, <strong>clEnqueueMapBuffer</strong> does not return until
-the specified region in <em>buffer</em> is mapped into the host address space
-and the application can access the contents of the mapped region using
-the pointer returned by <strong>clEnqueueMapBuffer</strong>.</p></div>
-<div class="paragraph"><p>If <em>blocking_map</em> is CL_FALSE i.e. map operation is non-blocking, the
-pointer to the mapped region returned by <strong>clEnqueueMapBuffer</strong> cannot be
-used until the map command has completed. The <em>event</em> argument returns
-an event object which can be used to query the execution status of the
-map command. When the map command is completed, the application can
-access the contents of the mapped region using the pointer returned by
-<strong>clEnqueueMapBuffer</strong>.</p></div>
-<div class="paragraph"><p><em>map_flags</em> is a bit-field and is described in <em>table 5.5</em>.</p></div>
-<div class="paragraph"><p><em>buffer</em> is a valid buffer object. The OpenCL context associated with
-<em>command_queue</em> and <em>buffer</em> must be the same.</p></div>
-<div class="paragraph"><p><em>offset</em> and <em>size</em> are the offset in bytes and the size of the region
-in the buffer object that is being mapped.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</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 NULL 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 NULL, 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><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>clEnqueueMapBuffer</strong> will return a pointer to the mapped region. The
-<em>errcode_ret</em> is set to CL_SUCCESS.</p></div>
-<div class="paragraph"><p>A NULL pointer is returned otherwise with one of the following error
-values returned in <em>errcode_ret</em>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_INVALID_COMMAND_QUEUE
-if _command_queue_is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if
-context associated with <em>command_queue_and _buffer</em> are not the same or
-if the context associated with <em>command_queue</em> and events in
-<em>event_wait_list</em> are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>buffer</em> is not a valid buffer object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if region
-being mapped given by (<em>offset</em>, <em>size</em>) is out of bounds or if <em>size</em>
-is 0 or if values specified in _map_flags_are not valid.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_MISALIGNED_SUB_BUFFER_OFFSET if <em>buffer</em> is a sub-buffer object and
-<em>offset</em> specified when the sub-buffer object is created is not aligned
-to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for the device associated with
-<em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_MAP_FAILURE if there is
-a failure to map the requested region into the host address space. This
-error cannot occur for buffer objects created with CL_MEM_USE_HOST_PTR
-or CL_MEM_ALLOC_HOST_PTR.
-</p>
-</li>
-<li>
-<p>
-     CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the map operation is
-blocking and the execution status of any of the events in
-<em>event_wait_list</em> is a negative integer value.
-</p>
-</li>
-<li>
-<p>
-     CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for data store associated with <em>buffer</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-buffer_ has been created with CL_MEM_HOST_WRITE_ONLY or
-CL_MEM_HOST_NO_ACCESS and CL_MAP_READ is set in <em>map_flags</em> or if
-<em>buffer</em> has been created with CL_MEM_HOST_READ_ONLY or
-CL_MEM_HOST_NO_ACCESS and CL_MAP_WRITE or CL_MAP_WRITE_INVALIDATE_REGION
-is set in <em>map_flags</em>.
-</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>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-mapping would lead to overlapping regions being mapped for writing.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The pointer returned maps a region starting at <em>offset</em> and is at least
-<em>size</em> bytes in size. The result of a memory access outside this region
-is undefined.</p></div>
-<div class="paragraph"><p>If the buffer object is created with CL_MEM_USE_HOST_PTR set in
-<em>mem_flags</em>, the following will be true:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      The <em>host_ptr</em> specified
-in <strong>clCreateBuffer</strong>  to contain the latest bits in the
-region being mapped when the <strong>clEnqueueMapBuffer</strong> command has completed.
-</p>
-</li>
-<li>
-<p>
-      The pointer value returned
-by <strong>clEnqueueMapBuffer</strong> will be derived from the <em>host_ptr</em> specified
-when the buffer object is created.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Mapped buffer objects are unmapped using <strong>clEnqueueUnmapMemObject</strong>.
-This is described in <em>section 5.5.2</em>.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 10. <em>List of supported cl_map_flags values</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_map_flags</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"><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.
-<br>
-<br>
-The pointer returned by clEnqueueMapBuffer (clEnqueueMapImage) is guaranteed
-to contain the latest bits in the region being
-mapped when the clEnqueueMapBuffer (clEnqueueMapImage) 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.
-<br>
-<br>
-The pointer returned by
-clEnqueueMap{Buffer</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Image} is guaranteed
-to contain the latest bits in the region being
-mapped when the clEnqueueMapBuffer (clEnqueueMapImage) command has completed</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MAP_WRITE_INVALIDATE_REGION</strong></p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_image_objects">5.3. Image Objects</h3>
-<div class="paragraph"><p>An <em>image</em> object is used to store a one-, two- or three- dimensional
-texture, frame-buffer or image. The elements of an image object are
-selected from a list of predefined image formats. The minimum number of
-elements in a memory object is one.</p></div>
-<div class="sect3">
-<h4 id="_creating_image_objects">5.3.1. Creating Image Objects</h4>
-<div class="paragraph"><p>A <strong>1D image</strong>,<strong>1D image buffer, 1D image array</strong>,<strong>2D image</strong>,<strong>2D image
-array and 3D image object</strong> can be created using the following function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_mem clCreateImage(cl_context context,
-                     cl_mem_flags flags,
-                     const cl_image_format *image_format,
-                     const cl_image_desc *image_desc,
-                     void  *host_ptr,
-                     cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p><em>context</em> is a valid OpenCL context on which the image object is to be
-created.</p></div>
-<div class="paragraph"><p><em>flags</em> is a bit-field that is used to specify allocation and usage
-information about the image memory object being created and is described
-in <em>table 5.3</em>.</p></div>
-<div class="paragraph"><p>For all image types except CL_MEM_OBJECT_IMAGE1D_BUFFER, if value
-specified for <em>flags</em> is 0, the default is used which is
-CL_MEM_READ_WRITE.</p></div>
-<div class="paragraph"><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 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 corresponding memory
-access qualifiers associated with <em>mem_object</em>. If CL_MEM_COPY_HOST_PTR
-is specified in the memory access qualifier values associated with
-<em>mem_object</em> it does not imply any additional copies when the image is
-created from <em>mem_object</em>. If the CL_MEM_HOST_WRITE_ONLY,
-CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_NO_ACCESS values are not specified
-in <em>flags</em>, they are inherited from the corresponding memory access
-qualifiers associated with <em>mem_object</em>.</p></div>
-<div class="paragraph"><p><em>image_format</em> is a pointer to a structure that describes format
-properties of the image to be allocated. A 1D image buffer or 2D image
-can belink:#<em>msocom_12<a id="BA12"></a>  created from a buffer by specifying a
-buffer object in the _image_desc&#8594;mem_object</em>. A 2D image can be
-created from another 2D image object by specifyging an image object in
-the <em>image_desc&#8594;mem_object</em>. Refer to <em>section 5.3.1.1</em> for a detailed
-description of the image format descriptor.</p></div>
-<div class="paragraph"><p><em>image_desc</em> is a pointer to a structure that describes type and
-dimensions of the image to be allocated. Refer to <em>section 5.3.1.2</em> for
-a detailed description of the image descriptor.</p></div>
-<div class="paragraph"><p><em>host_ptr</em> is a pointer to the image data that may already be allocated
-by the application. It is only used to initialize the image, and can be
-freed after the call to <strong>clCreateImage</strong>. 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"
-style="
-width:100%;
-">
-<col style="width:50%;">
-<col style="width:50%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Image Type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Size of buffer that <em>host_ptr</em> points to</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_OBJECT_IMAGE1D</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&gt;= image_row_pitch</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_OBJECT_IMAGE1D_BUFFER</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&gt;= image_row_pitch</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_OBJECT_IMAGE2D</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&gt;= image_row_pitch * image_height</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_OBJECT_IMAGE3D</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&gt;= image_slice_pitch * image_depth</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_OBJECT_IMAGE1D_ARRAY</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&gt;= image_slice_pitch * image_array_size</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_OBJECT_IMAGE2D_ARRAY</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&gt;= image_slice_pitch * image_array_size</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>For a 3D image or 2D image array, the image data specified by <em>host_ptr</em>
-is stored as a linear sequence of adjacent 2D image slices or 2D images
-respectively. Each 2D image is a linear sequence of adjacent
-scanlines. Each scanline is a linear sequence of image elements.</p></div>
-<div class="paragraph"><p>For a 2D image, the image data specified by <em>host_ptr</em> is stored as a
-linear sequence of adjacent scanlines. Each scanline is a linear
-sequence of image elements.</p></div>
-<div class="paragraph"><p>For a 1D image array, the image data specified by <em>host_ptr</em> is stored
-as a linear sequence of adjacent 1D images. Each 1D image is stored as
-a single scanline which is a linear sequence of adjacent elements.</p></div>
-<div class="paragraph"><p>For 1D image or 1D image buffer, the image data specified by <em>host_ptr</em>
-is stored as a single scanline which is a linear sequence of adjacent
-elements.</p></div>
-<div class="paragraph"><p>Image elements are stored according to their image format as described
-in section 5.3.1.1</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>clCreateImage</strong> returns a valid non-zero image object created and the
-<em>errcode_ret</em> is set to CL_SUCCESS if the image 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
-_context_is not a valid context.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if values
-specified in _flags_are not valid.
-</p>
-</li>
-<li>
-<p>
- CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if values specified in
-<em>image_format_are not valid or if _image_format</em> is NULL.
-</p>
-</li>
-<li>
-<p>
- CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if a 2D image is created from a
-buffer and the row pitch and base address alignment does not follow the
-rules described for creating a 2D image from a buffer.
-</p>
-</li>
-<li>
-<p>
-  CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if a 2D image is created from a 2D
-image object and the rules described above are not followed.
-</p>
-</li>
-<li>
-<p>
-CL_INVALID_IMAGE_DESCRIPTOR if values specified in <em>image_desc_are not
-valid or if _image_desc</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_IMAGE_SIZE if
-image dimensions specified in <em>image_desc</em> exceed the maximum image
-dimensions described in <em>table 4.3</em> for all devices in_context_.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_HOST_PTR if
-<em>host_ptr</em> is NULL and CL_MEM_USE_HOST_PTR or CL_MEM_COPY_HOST_PTR are
-set in <em>flags</em> or if <em>host_ptr</em> is not NULL but CL_MEM_COPY_HOST_PTR or
-CL_MEM_USE_HOST_PTR are not set in <em>flags</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if an
-image is being created from another memory object (buffer or image)
-under one of the following circumstances: 1) <em>mem_object</em> was created
-with CL_MEM_WRITE_ONLY and <em>flags</em> specifies CL_MEM_READ_WRITE or
-CL_MEM_READ_ONLY, 2) <em>mem_object</em> was created with CL_MEM_READ_ONLY and
-<em>flags</em> specifies CL_MEM_READ_WRITE or CL_MEM_WRITE_ONLY, 3) <em>flags</em>
-specifies CL_MEM_USE_HOST_PTR or CL_MEM_ALLOC_HOST_PTR or
-CL_MEM_COPY_HOST_PTR.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if an
-image is being created from another memory object (buffer or image) and
-<em>mem_object</em> object was created with CL_MEM_HOST_WRITE_ONLY and <em>flags</em>
-specifies CL_MEM_HOST_READ_ONLY, or if <em>mem_object</em> was created with
-CL_MEM_HOST_READ_ONLY and <em>flags</em> specifies CL_MEM_HOST_WRITE_ONLY, or
-if <em>mem_object</em> was created with CL_MEM_HOST_NO_ACCESS and_flags_
-specifies CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_WRITE_ONLY.
-</p>
-</li>
-<li>
-<p>
-CL_IMAGE_FORMAT_NOT_SUPPORTED if the <em>image_format</em> is not supported.
-</p>
-</li>
-<li>
-<p>
-CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for image object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-there are no devices in <em>context</em> that support images (i.e.
-CL_DEVICE_IMAGE_SUPPORT specified in <em>table 4.3</em> is CL_FALSE).
-</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="sect4">
-<h5 id="_image_format_descriptor">Image Format Descriptor</h5>
-<div class="paragraph"><p>The image format descriptor structure is defined as</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>typedef struct cl_image_format {
-  cl_channel_order image_channel_order;
-  cl_channel_type image_channel_data_type;
-} cl_image_format;</pre>
-</div></div>
-<div class="paragraph"><p>image_channel_order specifies the number of channels and the channel
-layout i.e. the memory layout in which channels are stored in the
-image. Valid values are described in <em>table 5.6.</em></p></div>
-<div class="paragraph"><p>image_channel_data_type describes the size of the channel data type.
-The list of supported values is described in <em>table 5.7</em>. The number of
-bits per element determined by the image_channel_data_type and
-image_channel_order must be a power of two.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 11. <em>List of supported Image Channel Order Values</em></caption>
-<col style="width:100%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Enum values that can be specified in channel_order</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_R</strong>, <strong>CL_Rx</strong> or <strong>CL_A</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_INTENSITY</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_LUMINANCE</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DEPTH</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_RG</strong>, <strong>CL_RGx</strong> or <strong>CL_RA</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_RGB</strong> or <strong>CL_RGBx</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_RGBA</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_sRGB, CL_sRGBx, CL_sRGBA, CL_sBGRA</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_ARGB, CL_BGRA, CL_ABGR</strong></p></td>
-</tr>
-</tbody>
-</table>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 12. <em>List of supported Image Channel Data Types</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Image Channel Data Type</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"><strong>CL_SNORM_INT8</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Each channel component is a normalized signed 8-bit
-integer value</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_SNORM_INT16</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Each channel component is a normalized signed 16-bit
-integer value</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_UNORM_INT8</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Each channel component is a normalized unsigned 8-bit
-integer value</p></td>
-</tr>
-<tr>
-<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_UNORM_SHORT_565</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Represents a normalized 5-6-5 3-channel RGB
-image. The channel order must be CL_RGB or CL_RGBx.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_UNORM_SHORT_555</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Represents a normalized x-5-5-5 4-channel xRGB
-image. The channel order must be CL_RGB or CL_RGBx.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_UNORM_INT_101010</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Represents a normalized x-10-10-10 4-channel
-xRGB image. The channel order must be CL_RGB or CL_RGBx.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_UNORM_INT_101010_2</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Represents a normalized 10-10-10-2
-four-channel RGBA image. The channel order must be CL_RGBA.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_SIGNED_INT8</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Each channel component is an unnormalized signed
-8-bit integer value</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_SIGNED_INT16</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Each channel component is an unnormalized signed
-16-bit integer value</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_SIGNED_INT32</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Each channel component is an unnormalized signed
-32-bit integer value</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_UNSIGNED_INT8</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Each channel component is an unnormalized unsigned
-8-bit integer value</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_UNSIGNED_INT16</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Each channel component is an unnormalized unsigned
-16-bit integer value</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_UNSIGNED_INT32</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Each channel component is an unnormalized unsigned
-32-bit integer value</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_HALF_FLOAT</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Each channel component is a 16-bit half-float 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>For example, to specify a normalized unsigned 8-bit / channel RGBA
-image, image_channel_order = CL_RGBA, and__image_channel_data_type =
-CL_UNORM_INT8. The memory layout of this image format is described
-below:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:60%;
-">
-<col style="width:10%;">
-<col style="width:10%;">
-<col style="width:10%;">
-<col style="width:10%;">
-<col style="width:60%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">R</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">G</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">B</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&#8230;</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>with the corresponding byte offsets</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:60%;
-">
-<col style="width:10%;">
-<col style="width:10%;">
-<col style="width:10%;">
-<col style="width:10%;">
-<col style="width:60%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0</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">2</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">3</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&#8230;</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>Similar, if image_channel_order = CL_RGBA and image_channel_data_type =
-CL_SIGNED_INT16, the memory layout of this image format is described
-below:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:60%;
-">
-<col style="width:10%;">
-<col style="width:10%;">
-<col style="width:10%;">
-<col style="width:10%;">
-<col style="width:60%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">R</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">G</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">B</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&#8230;</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>with the corresponding byte offsets</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:60%;
-">
-<col style="width:10%;">
-<col style="width:10%;">
-<col style="width:10%;">
-<col style="width:10%;">
-<col style="width:60%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">2</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">4</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">6</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">&#8230;</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>image_channel_data_type values of CL_UNORM_SHORT_565,
-CL_UNORM_SHORT_555, CL_UNORM_INT_101010 and CL_UNORM_INT_101010_2 are
-special cases of packed image formats where the channels of each element
-are packed into a single unsigned short or unsigned int. For these
-special packed image formats, the channels are normally packed with the
-first channel in the most significant bits of the bitfield, and successive
-channels occupying progressively less significant locations. For
-CL_UNORM_SHORT_565, R is in bits 15:11, G is in bits 10:5 and B is in
-bits 4:0. For CL_UNORM_SHORT_555, bit 15 is undefined, R is in bits
-14:10, G in bits 9:5 and B in bits 4:0. For CL_UNORM_INT_101010, bits
-31:30 are undefined, R is in bits 29:20, G in bits 19:10 and B in bits
-9:0. For CL_UNORM_INT_101010_2, R is in bits 31:22, G in bits 21:12, B
-in bits 11:2 and A in bits 1:0.</p></div>
-<div class="paragraph"><p>OpenCL implementations must maintain the minimum precision specified by
-the number of bits in image_channel_data_type. If the image format
-specified by image_channel_order, and image_channel_data_type cannot be
-supported by the OpenCL implementation, then the call to <strong>clCreateImage</strong>
-will return a NULL memory object.</p></div>
-</div>
-<div class="sect4">
-<h5 id="_image_descriptor">Image Descriptor</h5>
-<div class="paragraph"><p>The image descriptor structure describes the type and dimensions of the
-image or image array and is defined as:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>typedef struct cl_image_desc {
-    cl_mem_object_type image_type,
-    size_t  image_width;
-    size_t  image_height;
-    size_t image_depth;
-    size_t image_array_size;
-    size_t image_row_pitch;
-    size_t image_slice_pitch;
-    cl_uint num_mip_levels;
-    cl_uint num_samples;
-    cl_mem mem_object;
-} cl_image_desc;</pre>
-</div></div>
-<div class="paragraph"><p>image_type describes the image type and must be either
-CL_MEM_OBJECT_IMAGE1D, CL_MEM_OBJECT_IMAGE1D_BUFFER,
-CL_MEM_OBJECT_IMAGE1D_ARRAY, CL_MEM_OBJECT_IMAGE2D,
-CL_MEM_OBJECT_IMAGE2D_ARRAY or CL_MEM_OBJECT_IMAGE3D.</p></div>
-<div class="paragraph"><p>image_width is the width of the image in pixels. For a 2D image and
-image array, the image width must be a value &gt;= 1 and &#8656;
-CL_DEVICE_IMAGE2D_MAX_WIDTH. For a 3D image, the image width must be a
-value &gt;=1 and &#8656; CL_DEVICE_IMAGE3D_MAX_WIDTH. For a 1D image buffer,
-the image width must be a value &gt;=1 and &#8656;
-CL_DEVICE_IMAGE_MAX_BUFFER_SIZE. For a 1D image and 1D image array, the
-image width must be a value &gt;=1 and &#8656; CL_DEVICE_IMAGE2D_MAX_WIDTH.</p></div>
-<div class="paragraph"><p>image_height is height of the image in pixels. This is only used if the
-image is a 2D or 3D image, or a 2D image array. For a 2D image or image
-array, the image height must be a value &gt;=1 and &#8656;
-CL_DEVICE_IMAGE2D_MAX_HEIGHT. For a 3D image, the image height must be
-a value &gt;=1 and &#8656; CL_DEVICE_IMAGE3D_MAX_HEIGHT.</p></div>
-<div class="paragraph"><p>image_depth is the depth of the image in pixels. This is only used if
-the image is a 3D image and must be a value &gt;= 1 and &#8656;
-CL_DEVICE_IMAGE3D_MAX_DEPTH.</p></div>
-<div class="paragraph"><p>image_array_size<span class="footnote"><br>[Note that reading and writing 2D image arrays from a kernel with image_array_size =1 may be lower
-performance than 2D images]<br></span>: is the number of images in the image
-array. This is only used if the image is a 1D or 2D image array. The
-values for image_array_size, if specified, must be a value &gt;= 1 and &#8656;
-CL_DEVICE_IMAGE_MAX_ARRAY_SIZE.</p></div>
-<div class="paragraph"><p>image_row_pitch is the scan-line pitch in bytes. This must be 0 if
-<em>host_ptr</em> is NULL and can be either 0 or &gt;= image_width * size of
-element in bytes if <em>host_ptr</em> is not NULL. If <em>host_ptr</em> is not NULL
-and image_row_pitch__= 0, image_row_pitch is calculated as image_width *
-size of element in bytes. If image_row_pitch is not 0, it must be a
-multiple of the image element size in bytes. For a 2D image created
-from a buffer, 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&#8594;mem_object and that support images.</p></div>
-<div class="paragraph"><p>image_slice_pitch is the size in bytes of each 2D slice in the 3D image
-or the size in bytes of each image in a 1D or 2D image array. This must
-be 0 if <em>host_ptr</em> is NULL. If <em>host_ptr</em> is not NULL,
-image_slice_pitch can be either 0 or &gt;= image_row_pitch * image_height
-for a 2D image array or 3D image and can be either 0 or &gt;=
-image_row_pitch for a 1D image array. If <em>host_ptr</em> is not NULL and
-image_slice_pitch<em>= 0, image_slice_pitch is calculated as
-image_row_pitch * image_height for a 2D image array or 3D image and
-image_row_pitch for a 1D image array. If image_slice_pitch</em>is not 0,
-it must be a multiple of the image_row_pitch.</p></div>
-<div class="paragraph"><p>num_mip_levels and num_samples must be 0.</p></div>
-<div class="paragraph"><p>mem_object may refer to a valid buffer or image memory object.
-mem_object can be a buffer memory object if image_type is
-CL_MEM_OBJECT_IMAGE1D_BUFFER or
-CL_MEM_OBJECT_IMAGE2D<span class="footnote"><br>[To create a 2D image from a buffer object that share the data store between the image and buffer object]<br></span>:. mem_object can be an image
-object if image_type is CL_MEM_OBJECT_IMAGE2D<span class="footnote"><br>[To create an image object from another image object that share the data store between these image objects.]<br></span>:.
-Otherwise it must be NULL. The image pixels are taken from the memory
-objects data store. When the contents of the specified memory objects
-data store are modified, those changes are reflected in the contents of
-the image object and vice-versa at corresponding synchronization points.</p></div>
-<div class="paragraph"><p>For a 1D image buffer create from a buffer object, the image_width *
-size of element in bytes must be &#8656; size of the buffer object. The
-image data in the buffer object is stored as a single scanline which is
-a linear sequence of adjacent elements. </p></div>
-<div class="paragraph"><p>For a 2D image created from a buffer object, the image_row_pitch *
-image_height must be &#8656; size of the buffer object specified by
-mem_object. The image data in the buffer object is stored as a linear
-sequence of adjacent scanlines. Each scanline is a linear sequence of
-image elements padded to image_row_pitch bytes. </p></div>
-<div class="paragraph"><p>For an image object created from another image object, the values
-specified in the image descriptor except for mem_object must match the
-image descriptor information associated with mem_object. </p></div>
-<div class="paragraph"><p>Image elements are stored according to their image format as described
-in section 5.3.1.1. </p></div>
-<div class="paragraph"><p>If the buffer object specified by mem_object is created with
-CL_MEM_USE_HOST_PTR, the <em>host_ptr</em> specified to <strong>clCreateBuffer</strong> must
-be aligned to the minimum of the
-<strong>CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT</strong> value for all devices in the
-context associated with the buffer specified by mem_object and that
-support images.</p></div>
-<div class="paragraph"><p>Creating a 2D image object from another 2D image object allows users to
-create a new image object that shares the image data store with
-mem_object but views the pixels in the image with a different channel
-order. The restrictions are:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      all the values specified
-in image_desc except for mem_object must match the image descriptor
-information associated with mem_object.
-</p>
-</li>
-<li>
-<p>
-      The <em>image_desc</em> used for
-creation of <em>mem_object</em> may not be equivalent to image descriptor
-information associated with mem_object. To ensure the values in
-<em>image_desc</em> will match one can query mem_object for associated
-information using <strong>clGetImageInfo</strong> function described in section 5.3.7.
-</p>
-</li>
-<li>
-<p>
-      the channel data type
-specified in image_format must match the channel data type associated
-with mem_object. The channel order values<span class="footnote"><br>[This allows developers to create a sRGB view of the image from a linear RGB view or vice-versa i.e. the pixels
-stored in the image can be accessed as linear RGB or sRGB values.  ]<br></span>: supported
-are:
-</p>
-</li>
-</ul></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:50%;">
-<col style="width:50%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>image_channel_order specified in image_format</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>image channel order
-of mem_object</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_sBGRA</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_BGRA</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_BGRA</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_sBGRA</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_sRGBA</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_RGBA</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_RGBA</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_sRGBA</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_sRGB</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_RGB</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_RGB</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_sRGB</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_sRGBx</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_RGBx</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_RGBx</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_sRGBx</p></td>
-</tr>
-<tr>
-<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_R</p></td>
-</tr>
-</tbody>
-</table>
-<div class="ulist"><ul>
-<li>
-<p>
-      the channel order
-specified must have the same number of channels as the channel order of
-mem_object.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>NOTE:</p></div>
-<div class="paragraph"><p>Concurrent reading from, writing to and copying between both a buffer
-object and 1D image buffer or 2D image object associated with the buffer
-object is undefined. Only reading from both a buffer object and 1D
-image buffer or 2D image object associated with the buffer object is
-defined.</p></div>
-<div class="paragraph"><p>Writing to an image created from a buffer and then reading from this
-buffer in a kernel even if appropriate synchronization operations (such
-as a barrier) are performed between the writes and reads is undefined.
-Similarly, writing to the buffer and reading from the image created from
-this buffer with appropriate synchronization between the writes and
-reads is undefined.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="_querying_list_of_supported_image_formats">5.3.2. Querying List of Supported Image Formats</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int   clGetSupportedImageFormats(cl_context context,
-                                    cl_mem_flags flags,
-                                    cl_mem_object_type image_type,
-                                    cl_uint num_entries,
-                                    cl_image_format *image_formats,
-                                    cl_uint *num_image_formats)</pre>
-</div></div>
-<div class="paragraph"><p>can be used to get the list of image formats supported by an OpenCL
-implementation when the following information about an image memory
-object is specified:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      Context
-</p>
-</li>
-<li>
-<p>
-      Image type  1D, 2D, or 3D
-image, 1D image buffer, 1D or 2D image array.
-</p>
-</li>
-<li>
-<p>
-      Image object allocation
-information
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><strong>clGetSupportedImageFormats</strong> returns a union of image formats supported
-by all devices in the context.</p></div>
-<div class="paragraph"><p><em>context</em> is a valid OpenCL context on which the image object(s) will be
-created.</p></div>
-<div class="paragraph"><p><em>flags</em> is a bit-field that is used to specify allocation and usage
-information about the image memory object being queried and is described
-in <em>table 5.3</em>. To get a list of supported image formats that can be
-read from or written to by a kernel, <em>flags</em> must be set to
-CL_MEM_READ_WRITE (get a list of images that can be read from and
-written to by different kernel instances when correctly ordered by event
-dependencies), CL_MEM_READ_ONLY (list of images that can be read from by
-a kernel) or CL_MEM_WRITE_ONLY (list of images that can be written to by
-a kernel). To get a list of supported image formats that can be both
-read from and written to by the same kernel instance, <em>flags</em> must be
-set to CL_MEM_KERNEL_READ_AND_WRITE. Please see section 5.3.2.2 for
-clarification.</p></div>
-<div class="paragraph"><p><em>image_type</em> describes the image type and must be either
-CL_MEM_OBJECT_IMAGE1D, CL_MEM_OBJECT_IMAGE1D_BUFFER,
-CL_MEM_OBJECT_IMAGE2D, CL_MEM_OBJECT_IMAGE3D,
-CL_MEM_OBJECT_IMAGE1D_ARRAY or CL_MEM_OBJECT_IMAGE2D_ARRAY.

-<em>num_entries</em> specifies the number of entries that can be returned in
-the memory location given by <em>image_formats</em>.</p></div>
-<div class="paragraph"><p><em>image_formats</em> is a pointer to a memory location where the list of
-supported image formats are returned. Each entry describes a
-<em>cl_image_format</em> structure supported by the OpenCL implementation. If
-<em>image_formats</em> is NULL, it is ignored.

-<em>num_image_formats</em> is the actual number of supported image formats for
-a specific <em>context</em> and values specified by <em>flags</em>. If
-<em>num_image_formats</em> is NULL, it is ignored.</p></div>
-<div class="paragraph"><p><strong>clGetSupportedImageFormats</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_CONTEXT if
-<em>context</em> is not a valid context.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>flags</em> or <em>image_type</em> are not valid, or if <em>num_entries</em> is 0 and
-<em>image_formats</em> is not NULL. 
-</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>If CL_DEVICE_IMAGE_SUPPORT specified in <em>table 4.3</em> is CL_TRUE, the
-values assigned to CL_DEVICE_MAX_READ_IMAGE_ARGS,
-CL_DEVICE_MAX_WRITE_IMAGE_ARGS, CL_DEVICE_IMAGE2D_MAX_WIDTH,
-CL_DEVICE_IMAGE2D_MAX_HEIGHT, CL_DEVICE_IMAGE3D_MAX_WIDTH,
-CL_DEVICE_IMAGE3D_MAX_HEIGHT, CL_DEVICE_IMAGE3D_MAX_DEPTH and
-CL_DEVICE_MAX_SAMPLERS by the implementation must be greater than or
-equal to the minimum values specified in <em>table 4.3</em>.</p></div>
-<div class="sect4">
-<h5 id="_minimum_list_of_supported_image_formats">Minimum List of Supported Image Formats</h5>
-<div class="paragraph"><p>For 1D, 1D image from buffer, 2D, 3D image objects, 1D and 2D image
-array objects, the mandated minimum list of image formats that can be
-read from and written to by different kernel instances when correctly
-ordered by event dependencies and that must be supported by all devices
-that support images is described in <em>table 5.8</em>.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 13. <em>Min. list of supported image formats kernel read or write</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>num_channels</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>channel_order</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>channel_data_type</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">1</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_R</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_UNORM_INT8
-CL_UNORM_INT16
-CL_SNORM_INT8
-CL_SNORM_INT16
-CL_SIGNED_INT8
-CL_SIGNED_INT16
-CL_SIGNED_INT32
-CL_UNSIGNED_INT8
-CL_UNSIGNED_INT16
-CL_UNSIGNED_INT32
-CL_HALF_FLOAT
-CL_FLOAT</p></td>
-</tr>
-<tr>
-<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<span class="footnote"><br>[CL_DEPTH channel order is supported only for 2D image and 2D image array objects.]<br></span>:</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_UNORM_INT16 CL_FLOAT</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">CL_RG</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_UNORM_INT8
-CL_UNORM_INT16
-CL_SNORM_INT8
-CL_SNORM_INT16
-CL_SIGNED_INT8
-CL_SIGNED_INT16
-CL_SIGNED_INT32
-CL_UNSIGNED_INT8
-CL_UNSIGNED_INT16
-CL_UNSIGNED_INT32
-CL_HALF_FLOAT
-CL_FLOAT</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">CL_RGBA</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_UNORM_INT8
-CL_UNORM_INT16
-CL_SNORM_INT8
-CL_SNORM_INT16
-CL_SIGNED_INT8
-CL_SIGNED_INT16  CL_SIGNED_INT32
-CL_UNSIGNED_INT8
-CL_UNSIGNED_INT16
-CL_UNSIGNED_INT32
-CL_HALF_FLOAT
-CL_FLOAT</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">CL_BGRA</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_UNORM_INT8</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">CL_sRGBA</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_UNORM_INT8<span class="footnote"><br>[sRGB channel order support is not required for 1D image buffers. Writes to images with sRGB channel orders
-requires device support of the cl_khr_srgb_image_writes extension.]<br></span>:]</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>For 1D, 1D image from buffer, 2D, 3D image objects, 1D and 2D image
-array objects, the mandated minimum list of image formats that can be
-read from and written to by the same kernel instance and that must be
-supported by all devices that support images is described in <em>table
-5.9</em>.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 14. <em>Min. list of supported image formats kernel read and write</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>num_channels</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>channel_order</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>channel_data_type</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">1</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_R</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_UNORM_INT8
-CL_SIGNED_INT8
-CL_SIGNED_INT16
-CL_SIGNED_INT32
-CL_UNSIGNED_INT8
-CL_UNSIGNED_INT16
-CL_UNSIGNED_INT32
-CL_HALF_FLOAT
-CL_FLOAT</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">CL_RGBA</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_UNORM_INT8
-CL_SIGNED_INT8
-CL_SIGNED_INT16
-CL_SIGNED_INT32
-CL_UNSIGNED_INT8
-CL_UNSIGNED_INT16
-CL_UNSIGNED_INT32
-CL_HALF_FLOAT
-CL_FLOAT</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect4">
-<h5 id="_image_format_mapping_to_opencl_kernel_language_image_access_qualifiers">Image format mapping to OpenCL kernel language image access qualifiers</h5>
-<div class="paragraph"><p>Image arguments to kernels may have the read_only, write_only or
-read_write qualifier. Not all image formats supported by the device and
-platform are valid to be passed to all of these access qualifiers. For
-each access qualifier, only images whose format is in the list of
-formats returned by clGetSupportedImageFormats with the given flag
-arguments in <em>table 5.9</em> are permitted. It is not valid to pass an image
-supporting writing as both a read_only image and a write_only image
-parameter, or to a read_write image parameter and any other image
-parameter.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 15. <em>Mapping from format flags passed to clGetSupportedImageFormats to OpenCL kernel language image access qualifiers</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Access Qualifier</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_mem_flags</strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>read_only</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_MEM_READ_ONLY, CL_MEM_READ_WRITE, CL_MEM_KERNEL_READ_AND_WRITE</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>write_only</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_MEM_WRITE_ONLY, CL_MEM_READ_WRITE, CL_MEM_KERNEL_READ_AND_WRITE</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>read_write</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_MEM_KERNEL_READ_AND_WRITE</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect3">
-<h4 id="_reading_writing_and_copying_image_objects">5.3.3. Reading, Writing and Copying Image Objects</h4>
-<div class="paragraph"><p>The following functions enqueue commands to read from an image or image
-array object to host memory or write to an image or image array object
-from host memory.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueReadImage(cl_command_queue command_queue,
-                          cl_mem image,
-                          cl_bool blocking_read,
-                          const size_t *origin,
-                          const size_t *region,
-                          size_t row_pitch,
-                          size_t slice_pitch,
-                          void *ptr,
-                          cl_uint num_events_in_wait_list,
-                          const cl_event *event_wait_list,
-                          cl_event *event)</pre>
-</div></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueWriteImage(cl_command_queue command_queue,
-                           cl_mem image,
-                           cl_bool blocking_write,
-                           const size_t *origin,
-                           const size_t *region,
-                           size_t input_row_pitch,
-                           size_t input_slice_pitch,
-                           const void *ptr,
-                           cl_uint num_events_in_wait_list,
-                           const cl_event *event_wait_list,
-                           cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p><em>command_queue</em> refers to the host command-queue in which the read /
-write command will be queued. <em>command_queue</em> and <em>image</em> must be
-created with the same OpenCL context.</p></div>
-<div class="paragraph"><p><em>image</em> refers to a valid image or image array object.</p></div>
-<div class="paragraph"><p><em>blocking_read</em> and <em>blocking_write</em> indicate if the read and write
-operations are <em>blocking</em> or <em>non-blocking</em>.</p></div>
-<div class="paragraph"><p>If <em>blocking_read</em> is CL_TRUE i.e. the read command is blocking,
-<strong>clEnqueueReadImage</strong> does not return until the buffer data has been read
-and copied into memory pointed to by <em>ptr</em>.</p></div>
-<div class="paragraph"><p>If <em>blocking_read</em> is CL_FALSE i.e. the read command is non-blocking,
-<strong>clEnqueueReadImage</strong> queues a non-blocking read command and returns. The
-contents of the buffer that <em>ptr</em> points to cannot be used until the
-read command has completed. The <em>event</em> argument returns an event
-object which can be used to query the execution status of the read
-command. When the read command has completed, the contents of the
-buffer that _ptr_points to__can be used by the application.</p></div>
-<div class="paragraph"><p>If <em>blocking_write_is CL_TRUE, the OpenCL implementation copies the data
-referred to by _ptr</em> and enqueues the write command in the
-command-queue. The memory pointed to by <em>ptr</em> can be reused by the
-application after the <strong>clEnqueueWriteImage</strong> call returns.</p></div>
-<div class="paragraph"><p>If <em>blocking_write</em> is CL_FALSE, the OpenCL implementation will use
-<em>ptr</em> to perform a non-blocking write. As the write is non-blocking the
-implementation can return immediately. The memory pointed to by <em>ptr</em>
-cannot be reused by the application after the call returns. The <em>event</em>
-argument returns an event object which can be used to query the
-execution status of the write command. When the write command has
-completed, the memory pointed to by <em>ptr</em> can then be reused by the
-application.</p></div>
-<div class="paragraph"><p><em>origin</em> defines the (<em>x</em>, <em>y</em>, <em>z</em>) offset in pixels in the 1D, 2D or
-3D image, the (<em>x</em>, <em>y</em>) offset and the image index in the 2D image
-array or the (<em>x</em>) offset and the image index in the 1D image array. If
-<em>image</em> is a 2D image object, <em>origin</em>[2] must be 0. If <em>image</em> is a 1D
-image or 1D image buffer object, <em>origin</em>[1] and <em>origin</em>[2] must be 0.
-If <em>image</em> is a 1D image array object, <em>origin</em>[2] must be 0. If
-<em>image</em> is a 1D image array object, <em>origin</em>[1] describes the image
-index in the 1D image array. If <em>image</em> is a 2D image array object,
-<em>origin</em>[2] describes the image index in the 2D image array.</p></div>
-<div class="paragraph"><p><em>region_defines the_</em>(<em>width</em>, <em>height,</em> <em>depth</em>) in pixels of the 1D,
-2D or 3D rectangle, the (<em>width</em>, <em>height</em>) in pixels of the 2D
-rectangle and the number of images of a 2D image array or the (<em>width</em>)
-in pixels of the 1D rectangle and the number of images of a 1D image
-array. If <em>image</em> is a 2D image object, <em>region</em>[2] must be 1. If
-<em>image</em> is a 1D image or 1D image buffer object, <em>region</em>[1] and
-<em>region</em>[2] must be 1. If <em>image</em> is a 1D image array object,
-<em>region</em>[2] must be 1. The values in <em>region</em> cannot be 0.</p></div>
-<div class="paragraph"><p><em>row_pitch</em> in <strong>clEnqueueReadImage</strong> and <em>input_row_pitch</em> in
-<strong>clEnqueueWriteImage</strong> is the length of each row in bytes. This value
-must be greater than or equal to the element size in bytes * <em>width</em>.
-If <em>row_pitch</em> (or <em>input_row_pitch</em>) is set to 0, the appropriate row
-pitch is calculated based on the size of each element in bytes
-multiplied by <em>width</em>.</p></div>
-<div class="paragraph"><p><em>slice_pitch</em> in <strong>clEnqueueReadImage</strong> and <em>input_slice_pitch</em> in
-<strong>clEnqueueWriteImage</strong> is the size in bytes of the 2D slice of the 3D
-region of a 3D image or each image of a 1D or 2D image array being read
-or written respectively. This must be 0 if <em>image</em> is a 1D or 2D
-image. Otherwise this value must be greater than or equal to
-<em>row_pitch</em> * <em>height</em>. If <em>slice_pitch</em> (or <em>input_slice_pitch</em>) is
-set to 0, the appropriate slice pitch is calculated based on the
-<em>row_pitch</em> * <em>height</em>.</p></div>
-<div class="paragraph"><p><em>ptr</em> is the pointer to a buffer in host memory where image data is to be read from or to be written to. The alignment requirements for ptr are specified in section C.3.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</p></div>
-<div class="paragraph"><p><em>event</em> returns an event object that identifies this particular read /
-write command and can be used to query or queue a wait for this
-particular command to complete. <em>event</em> can be NULL 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 NULL, 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>clEnqueueReadImage</strong> and <strong>clEnqueueWriteImage</strong> return 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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if the
-context associated with <em>command_queue</em> and <em>image</em> are not the same or
-if the context associated with <em>command_queue</em> and events in
-<em>event_wait_list</em> are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-i_mage_ is not a valid image object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if the
-region being read or written specified by <em>origin</em> and <em>region</em> is out
-of bounds or if <em>ptr</em> is a NULL value.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if values
-in <em>origin</em> and <em>region</em> do not follow rules described in the argument
-description for <em>origin</em> and <em>region</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_INVALID_IMAGE_SIZE if
-image dimensions (image width, height, specified or compute row and/or
-slice pitch) for <em>image</em> are not supported by device associated with
-<em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and
-data type) for <em>image</em> are not supported by device associated with
-<em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for data store associated with <em>image</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-the device associated with <em>command_queue</em> does not support images (i.e.
-CL_DEVICE_IMAGE_SUPPORT specified in <em>table 4.3</em> is CL_FALSE).
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-<strong>clEnqueueReadImage</strong> is called on <em>image</em> which has been created with
-CL_MEM_HOST_WRITE_ONLY or CL_MEM_HOST_NO_ACCESS.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-<strong>clEnqueueWriteImage</strong> is called on <em>image</em> which has been created with
-CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_NO_ACCESS.
-</p>
-</li>
-<li>
-<p>
-     CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read and write
-operations are blocking and the execution status of any of the events in
-<em>event_wait_list</em> is a negative integer value.
-</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>NOTE:</p></div>
-<div class="paragraph"><p>Calling <strong>clEnqueueReadImage</strong> to read a region of the <em>image</em> with the
-<em>ptr</em> argument value set to <em>host_ptr</em> + (<em>origin[2]</em>*<em>image slice pitch
-+ origin[1]</em>*<em>image row pitch + origin[0]</em>*<em>bytes per pixel</em>)<em>,</em> where
-<em>host_ptr</em> is a pointer to the memory region specified when the <em>image</em>
-being read is created with CL_MEM_USE_HOST_PTR, must meet the following
-requirements in order to avoid undefined behavior:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-All commands that use this image object have finished execution before
-the read command begins execution.
-</p>
-</li>
-<li>
-<p>
-The <em>row_pitch</em> and <em>slice_pitch</em> argument values in
-<strong>clEnqueueReadImage</strong> must be set to the image row pitch and slice pitch.
-</p>
-</li>
-<li>
-<p>
-The image object is not mapped.
-</p>
-</li>
-<li>
-<p>
-The image object is not used by any command-queue until the read
-command has finished execution.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Calling <strong>clEnqueueWriteImage</strong> to update the latest bits in a region of
-the <em>image</em> with the <em>ptr</em> argument value set to <em>host_ptr</em><br>
-(<em>origin[2]</em>*<em>image slice pitch + origin[1]</em>*<em>image row pitch<br>
-origin[0]</em>*<em>bytes per pixel</em>), where <em>host_ptr</em> is a pointer to the
-memory region specified when the <em>image</em> being written is created with
-CL_MEM_USE_HOST_PTR, must meet the following requirements in order to
-avoid undefined behavior:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The host memory region being written contains the latest bits when the
-enqueued write command begins execution.
-</p>
-</li>
-<li>
-<p>
-The <em>input_row_pitch</em> and <em>input_slice_pitch</em> argument values in
-<strong>clEnqueueWriteImage</strong> must be set to the image row pitch and slice
-pitch.
-</p>
-</li>
-<li>
-<p>
-The image object is not mapped.
-</p>
-</li>
-<li>
-<p>
-The image object is not used by any command-queue until the write
-command has finished execution.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueCopyImage(cl_command_queue command_queue,
-                          cl_mem src_image,
-                          cl_mem dst_image,
-                          const size_t *src_origin,
-                          const size_t *dst_origin,
-                          const size_t *region,
-                          cl_uint num_events_in_wait_list,
-                          const cl_event *event_wait_list,
-                          cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to copy image objects. <em>src_image</em> and <em>dst_image</em>
-can be 1D, 2D, 3D image or a 1D, 2D image array objects. It is
-possible to copy subregions between any combinations of source and
-destination types, provided that the dimensions of the subregions are
-the same e.g., one can copy a rectangular region from a 2D image to a
-slice of a 3D image.</p></div>
-<div class="paragraph"><p><em>command_queue</em> refers to the host command-queue in which the copy
-command will be queued. The OpenCL context associated with
-<em>command_queue</em>, <em>src_image</em> and <em>dst_image</em> must be the same.</p></div>
-<div class="paragraph"><p><em>src_origin</em> defines the (<em>x</em>, <em>y</em>, <em>z</em>) offset in pixels in the 1D, 2D
-or 3D image, the (<em>x</em>, <em>y</em>) offset and the image index in the 2D image
-array or the (<em>x</em>) offset and the image index in the 1D image array. If
-<em>image</em> is a 2D image object, <em>src_origin</em>[2] must be 0. If <em>src_image</em>
-is a 1D image object, <em>src_origin</em>[1] and <em>src_origin</em>[2] must be 0. If
-<em>src_image</em> is a 1D image array object, <em>src_origin</em>[2] must be 0. If
-<em>src_image</em> is a 1D image array object, <em>src_origin</em>[1] describes the
-image index in the 1D image array. If <em>src_image</em> is a 2D image array
-object, <em>src_origin</em>[2] describes the image index in the 2D image array.</p></div>
-<div class="paragraph"><p><em>dst_origin</em> defines the (<em>x</em>, <em>y</em>, <em>z</em>) offset in pixels in the 1D, 2D
-or 3D image, the (<em>x</em>, <em>y</em>) offset and the image index in the 2D image
-array or the (<em>x</em>) offset and the image index in the 1D image array. If
-<em>dst_image</em> is a 2D image object, <em>dst_origin</em>[2] must be 0. If
-<em>dst_image</em> is a 1D image or 1D image buffer object, <em>dst_origin</em>[1] and
-<em>dst_origin</em>[2] must be 0. If <em>dst_image</em> is a 1D image array object,
-<em>dst_origin</em>[2] must be 0. If <em>dst_image</em> is a 1D image array object,
-<em>dst_origin</em>[1] describes the image index in the 1D image array. If
-<em>dst_image</em> is a 2D image array object, <em>dst_origin</em>[2] describes the
-image index in the 2D image array.</p></div>
-<div class="paragraph"><p><em>region_defines the_</em>(<em>width</em>, <em>height,</em> <em>depth</em>) in pixels of the 1D,
-2D or 3D rectangle, the (<em>width</em>, <em>height</em>) in pixels of the 2D
-rectangle and the number of images of a 2D image array or the (<em>width</em>)
-in pixels of the 1D rectangle and the number of images of a 1D image
-array. If <em>src_image</em> or <em>dst_image</em> is a 2D image object, <em>region</em>[2]
-must be 1. If <em>src_image</em> or <em>dst_image</em> is a 1D image or 1D image
-buffer object, <em>region</em>[1] and <em>region</em>[2] must be 1. If <em>src_image</em> or
-<em>dst_image</em> is a 1D image array object, <em>region</em>[2] must be 1. The
-values in <em>region</em> cannot be 0.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</p></div>
-<div class="paragraph"><p><em>event</em> returns an event object that identifies this particular copy
-command and can be used to query or queue a wait for this particular
-command to complete. <em>event</em> can be NULL 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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead. If the
-<em>event_wait_list</em> and the <em>event</em> arguments are not NULL, 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>It is currently a requirement that the <em>src_image</em> and <em>dst_image</em> image
-memory objects for <strong>clEnqueueCopyImage</strong> must have the exact same image
-format (i.e. the cl_image_format descriptor specified when <em>src_image</em>
-and <em>dst_image</em> are created must match).</p></div>
-<div class="paragraph"><p><strong>clEnqueueCopyImage</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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if the
-context associated with <em>command_queue</em>, <em>src_image</em> and <em>dst_image</em> are
-not the same or if the context associated with <em>command_queue</em> and
-events in <em>event_wait_list</em> are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>src_image</em> and <em>dst_image</em> are not valid image objects.
-</p>
-</li>
-<li>
-<p>
-      CL_IMAGE_FORMAT_MISMATCH
-if <em>src_image</em> and <em>dst_image</em> do not use the same image format.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if the 2D
-or 3D rectangular region specified by <em>src_origin</em> and <em>src_origin</em><br>
-<em>region</em> refers to a region outside <em>src_image</em>, or if the 2D or 3D
-rectangular region specified by <em>dst_origin</em> and <em>dst_origin</em> + <em>region</em>
-refers to a region outside <em>dst_image</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if values
-in <em>src_origin</em>, <em>dst_origin</em> and <em>region</em> do not follow rules described
-in the argument description for <em>src_origin</em>, <em>dst_origin</em> and <em>region</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_INVALID_IMAGE_SIZE if
-image dimensions (image width, height, specified or compute row and/or
-slice pitch) for <em>src_image</em> or <em>dst_image</em> are not supported by device
-associated with <em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and
-data type) for <em>src_image</em> or <em>dst_image</em> are not supported by device
-associated with <em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for data store associated with <em>src_image</em> or <em>dst_image</em>.
-</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>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-the device associated with <em>command_queue</em> does not support images (i.e.
-CL_DEVICE_IMAGE_SUPPORT specified in <em>table 4.3</em> is CL_FALSE).
-</p>
-</li>
-<li>
-<p>
-      CL_MEM_COPY_OVERLAP if
-<em>src_image</em> and <em>dst_image</em> are the same image object and the source and
-destination regions overlap.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="_filling_image_objects">5.3.4. Filling Image Objects</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueFillImage*(cl_command_queue command_queue,
-                           cl_mem image,
-                           const void *fill_color,
-                           const size_t *origin,
-                           const size_t *region,
-                           cl_uint num_events_in_wait_list,
-                           const cl_event *event_wait_list,
-                           cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to fill an image object with a specified color. The
-usage information which indicates whether the memory object can be read
-or written by a kernel and/or the host and is given by the cl_mem_flags
-argument value specified when <em>image</em> is created is ignored by
-<strong>clEnqueueFillImage</strong>.</p></div>
-<div class="paragraph"><p><em>command_queue</em> refers to the host command-queue in which the fill
-command will be queued. The OpenCL context associated with
-<em>command_queue</em> and <em>image</em> must be the same.</p></div>
-<div class="paragraph"><p><em>image</em> is a valid image object.</p></div>
-<div class="paragraph"><p><em>fill_color</em> is the color used to fill the image. The fill color is a
-single floating point value if the channel order is CL_DEPTH. Otherwise,
-the fill color is a four component RGBA floating-point color value if
-the <em>image</em> channel data type is not an unnormalized signed or unsigned
-integer type, is a four component signed integer value if the <em>image</em>
-channel data type is an unnormalized signed integer type and is a four
-component unsigned integer value if the <em>image</em> channel data type is an
-unnormalized unsigned integer type. The fill color will be converted to
-the appropriate image channel format and order associated with <em>image</em>
-as described in <em>sections 6.12.14</em> and <em>8.3</em>.</p></div>
-<div class="paragraph"><p><em>origin</em> defines the (<em>x</em>, <em>y</em>, <em>z</em>) offset in pixels in the 1D, 2D or
-3D image, the (<em>x</em>, <em>y</em>) offset and the image index in the 2D image
-array or the (<em>x</em>) offset and the image index in the 1D image array. If
-<em>image</em> is a 2D image object, <em>origin</em>[2] must be 0. If <em>image</em> is a 1D
-image or 1D image buffer object, <em>origin</em>[1] and <em>origin</em>[2] must be 0.
-If <em>image</em> is a 1D image array object, <em>origin</em>[2] must be 0. If
-<em>image</em> is a 1D image array object, <em>origin</em>[1] describes the image
-index in the 1D image array. If <em>image</em> is a 2D image array object,
-<em>origin</em>[2] describes the image index in the 2D image array.</p></div>
-<div class="paragraph"><p><em>region_defines the_</em>(<em>width</em>, <em>height,</em> <em>depth</em>) in pixels of the 1D,
-2D or 3D rectangle, the (<em>width</em>, <em>height</em>) in pixels of the 2D
-rectangle and the number of images of a 2D image array or the (<em>width</em>)
-in pixels of the 1D rectangle and the number of images of a 1D image
-array. If <em>image</em> is a 2D image object, <em>region</em>[2] must be 1. If
-<em>image</em> is a 1D image or 1D image buffer object, <em>region</em>[1] and
-<em>region</em>[2] must be 1. If <em>image</em> is a 1D image array object,
-<em>region</em>[2] must be 1. The values in <em>region</em> cannot be 0.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</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 NULL 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. <strong>clEnqueueBarrierWithWaitList</strong> can be used
-instead. If the <em>event_wait_list</em> and the <em>event</em> arguments are not
-NULL, 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>clEnqueueFillImage</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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if the
-context associated with <em>command_queue</em> and <em>image</em> are not the same or
-if the context associated with <em>command_queue</em> and events in
-<em>event_wait_list</em> are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>image</em> is not a valid image object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>fill_color</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if the
-region being filled as specified by <em>origin</em> and <em>region</em> is out of
-bounds or if <em>ptr</em> is a NULL value.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if values
-in <em>origin</em> and <em>region</em> do not follow rules described in the argument
-description for <em>origin</em> and <em>region</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_INVALID_IMAGE_SIZE if
-image dimensions (image width, height, specified or compute row and/or
-slice pitch) for <em>image</em> are not supported by device associated with
-<em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and
-data type) for <em>image</em> are not supported by device associated with
-<em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for data store associated with <em>image</em>.
-</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="sect3">
-<h4 id="_copying_between_image_and_buffer_objects">5.3.5. Copying between Image and Buffer Objects</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueCopyImageToBuffer(cl_command_queue command_queue,
-                                  cl_mem src_image,
-                                  cl_mem dst_buffer,
-                                  const size_t *src_origin,
-                                  const size_t *region,
-                                  size_t dst_offset,
-                                  cl_uint num_events_in_wait_list,
-                                  const cl_event *event_wait_list,
-                                  cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to copy an image object to a buffer object.</p></div>
-<div class="paragraph"><p><em>command_queue</em> must be a valid host command-queue. The OpenCL context
-associated with <em>command_queue</em>, <em>src_image</em> and <em>dst_buffer</em> must be
-the same.</p></div>
-<div class="paragraph"><p><em>src_image</em> is a valid image object.</p></div>
-<div class="paragraph"><p><em>dst_buffer</em> is a valid buffer object.</p></div>
-<div class="paragraph"><p><em>src_origin</em> defines the (<em>x</em>, <em>y</em>, <em>z</em>) offset in pixels in the 1D, 2D
-or 3D image, the (<em>x</em>, <em>y</em>) offset and the image index in the 2D image
-array or the (<em>x</em>) offset and the image index in the 1D image array. If
-<em>src_image</em> is a 2D image object, <em>src_origin</em>[2] must be 0. If
-<em>src_image</em> is a 1D image or 1D image buffer object, <em>src_origin</em>[1] and
-<em>src_origin</em>[2] must be 0. If <em>src_image</em> is a 1D image array object,
-<em>src_origin</em>[2] must be 0. If <em>src_image</em> is a 1D image array object,
-<em>src_origin</em>[1] describes the image index in the 1D image array. If
-<em>src_image</em> is a 2D image array object, <em>src_origin</em>[2] describes the
-image index in the 2D image array.</p></div>
-<div class="paragraph"><p><em>region_defines the_</em>(<em>width</em>, <em>height,</em> <em>depth</em>) in pixels of the 1D,
-2D or 3D rectangle, the (<em>width</em>, <em>height</em>) in pixels of the 2D
-rectangle and the number of images of a 2D image array or the (<em>width</em>)
-in pixels of the 1D rectangle and the number of images of a 1D image
-array. If <em>src_image</em> is a 2D image object, <em>region</em>[2] must be 1. If
-<em>src_image</em> is a 1D image or 1D image buffer object, <em>region</em>[1] and
-<em>region</em>[2] must be 1. If <em>src_image</em> is a 1D image array object,
-<em>region</em>[2] must be 1. The values in <em>region</em> cannot be 0.</p></div>
-<div class="paragraph"><p><em>dst_offset</em> refers to the offset where to begin copying data into
-<em>dst_buffer</em>. The size in bytes of the region to be copied referred to
-as <em>dst_cb</em> is computed as <em>width</em> * <em>height</em> * <em>depth</em> * <em>bytes/image
-element</em> if <em>src_image</em> is a 3D image object, is computed as <em>width</em> *
-<em>height</em> * <em>bytes/image element</em> if <em>src_image</em> is a 2D image, is
-computed as <em>width</em> * <em>height</em> * <em>arraysize</em> * <em>bytes/image element</em> if
-<em>src_image</em> is a 2D image array object, is computed as <em>width</em> *
-<em>bytes/image element</em> if <em>src_image</em> is a 1D image or 1D image buffer
-object and is computed as <em>width</em> * <em>arraysize</em> * <em>bytes/image element</em>
-if <em>src_image</em> is a 1D image array object.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</p></div>
-<div class="paragraph"><p><em>event</em> returns an event object that identifies this particular copy
-command and can be used to query or queue a wait for this particular
-command to complete. <em>event</em> can be NULL 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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead. If the
-<em>event_wait_list</em> and the <em>event</em> arguments are not NULL, 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>clEnqueueCopyImageToBuffer</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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if the
-context associated with <em>command_queue</em>, <em>src_image</em> and <em>dst_buffer</em>
-are not the same or if the context associated with <em>command_queue</em> and
-events in <em>event_wait_list</em> are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>src_image</em> is not a valid image object or <em>dst_buffer</em> is not a valid
-buffer object or if <em>src_image</em> is a 1D image buffer object created from
-<em>dst_buffer</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if the
-1D, 2D or 3D rectangular region specified by <em>src_origin</em> and
-<em>src_origin</em> + <em>region</em> refers to a region outside <em>src_image</em>, or if
-the region specified by <em>dst_offset</em> and <em>dst_offset</em> + <em>dst_cb</em> to a
-region outside <em>dst_buffer</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if values
-in <em>src_origin</em> and <em>region</em> do not follow rules described in the
-argument description for <em>src_origin</em> and <em>region</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_MISALIGNED_SUB_BUFFER_OFFSET if <em>dst_buffer</em> is a sub-buffer object
-and <em>offset</em> specified when the sub-buffer object is created is not
-aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated
-with <em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_IMAGE_SIZE if
-image dimensions (image width, height, specified or compute row and/or
-slice pitch) for <em>src_image</em> are not supported by device associated with
-<em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and
-data type) for <em>src_image</em> are not supported by device associated with
-<em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for data store associated with <em>src_image</em> or <em>dst_buffer</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-the device associated with <em>command_queue</em> does not support images (i.e.
-CL_DEVICE_IMAGE_SUPPORT specified in <em>table 4.3</em> is CL_FALSE).
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueCopyBufferToImage(cl_command_queue command_queue,
-                                  cl_mem src_buffer,
-                                  cl_mem dst_image,
-                                  size_t src_offset,
-                                  const size_t *dst_origin,
-                                  const size_t *region,
-                                  cl_uint num_events_in_wait_list,
-                                  const cl_event *event_wait_list,
-                                  cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to copy a buffer object to an image object.</p></div>
-<div class="paragraph"><p><em>command_queue</em> must be a valid host command-queue. The OpenCL context
-associated with <em>command_queue</em>, <em>src_buffer</em> and <em>dst_image</em> must be
-the same.</p></div>
-<div class="paragraph"><p><em>src_buffer</em> is a valid buffer object.</p></div>
-<div class="paragraph"><p><em>dst_image</em> is a valid image object.</p></div>
-<div class="paragraph"><p><em>src_offset</em> refers to the offset where to begin copying data from
-<em>src_buffer</em>.</p></div>
-<div class="paragraph"><p><em>dst_origin</em> defines the (<em>x</em>, <em>y</em>, <em>z</em>) offset in pixels in the 1D, 2D
-or 3D image, the (<em>x</em>, <em>y</em>) offset and the image index in the 2D image
-array or the (<em>x</em>) offset and the image index in the 1D image array. If
-<em>dst_image</em> is a 2D image object, <em>dst_origin</em>[2] must be 0. If
-<em>dst_image</em> is a 1D image or 1D image buffer object, <em>dst_origin</em>[1] and
-<em>dst_origin</em>[2] must be 0. If <em>dst_image</em> is a 1D image array object,
-<em>dst_origin</em>[2] must be 0. If <em>dst_image</em> is a 1D image array object,
-<em>dst_origin</em>[1] describes the image index in the 1D image array. If
-<em>dst_image</em> is a 2D image array object, <em>dst_origin</em>[2] describes the
-image index in the 2D image array.</p></div>
-<div class="paragraph"><p><em>region_defines the_</em>(<em>width</em>, <em>height,</em> <em>depth</em>) in pixels of the 1D,
-2D or 3D rectangle, the (<em>width</em>, <em>height</em>) in pixels of the 2D
-rectangle and the number of images of a 2D image array or the (<em>width</em>)
-in pixels of the 1D rectangle and the number of images of a 1D image
-array. If <em>dst_image</em> is a 2D image object, <em>region</em>[2] must be 1. If
-<em>dst_image</em> is a 1D image or 1D image buffer object, <em>region</em>[1] and
-<em>region</em>[2] must be 1. If <em>dst_image</em> is a 1D image array object,
-<em>region</em>[2] must be 1. The values in <em>region</em> cannot be 0.</p></div>
-<div class="paragraph"><p>The size in bytes of the region to be copied from <em>src_buffer</em> referred
-to as <em>src_cb</em> is computed as <em>width</em> * <em>height</em> * <em>depth</em> *
-<em>bytes/image element</em> if <em>dst_image</em> is a 3D image object, is computed
-as <em>width</em> * <em>height</em> * <em>bytes/image element</em> if <em>dst_image</em> is a 2D
-image, is computed as <em>width</em> * <em>height</em> * <em>arraysize</em> * <em>bytes/image
-element</em> if <em>dst_image</em> is a 2D image array object, is computed as
-<em>width</em> * <em>bytes/image element</em> if <em>dst_image</em> is a 1D image or 1D image
-buffer object and is computed as <em>width</em> * <em>arraysize</em> * <em>bytes/image
-element</em> if <em>dst_image</em> is a 1D image array object.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</p></div>
-<div class="paragraph"><p><em>event</em> returns an event object that identifies this particular copy
-command and can be used to query or queue a wait for this particular
-command to complete. <em>event</em> can be NULL 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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead. If the
-<em>event_wait_list</em> and the <em>event</em> arguments are not NULL, 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>clEnqueueCopyBufferToImage</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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if the
-context associated with <em>command_queue</em>, <em>src_buffer</em> and <em>dst_image</em>
-are not the same or if the context associated with <em>command_queue</em> and
-events in <em>event_wait_list</em> are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>src_buffer</em> is not a valid buffer object or <em>dst_image</em> is not a valid
-image object or if <em>dst_image</em> is a 1D image buffer object created from
-<em>src_buffer</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if the
-1D, 2D or 3D rectangular region specified by <em>dst_origin</em> and
-<em>dst_origin</em> + <em>region</em> refer to a region outside <em>dst_image</em>, or if the
-region specified by <em>src_offset</em> and <em>src_offset</em> + <em>src_cb</em> refer to a
-region outside <em>src_buffer</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if values
-in <em>dst_origin</em> and <em>region</em> do not follow rules described in the
-argument description for <em>dst_origin</em> and <em>region</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_MISALIGNED_SUB_BUFFER_OFFSET if <em>src_buffer</em> is a sub-buffer object
-and <em>offset</em> specified when the sub-buffer object is created is not
-aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated
-with <em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_IMAGE_SIZE if
-image dimensions (image width, height, specified or compute row and/or
-slice pitch) for <em>dst_image</em> are not supported by device associated with
-<em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and
-data type) for <em>dst_image</em> are not supported by device associated with
-<em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for data store associated with <em>src_buffer</em> or <em>dst_image</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-the device associated with <em>command_queue</em> does not support images (i.e.
-CL_DEVICE_IMAGE_SUPPORT specified in <em>table 4.3</em> is CL_FALSE).
-</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="sect3">
-<h4 id="_mapping_image_objects">5.3.6. Mapping Image Objects</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>void clEnqueueMapImage(cl_command_queue command_queue,
-                       cl_mem image,
-                       cl_bool blocking_map,
-                       cl_map_flags map_flags,
-                       const size_t *origin,
-                       const size_t *region,
-                       size_t *image_row_pitch,
-                       size_t *image_slice_pitch,
-                       cl_uint num_events_in_wait_list,
-                       const cl_event *event_wait_list,
-                       cl_event *event,
-                       cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to map a region in the image object given by <em>image</em>
-into the host address space and returns a pointer to this mapped region.</p></div>
-<div class="paragraph"><p><em>command_queue</em> must be a valid host command-queue.</p></div>
-<div class="paragraph"><p><em>image</em> is a valid image object. The OpenCL context associated with
-<em>command_queue</em> and <em>image</em> must be the same.</p></div>
-<div class="paragraph"><p><em>blocking_map</em> indicates if the map operation is <em>blocking</em> or
-<em>non-blocking</em>.</p></div>
-<div class="paragraph"><p>If <em>blocking_map</em> is CL_TRUE, <strong>clEnqueueMapImage</strong> does not return until
-the specified region in <em>image</em> is mapped into the host address space
-and the application can access the contents of the mapped region using
-the pointer returned by <strong>clEnqueueMapImage</strong>.</p></div>
-<div class="paragraph"><p>If <em>blocking_map</em> is CL_FALSE i.e. map operation is non-blocking, the
-pointer to the mapped region returned by <strong>clEnqueueMapImage</strong> cannot be
-used until the map command has completed. The <em>event</em> argument returns
-an event object which can be used to query the execution status of the
-map command. When the map command is completed, the application can
-access the contents of the mapped region using the pointer returned by
-<strong>clEnqueueMapImage</strong>.</p></div>
-<div class="paragraph"><p><em>map_flags</em> is a bit-field and is described in <em>table 5.5</em>.</p></div>
-<div class="paragraph"><p><em>origin</em> defines the (<em>x</em>, <em>y</em>, <em>z</em>) offset in pixels in the 1D, 2D or
-3D image, the (<em>x</em>, <em>y</em>) offset and the image index in the 2D image
-array or the (<em>x</em>) offset and the image index in the 1D image array. If
-<em>image</em> is a 2D image object, <em>origin</em>[2] must be 0. If <em>image</em> is a 1D
-image or 1D image buffer object, <em>origin</em>[1] and <em>origin</em>[2] must be 0.
-If <em>image</em> is a 1D image array object, <em>origin</em>[2] must be 0. If
-<em>image</em> is a 1D image array object, <em>origin</em>[1] describes the image
-index in the 1D image array. If <em>image</em> is a 2D image array object,
-<em>origin</em>[2] describes the image index in the 2D image array.</p></div>
-<div class="paragraph"><p><em>region_defines the_</em>(<em>width</em>, <em>height,</em> <em>depth</em>) in pixels of the 1D,
-2D or 3D rectangle, the (<em>width</em>, <em>height</em>) in pixels of the 2D
-rectangle and the number of images of a 2D image array or the (<em>width</em>)
-in pixels of the 1D rectangle and the number of images of a 1D image
-array. If <em>image</em> is a 2D image object, <em>region</em>[2] must be 1. If
-<em>image</em> is a 1D image or 1D image buffer object, <em>region</em>[1] and
-<em>region</em>[2] must be 1. If <em>image</em> is a 1D image array object,
-<em>region</em>[2] must be 1. The values in <em>region</em> cannot be 0.</p></div>
-<div class="paragraph"><p><em>image_row_pitch</em> returns the scan-line pitch in bytes for the mapped
-region. This must be a non-NULL value.</p></div>
-<div class="paragraph"><p><em>image_slice_pitch</em> returns the size in bytes of each 2D slice of a 3D
-image or the size of each 1D or 2D image in a 1D or 2D image array for
-the mapped region. For a 1D and 2D image, zero is returned if this
-argument is not NULL. For a 3D image, 1D and 2D image array,
-<em>image_slice_pitch</em> must be a non-NULL value.</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 <strong>clEnqueueMapImage</strong> can be executed. If
-<em>event_wait_list</em> is NULL, then <strong>clEnqueueMapImage</strong> does not wait on any
-event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</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 NULL 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 NULL, 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><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>clEnqueueMapImage</strong> will return a pointer to the mapped region. The
-<em>errcode_ret</em> is set to CL_SUCCESS.</p></div>
-<div class="paragraph"><p>A NULL pointer is returned otherwise with one of the following error
-values returned in <em>errcode_ret</em>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_INVALID_COMMAND_QUEUE
-if _command_queue_is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if
-context associated with <em>command_queue_and _image</em> are not the same or
-if context associated with <em>command_queue</em> and events in
-<em>event_wait_list</em> are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>image</em> is not a valid image object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if region
-being mapped given by (<em>origin</em>, <em>origin+region</em>) is out of bounds or if
-values specified in _map_flags_are not valid.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if values
-in <em>origin</em> and <em>region</em> do not follow rules described in the argument
-description for <em>origin</em> and <em>region</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>image_row_pitch</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>image</em> is a 3D image, 1D or 2D image array object and
-<em>image_slice_pitch</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_INVALID_IMAGE_SIZE if
-image dimensions (image width, height, specified or compute row and/or
-slice pitch) for <em>image</em> are not supported by device associated with
-<em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and
-data type) for <em>image</em> are not supported by device associated with
-<em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_MAP_FAILURE if there is
-a failure to map the requested region into the host address space. This
-error cannot occur for image objects created with CL_MEM_USE_HOST_PTR or
-CL_MEM_ALLOC_HOST_PTR.
-</p>
-</li>
-<li>
-<p>
-     CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the map operation is
-blocking and the execution status of any of the events in
-<em>event_wait_list</em> is a negative integer value.
-</p>
-</li>
-<li>
-<p>
-     CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for data store associated with <em>image</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-the device associated with <em>command_queue</em> does not support images (i.e.
-CL_DEVICE_IMAGE_SUPPORT specified in <em>table 4.3</em> is CL_FALSE).
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-<em>image</em> has been created with CL_MEM_HOST_WRITE_ONLY or
-CL_MEM_HOST_NO_ACCESS and CL_MAP_READ is set in <em>map_flags</em> or if
-<em>image</em> has been created with CL_MEM_HOST_READ_ONLY or
-CL_MEM_HOST_NO_ACCESS and CL_MAP_WRITE or CL_MAP_WRITE_INVALIDATE_REGION
-is set in <em>map_flags</em>.
-</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>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-mapping would lead to overlapping regions being mapped for writing.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The pointer returned maps a 1D, 2D or 3D region starting at <em>origin</em> and
-is at least <em>region[0]</em> pixels in size for a 1D image, 1D image buffer
-or 1D image array, (<em>image_row_pitch * region[1])</em> pixels in size for a
-2D image or 2D image array, and (<em>image_slice_pitch * region[2])</em> pixels
-in size for a 3D image. The result of a memory access outside this
-region is undefined.</p></div>
-<div class="paragraph"><p>If the image object is created with CL_MEM_USE_HOST_PTR set in
-<em>mem_flags</em>, the following will be true:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      The <em>host_ptr</em> specified
-in <strong>clCreateImage</strong> is guaranteed to contain the latest bits in the
-region being mapped when the <strong>clEnqueueMapImage</strong> command has completed.
-</p>
-</li>
-<li>
-<p>
-      The pointer value returned
-by <strong>clEnqueueMapImage</strong> will be derived from the <em>host_ptr</em> specified
-when the image object is created.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Mapped image objects are unmapped using <strong>clEnqueueUnmapMemObject</strong>. This
-is described in <em>section 5.5.2</em>.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_image_object_queries">5.3.7. Image Object Queries</h4>
-<div class="paragraph"><p>To get information that is common to all memory objects, use the
-<strong>clGetMemObjectInfo</strong> function described in <em>section 5.5.5</em>.</p></div>
-<div class="paragraph"><p>To get information specific to an image object created with
-<strong>clCreateImage</strong>, use the following function
- </p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetImageInfo(cl_mem image,
-                      cl_image_info param_name,
-                      size_t param_value_size,
-                      void *param_value,
-                      size_t *param_value_size_ret)</pre>
-</div></div>
-<div class="paragraph"><p><em>image</em> specifies the image object being queried.</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>clGetImageInfo</strong> is described in <em>table 5.10</em>.</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 NULL, 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 &gt;= size of return type
-as described in <em>table 5.10</em>.</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 NULL, it is
-ignored.</p></div>
-<div class="paragraph"><p><strong>clGetImageInfo</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_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 <em>table
-5.10_and _param_value</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>image</em> is a not a valid image 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>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 16. <em>List of supported param_names by clGetImageInfo</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_image_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Info. returned in <em>param_value</em></strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_IMAGE_FORMAT</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_image_format</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return image format descriptor
-specified when <em>image</em> is created with <strong>clCreateImage</strong>.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_IMAGE_ELEMENT_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">Return size of each element of the
-image memory object given by <em>image</em> in bytes. An element is made up of
-<em>n</em> channels. The value of <em>n</em> is given in <em>cl_image_format</em>
-descriptor.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_IMAGE_ROW_PITCH</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 calculated row pitch in bytes of a
-row of elements of the image object given by <em>image</em>.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_IMAGE_SLICE_PITCH</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 calculated slice pitch in bytes
-of a 2D slice for the 3D image object or size of each image in a 1D or
-2D image array given by <em>image</em>. For a 1D image, 1D image buffer and 2D
-image object return 0.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_IMAGE_WIDTH</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 width of the image in pixels.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_IMAGE_HEIGHT</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 height of the image in pixels. For a
-1D image, 1D image buffer and 1D image array object, height = 0.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_IMAGE_DEPTH</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 depth of the image in pixels. For a
-1D image, 1D image buffer, 2D image or 1D and 2D image array object,
-depth = 0.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_IMAGE_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">Return number of images in the image
-array. If <em>image</em> is not an image array, 0 is returned.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_IMAGE_NUM_MIP_<br>
- LEVELS</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">Return num_mip_levels associated with <em>image</em>.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_IMAGE_NUM_SAMPLES</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">Return num_samples associated with
-<em>image</em>.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_pipes">5.4. Pipes</h3>
-<div class="paragraph"><p>A <em>pipe</em> is a memory object that stores data organized as a FIFO. Pipe
-objects can only be accessed using built-in functions that read from and
-write to a pipe. Pipe objects are not accessible from the host. A pipe
-object encapsulates the following information:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      Packet size in bytes
-</p>
-</li>
-<li>
-<p>
-      Maximum capacity in packets
-</p>
-</li>
-<li>
-<p>
-      Information about the number of packets currently in the pipe
-</p>
-</li>
-<li>
-<p>
-      Data packets
-</p>
-</li>
-</ul></div>
-<div class="sect3">
-<h4 id="_creating_pipe_objects">5.4.1. Creating Pipe Objects</h4>
-<div class="paragraph"><p>A <strong>pipe object</strong> is created using the following function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_mem clCreatePipe(cl_context context,
-                    cl_mem_flags flags,
-                    cl_uint pipe_packet_size,
-                    cl_uint pipe_max_packets,
-                    const cl_pipe_properties *properties,
-                    cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p><em>context</em> is a valid OpenCL context used to create the pipe object.</p></div>
-<div class="paragraph"><p><em>flags</em> is a bit-field that is used to specify allocation and usage
-information such as the memory arena that should be used to allocate the
-pipe object and how it will be used. <em>Table 5.3</em> describes the possible
-values for <em>flags</em>. Only CL_MEM_READ_WRITE and CL_MEM_HOST_NO_ACCESS
-can be specified when creating a pipe object. If the value specified for
-<em>flags</em> is 0, the default is used which is CL_MEM_READ_WRITE |
-CL_MEM_HOST_NO_ACCESS.</p></div>
-<div class="paragraph"><p><em>pipe_packet_size</em> is the size in bytes of a pipe packet.</p></div>
-<div class="paragraph"><p><em>pipe_max_packets</em> specifies the pipe capacity by specifying the maximum
-number of packets the pipe can hold.</p></div>
-<div class="paragraph"><p><em>properties</em> specifies a list of properties for the pipe and their
-corresponding values. Each property name is immediately followed by the
-corresponding desired value. The list is terminated with 0. In OpenCL
-2.2, <em>properties</em> must be NULL.</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>clCreatePipe</strong> returns a valid non-zero pipe object and <em>errcode_ret</em> is
-set to CL_SUCCESS if the pipe 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
-_context_is not a valid context.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if values
-specified in _flags_are not as defined above.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>properties</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_PIPE_SIZE if
-<em>pipe_packet_size</em> is 0 or the <em>pipe_packet_size</em> exceeds
-CL_DEVICE_PIPE_MAX_PACKET_SIZE value specified in <em>table 4.3</em> for all
-devices in <em>context_or if _pipe_max_packets</em> is 0.
-</p>
-</li>
-<li>
-<p>
-     CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for the pipe 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 class="paragraph"><p>Pipes follow the same memory consistency model as defined for buffer and
-image objects. The pipe state i.e. contents of the pipe across
-kernel-instances (on the same or different devices) is enforced at a
-synchronization point.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_pipe_object_queries">5.4.2. Pipe Object Queries</h4>
-<div class="paragraph"><p>To get information that is common to all memory objects, use the
-<strong>clGetMemObjectInfo</strong> function described in <em>section 5.5.5</em>.</p></div>
-<div class="paragraph"><p>To get information specific to a pipe object created with
-<strong>clCreatePipe</strong>, use the following function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetPipeInfo(cl_mem pipe,
-                     cl_pipe_info param_name,
-                     size_t param_value_size,
-                     void *param_value,
-                     size_t *param_value_size_ret)</pre>
-</div></div>
-<div class="paragraph"><p><em>pipe</em> specifies the pipe object being queried.</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>clGetPipeInfo</strong> is described in <em>table 5.11</em>.</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 NULL, 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 &gt;= size of return type
-as described in <em>table 5.11</em>.</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 NULL, it is
-ignored.</p></div>
-<div class="paragraph"><p><strong>clGetPipeInfo</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_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 <em>table
-5.11_and _param_value</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>pipe</em> is a not a valid pipe 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>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 17. <em>List of supported param_names by clGetPipeInfo</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_pipe_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Info. returned in <em>param_value</em></strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PIPE_PACKET_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">Return pipe packet size specified when
-<em>pipe</em> is created with <strong>clCreatePipe</strong>.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PIPE_MAX_PACKETS</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">Return max. number of packets specified
-when <em>pipe</em> is created with <strong>clCreatePipe</strong>.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_handling_memory_objects">5.5. Handling Memory Objects</h3>
-<div class="sect3">
-<h4 id="_retaining_and_releasing_memory_objects">5.5.1. Retaining and Releasing Memory Objects</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clRetainMemObject(cl_mem memobj)</pre>
-</div></div>
-<div class="paragraph"><p>increments the <em>memobj</em> reference count. <strong>clRetainMemObject</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_MEM_OBJECT if
-<em>memobj</em> is not a valid memory object (buffer or image 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 class="paragraph"><p><strong>clCreateBuffer</strong>, <strong>clCreateSubBuffer</strong>, <strong>clCreateImage</strong> and
-<strong>clCreatePipe</strong> perform an implicit retain.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clReleaseMemObject(cl_mem memobj)</pre>
-</div></div>
-<div class="paragraph"><p>decrements the <em>memobj</em> reference count. <strong>clReleaseMemObject</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_MEM_OBJECT if
-<em>memobj</em> is not a valid memory 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 class="paragraph"><p>After the <em>memobj</em> reference count becomes zero and commands queued for
-execution on a command-queue(s) that use <em>memobj</em> have finished, the
-memory object is deleted. If <em>memobj</em> is a buffer object, <em>memobj</em>
-cannot be deleted until all sub-buffer objects associated with <em>memobj</em>
-are deleted. Using this function to release a reference that was not
-obtained by creating the object or by calling <strong>clRetainMemObject</strong> causes
-undefined behavior.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clSetMemObjectDestructorCallback
-       (cl_mem memobj,
-        void (CL_CALLBACK *pfn_notify)(cl_mem memobj,void *user_data),
-        void *user_data)</pre>
-</div></div>
-<div class="paragraph"><p>registers a user callback function with a memory object. Each call to
-<strong>clSetMemObjectDestructorCallback</strong> registers the specified user callback
-function on a callback stack associated with <em>memobj</em>. The registered
-user callback functions are called in the reverse order in which they
-were registered. The user callback functions are called and then the
-memory objects resources are freed and the memory object is deleted.
-This provides a mechanism for the application (and libraries) using
-<em>memobj</em> to be notified when the memory referenced by <em>host_ptr</em>,
-specified when the memory object is created and used as the storage bits
-for the memory object, can be reused or freed.</p></div>
-<div class="paragraph"><p><em>memobj</em> is a valid memory object.</p></div>
-<div class="paragraph"><p><em>pfn_notify</em> is the callback function that can be registered by the
-application. This callback function may be called asynchronously by the
-OpenCL implementation. It is the applications responsibility to ensure
-that the callback function is thread-safe. The parameters to this
-callback function are:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      <em>memobj_is the memory
-object being deleted. When the user callback is called by the
-implementation, this memory object is not longer valid. _memobj</em> is
-only provided for reference purposes.
-</p>
-</li>
-<li>
-<p>
-      _user_data_is a pointer to
-user supplied data.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>_user_data_will be passed as the _user_data_argument when _pfn_notify_is
-called. _user_data_can be NULL.</p></div>
-<div class="paragraph"><p><strong>clSetMemObjectDestructorCallback</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_MEM_OBJECT if
-<em>memobj</em> is not a valid memory object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>pfn_notify</em> is NULL.
-</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="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">When the user callback function is called by the implementation,
-the contents of the memory region pointed to by <em>host_ptr</em> (if the
-memory object is created with CL_MEM_USE_HOST_PTR) are undefined. The
-callback function is typically used by the application to either free or
-reuse the memory region pointed to by <em>host_ptr</em>.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>The behavior of calling expensive system routines, OpenCL API calls to
-create contexts or command-queues, or blocking OpenCL operations from
-the following list below, in a callback is undefined.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>clFinish</strong>, 
-</p>
-</li>
-<li>
-<p>
-<strong>clWaitForEvents</strong>, 
-</p>
-</li>
-<li>
-<p>
-blocking calls to <strong>clEnqueueReadBuffer</strong>, <strong>clEnqueueReadBufferRect</strong>,
-</p>
-</li>
-<li>
-<p>
-<strong>clEnqueueWriteBuffer</strong>,<strong>clEnqueueWriteBufferRect,</strong>
-</p>
-</li>
-<li>
-<p>
-blocking calls to <strong>clEnqueueReadImage</strong> and *clEnqueueWriteImage, *
-</p>
-</li>
-<li>
-<p>
-blocking calls to <strong>clEnqueueMapBuffer,</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>clEnqueueMapImage</strong>,
-</p>
-</li>
-<li>
-<p>
-blocking calls to <strong>clBuildProgram</strong>, <strong>clCompileProgram</strong> or <strong>clLinkProgram</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If an application needs to wait for completion of a routine from the
-above list in a callback, please use the non-blocking form of the
-function, and assign a completion callback to it to do the remainder of
-your work.  Note that when a callback (or other code) enqueues commands
-to a command-queue, the commands are not required to begin execution
-until the queue is flushed. In standard usage, blocking enqueue calls
-serve this role by implicitly flushing the queue. Since blocking calls
-are not permitted in callbacks, those callbacks that enqueue commands on
-a command queue should either call <strong>clFlush</strong> on the queue before
-returning or arrange for <strong>clFlush</strong> to be called later on another thread.</p></div>
-<div class="paragraph"><p>The user callback function may not call OpenCL APIs with the memory
-object for which the callback function is invoked and for such cases the
-behavior of OpenCL APIs is considered to be undefined.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_unmapping_mapped_memory_objects">5.5.2. Unmapping Mapped Memory Objects</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueUnmapMemObject(cl_command_queue command_queue,
-                               cl_mem memobj,
-                               void *mapped_ptr,
-                               cl_uint num_events_in_wait_list,
-                               const cl_event *event_wait_list,
-                               cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to unmap a previously mapped region of a memory
-object. Reads or writes from the host using the pointer returned by
-<strong>clEnqueueMapBuffer</strong> or *clEnqueueMapImage*are considered to be complete.</p></div>
-<div class="paragraph"><p><em>command_queue</em> must be a valid host command-queue.</p></div>
-<div class="paragraph"><p><em>memobj</em> is a valid memory (buffer or image) object. The OpenCL context
-associated with <em>command_queue</em> and <em>memobj</em> must be the same.</p></div>
-<div class="paragraph"><p><em>mapped_ptr</em> is the host address returned by a previous call to
-<strong>clEnqueueMapBuffer</strong>, or <strong>clEnqueueMapImage</strong> for <em>memobj</em>.</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 <strong>clEnqueueUnmapMemObject</strong> can be executed. If
-<em>event_wait_list</em> is NULL, then <strong>clEnqueueUnmapMemObject</strong> does not wait
-on any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</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 NULL 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. <strong>clEnqueueBarrierWithWaitList</strong> can be used
-instead. If the <em>event_wait_list</em> and the <em>event</em> arguments are not
-NULL, 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>clEnqueueUnmapMemObject</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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>memobj</em> is not a valid memory object or is a pipe object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>mapped_ptr</em> is not a valid pointer returned by
-<strong>clEnqueueMapBuffer</strong> or <strong>clEnqueueMapImage</strong> for <em>memobj</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or if
-<em>event_wait_list</em> is not NULL 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_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>
-<li>
-<p>
-      CL_INVALID_CONTEXT if
-context associated with <em>command_queue</em> and <em>memobj</em> are not the same or
-if the context associated with <em>command_queue</em> and events in
-<em>event_wait_list</em> are not the same.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><strong>clEnqueueMapBuffer</strong> and <strong>clEnqueueMapImage</strong> increment the mapped count
-of the memory object. The initial mapped count value of the memory
-object is zero. Multiple calls to
-<strong>clEnqueueMapBuffer</strong>, or <strong>clEnqueueMapImage</strong> on the same memory object
-will increment this mapped count by appropriate number of calls.
-*clEnqueueUnmapMemObject*decrements the mapped count of the memory
-object.</p></div>
-<div class="paragraph"><p><strong>clEnqueueMapBuffer</strong>, and <strong>clEnqueueMapImage</strong> act as synchronization
-points for a region of the buffer object being mapped.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_accessing_mapped_regions_of_a_memory_object">5.5.3. Accessing mapped regions of a memory object</h4>
-<div class="paragraph"><p>This section describes the behavior of OpenCL commands that access
-mapped regions of a memory object.</p></div>
-<div class="paragraph"><p>The contents of the region of a memory object and associated memory
-objects (sub-buffer objects or 1D image buffer objects that overlap this
-region) mapped for writing (i.e. CL_MAP_WRITE or
-CL_MAP_WRITE_INVALIDATE_REGION is set in <em>map_flags</em> argument to
-<strong>clEnqueueMapBuffer</strong>, or <strong>clEnqueueMapImage</strong>) are considered to be
-undefined until this region is unmapped.</p></div>
-<div class="paragraph"><p>Multiple commands in command-queues can map a region or overlapping
-regions of a memory object and associated memory objects (sub-buffer
-objects or 1D image buffer objects that overlap this region) for reading
-(i.e. <em>map_flags</em> = CL_MAP_READ). The contents of the regions of a
-memory object mapped for reading can also be read by kernels and other
-OpenCL commands (such as <strong>clEnqueueCopyBuffer</strong>) executing on a
-device(s).</p></div>
-<div class="paragraph"><p>Mapping (and unmapping) overlapped regions in a memory object and/or
-associated memory objects (sub-buffer objects or 1D image buffer objects
-that overlap this region) for writing is an error and will result in
-CL_INVALID_OPERATION error returned by <strong>clEnqueueMapBuffer</strong>, or
-<strong>clEnqueueMapImage</strong>.</p></div>
-<div class="paragraph"><p>If a memory object is currently mapped for writing, the application must
-ensure that the memory object is unmapped before any enqueued kernels or
-commands that read from or write to this memory object or any of its
-associated memory objects (sub-buffer or 1D image buffer objects) or its
-parent object (if the memory object is a sub-buffer or 1D image buffer
-object) begin execution; otherwise the behavior is undefined.</p></div>
-<div class="paragraph"><p>If a memory object is currently mapped for reading, the application must
-ensure that the memory object is unmapped before any enqueued kernels or
-commands that write to this memory object or any of its associated
-memory objects (sub-buffer or 1D image buffer objects) or its parent
-object (if the memory object is a sub-buffer or 1D image buffer object)
-begin execution; otherwise the behavior is undefined.</p></div>
-<div class="paragraph"><p>A memory object is considered as mapped if there are one or more active
-mappings for the memory object irrespective of whether the mapped
-regions span the entire memory object.</p></div>
-<div class="paragraph"><p>Accessing the contents of the memory region referred to by the mapped
-pointer that has been unmapped is undefined.</p></div>
-<div class="paragraph"><p>The mapped pointer returned by <strong>clEnqueueMapBuffer</strong> or
-<strong>clEnqueueMapImage</strong> can be used as <em>ptr</em> argument value to
-<strong>clEnqueue{Read | Write}Buffer</strong>, <strong>clEnqeue{Read | Write}BufferRect</strong>,
-<strong>clEnqueue{Read | Write}Image</strong> provided the rules described above are
-adhered to.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_migrating_memory_objects">5.5.4. Migrating Memory Objects</h4>
-<div class="paragraph"><p>This section describes a mechanism for assigning which device an OpenCL
-memory object resides. A user may wish to have more explicit control
-over the location of their memory objects on creation. This could be
-used to:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      Ensure that an object is
-allocated on a specific device prior to usage.
-</p>
-</li>
-<li>
-<p>
-      Preemptively migrate an
-object from one device to another.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueMigrateMemObjects(cl_command_queue command_queue,
-                                  cl_uint num_mem_objects,
-                                  const cl_mem *mem_objects,
-                                  cl_mem_migration_flags flags,
-                                  cl_uint num_events_in_wait_list
-                                  const cl_event *event_wait_list,
-                                  cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to indicate which device a set of memory objects
-should be associated with. Typically, memory objects are implicitly
-migrated to a device for which enqueued commands, using the memory
-object, are targeted. <strong>clEnqueueMigrateMemObjects</strong> allows this
-migration to be explicitly performed ahead of the dependent commands.
-This allows a user to preemptively change the association of a memory
-object, through regular command queue scheduling, in order to prepare
-for another upcoming command. This also permits an application to
-overlap the placement of memory objects with other unrelated operations
-before these memory objects are needed potentially hiding transfer
-latencies. Once the event, returned from <strong>clEnqueueMigrateMemObjects</strong>,
-has been marked CL_COMPLETE the memory objects specified in
-<em>mem_objects</em> have been successfully migrated to the device associated
-with <em>command_queue</em>. The migrated memory object shall remain resident
-on the device until another command is enqueued that either implicitly
-or explicitly migrates it away.</p></div>
-<div class="paragraph"><p><strong>clEnqueueMigrateMemObjects</strong> can also be used to direct the initial
-placement of a memory object, after creation, possibly avoiding the
-initial overhead of instantiating the object on the first enqueued
-command to use it.</p></div>
-<div class="paragraph"><p>The user is responsible for managing the event dependencies, associated
-with this command, in order to avoid overlapping access to memory
-objects. Improperly specified event dependencies passed to
-<strong>clEnqueueMigrateMemObjects</strong> could result in undefined results.</p></div>
-<div class="paragraph"><p><em>command_queue</em> is a valid host command-queue. The specified set of
-memory objects in <em>mem_objects</em> will be migrated to the OpenCL device
-associated with <em>command_queue</em> or to the host if the
-CL_MIGRATE_MEM_OBJECT_HOST has been specified.</p></div>
-<div class="paragraph"><p><em>num_mem_objects_is the number of memory objects specified in
-_mem_objects</em>.</p></div>
-<div class="paragraph"><p><em>mem_objects</em> is a pointer to a list of memory objects.</p></div>
-<div class="paragraph"><p><em>flags</em> is a bit-field that is used to specify migration options. The
-<em>table 5.12</em> describes the possible values for flags.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 18. <em>Supported values for cl_mem_migration_flags</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_mem_migration flags</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"><strong>CL_MIGRATE_MEM_OBJECT_HOST</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">This flag indicates that the specified
-set of memory objects are to be migrated to the host, regardless of the
-target command-queue.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MIGRATE_MEM_OBJECT_<br>
- CONTENT_UNDEFINED</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">This flag indicates that the contents of the set of
-memory objects are undefined after migration. The specified set of
-memory objects are migrated to the device associated with
-_command_queue_without incurring the overhead of migrating their
-contents.</p></td>
-</tr>
-</tbody>
-</table>
-<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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</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 NULL 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 NULL, 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>clEnqueueMigrateMemObjects</strong> return 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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if the
-context associated with <em>command_queue</em> and memory objects in
-<em>mem_objects</em> are not the same or if the context associated with
-<em>command_queue</em> and events in <em>event_wait_list</em> are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-any of the memory objects in <em>mem_objects</em> is not a valid memory object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>num_mem_objects</em> is zero or if <em>mem_objects</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>flags</em> is not 0 or is not any of the values described in the table
-above.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for the specified set of memory objects in <em>mem_objects</em>.
-</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="sect3">
-<h4 id="_memory_object_queries">5.5.5. Memory Object Queries</h4>
-<div class="paragraph"><p>To get information that is common to all memory objects (buffer and
-image objects), use the following function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetMemObjectInfo(cl_mem memobj,
-                          cl_mem_info param_name,
-                          size_t param_value_size,
-                          void *param_value,
-                          size_t *param_value_size_ret)</pre>
-</div></div>
-<div class="paragraph"><p><em>memobj</em> specifies the memory object being queried.</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>clGetMemObjectInfo</strong> is described in <em>table 5.13</em>.</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 NULL, 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 &gt;= size of return type
-as described in <em>table 5.13</em>.</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 NULL, it is
-ignored.</p></div>
-<div class="paragraph"><p><strong>clGetMemObjectInfo</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_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 <em>table 5.13</em>
-and <em>param_value</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-<em>memobj</em> is a not a valid memory 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>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 19. <em>List of supported param_names by clGetMemObjectInfo</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_mem_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Info. returned in <em>param_value</em></strong></p></td>
-</tr>
-<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:
-<br>
-<br>
-CL_MEM_OBJECT_BUFFER if memobj
-is created with clCreateBuffer or
-clCreateSubBuffer.
-<br>
-<br>
-cl_image_desc.image_type argument
-value if memobj is created with
-clCreateImage.
-<br>
-<br>
-CL_MEM_OBJECT_PIPE if memobj is
-created with clCreatePipe.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_FLAGS</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_mem_flags</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return the flags argument value specified
-when memobj is created with
-clCreateBuffer,
-clCreateSubBuffer,
-clCreateImage or
-clCreatePipe.
-<br>
-<br>
-If memobj is a sub-buffer the memory
-access qualifiers inherited from parent
-buffer is also returned.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_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">Return actual size of the data store associated
-with <em>memobj</em> in bytes.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_HOST_PTR</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">void *</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">If memobj is created with
-clCreateBuffer or clCreateImage and
-CL_MEM_USE_HOST_PTR is specified
-in mem_flags, return the host_ptr
-argument value specified when memobj
-is created. Otherwise a NULL value is
-returned.
-<br>
-<br>
-If memobj is created with
-clCreateSubBuffer, return the host_ptr
-+ origin value specified when memobj is
-created.  host_ptr is the argument value
-specified to clCreateBuffer and
-CL_MEM_USE_HOST_PTR is specified
-in mem_flags for memory object from
-which memobj is created.  Otherwise a
-NULL value is returned.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">*CL_MEM_MAP_COUNT*<span class="footnote"><br>[The map count returned should be considered immediately stale. It is unsuitable for general use in applications.
-This feature is provided for debugging.]<br></span>:</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">Map count.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">*CL_MEM_REFERENCE_COUNT*<span class="footnote"><br>[The reference count returned should be considered immediately stale. It is unsuitable for general use in
-applications. This feature is provided for identifying memory leaks.]<br></span>:</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">Return <em>memobj</em> reference count.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_CONTEXT</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_context</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return context specified when memory
-object is created. If <em>memobj</em> is created using <strong>clCreateSubBuffer</strong>,
-the context associated with the memory object specified as the <em>buffer</em>
-argument to <strong>clCreateSubBuffer</strong> is returned.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_ASSOCIATED_ MEMOBJECT</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_mem</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return memory object from which
-memobj is created. This returns the memory object specified
-as buffer argument to
-clCreateSubBuffer if memobj is a subbuffer object created using
-clCreateSubBuffer.
-<br>
-<br>
-This returns the mem_object specified in
-cl_image_desc if memobj is an image
-object.
-<br>
-<br>
-Otherwise a NULL 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 memobj is a sub-buffer
-object created using clCreateSubBuffer.
-<br>
-<br>
-This return 0 if memobj 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>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_bool</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return CL_TRUE if <em>memobj</em> is a buffer object that
-was created with CL_MEM_USE_HOST_PTR or is a sub-buffer object of a
-buffer object that was created with CL_MEM_USE_HOST_PTR and the
-<em>host_ptr</em> specified when the buffer object was created is a SVM
-pointer; otherwise returns CL_FALSE.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_shared_virtual_memory">5.6. Shared Virtual Memory</h3>
-<div class="paragraph"><p>OpenCL 2.2 adds support for shared virtual memory (a.k.a. SVM). SVM
-allows the host and kernels executing on devices to directly share
-complex, pointer-containing data structures such as trees and linked
-lists. It also eliminates the need to marshal data between the host and
-devices. As a result, SVM substantially simplifies OpenCL programming
-and may improve performance.</p></div>
-<div class="sect3">
-<h4 id="_svm_sharing_granularity_coarse_and_fine_grained_sharing">5.6.1. SVM sharing granularity: coarse- and fine- grained sharing</h4>
-<div class="paragraph"><p>OpenCL maintains memory consistency in a coarse-grained fashion in
-regions of buffers. We call this coarse-grained sharing. Many platforms
-such as those with integrated CPU-GPU processors and ones using the
-SVM-related PCI-SIG IOMMU services can do better, and can support
-sharing at a granularity smaller than a buffer. We call this
-fine-grained sharing. OpenCL 2.0 requires that the host and all OpenCL
-2.2 devices support coarse-grained sharing at a minimum.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      Coarse-grained sharing:
-Coarse-grain sharing may be used for memory and virtual pointer sharing
-between multiple devices as well as between the host and one or more
-devices. The shared memory region is a memory buffer allocated using
-<strong>clSVMAlloc</strong>. Memory consistency is guaranteed at synchronization points
-and the host can use calls to <strong>clEnqueueSVMMap</strong> and <strong>clEnqueueSVMUnmap</strong>
-or create a cl_mem buffer object using the SVM pointer and use OpenCLs
-existing host API functions <strong>clEnqueueMapBuffer</strong> and
-<strong>clEnqueueUnmapMemObject</strong> to update regions of the buffer. What
-coarse-grain buffer SVM adds to OpenCLs earlier buffer support are the
-ability to share virtual memory pointers and a guarantee that concurrent
-access to the same memory allocation from multiple kernels on a single
-device is valid. The coarse-grain buffer SVM provides a memory
-consistency model similar to the global memory consistency model
-described in <em>sections 3.3.1</em> and <em>3.4.3</em> of the OpenCL 1.2
-specification. This memory consistency applies to the regions of buffers
-being shared in a coarse-grained fashion. It is enforced at the
-synchronization points between commands enqueued to command queues in a
-single context with the additional consideration that multiple kernels
-concurrently running on the same device may safely share the data.
-</p>
-</li>
-<li>
-<p>
-      Fine-grained sharing:
-Shared virtual memory where memory consistency is maintained at a
-granularity smaller than a buffer. How fine-grained SVM is used depends
-on whether the device supports SVM atomic operations.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>o   If SVM atomic operations are supported, they provide memory
-consistency for loads and stores by the host and kernels executing on
-devices supporting SVM. This means that the host and devices can
-concurrently read and update the same memory. The consistency provided
-by SVM atomics is in addition to the consistency provided at
-synchronization points. There is no need for explicit calls to
-<strong>clEnqueueSVMMap</strong> and <strong>clEnqueueSVMUnmap</strong> or <strong>clEnqueueMapBuffer</strong> and
-<strong>clEnqueueUnmapMemObject</strong> on a cl_mem buffer object created using the
-SVM pointer.</p></div>
-<div class="paragraph"><p>o   If SVM atomic operations are not supported, the host and devices can
-concurrently read the same memory locations and can concurrently update
-non-overlapping memory regions, but attempts to update the same memory
-locations are undefined. Memory consistency is guaranteed at
-synchronization points without the need for explicit calls to to
-<strong>clEnqueueSVMMap</strong> and <strong>clEnqueueSVMUnmap</strong> or <strong>clEnqueueMapBuffer</strong> and
-<strong>clEnqueueUnmapMemObject</strong> on a cl_mem buffer object created using the
-SVM pointer.</p></div>
-<div class="paragraph"><p>There are two kinds of fine-grain sharing support. Devices may support
-either fine-grain buffer sharing or fine-grain system sharing.</p></div>
-<div class="paragraph"><p>o   Fine-grain buffer sharing provides fine-grain SVM only within
-buffers and is an extension of coarse-grain sharing. To support
-fine-grain buffer sharing in an OpenCL context, all devices in the
-context must support CL_DEVICE_SVM_FINE_GRAIN_BUFFER.</p></div>
-<div class="paragraph"><p>o   Fine-grain system sharing enables fine-grain sharing of the hosts
-entire virtual memory, including memory regions allocated by the system
-<strong>malloc</strong> API. OpenCL buffer objects are unnecessary and programmers can
-pass pointers allocated using <strong>malloc</strong> to OpenCL kernels.</p></div>
-<div class="paragraph"><p>As an illustration of fine-grain SVM using SVM atomic operations to
-maintain memory consistency, consider the following example. The host
-and a set of devices can simultaneously access and update a shared
-work-queue data structure holding work-items to be done. The host can
-use atomic operations to insert new work-items into the queue at the
-same time as the devices using similar atomic operations to remove
-work-items for processing.</p></div>
-<div class="paragraph"><p>It is the programmers responsibility to ensure that no host code or
-executing kernels attempt to access a shared memory region after that
-memory is freed. We require the SVM implementation to work with either
-32- or 64- bit host applications subject to the following requirement:
-the address space size must be the same for the host and all OpenCL
-devices in the context.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>void* clSVMAlloc(cl_context context,
-                 cl_svm_mem_flags flags,
-                 size_t size,
-                 cl_uint alignment)</pre>
-</div></div>
-<div class="paragraph"><p>allocates a shared virtual memory buffer (referred to as a SVM buffer)
-that can be shared by the host and all devices in an OpenCL context that
-support shared virtual memory.</p></div>
-<div class="paragraph"><p><em>context</em> is a valid OpenCL context used to create the SVM buffer.</p></div>
-<div class="paragraph"><p><em>flags</em> is a bit-field that is used to specify allocation and usage
-information. <em>Table 5.14</em> describes the possible values for <em>flags</em>.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 20. <em>List of supported cl_svm_mem_flags_values</em></caption>
-<col style="width:50%;">
-<col style="width:50%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_svm_mem_flags</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"><strong>CL_MEM_READ_WRITE</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">This flag specifies that the SVM buffer will be read
-and written by a kernel. This is the default.</p></td>
-</tr>
-<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.
-<br>
-<br>
-Reading from a SVM buffer created with
-CL_MEM_WRITE_ONLY inside a kernel is undefined.
-<br>
-<br>
-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.
-<br>
-<br>
-Writing to a SVM buffer created with
-CL_MEM_READ_ONLY inside a kernel is undefined.
-<br>
-<br>
-CL_MEM_READ_WRITE or CL_MEM_WRITE_ONLY
-and CL_MEM_READ_ONLY are mutually exclusive.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_SVM_FINE_GRAIN_<br>
- BUFFER</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">This specifies that the application wants the OpenCL
-implementation to do a fine-grained allocation.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MEM_SVM_ATOMICS</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">This flag is valid only if
-CL_MEM_SVM_FINE_GRAIN_BUFFER is specified in flags. It is used to
-indicate that SVM atomic operations can control visibility of memory
-accesses in this SVM buffer.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>If CL_MEM_SVM_FINE_GRAIN_BUFFER is not specified, the buffer can be
-created as a coarse grained SVM allocation. Similarly, if
-CL_MEM_SVM_ATOMICS is not specified, the buffer can be created without
-support for SVM atomic operations (refer to an OpenCL kernel
-language specifications).</p></div>
-<div class="paragraph"><p><em>size</em> is the size in bytes of the SVM buffer to be allocated.</p></div>
-<div class="paragraph"><p><em>alignment</em> is the minimum alignment in bytes that is required for the
-newly created buffers memory region. It must be a power of two up to
-the largest data type supported by the OpenCL device. For the full
-profile, the largest data type is long16. For the embedded profile, it
-is long16 if the device supports 64-bit integers; otherwise it is
-int16. If alignment is 0, a default alignment will be used that is
-equal to the size of largest data type supported by the OpenCL
-implementation.</p></div>
-<div class="paragraph"><p><strong>clSVMAlloc</strong> returns a valid non-NULL shared virtual memory address if
-the SVM buffer is successfully allocated. Otherwise, like <strong>malloc</strong>, it
-returns a NULL pointer value. <strong>clSVMAlloc</strong> will fail if</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      <em>context</em> is not a valid context.
-</p>
-</li>
-<li>
-<p>
-      <em>flags</em> does not contain
-CL_MEM_SVM_FINE_GRAIN_BUFFER but does contain CL_MEM_SVM_ATOMICS.
-</p>
-</li>
-<li>
-<p>
-      Values specified in
-<em>flags</em> do not follow rules described for supported values in <em>table
-5.14</em>.
-</p>
-</li>
-<li>
-<p>
-     CL_MEM_SVM_FINE_GRAIN_BUFFER or CL_MEM_SVM_ATOMICS is specified in
-<em>flags</em> and these are not supported by at least one device in <em>context</em>.
-</p>
-</li>
-<li>
-<p>
-      The values specified in
-<em>flags</em> are not valid i.e. dont match those defined in <em>table 5.14</em>.
-</p>
-</li>
-<li>
-<p>
-      <em>size</em> is 0 or &gt;
-CL_DEVICE_MAX_MEM_ALLOC_SIZE value for any device in <em>context</em>.
-</p>
-</li>
-<li>
-<p>
-      <em>alignment</em> is not a power
-of two or the OpenCL implementation cannot support the specified
-alignment for at least one device in <em>context</em>.
-</p>
-</li>
-<li>
-<p>
-      There was a failure to
-allocate resources.
-</p>
-</li>
-</ul></div>
-<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 guaranteed memory consistency at synchronization
-points.</p></div>
-<div class="paragraph"><p>For SVM to be used efficiently, the host and any devices sharing a
-buffer containing virtual memory pointers should have the same
-endianness. If the context passed to <strong>clSVMAlloc</strong> has devices with
-mixed endianness and the OpenCL implementation is unable to implement
-SVM because of that mixed endianness, <strong>clSVMAlloc</strong> will fail and return
-NULL.</p></div>
-<div class="paragraph"><p>Although SVM is generally not supported for image objects,
-<strong>clCreateImage</strong> may create an image from a buffer (a 1D image from a
-buffer or a 2D image from buffer) if the buffer specified in its image
-description parameter is a SVM buffer. Such images have a linear memory
-representation so their memory can be shared using SVM. However, fine
-grained sharing and atomics are not supported for image reads and writes
-in a kernel.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>void clSVMFree(cl_context context,
-               void * svm_pointer)</pre>
-</div></div>
-<div class="paragraph"><p>frees a shared virtual memory buffer allocated using <strong>clSVMAlloc</strong>.</p></div>
-<div class="paragraph"><p><em>context</em> is a valid OpenCL context used to create the SVM buffer.</p></div>
-<div class="paragraph"><p><em>svm_pointer</em> must be the value returned by a call to <strong>clSVMAlloc</strong>. If
-a NULL pointer is passed in <em>svm_pointer</em>, no action occurs.</p></div>
-<div class="paragraph"><p>Note that <strong>clSVMFree</strong> does not wait for previously enqueued commands
-that may be using <em>svm_pointer</em> to finish before freeing
-<em>svm_pointer</em>. It is the responsibility of the application to make
-sure that enqueued commands that use <em>svm_pointer</em> have finished before
-freeing <em>svm_pointer</em>. 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></div>
-<div class="paragraph"><p>The behavior of using <em>svm_pointer</em> after it has been freed is
-undefined. In addition, if a buffer object is created using
-<strong>clCreateBuffer</strong> with <em>svm_pointer</em>, the buffer object must first be
-released before the <em>svm_pointer</em> is freed.</p></div>
-<div class="paragraph"><p>The <strong>clEnqueueSVMFree</strong> API can also be used to enqueue a callback to
-free the shared virtual memory buffer allocated using <strong>clSVMAlloc</strong> or a
-shared system memory pointer.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueSVMFree(cl_command_queue command_queue,
-                        cl_uint num_svm_pointers,
-                        void *svm_pointers[],
-                        void (CL_CALLBACK *_pfn_free_func_)
-                            (cl_command_queue queue,
-                            cl_uint num_svm_pointers,
-                            void *svm_pointers[],
-                            void *user_data),
-                        void *user_data,
-                        cl_uint num_events_in_wait_list,
-                        const cl_event *event_wait_list,
-                        cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to free the shared virtual memory allocated using
-<strong>clSVMAlloc</strong> or a shared system memory pointer.</p></div>
-<div class="paragraph"><p><em>command_queue</em> is a valid host command-queue.</p></div>
-<div class="paragraph"><p><em>svm_pointers</em> and <em>num_svm_pointers</em> specify shared virtual memory
-pointers to be freed. Each pointer in <em>svm_pointers</em> that was allocated
-using <strong>clSVMAlloc</strong> must have been allocated from the same context from
-which <em>command_queue</em> was created. The memory associated with
-<em>svm_pointers</em> can be reused or freed after the function returns.</p></div>
-<div class="paragraph"><p><em>pfn_free_func</em> specifies the callback function to be called to free the
-SVM pointers. <em>pfn_free_func</em> takes four arguments: <em>queue</em> which is
-the command queue in which <strong>clEnqueueSVMFree</strong> was enqueued, the count
-and list of SVM pointers to free and <em>user_data</em> which is a pointer to
-user specified data. If <em>pfn_free_func</em> is NULL, all pointers
-specified in <em>svm_pointers</em> must be allocated using <strong>clSVMAlloc</strong> and the
-OpenCL implementation will free these SVM pointers. <em>pfn_free_func</em>
-must be a valid callback function if any SVM pointer to be freed is a
-shared system memory pointer i.e. not allocated using <strong>clSVMAlloc</strong>. If
-<em>pfn_free_func</em> is a valid callback function, the OpenCL implementation
-will call <em>pfn_free_func</em> to free all the SVM pointers specified in
-<em>svm_pointers</em>.</p></div>
-<div class="paragraph"><p><em>user_data</em> will be passed as the user_data argument when
-<em>pfn_free_func</em> is called. <em>user_data</em> can be NULL.</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 <strong>clEnqueueSVMFree</strong> can be executed. If
-<em>event_wait_list</em> is NULL, then <strong>clEnqueueSVMFree</strong> does not wait on any
-event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</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 NULL 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 NULL, 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>clEnqueueSVMFree</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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>num_svm_pointers</em> is 0 and <em>svm_pointers_is non-NULL, _or</em> if
-<em>svm_pointers</em> is NULL and _num_svm_pointers_is not 0.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_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 following function enqueues a command to do a memcpy operation.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueSVMMemcpy(cl_command_queue command_queue,
-                          cl_bool blocking_copy,
-                          void *dst_ptr,
-                          const void *src_ptr,
-                          size_t size,
-                          cl_uint num_events_in_wait_list,
-                          const cl_event *event_wait_list,
-                          cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p><em>command_queue</em> refers to the host command-queue in which the read /
-write command will be queued. If either <em>dst_ptr</em> or <em>src_ptr</em> is
-allocated using clSVMAlloc then the OpenCL context allocated against
-must match that of <em>command_queue</em>.</p></div>
-<div class="paragraph"><p><em>blocking_copy</em> indicates if the copy operation is <em>blocking</em> or
-<em>non-blocking</em>.</p></div>
-<div class="paragraph"><p>If <em>blocking_copy</em> is CL_TRUE i.e. the copy command is blocking,
-<strong>clEnqueueSVMMemcpy</strong> does not return until the buffer data has been
-copied into memory pointed to by <em>dst_ptr</em>.</p></div>
-<div class="paragraph"><p>If <em>blocking_copy</em> is CL_FALSE i.e. the copy command is non-blocking,
-<strong>clEnqueueSVMMemcpy</strong> queues a non-blocking copy command and returns.
-The contents of the buffer that <em>dst_ptr</em> point to cannot be used until
-the copy command has completed. The <em>event</em> argument returns an event
-object which can be used to query the execution status of the read
-command. When the copy command has completed, the contents of the
-buffer that _dst_ptr_points to__can be used by the application.</p></div>
-<div class="paragraph"><p><em>size</em> is the size in bytes of data being copied.</p></div>
-<div class="paragraph"><p><em>dst_ptr</em> is the pointer to a host or SVM memory allocation where data
-is copied to.</p></div>
-<div class="paragraph"><p><em>src_ptr</em> is the pointer to a host or SVM memory allocation where data
-is copied from.</p></div>
-<div class="paragraph"><p>If the memory allocation(s) containing <em>dst_ptr</em> and/or <em>src_ptr</em> are
-allocated using <strong>clSVMAlloc</strong> and either is not allocated from the same
-context from which <em>command_queue</em> was created the behavior is
-undefined.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</p></div>
-<div class="paragraph"><p><em>event</em> returns an event object that identifies this particular read /
-write command and can be used to query or queue a wait for this
-particular command to complete. <em>event</em> can be NULL 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 NULL, 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>clEnqueueSVMMemcpy</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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if the
-context associated with <em>command_queue</em> and events in <em>event_wait_list</em>
-are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the copy operation is
-blocking and the execution status of any of the events in
-<em>event_wait_list</em> is a negative integer value.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>dst_ptr</em> or <em>src_ptr</em> are NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_MEM_COPY_OVERLAP if the
-values specified for <em>dst_ptr</em>, <em>src_ptr</em> and <em>size</em> result in an
-overlapping copy.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueSVMMemFill(cl_command_queue command_queue,
-                           void *svm_ptr,
-                           const void *pattern,
-                           size_t pattern_size,
-                           size_t size,
-                           cl_uint num_events_in_wait_list,
-                           const cl_event *event_wait_list,
-                           cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to fill a region in memory with a pattern of a given
-pattern size.</p></div>
-<div class="paragraph"><p><em>command_queue</em> refers to the host command-queue in which the fill
-command will be queued. The OpenCL context associated with
-<em>command_queue</em> and SVM pointer referred to by <em>svm_ptr</em> must be the
-same.</p></div>
-<div class="paragraph"><p><em>svm_ptr</em> is a pointer to a memory region that will be filled with
-<em>pattern</em>. It must be aligned to <em>pattern_size</em> bytes. If <em>svm_ptr</em> is
-allocated using <strong>clSVMAlloc</strong> then it must be allocated from the same
-context from which <em>command_queue</em> was created. Otherwise the behavior
-is undefined.</p></div>
-<div class="paragraph"><p><em>pattern</em> is a pointer to the data pattern of size <em>pattern_size</em> in
-bytes. <em>pattern</em> will be used to fill a region in <em>buffer</em> starting at
-<em>svm_ptr</em> and is <em>size</em> bytes in size. The data pattern must be a
-scalar or vector integer or floating-point data type supported by OpenCL
-as described in <em>sections 6.1.1</em> and <em>6.1.2</em>. For example, if region
-pointed to by <em>svm_ptr</em> is to be filled with a pattern of float4 values,
-then <em>pattern</em> will be a pointer to a cl_float4 value and <em>pattern_size</em>
-will be sizeof(cl_float4). The maximum value of <em>pattern_size</em> is the
-size of the largest integer or floating-point vector data type supported
-by the OpenCL device. The memory associated with <em>pattern</em> can be
-reused or freed after the function returns.</p></div>
-<div class="paragraph"><p><em>size</em> is the size in bytes of region being filled starting with
-<em>svm_ptr</em> and must be a multiple of <em>pattern_size</em>.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</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 NULL 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. <strong>clEnqueueBarrierWithWaitList</strong> can be used
-instead. If the <em>event_wait_list</em> and the <em>event</em> arguments are not
-NULL, 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>clEnqueueSVMMemFill</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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if the
-context associated with <em>command_queue</em> and events in <em>event_wait_list</em>
-are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>svm_ptr</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>svm_ptr</em> is not aligned to <em>pattern_size</em> bytes.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>pattern</em> is NULL or if <em>pattern_size</em> is 0 or if <em>pattern_size</em> is not
-one of {1, 2, 4, 8, 16, 32, 64, 128}.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if <em>size</em>
-is not a multiple of <em>pattern_size</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueSVMMap(cl_command_queue command_queue,
-                       cl_bool blocking_map,
-                       cl_map_flags map_flags,
-                       void *svm_ptr,
-                       size_t size,
-                       cl_uint num_events_in_wait_list,
-                       const cl_event *event_wait_list,
-                       cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command that will allow the host to update a region of a SVM
-buffer. Note that since we are enqueuing a command with a SVM buffer,
-the region is already mapped in the host address space.</p></div>
-<div class="paragraph"><p><em>command_queue</em> must be a valid host command-queue.</p></div>
-<div class="paragraph"><p><em>blocking_map</em> indicates if the map operation is <em>blocking</em> or
-<em>non-blocking</em>.</p></div>
-<div class="paragraph"><p>If <em>blocking_map</em> is CL_TRUE, <strong>clEnqueueSVMMap</strong> does not return until
-the application can access the contents of the SVM region specified by
-<em>svm_ptr</em> and <em>size</em> on the host.</p></div>
-<div class="paragraph"><p>If <em>blocking_map</em> is CL_FALSE i.e. map operation is non-blocking, the
-region specified by <em>svm_ptr</em> and <em>size</em> cannot be used until the map
-command has completed. The <em>event</em> argument returns an event object
-which can be used to query the execution status of the map command.
-When the map command is completed, the application can access the
-contents of the region specified by <em>svm_ptr</em> and <em>size</em>.</p></div>
-<div class="paragraph"><p><em>map_flags</em> is a bit-field and is described in <em>table 5.5</em>.</p></div>
-<div class="paragraph"><p><em>svm_ptr</em> and <em>size</em> are a pointer to a memory region and size in bytes
-that will be updated by the host. If <em>svm_ptr</em> is allocated using
-<strong>clSVMAlloc</strong> then it must be allocated from the same context from which
-<em>command_queue</em> was created. Otherwise the behavior is undefined.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</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 NULL 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. <strong>clEnqueueBarrierWithWaitList</strong> can be used
-instead. If the <em>event_wait_list</em> and the <em>event</em> arguments are not
-NULL, 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>clEnqueueSVMMap</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_COMMAND_QUEUE
-if _command_queue_is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if
-context associated with <em>command_queue</em> and events in <em>event_wait_list</em>
-are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>svm_ptr</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if <em>size</em>
-is 0 or if values specified in _map_flags_are not valid.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the map operation is
-blocking and the execution status of any of the events in
-<em>event_wait_list</em> is a negative integer value.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueSVMUnmap(cl_command_queue command_queue,
-                         void *svm_ptr,
-                         cl_uint num_events_in_wait_list,
-                         const cl_event *event_wait_list,
-                         cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to indicate that the host has completed updating the
-region given by <em>svm_ptr</em> and which was specified in a previous call to
-<strong>clEnqueueSVMMap</strong>.</p></div>
-<div class="paragraph"><p><em>command_queue</em> must be a valid host command-queue.</p></div>
-<div class="paragraph"><p><em>svm_ptr</em> is a pointer that was specified in a previous call to
-<strong>clEnqueueSVMMap</strong>. If <em>svm_ptr</em> is allocated using <strong>clSVMAlloc</strong> then it
-must be allocated from the same context from which <em>command_queue</em> was
-created. Otherwise the behavior is undefined.</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 <strong>clEnqueueSVMUnmap</strong> can be executed. If
-<em>event_wait_list</em> is NULL, then <strong>clEnqueueUnmap</strong> does not wait on any
-event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</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 NULL 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. <strong>clEnqueueBarrierWithWaitList</strong> can be used
-instead. If the <em>event_wait_list</em> and the <em>event</em> arguments are not
-NULL, 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>clEnqueueSVMUnmap</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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if
-context associated with <em>command_queue</em> and events in <em>event_wait_list</em>
-are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>svm_ptr</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or if
-<em>event_wait_list</em> is not NULL 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_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><strong>clEnqueueSVMMap</strong>  and <strong>clEnqueueSVMUnmap</strong> act as synchronization points
-for the region of the SVM buffer specified in these calls.</p></div>
-<div class="paragraph"><p>NOTE:</p></div>
-<div class="paragraph"><p>If a coarse-grained SVM buffer is currently mapped for writing, the
-application must ensure that the SVM buffer is unmapped before any
-enqueued kernels or commands that read from or write to this SVM buffer
-or any of its associated cl_mem buffer objects begin execution;
-otherwise the behavior is undefined.</p></div>
-<div class="paragraph"><p>If a coarse-grained SVM buffer is currently mapped for reading, the
-application must ensure that the SVM buffer is unmapped before any
-enqueued kernels or commands that write to this memory object or any of
-its associated cl_mem buffer objects begin execution; otherwise the
-behavior is undefined.</p></div>
-<div class="paragraph"><p>A SVM buffer is considered as mapped if there are one or more active
-mappings for the SVM buffer irrespective of whether the mapped regions
-span the entire SVM buffer.</p></div>
-<div class="paragraph"><p>The above note does not apply to fine-grained SVM buffers (fine-grained
-buffers allocated using <strong>clSVMAlloc</strong> or fine-grained system
-allocations).</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueSVMMigrateMem(cl_command_queue command_queue,
-                              cl_uint num_svm_pointers,
-                              const void **svm_pointers,
-                              const size_t *sizes,
-                              cl_mem_migration_flags flags,
-                              cl_uint num_events_in_wait_list,
-                              const cl_event *event_wait_list,
-                              cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to indicate which device a set of ranges of SVM
-allocations should be associated with. Once the event returned by
-<strong>clEnqueueSVMMigrateMem</strong> has become CL_COMPLETE, the ranges specified by
-svm pointers and sizes have been successfully migrated to the device
-associated with command queue.</p></div>
-<div class="paragraph"><p>The user is responsible for managing the event dependencies associated
-with this command in order to avoid overlapping access to SVM
-allocations. Improperly specified event dependencies passed to
-<strong>clEnqueueSVMMigrateMem</strong> could result in undefined results.</p></div>
-<div class="paragraph"><p><em>command_queue</em> is a valid host command queue. The specified set of
-allocation ranges will be migrated to the OpenCL device associated with
-<em>command_queue</em>.</p></div>
-<div class="paragraph"><p><em>num_svm_pointers</em> is the number of pointers in the specified
-<em>svm_pointers</em> array, and the number of sizes in the <em>sizes</em> array, if
-_sizes_is not NULL.</p></div>
-<div class="paragraph"><p><em>svm_pointers</em> is a pointer to an array of pointers. Each pointer in
-this array must be within an allocation produced by a call to
-<strong>clSVMAlloc</strong>.</p></div>
-<div class="paragraph"><p><em>sizes</em> is an array of sizes. The pair <em>svm_pointers</em>[i] and <em>sizes</em>[i]
-together define the starting address and number of bytes in a range to
-be migrated. <em>sizes</em> may be NULL indicating that every allocation
-containing any <em>svm_pointer</em>[i] is to be migrated. Also, if <em>sizes</em>[i]
-is zero, then the entire allocation containing <em>svm_pointer</em>[i] is
-migrated.</p></div>
-<div class="paragraph"><p><em>flags</em> is a bit-field that is used to specify migration options. <em>Table
-5.12</em> describes the possible values for <em>flags</em>.</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</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 NULL in which case it will not be possible for
-the application to query the status of this command or queue another
-command that waits for this command to complete. If the
-<em>event_wait_list</em> and <em>event</em> arguments are not NULL, 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>clEnqueueSVMMigrateMem</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_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if
-context associated with <em>command_queue</em> and events in <em>event_wait_list</em>
-are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-_num_svm_pointers is zero_or_svm_pointers_is NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>sizes</em><em><span class="i">is non-zero</span></em>range [<em>svm_pointers</em>[i],
-<em>svm_pointers</em>[i]+<em>sizes</em>[i]) is not contained within an existing
-<strong>clSVMAlloc</strong> allocation.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or if
-<em>event_wait_list</em> is not NULL 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_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="sect3">
-<h4 id="_memory_consistency_for_svm_allocations">5.6.2. Memory consistency for SVM allocations</h4>
-<div class="paragraph"><p>To ensure memory consistency in SVM allocations, the program can rely on
-the guaranteed memory consistency at synchronization points. This
-consistency support already exists in OpenCL 1.x and can be used for
-coarse-grained SVM allocations or for fine-grained buffer SVM
-allocations; what SVM adds is the ability to share pointers between the
-host and all SVM devices.</p></div>
-<div class="paragraph"><p>In addition, sub-buffers can also be used to ensure that each device
-gets a consistent view of a SVM buffers memory when it is shared by
-multiple devices. For example, assume that two devices share a SVM
-pointer. The host can create a cl_mem buffer object using
-<strong>clCreateBuffer</strong> with CL_MEM_USE_HOST_PTR and <em>host_ptr</em> set to the SVM
-pointer and then create two disjoint sub-buffers with starting virtual
-addresses <em>sb1_ptr</em> and <em>sb2_ptr</em>. These pointers (<em>sb1_ptr</em> and
-<em>sb2_ptr</em>) can be passed to kernels executing on the two devices.
-<strong>clEnqueueMapBuffer</strong> and <strong>clEnqueueUnmapMemObject</strong> and the existing
-access rules for memory objects (in <em>section 5.5.3</em>) can be used to
-ensure consistency for buffer regions (<em>sb1_ptr</em> and <em>sb2_ptr</em>) read and
-written by these kernels.</p></div>
-<div class="paragraph"><p>When the host and devices are able to use SVM atomic operations (i.e.
-CL_DEVICE_SVM_ATOMICS is set in CL_DEVICE_SVM_CAPABILITIES), these
-atomic operations can be used to provide memory consistency at a fine
-grain in a shared memory region. The effect of these operations is
-visible to the host and all devices with which that memory is shared.</p></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_sampler_objects">5.7. Sampler Objects</h3>
-<div class="paragraph"><p>A sampler object describes how to sample an image when the image is read
-in the kernel. The built-in functions to read from an image in a kernel
-take a sampler as an argument. The sampler arguments to the image read
-function can be sampler objects created using OpenCL functions and
-passed as argument values to the kernel or can be samplers declared
-inside a kernel. In this section we discuss how sampler objects are
-created using OpenCL functions.</p></div>
-<div class="sect3">
-<h4 id="_creating_sampler_objects">5.7.1. Creating Sampler Objects</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_sampler clCreateSamplerWithProperties(cl_context context,
-                                         const cl_sampler_properties *sampler_properties,
-                                         cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p>creates a sampler object.</p></div>
-<div class="paragraph"><p><em>context</em> must be a valid OpenCL context.</p></div>
-<div class="paragraph"><p><em>sampler_properties</em> specifies a list of sampler property names and
-their corresponding values. Each sampler property name is immediately
-followed by the corresponding desired value. The list is terminated
-with 0. The list of supported properties is described in <em>table 5.15</em>.
-If a supported property and its value is not specified in
-<em>sampler_properties</em>, its default value will be used.
-<em>sampler_properties</em> can be NULL in which case the default values for
-supported sampler properties will be used.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 21. <em>List of supported cl_sampler_properties values and description</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_sampler_properties <br>
- enum</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Property Value</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"><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.
-<br>
-<br>
-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.
-<br>
-<br>
-Valid values are:
-<br>
-<br>
-CL_ADDRESS_MIRRORED_REPEAT
-CL_ADDRESS_REPEAT
-CL_ADDRESS_CLAMP_
-CL_ADDRESS_CLAMP
-CL_ADDRESS_NONE
-<br>
-<br>
-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:
-<br>
-<br>
-CL_FILTER_NEAREST
-CL_FILTER_LINEAR
-<br>
-<br>
-The default value is
-CL_FILTER_NEAREST.</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>clCreateSamplerWithProperties</strong> returns a valid non-zero sampler object
-and <em>errcode_ret</em> is set to CL_SUCCESS if the sampler 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
-_context_is not a valid context.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if the
-property name in <em>sampler_properties</em> is not a supported property name,
-if the value specified for a supported property name is not valid, or if
-the same property name is specified more than once.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-images are not supported by any device associated with <em>context</em> (i.e.
-CL_DEVICE_IMAGE_SUPPORT specified in <em>table 4.3</em> is CL_FALSE).
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clRetainSampler(cl_sampler sampler)</pre>
-</div></div>
-<div class="paragraph"><p>increments the <em>sampler</em> reference count.
-<strong>clCreateSamplerWithProperties</strong> performs an implicit retain.
-<strong>clRetainSampler</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_SAMPLER if
-<em>sampler</em> is not a valid sampler 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 class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clReleaseSampler(cl_sampler sampler)</pre>
-</div></div>
-<div class="paragraph"><p>decrements the <em>sampler</em> reference count. The sampler object is deleted
-after the reference count becomes zero and commands queued for execution
-on a command-queue(s) that use <em>sampler</em> have finished.
-<strong>clReleaseSampler</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_SAMPLER if
-<em>sampler</em> is not a valid sampler 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 class="paragraph"><p>Using this function to release a reference that was not obtained by
-creating the object or by calling <strong>clRetainSampler</strong> causes undefined
-behavior.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_sampler_object_queries">5.7.2. Sampler Object Queries</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetSamplerInfo(cl_sampler sampler,
-                        cl_sampler_info param_name,
-                        size_t param_value_size,
-                        void *param_value,
-                        size_t *param_value_size_ret)</pre>
-</div></div>
-<div class="paragraph"><p>returns information about the sampler object.</p></div>
-<div class="paragraph"><p><em>sampler</em> specifies the sampler being queried.</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>clGetSamplerInfo</strong> is described in <em>table 5.16</em>.</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 NULL, 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 &gt;= size of return type
-as described in <em>table 5.16.</em></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 NULL, it is
-ignored.
- </p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 22. <em>clGetSamplerInfo</em> <em>parameter queries</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_sampler_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return Type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Info. returned in <em>param_value</em></strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">*CL_SAMPLER_REFERENCE_ COUNT*<span class="footnote"><br>[The reference count returned should be considered immediately stale. It is unsuitable for general use in
-applications. This feature is provided for identifying memory leaks.]<br></span>:</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">Return the <em>sampler</em> reference
-count.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_SAMPLER_CONTEXT</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_context</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return the context specified when the
-sampler is created.</p></td>
-</tr>
-<tr>
-<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">Return the normalized coords value
-associated with <em>sampler</em>.</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">Return the
-addressing mode value associated with <em>sampler</em>.</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">Return the filter mode value
-associated with <em>sampler</em>.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><strong>clGetSamplerInfo</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_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 <em>table
-5.16_and _param_value</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_SAMPLER if
-<em>sampler</em> is a not a valid sampler 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>
-<div class="sect2">
-<h3 id="_program_objects">5.8. Program Objects</h3>
-<div class="paragraph"><p>An OpenCL program consists of a set of kernels that are identified as
-functions declared with the <em>kernel qualifier in the program source.
-OpenCL programs may also contain auxiliary functions and constant data
-that can be used by </em>kernel functions. The program executable can be
-generated <em>online</em> or <em>offline</em> by the OpenCL compiler for the
-appropriate target device(s).</p></div>
-<div class="paragraph"><p>A program object encapsulates the following information:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      An associated context.
-</p>
-</li>
-<li>
-<p>
-      A program source or binary.
-</p>
-</li>
-<li>
-<p>
-      The latest successfully
-built program executable, library or compiled binary, the list of
-devices for which the program executable, library or compiled binary is
-built, the build options used and a build log.
-</p>
-</li>
-<li>
-<p>
-      The number of kernel objects currently attached.
-</p>
-</li>
-</ul></div>
-<div class="sect3">
-<h4 id="_creating_program_objects">5.8.1. Creating Program Objects</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_program clCreateProgramWithSource(cl_context context,
-                                     cl_uint count,
-                                     const char **strings,
-                                     const size_t *lengths,
-                                     cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p>creates a program object for a context, and loads the source code
-specified by the text strings in the <em>strings</em> array into the program
-object. The devices associated with the program object are the devices
-associated with <em>context</em>. The source code specified by <em>strings</em> is
-either an OpenCL C program source, header or implementation-defined
-source for custom devices that support an online compiler. OpenCL C++ is
-not supported as an online-compiled kernel language through this
-interface.</p></div>
-<div class="paragraph"><p><em>context</em> must be a valid OpenCL context.</p></div>
-<div class="paragraph"><p><em>strings</em> is an array of <em>count</em> pointers to optionally null-terminated
-character strings that make up the source code.</p></div>
-<div class="paragraph"><p>The <em>lengths</em> argument is an array with the number of chars in each
-string (the string length). If an element in <em>lengths</em> is zero, its
-accompanying string is null-terminated. If <em>lengths</em> is NULL, all
-strings in the <em>strings</em> argument are considered null-terminated. Any
-length value passed in that is greater than zero excludes the null
-terminator in its count.</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>clCreateProgramWithSource</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
-_context_is not a valid context.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>count</em> is zero or if <em>strings</em> or any entry in <em>strings</em> is NULL.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_program clCreateProgramWithIL(cl_context context,
-                                 const void *il,
-                                 size_t length,
-                                 cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p>creates a program object for a context, and loads the IL pointed to by
-_il_and with length in bytes _length_into the program object.</p></div>
-<div class="paragraph"><p><em>context</em> must be a valid OpenCL context.</p></div>
-<div class="paragraph"><p><em>il_is a pointer to a _length</em>-byte block of memory containing SPIR-V or
-an implementation-defined intermediate language.</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>clCreateProgramWithIL</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
-_context_is not a valid context.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if <em>il</em>
-is NULL or if _length_is zero.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if the
-<em>length</em>-byte memory pointed to by <em>il</em> does not contain well-formed
-intermediate language input that can be consumed by the OpenCL runtime.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_program clCreateProgramWithBinary(cl_context context,
-                                     cl_uint num_devices,
-                                     const cl_device_id *device_list,
-                                     const size_t *lengths,
-                                     const unsigned char **binaries,
-                                     cl_int *binary_status,
-                                     cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p>creates a program object for a context, and loads the binary bits
-specified by <em>binary</em> into the program object.</p></div>
-<div class="paragraph"><p><em>context</em> must be a valid OpenCL context.</p></div>
-<div class="paragraph"><p><em>device_list</em> is a pointer to a list of devices that are in <em>context</em>.
-<em>device_list</em> must be a non-NULL value. The binaries are loaded for
-devices specified in this list.</p></div>
-<div class="paragraph"><p><em>num_devices_is the number of devices listed in _device_list</em>.</p></div>
-<div class="paragraph"><p>The devices associated with the program object will be the list of
-devices specified by <em>device_list</em>. The list of devices specified by
-<em>device_list</em> must be devices associated with <em>context</em>.</p></div>
-<div class="paragraph"><p><em>lengths</em> is an array of the size in bytes of the program binaries to be
-loaded for devices specified by <em>device_list</em>.</p></div>
-<div class="paragraph"><p><em>binaries</em> is an array of pointers to program binaries to be loaded for
-devices specified by <em>device_list</em>. For each device given by
-<em>device_list</em>[i], the pointer to the program binary for that device is
-given by <em>binaries</em>[i] and the length of this corresponding binary is
-given by <em>lengths</em>[i]. <em>lengths</em>[i] cannot be zero and <em>binaries</em>[i]
-cannot be a NULL pointer.</p></div>
-<div class="paragraph"><p>The program binaries specified by <em>binaries</em> contain the bits that
-describe one of the following:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      a program executable to be
-run on the device(s) associated with <em>context</em>,
-</p>
-</li>
-<li>
-<p>
-      a compiled program for
-device(s) associated with <em>context</em>, or
-</p>
-</li>
-<li>
-<p>
-      a library of compiled
-programs for device(s) associated with <em>context</em>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The program binary can consist of either or both:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      Device-specific code and/or,
-</p>
-</li>
-<li>
-<p>
-      Implementation-specific
-intermediate representation (IR) which will be converted to the
-device-specific code.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><em>binary_status</em> returns whether the program binary for each device
-specified in <em>device_list</em> was loaded successfully or not. It is an
-array of <em>num_devices</em> entries and returns CL_SUCCESS in
-<em>binary_status[i]</em> if binary was successfully loaded for device
-specified by <em>device_list[i]</em>; otherwise returns CL_INVALID_VALUE if
-<em>lengths[i]</em> is zero or if <em>binaries[i]</em> is a NULL value or
-CL_INVALID_BINARY in <em>binary_status[i]</em> if program binary is not a valid
-binary for the specified device. If <em>binary_status</em> is NULL, it is
-ignored.</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>clCreateProgramWithBinary</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
-_context_is not a valid context.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>device_list</em> is NULL or <em>num_devices</em> is zero.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_DEVICE if
-OpenCL devices listed in <em>device_list</em> are not in the list of devices
-associated with <em>context</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>lengths</em> or <em>binaries</em> are NULL or if any entry in <em>lengths</em>[i] is zero
-or <em>binaries</em>[i] is NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_BINARY if an
-invalid program binary was encountered for any device. <em>binary_status</em>
-will return specific status for each 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 class="paragraph"><p>OpenCL allows applications to create a program object using the program
-source or binary and build appropriate program executables. This can be
-very useful as it allows applications to load program source and then
-compile and link to generate a program executable online on its first
-instance for appropriate OpenCL devices in the system. These
-executables can now be queried and cached by the application.
-The cached executables can be read
-and loaded by the application, which can help significantly reduce the
-application initialization time.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_program clCreateProgramWithBuiltInKernels(cl_context context,
-                                             cl_uint num_devices,
-                                             const cl_device_id *device_list,
-                                             const char *kernel_names,
-                                             cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p>creates a program object for a context, and loads the information
-related to the built-in kernels into a program object.</p></div>
-<div class="paragraph"><p><em>context</em> must be a valid OpenCL context.</p></div>
-<div class="paragraph"><p><em>num_devices_is the number of devices listed in _device_list</em>.</p></div>
-<div class="paragraph"><p><em>device_list</em> is a pointer to a list of devices that are in <em>context</em>.
-<em>device_list</em> must be a non-NULL value. The built-in kernels are
-loaded for devices specified in this list.</p></div>
-<div class="paragraph"><p>The devices associated with the program object will be the list of
-devices specified by <em>device_list</em>. The list of devices specified by
-<em>device_list</em> must be devices associated with <em>context</em>.</p></div>
-<div class="paragraph"><p><em>kernel_names</em> is a semi-colon separated list of built-in kernel names.</p></div>
-<div class="paragraph"><p><strong>clCreateProgramWithBuiltInKernels</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
-_context_is not a valid context.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>device_list</em> is NULL or <em>num_devices</em> is zero.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>kernel_names</em> is NULL or <em>kernel_names</em> contains a kernel name that is
-not supported by any of the devices in <em>device_list</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_DEVICE if
-devices listed in <em>device_list</em> are not in the list of devices
-associated with <em>context</em>.
-</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="sect3">
-<h4 id="_retaining_and_releasing_program_objects">5.8.2. Retaining and Releasing Program Objects</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clRetainProgram(cl_program program)</pre>
-</div></div>
-<div class="paragraph"><p>increments the <em>program</em> reference count. All <strong>clCreateProgram</strong> APIs
-do an implicit retain. <strong>clRetainProgram</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_PROGRAM if
-<em>program</em> is not a valid program 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 class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clReleaseProgram(cl_program program)</pre>
-</div></div>
-<div class="paragraph"><p>decrements the <em>program</em> reference count. The program object is deleted
-after all kernel objects associated with <em>program</em> have been deleted and
-the <em>program</em> reference count becomes zero. <strong>clReleaseProgram</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_PROGRAM if
-<em>program</em> is not a valid program 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 class="paragraph"><p>Using this function to release a reference that was not obtained by
-creating the object or by calling <strong>clRetainProgram</strong> causes undefined
-behavior.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clSetProgramReleaseCallback(cl_program program,
-                                   void (CL_CALLBACK *pfn_notify)
-                                       (cl_program prog,
-                                       void *user_data),
-                                   void *user_data)</pre>
-</div></div>
-<div class="paragraph"><p>registers a user callback function with a program object. Each call to
-<strong>clSetProgramReleaseCallback</strong> registers the specified user callback
-function on a callback stack associated with program. The registered
-user callback functions are called in the reverse order in which they
-were registered. The user callback functions are called after
-destructors (if any) for program scope global variables (if any) are
-called and before the program is released. This provides a mechanism for
-the application (and libraries) to be notified when destructors are
-complete.</p></div>
-<div class="paragraph"><p><em>program</em> is a valid program object</p></div>
-<div class="paragraph"><p><em>pfn_notify</em> is the callback function that can be registered by the
-application. This callback function may be called asynchronously by the
-OpenCL implementation. It is the applications responsibility to ensure
-that the callback function is thread safe. The parameters to this
-callback function are:</p></div>
-<div class="paragraph"><p><em>prog</em> is the program object whose destructors are being called. When
-the user callback is called by the implementation, this program object
-is not longer valid. prog is only provided for reference purposes.</p></div>
-<div class="paragraph"><p><em>user_data</em> is a pointer to user supplied data. <em>user_data</em> will be
-passed as the <em>user_data</em> argument when <em>pfn_notify</em> is called. user
-data can be NULL.</p></div>
-<div class="paragraph"><p><strong>clSetProgramReleaseCallback</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_PROGRAM if
-<em>program</em> is not a valid program object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>pfn_notify</em> is NULL.
-</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="sect3">
-<h4 id="_setting_spir_v_specialization_constants">5.8.3. Setting SPIR-V specialization constants</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clSetProgramSpecializationConstant(cl_program program,
-                                          cl_uint spec_id,
-                                          size_t spec_size,
-                                          const void *spec_value)</pre>
-</div></div>
-<div class="paragraph"><p>sets the values of a SPIR-V specialization constants.</p></div>
-<div class="paragraph"><p><em>program</em> must be a valid OpenCL program created from a SPIR-V module.</p></div>
-<div class="paragraph"><p><em>spec</em> id_ identifies the SPIR-V specialization constant whose value
-will be set.</p></div>
-<div class="paragraph"><p><em>spec_size</em> specifies the size in bytes of the data pointed to by
-<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></div>
-<div class="paragraph"><p><em>spec_value</em> is a pointer to the memory location that contains the value
-of the specialization constant. The data pointed to by <em>spec_value</em> are
-copied and can be safely reused by the application after
-<strong>clSetProgramSpecializationConstant</strong> returns. This specialization value
-will be used by subsequent calls to <strong>clBuildProgram</strong> until another call
-to <strong>clSetProgramSpecializationConstant</strong> changes it. If a specialization
-constant is a boolean constant, _spec value_should be a pointer to a
-cl_uchar value. A value of zero will set the specialization constant to
-false; any other value will set it to true.</p></div>
-<div class="paragraph"><p>Calling this function multiple times for the same specialization
-constant shall cause the last provided value to override any previously
-specified value. The values are used by a subsequent <strong>clBuildProgram</strong>
-call for the <em>program</em>.</p></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></div>
-<div class="paragraph"><p><strong>clSetProgramSpecializationConstant</strong> returns CL_SUCCESS if the function
-is executed successfully.</p></div>
-<div class="paragraph"><p>Otherwise, it returns one of the following errors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_INVALID_PROGRAM if
-<em>program</em> is not a valid program object created from a SPIR-V module.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_SPEC_ID if
-<em>spec_id</em> is not a valid specialization constant ID
-</p>
-</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 NULL.
-</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="sect3">
-<h4 id="_building_program_executables">5.8.4. Building Program Executables</h4>
-<div class="paragraph"><p> 
-The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clBuildProgram(cl_program program,
-                      cl_uint num_devices,
-                      const cl_device_id *device_list,
-                      const char *options,
-                      void (CL_CALLBACK *pfn_notify)
-                          (cl_program program,
-                          void *user_data),
-                      void *user_data)</pre>
-</div></div>
-<div class="paragraph"><p>builds (compiles &amp; links) a program executable from the program source
-or binary for all the devices or a specific device(s) in the OpenCL
-context associated with <em>program</em>. OpenCL allows program executables to
-be built using the source or the binary. <strong>clBuildProgram</strong> must be
-called for <em>program</em> created using <strong>clCreateProgramWithSource</strong>,
-<strong>clCreateProgramWithIL</strong> or <strong>clCreateProgramWithBinary</strong> to build the
-program executable for one or more devices associated with <em>program</em>.
-If <em>program</em> is created with <strong>clCreateProgramWithBinary</strong>, then the
-program binary must be an executable binary (not a compiled binary or
-library).</p></div>
-<div class="paragraph"><p>The executable binary can be queried using <strong>clGetProgramInfo</strong>(<em>program</em>,
-CL_PROGRAM_BINARIES, ) and can be specified to
-<strong>clCreateProgramWithBinary</strong> to create a new program object.</p></div>
-<div class="paragraph"><p><em>program</em> is the program object.</p></div>
-<div class="paragraph"><p><em>device_list</em> is a pointer to a list of devices associated with
-<em>program</em>. If <em>device_list</em> is a NULL value, the program executable is
-built for all devices associated with <em>program</em> for which a source or
-binary has been loaded. If <em>device_list</em> is a non-NULL value, the
-program executable is built for devices specified in this list for which
-a source or binary has been loaded.</p></div>
-<div class="paragraph"><p><em>num_devices_is the number of devices listed in _device_list</em>.</p></div>
-<div class="paragraph"><p><em>options</em> is a pointer to a null-terminated string of characters that
-describes the build options to be used for building the program
-executable. The list of supported options is described <em>in section 5.8.6</em>.
-If the program was created using clCreateProgramWithBinary and <em>options</em> is
-a NULL pointer,
-the program will be built as if options were the same as when the program binary
-was originally built.
-If the program was created using clCreateProgramWithBinary and <em>options</em> string contains
-anything other than the same options in the same order (whitespace ignored) as when
-the program binary was originally built, then the behavior is implementation defined.</p></div>
-<div class="paragraph"><p><em>pfn_notify</em> is a function pointer to a notification routine. The
-notification routine is a callback function that an application can
-register and which will be called when the program executable has been
-built (successfully or unsuccessfully). If <em>pfn_notify</em> is not NULL,
-<strong>clBuildProgram</strong> does not need to wait for the build to complete and can
-return immediately once the build operation can begin. The build
-operation can begin if the context, program whose sources are being
-compiled and linked, list of devices and build options specified are all
-valid and appropriate host and device resources needed to perform the
-build are available. If <em>pfn_notify</em> is NULL, <strong>clBuildProgram</strong> does not
-return until the build has completed. This callback function may be
-called asynchronously by the OpenCL implementation. It is the
-applications responsibility to ensure that the callback function is
-thread-safe.</p></div>
-<div class="paragraph"><p><em>user_data</em> will be passed as an argument when <em>pfn_notify</em> is called.
-<em>user_data</em> can be NULL.</p></div>
-<div class="paragraph"><p><strong>clBuildProgram</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_PROGRAM if
-<em>program</em> is not a valid program object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>device_list</em> is NULL and <em>num_devices</em> is greater than zero, or if
-<em>device_list</em> is not NULL and <em>num_devices</em> is zero.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>pfn_notify</em> is NULL but <em>user_data</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_DEVICE if
-OpenCL devices listed in <em>device_list</em> are not in the list of devices
-associated with <em>program</em>
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_BINARY if
-<em>program</em> is created with <strong>clCreateProgramWithBinary</strong> and devices listed
-in <em>device_list</em> do not have a valid program binary loaded.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_BUILD_OPTIONS
-if the build options specified by <em>options</em> are invalid.
-</p>
-</li>
-<li>
-<p>
-      CL_COMPILER_NOT_AVAILABLE
-if <em>program</em> is created with <strong>clCreateProgramWithSource</strong> and a compiler
-is not available i.e. CL_DEVICE_COMPILER_AVAILABLE specified in <em>table
-4.3</em> is set to CL_FALSE.
-</p>
-</li>
-<li>
-<p>
-      CL_BUILD_PROGRAM_FAILURE
-if there is a failure to build the program executable. This error will
-be returned if <strong>clBuildProgram</strong> does not return until the build has
-completed.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-the build of a program executable for any of the devices listed in
-<em>device_list</em> by a previous call to <strong>clBuildProgram</strong> for <em>program</em> has
-not completed.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-there are kernel objects attached to <em>program</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-<em>program</em> was not created with <strong>clCreateProgramWithSource,
-clCreateProgramWithIL</strong> or <strong>clCreateProgramWithBinary</strong>.
-</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="sect3">
-<h4 id="_separate_compilation_and_linking_of_programs">5.8.5. Separate Compilation and Linking of Programs</h4>
-<div class="paragraph"><p>OpenCL programs are compiled and linked to support the following:</p></div>
-<div class="ulist"><ul>
-<li>
-<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>
-</li>
-<li>
-<p>
-      Embedded headers. In
-OpenCL 1.0 and 1.1, the I build option could be used to specify the
-list of directories to be searched for headers files that are included
-by a program source(s). OpenCL 1.2 extends this by allowing the header
-sources to come from program objects instead of just header files.
-</p>
-</li>
-<li>
-<p>
-      Libraries. The linker can
-be used to link compiled objects and libraries into a program executable
-or to create a library of compiled binaries.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clCompileProgram(cl_program program,
-                        cl_uint num_devices,
-                        const cl_device_id *device_list,
-                        const char *options,
-                        cl_uint num_input_headers,
-                        const cl_program *input_headers,
-                        const char **header_include_names,
-                        void (CL_CALLBACK *pfn_notify)
-                            (cl_program program,
-                            void *user_data),
-                        void *user_data)</pre>
-</div></div>
-<div class="paragraph"><p>compiles a programs source for all the devices or a specific device(s)
-in the OpenCL context associated with <em>program</em>. The pre-processor runs
-before the program sources are compiled. The compiled binary is built
-for all devices associated with <em>program</em> or the list of devices
-specified. The compiled binary can be queried using
-<strong>clGetProgramInfo</strong>(<em>program</em>, CL_PROGRAM_BINARIES, ) and can be passed
-to <strong>clCreateProgramWithBinary</strong> to create a new program object.</p></div>
-<div class="paragraph"><p><em>program</em> is the program object that is the compilation target.</p></div>
-<div class="paragraph"><p><em>device_list</em> is a pointer to a list of devices associated with
-<em>program</em>. If <em>device_list</em> is a NULL value, the compile is performed
-for all devices associated with <em>program</em>. If <em>device_list</em> is a
-non-NULL value, the compile is performed for devices specified in this
-list.</p></div>
-<div class="paragraph"><p><em>num_devices_is the number of devices listed in _device_list</em>.</p></div>
-<div class="paragraph"><p><em>options</em> is a pointer to a null-terminated string of characters that
-describes the compilation options to be used for building the program
-executable. Certain options are ignored when program is created with IL.
-The list of supported options is as described <em>in section 5.8.4</em>.</p></div>
-<div class="paragraph"><p><em>num_input_headers</em> specifies the number of programs that describe
-headers in the array referenced by <em>input_headers</em>.</p></div>
-<div class="paragraph"><p><em>input_headers</em> is an array of program embedded headers created with
-<strong>clCreateProgramWithSource</strong>.</p></div>
-<div class="paragraph"><p><em>header_include_names</em> is an array that has a one to one correspondence
-with <em>input_headers</em>. Each entry in <em>header_include_names</em> specifies
-the include name used by source in <em>program</em> that comes from an embedded
-header. The corresponding entry in <em>input_headers</em> identifies the
-program object which contains the header source to be used. The
-embedded headers are first searched before the headers in the list of
-directories specified by the I compile option (as described in <em>section
-5.8.4.1</em>). If multiple entries in <em>header_include_names</em> refer to the
-same header name, the first one encountered will be used.</p></div>
-<div class="paragraph"><p>If <em>program</em> was created using clCreateProgramWithIL, then
-<em>num_input_headers</em>, <em>input_headers</em>, and <em>header_include_names</em> are
-ignored.</p></div>
-<div class="paragraph"><p>For example, consider the following program source:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre> #include &lt;foo.h&gt;
- #include &lt;mydir/myinc.h&gt;
-
- __kernel void
-
- image_filter (int n, int m,
-
-  __constant float *filter_weights,
-
-  __read_only image2d_t src_image,
-
-  __write_only image2d_t dst_image)
-
- {
-
- ...
-
- }</pre>
-</div></div>
-<div class="paragraph"><p>This kernel includes two headers foo.h and mydir/myinc.h. The following
-describes how these headers can be passed as embedded headers in program
-objects:
- </p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre> cl_program foo_pg = clCreateProgramWithSource(context,
-
- 1, &amp;foo_header_src, NULL, &amp;err);
-
- cl_program myinc_pg = clCreateProgramWithSource(context,
-
- 1, &amp;myinc_header_src, NULL, &amp;err);
-
- // lets assume the program source described above is given
-
- // by program_A and is loaded via clCreateProgramWithSource
-
- cl_program input_headers[2] = \{ foo_pg, myinc_pg };
-
- char * input_header_names[2] = \{ foo.h, mydir/myinc.h };
-
- clCompileProgram(program_A,
-
- 0, NULL, // num_devices &amp; device_list
-
- NULL, // compile_options
-
- 2, // num_input_headers
-
- input_headers,
-
- input_header_names,
-
- NULL, NULL); // pfn_notify &amp; user_data</pre>
-</div></div>
-<div class="paragraph"><p><em>pfn_notify</em> is a function pointer to a notification routine. The
-notification routine is a callback function that an application can
-register and which will be called when the program executable has been
-built (successfully or unsuccessfully). If <em>pfn_notify</em> is not NULL,
-<strong>clCompileProgram</strong> does not need to wait for the compiler to complete
-and can return immediately once the compilation can begin. The
-compilation can begin if the context, program whose sources are being
-compiled, list of devices, input headers, programs that describe input
-headers and compiler options specified are all valid and appropriate
-host and device resources needed to perform the compile are available.
-If <em>pfn_notify</em> is NULL, <strong>clCompileProgram</strong> does not return until the
-compiler has completed. This callback function may be called
-asynchronously by the OpenCL implementation. It is the applications
-responsibility to ensure that the callback function is thread-safe.</p></div>
-<div class="paragraph"><p><em>user_data</em> will be passed as an argument when <em>pfn_notify</em> is called.
-<em>user_data</em> can be NULL.</p></div>
-<div class="paragraph"><p><strong>clCompileProgram</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_PROGRAM if
-<em>program</em> is not a valid program object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>device_list</em> is NULL and <em>num_devices</em> is greater than zero, or if
-<em>device_list</em> is not NULL and <em>num_devices</em> is zero.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>num_input_headers</em> is zero and <em>header_include_names</em> or
-<em>input_headers</em> are not NULL or if <em>num_input_headers</em> is not zero and
-<em>header_include_names</em> or <em>input_headers</em> are NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>pfn_notify</em> is NULL but <em>user_data</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_DEVICE if
-OpenCL devices listed in <em>device_list</em> are not in the list of devices
-associated with <em>program</em>
-</p>
-</li>
-<li>
-<p>
-     CL_INVALID_COMPILER_OPTIONS if the compiler options specified by
-<em>options</em> are invalid.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-the compilation or build of a program executable for any of the devices
-listed in <em>device_list</em> by a previous call to <strong>clCompileProgram</strong> or
-<strong>clBuildProgram</strong> for <em>program</em> has not completed.
-</p>
-</li>
-<li>
-<p>
-      CL_COMPILER_NOT_AVAILABLE
-if a compiler is not available i.e. CL_DEVICE_COMPILER_AVAILABLE
-specified in <em>table 4.3</em> is set to CL_FALSE.
-</p>
-</li>
-<li>
-<p>
-      CL_COMPILE_PROGRAM_FAILURE
-if there is a failure to compile the program source. This error will be
-returned if <strong>clCompileProgram</strong> does not return until the compile has
-completed.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-there are kernel objects attached to <em>program</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-<em>program</em> has no source or IL available, i.e. it has not been created
-with <strong>clCreateProgramWithSource</strong> or <strong>clCreateProgramWithIL</strong>.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_program clLinkProgram(cl_context context,
-                         cl_uint num_devices,
-                         const cl_device_id *device_list,
-                         const char *options,
-                         cl_uint num_input_programs,
-                         const cl_program *input_programs,
-                         void (CL_CALLBACK *pfn_notify)
-                             (cl_program program,
-                             void *user_data),
-                         void *user_data,
-                         cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p>links a set of compiled program objects and libraries for all the
-devices or a specific device(s) in the OpenCL context and creates a
-library or executable. <strong>clLinkProgram</strong> creates a new program object
-which contains the library or executable. The library or executable
-binary can be queried using <strong>clGetProgramInfo</strong>(<em>program</em>,
-CL_PROGRAM_BINARIES, ) and can be specified to
-<strong>clCreateProgramWithBinary</strong> to create a new program object.</p></div>
-<div class="paragraph"><p>The devices associated with the returned program object will be the list
-of devices specified by_device_list_ or if <em>device_list</em> is NULL it will
-be the list of devices associated with <em>context</em>.</p></div>
-<div class="paragraph"><p><em>context</em> must be a valid OpenCL context.</p></div>
-<div class="paragraph"><p><em>device_list</em> is a pointer to a list of devices that are in <em>context</em>.
-If <em>device_list</em> is a NULL value, the link is performed for all devices
-associated with <em>context</em> for which a compiled object is available. If
-<em>device_list</em> is a non-NULL value, the link is performed for devices
-specified in this list for which a compiled object is available.</p></div>
-<div class="paragraph"><p><em>num_devices_is the number of devices listed in _device_list</em>.</p></div>
-<div class="paragraph"><p><em>options</em> is a pointer to a null-terminated string of characters that
-describes the link options to be used for building the program
-executable. The list of supported options is as described <em>in section
-5.8.7</em>.
-If the program was created using clCreateProgramWithBinary and <em>options</em> is
-a NULL pointer,
-the program will be linked as if options were the same as when the program binary
-was originally built.
-If the program was created using clCreateProgramWithBinary and <em>options</em> string contains
-anything other than the same options in the same order (whitespace ignored)
-as when the program binary
-was originally built, then the behavior is implementation defined.</p></div>
-<div class="paragraph"><p><em>num_input_programs</em> specifies the number of programs in array
-referenced by <em>input_programs</em>.</p></div>
-<div class="paragraph"><p><em>input_programs</em> is an array of program objects that are compiled
-binaries or libraries that are to be linked to create the program
-executable. For each device in <em>device_list</em> or if <em>device_list</em> is
-NULL the list of devices associated with context, the following cases
-occur:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      All programs specified by
-<em>input_programs</em> contain a compiled binary or library for the device.
-In this case, a link is performed to generate a program executable for
-this device.
-</p>
-</li>
-<li>
-<p>
-      None of the programs
-contain a compiled binary or library for that device. In this case, no
-link is performed and there will be no program executable generated for
-this device.
-</p>
-</li>
-<li>
-<p>
-      All other cases will
-return a CL_INVALID_OPERATION error.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><em>pfn_notify</em> is a function pointer to a notification routine. The
-notification routine is a callback function that an application can
-register and which will be called when the program executable has been
-built (successfully or unsuccessfully).</p></div>
-<div class="paragraph"><p>If <em>pfn_notify</em> is not NULL, <strong>clLinkProgram</strong> does not need to wait for
-the linker to complete and can return immediately once the linking
-operation can begin. Once the linker has completed, the <em>pfn_notify</em>
-callback function is called which returns the program object returned by
-<strong>clLinkProgram</strong>. The application can query the link status and log for
-this program object. This callback function may be called asynchronously
-by the OpenCL implementation. It is the applications responsibility to
-ensure that the callback function is thread-safe.</p></div>
-<div class="paragraph"><p>If <em>pfn_notify</em> is NULL, <strong>clLinkProgram</strong> does not return until the
-linker has completed.</p></div>
-<div class="paragraph"><p><em>user_data</em> will be passed as an argument when <em>pfn_notify</em> is called.
-<em>user_data</em> can be NULL.</p></div>
-<div class="paragraph"><p>The linking operation can begin if the context, list of devices, input
-programs and linker options specified are all valid and appropriate host
-and device resources needed to perform the link are available. If the
-linking operation can begin, <strong>clLinkProgram</strong> returns a valid non-zero
-program object.</p></div>
-<div class="paragraph"><p>If <em>pfn_notify</em> is NULL, the <em>errcode_ret</em> will be set to CL_SUCCESS if
-the link operation was successful and CL_LINK_FAILURE if there is a
-failure to link the compiled binaries and/or libraries.</p></div>
-<div class="paragraph"><p>If <em>pfn_notify</em> is not NULL, <strong>clLinkProgram</strong> does not have to wait until
-the linker to complete and can return CL_SUCCESS in <em>errcode_ret</em> if the
-linking operation can begin. The <em>pfn_notify</em> callback function will
-return a CL_SUCCESS or CL_LINK_FAILURE if the linking operation was
-successful or not.</p></div>
-<div class="paragraph"><p>Otherwise <strong>clLinkProgram</strong> returns a NULL program object with an
-appropriate error in <em>errcode_ret</em>. The application should query the
-linker status of this program object to check if the link was successful
-or not. The list of errors that can be returned are:</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>device_list</em> is NULL and <em>num_devices</em> is greater than zero, or if
-<em>device_list</em> is not NULL and <em>num_devices</em> is zero.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>num_input_programs</em> is zero and <em>input_programs</em> is NULL__or
-if_num_input_programs_ is zero and <em>input_programs</em> is not NULL or if
-<em>num_input_programs</em> is not zero and <em>input_programs</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_PROGRAM if
-programs specified in <em>input_programs</em> are not valid program objects.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>pfn_notify</em> is NULL but <em>user_data</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_DEVICE if
-OpenCL devices listed in <em>device_list</em> are not in the list of devices
-associated with <em>context</em>
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_LINKER_OPTIONS
-if the linker options specified by <em>options</em> are invalid.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-the compilation or build of a program executable for any of the devices
-listed in <em>device_list</em> by a previous call to <strong>clCompileProgram</strong> or
-<strong>clBuildProgram</strong> for <em>program</em> has not completed.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-the rules for devices containing compiled binaries or libraries as
-described in <em>input_programs</em> argument above are not followed.
-</p>
-</li>
-<li>
-<p>
-      CL_LINKER_NOT_AVAILABLE if
-a linker is not available i.e. CL_DEVICE_LINKER_AVAILABLE specified in
-<em>table 4.3</em> is set to CL_FALSE.
-</p>
-</li>
-<li>
-<p>
-      CL_LINK_PROGRAM_FAILURE if
-there is a failure to link the compiled binaries and/or libraries.
-</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="sect3">
-<h4 id="_compiler_options">5.8.6. Compiler Options</h4>
-<div class="paragraph"><p>The compiler options are categorized as pre-processor options, options
-for math intrinsics, options that control optimization and miscellaneous
-options. This specification defines a standard set of options that must
-be supported by the compiler when building program executables online or
-offline from OpenCL C/C++ or, where relevant, from an IL. These may be
-extended by a set of vendor- or platform-specific options.</p></div>
-<div class="sect4">
-<h5 id="_preprocessor_options">Preprocessor options</h5>
-<div class="paragraph"><p>These options control the OpenCL C/C++ preprocessor which is run on each
-program source before actual compilation. These options are ignored for
-programs created with IL.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-D _name_</pre>
-</div></div>
-<div class="paragraph"><p>Predefine <em>name</em> as a macro, with definition 1.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-D _name_=_definition_</pre>
-</div></div>
-<div class="paragraph"><p>The contents of <em>definition</em> are tokenized and processed as if they
-appeared during</p></div>
-<div class="paragraph"><p>translation phase three in a &#8216;#define&#8217; directive. In particular, the
-definition will be</p></div>
-<div class="paragraph"><p>truncated by embedded newline characters.</p></div>
-<div class="paragraph"><p>-D options are processed in the order they are given in the <em>options</em>
-argument to <strong>clBuildProgram</strong> or <strong>clCompileProgram</strong>. Note that a space is
-required between the -D option and the symbol it defines, otherwise
-behavior is implementation defined.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-I _dir_</pre>
-</div></div>
-<div class="paragraph"><p>Add the directory <em>dir</em> to the list of directories to be searched for
-header files.  <em>dir</em> can optionally be enclosed in double quotes.</p></div>
-<div class="paragraph"><p>This option is not portable due to its dependency on host file system and host operating
-system. It is supported for backwards compatibility with previous OpenCL versions.
-Developers are encouraged to create and use explicit header objects by means of
-clCompileProgram followed by clLinkProgram.</p></div>
-</div>
-<div class="sect4">
-<h5 id="_math_intrinsics_options">Math Intrinsics Options</h5>
-<div class="paragraph"><p>These options control compiler behavior regarding floating-point
-arithmetic. These options trade off between speed and correctness.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-single-precision-constant</pre>
-</div></div>
-<div class="paragraph"><p>Treat double precision floating-point constant as single precision
-constant. This option is ignored for programs created with IL.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-denorms-are-zero</pre>
-</div></div>
-<div class="paragraph"><p>This option controls how single precision and double precision
-denormalized numbers are handled. If specified as a build option, the
-single precision denormalized numbers may be flushed to zero; double
-precision denormalized numbers may also be flushed to zero if the
-optional extension for double precision is supported. This is intended
-to be a performance hint and the OpenCL compiler can choose not to flush
-denorms to zero if the device supports single precision (or double
-precision) denormalized numbers.</p></div>
-<div class="paragraph"><p>This option is ignored for single precision numbers if the device does
-not support single precision denormalized numbers i.e. CL_FP_DENORM bit
-is not set in CL_DEVICE_SINGLE_FP_CONFIG.</p></div>
-<div class="paragraph"><p>This option is ignored for double precision numbers if the device does
-not support double precision or if it does support double precision but
-not double precision denormalized numbers i.e. CL_FP_DENORM bit is not
-set in CL_DEVICE_DOUBLE_FP_CONFIG.</p></div>
-<div class="paragraph"><p>This flag only applies for scalar and vector single precision
-floating-point variables and computations on these floating-point
-variables inside a program. It does not apply to reading from or
-writing to image objects.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-fp32-correctly-rounded-divide-sqrt</pre>
-</div></div>
-<div class="paragraph"><p>The -cl-fp32-correctly-rounded-divide-sqrt build option to
-<strong>clBuildProgram</strong> or</p></div>
-<div class="paragraph"><p><strong>clCompileProgram</strong> allows an application to specify that single
-precision floating-point</p></div>
-<div class="paragraph"><p>divide (x/y and 1/x) and sqrt used in the program source are correctly
-rounded. If</p></div>
-<div class="paragraph"><p>this build option is not specified, te minimum numerical accuracy of
-single precision</p></div>
-<div class="paragraph"><p>floating-point divide and sqrt are as defined in the SPIR-V OpenCL
-environment specification.</p></div>
-<div class="paragraph"><p>This build option can only be specified if the
-CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT is set in CL_DEVICE_SINGLE_FP_CONFIG
-(as defined in <em>table 4.3</em>) for devices that the program is being
-build. <strong>clBuildProgram</strong> or <strong>clCompileProgram</strong> will fail to compile the
-program for a device if the -cl-fp32-correctly-rounded-divide-sqrt
-option is specified and CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT is not set
-for the device.</p></div>
-</div>
-<div class="sect4">
-<h5 id="_optimization_options">Optimization Options</h5>
-<div class="paragraph"><p>These options control various sorts of optimizations. Turning on
-optimization flags makes the compiler attempt to improve the performance
-and/or code size at the expense of compilation time and possibly the
-ability to debug the program.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-opt-disable</pre>
-</div></div>
-<div class="literalblock">
-<div class="content monospaced">
-<pre> This option disables all optimizations. The default is
-optimizations are enabled.</pre>
-</div></div>
-<div class="paragraph"><p>The following options control compiler behavior regarding floating-point
-arithmetic. These options trade off between performance and correctness
-and must be specifically enabled. These options are not turned on by
-default since it can result in incorrect output for programs which
-depend on an exact implementation of IEEE 754 rules/specifications for
-math functions.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-mad-enable</pre>
-</div></div>
-<div class="paragraph"><p>Allow a * b + c to be replaced by a mad. The mad computes a * b + c
-with</p></div>
-<div class="paragraph"><p>reduced accuracy. For example, some OpenCL devices implement mad as
-truncate the</p></div>
-<div class="paragraph"><p>result of a * b before adding it to c.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-no-signed-zeros</pre>
-</div></div>
-<div class="paragraph"><p>Allow optimizations for floating-point arithmetic that ignore the
-signedness of zero.</p></div>
-<div class="paragraph"><p>IEEE 754 arithmetic specifies the distinct behavior of +0.0 and -0.0
-values, which then prohibits simplification of expressions such as x+0.0
-or 0.0*x (even with -cl-finite-math only). This option implies that the
-sign of a zero result isn&#8217;t significant.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-unsafe-math-optimizations</pre>
-</div></div>
-<div class="paragraph"><p>Allow optimizations for floating-point arithmetic that (a) assume that
-arguments and results are valid, (b) may violate IEEE 754 standard and
-(c) may violate the OpenCL numerical compliance requirements as defined
-in the SPIR-V OpenCL environment specification for single precision and
-double precision floating-point, and edge case behavior in the SPIR-V
-OpenCL environment specification. This option includes the
--cl-no-signed-zeros and -cl-mad-enable options.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-finite-math-only</pre>
-</div></div>
-<div class="paragraph"><p>Allow optimizations for floating-point arithmetic that assume that
-arguments and results</p></div>
-<div class="paragraph"><p>are not NaNs, +Inf, -Inf. This option may violate the OpenCL numerical
-compliance requirements for single precision and double precision
-floating-point, as well as edge case behavior. The original and modified
-values are defined in the SPIR-V OpenCL environment specification</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-fast-relaxed-math</pre>
-</div></div>
-<div class="paragraph"><p>Sets the optimization options -cl-finite-math-only and
--cl-unsafe-math-optimizations.</p></div>
-<div class="paragraph"><p>This allows optimizations for floating-point arithmetic that may violate
-the IEEE 754
-standard and the OpenCL numerical compliance requirements for single
-precision and double precision floating-point, as well as floating point
-edge case behavior. This option also relaxes the precision of commonly
-used math functions. This option causes the preprocessor macro
-<em>FAST_RELAXED_MATH</em> to be defined in the OpenCL program. The original
-and modified values are defined in the SPIR-V OpenCL environment
-specification</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-uniform-work-group-size</pre>
-</div></div>
-<div class="paragraph"><p>This requires that the global work-size be a multiple of the work-group
-size specified to
-<strong>clEnqueueNDRangeKernel</strong>. Allow optimizations that are made possible by
-this restriction.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-no-subgroup-ifp</pre>
-</div></div>
-<div class="paragraph"><p>This indicates that kernels in this program do not require subgroups to
-make independent forward progress. Allows optimizations that are made
-possible by this restriction. This option has no effect for devices
-that do not support independent forward progress for subgroups.</p></div>
-</div>
-<div class="sect4">
-<h5 id="_options_to_request_or_suppress_warnings">Options to Request or Suppress Warnings</h5>
-<div class="paragraph"><p>Warnings are diagnostic messages that report constructions which are not
-inherently erroneous but which are risky or suggest there may have been
-an error. The following language-independent options do not enable
-specific warnings but control the kinds of diagnostics produced by the
-OpenCL compiler. These options are ignored for programs created with IL.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-w</pre>
-</div></div>
-<div class="paragraph"><p>Inhibit all warning messages.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-Werror</pre>
-</div></div>
-<div class="paragraph"><p>Make all warnings into errors.</p></div>
-</div>
-<div class="sect4">
-<h5 id="_options_controlling_the_opencl_c_version">Options Controlling the OpenCL C version</h5>
-<div class="paragraph"><p>The following option controls the version of OpenCL C that the compiler
-accepts. These options are ignored for programs created with IL.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-std=</pre>
-</div></div>
-<div class="paragraph"><p>Determine the OpenCL C language version to use. A value for this
-option must be provided. Valid values are:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL1.1  Support all OpenCL C programs that use the OpenCL C language
-features defined in <em>section 6</em> of the OpenCL 1.1 specification.
-</p>
-</li>
-<li>
-<p>
-CL1.2  Support all OpenCL C programs that use the OpenCL C language
-features defined in <em>section 6</em> of the OpenCL 1.2 specification.
-</p>
-</li>
-<li>
-<p>
-CL2.0  Support all OpenCL C programs that use the OpenCL C language
-features defined in <em>section 6</em> OpenCL C 2.0 specification.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Calls to <strong>clBuildProgram</strong> or <strong>clCompileProgram</strong> with the -cl-std=CL1.1
-option <strong>will fail</strong> to compile the program for any devices with
-CL_DEVICE_OPENCL_C_VERSION = OpenCL C 1.0.</p></div>
-<div class="paragraph"><p>Calls to <strong>clBuildProgram</strong> or <strong>clCompileProgram</strong> with the -cl-std=CL1.2
-option <strong>will fail</strong> to compile the program for any devices with
-CL_DEVICE_OPENCL_C_VERSION = OpenCL C 1.0.</p></div>
-<div class="paragraph"><p>Calls to <strong>clBuildProgram</strong> or <strong>clCompileProgram</strong> with the -cl-std=CL2.0
-option <strong>will fail</strong> to compile the program for any devices with
-CL_DEVICE_OPENCL_C_VERSION = OpenCL C 1.0, OpenCL C 1.1 or OpenCL C 1.2.</p></div>
-<div class="paragraph"><p>If the cl-std build option is not specified, the highest OpenCL C 1.x
-language version supported by each device is used when compiling the
-program for each device. Applications are required to specify the
-cl-std=CL2.0 option if they want to compile or build their programs
-with OpenCL C 2.0.</p></div>
-</div>
-<div class="sect4">
-<h5 id="_options_for_querying_kernel_argument_information">Options for Querying Kernel Argument Information</h5>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-kernel-arg-info</pre>
-</div></div>
-<div class="paragraph"><p>This option allows the compiler to store information about the arguments
-of a kernel(s) in</p></div>
-<div class="paragraph"><p>the program executable. The argument information stored includes the
-argument name,</p></div>
-<div class="paragraph"><p>its type, the address space and access qualifiers used. Refer to
-description of</p></div>
-<div class="paragraph"><p><strong>clGetKernelArgInfo</strong> on how to query this information.</p></div>
-</div>
-<div class="sect4">
-<h5 id="_options_for_debugging_your_program">Options for debugging your program</h5>
-<div class="paragraph"><p>The following option is available.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-g</pre>
-</div></div>
-<div class="paragraph"><p>This option can currently be used to generate additional errors for the
-built-in functions that allow you to enqueue commands on a device (refer
-to OpenCL kernel languages specifications).</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="_linker_options">5.8.7. Linker Options</h4>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>This specification defines a standard set of linker options that must be
-supported by the OpenCL C compiler when linking compiled programs online
-or offline. These linker options are categorized as library linking
-options and program linking options. These may be extended by a set of
-vendor- or platform-specific options.</p></div>
-<div class="sect4">
-<h5 id="_library_linking_options">Library Linking Options</h5>
-<div class="paragraph"><p>The following options can be specified when creating a library of
-compiled binaries.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-create-library</pre>
-</div></div>
-<div class="paragraph"><p>Create a library of compiled binaries specified in <em>input_programs</em>
-argument to <strong>clLinkProgram</strong>.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-enable-link-options</pre>
-</div></div>
-<div class="paragraph"><p>Allows the linker to modify the library behavior based on one or more
-link options</p></div>
-<div class="paragraph"><p>(described in <em>section 5.8.5.2</em>) when this library is linked with a
-program executable. This</p></div>
-<div class="paragraph"><p>option must be specified with the create-library option.</p></div>
-</div>
-<div class="sect4">
-<h5 id="_program_linking_options">Program Linking Options</h5>
-<div class="paragraph"><p>The following options can be specified when linking a program
-executable.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>-cl-denorms-are-zero
--cl-no-signed-zeroes
--cl-unsafe-math-optimizations
--cl-finite-math-only
--cl-fast-relaxed-math
--cl-no-subgroup-ifp</pre>
-</div></div>
-<div class="paragraph"><p>The options are described in <em>section 5.8.4.2</em> and <em>section 5.8.4.3</em>.
-The linker may apply these options to all compiled program objects
-specified to <strong>clLinkProgram</strong>. The linker may apply these options only
-to libraries which were created with the enable-link-option.</p></div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="_unloading_the_opencl_compiler">5.8.8. Unloading the OpenCL Compiler</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int  clUnloadPlatformCompiler(cl_platform_id platform)</pre>
-</div></div>
-<div class="paragraph"><p>allows the implementation to release the resources allocated by the
-OpenCL compiler for <em>platform</em>. This is a hint from the application and
-does not guarantee that the compiler will not be used in the future or
-that the compiler will actually be unloaded by the implementation.
-Calls to <strong>clBuildProgram</strong>, <strong>clCompileProgram</strong> or <strong>clLinkProgram</strong> after
-<strong>clUnloadPlatformCompiler</strong> will reload the compiler, if necessary, to
-build the appropriate program executable.</p></div>
-<div class="paragraph"><p><strong>clUnloadPlatformCompiler</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_PLATFORM if
-<em>platform</em> is not a valid platform.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
-<h4 id="_program_object_queries">5.8.9. Program Object Queries</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetProgramInfo(cl_program program,
-                        cl_program_info param_name,
-                        size_t param_value_size,
-                        void *param_value,
-                        size_t *param_value_size_ret)</pre>
-</div></div>
-<div class="paragraph"><p>returns information about the program object.</p></div>
-<div class="paragraph"><p><em>program</em> specifies the program object being queried.</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>clGetProgramInfo</strong> is described in <em>table 5.17</em>.</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 NULL, 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 &gt;= size of return type
-as described in <em>table 5.17.</em></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 NULL, it is
-ignored.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 23. <em>clGetProgramInfo parameter queries</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_program_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return Type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Info. returned in <em>param_value</em></strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">*CL_PROGRAM_REFERENCE_ COUNT*<span class="footnote"><br>[The reference count returned should be considered immediately stale. It is unsuitable for general use in
-applications. This feature is provided for identifying memory leaks.]<br></span>:</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">Return the <em>program</em> reference count.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROGRAM_CONTEXT</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_context</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return the context specified when the
-program object is created</p></td>
-</tr>
-<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"> </p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROGRAM_NUM_DEVICES</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">Return the number of devices
-associated with <em>program</em>.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROGRAM_DEVICES</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_device_id[]</p></td>
-<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 <strong>clCreateProgramWithBinary</strong>.</p></td>
-</tr>
-<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"> </p></td>
-</tr>
-<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 clCreateProgramWithSource. The
-source string returned is a concatenation of
-all source strings specified to
-clCreateProgramWithSource with a null
-terminator. The concatenation strips any
-nulls in the original source strings.
-<br>
-<br>
-If program is created using
-clCreateProgramWithBinary,
-clCreateProgramWithIL or
-clCreateProgramWithBuiltinKernels, 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
-param_value_size_ret.</p></td>
-</tr>
-<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"> </p></td>
-</tr>
-<tr>
-<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 clCreateProgramWithIL.
-<br>
-<br>
-If program is created with
-clCreateProgramWithSource,
-clCreateProgramWithBinary or
-clCreateProgramWithBuiltinKernels the
-memory pointed to by param_value will be
-unchanged and param_value_size_retwill be
-set to 0.</p></td>
-</tr>
-<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"> </p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROGRAM_BINARY_SIZES</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">Returns an array that contains the size in
-bytes of the program binary (could be an
-executable binary, compiled binary or
-library binary) for each device associated
-with program. 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.
-<br>
-<br>
-If program is created using
-clCreateProgramWithBuiltinKernels,
-the implementation may return zero in any
-entries of the returned array.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROGRAM_BINARIES</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">unsigned <br>
- char *[]</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return the program binaries (could be an
-executable binary, compiled binary or
-library binary) for all devices associated
-with program.   For each device in
-program, the binary returned can be the
-binary specified for the device when
-program is created with
-clCreateProgramWithBinary or it can be
-the executable binary generated by
-clBuildProgram or clLinkProgram.  If
-program is created with
-clCreateProgramWithSource or
-clCreateProgramWithIL, the binary
-returned is the binary generated by
-clBuildProgram, clCompileProgram or
-clLinkProgram.  The bits returned can be
-an implementation-specific intermediate
-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.
-<br>
-<br>
-param_value points to an array of n
-pointers allocated by the caller, where n is
-the number of devices associated with
-program. The buffer sizes needed to
-allocate the memory that these n pointers
-refer to can be queried using the
-CL_PROGRAM_BINARY_SIZES query as
-described in this table.
-<br>
-<br>
-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, use
-the CL_PROGRAM_DEVICES query to get
-the list of devices. There is a one-to-one
-correspondence between the array of n
-pointers returned by
-CL_PROGRAM_BINARIES and array of
-devices returned by
-CL_PROGRAM_DEVICES.</p></td>
-</tr>
-<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"> </p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROGRAM_NUM_KERNELS</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">Returns the number of kernels
-declared in <em>program</em> that can be created with <strong>clCreateKernel</strong>. This
-information is only available after a successful program executable has
-been built for at least one device in the list of devices associated
-with <em>program</em>.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROGRAM_KERNEL_ NAMES</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 a semi-colon separated list
-of kernel names in <em>program</em> that can be created with <strong>clCreateKernel</strong>.
-This information is only available after a successful program executable
-has been built for at least one device in the list of devices associated
-with <em>program</em>.</p></td>
-</tr>
-<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"> </p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROGRAM_SCOPE_ GLOBAL_CTORS_PRESENT</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">This indicates that
-the <em>program</em> object contains non-trivial constructor(s) that will be
-executed by runtime before any kernel from the program is executed.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROGRAM_SCOPE_ GLOBAL_DTORS_PRESENT</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">This indicates that
-the program object contains non-trivial destructor(s) that will be
-executed by runtime when <em>program</em> is
-destroyed. </p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><strong>clGetProgramInfo</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_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 <em>table
-5.17_and _param_value</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_PROGRAM if
-<em>program</em> is a not a valid program object.
-</p>
-</li>
-<li>
-<p>
-     
-CL_INVALID_PROGRAM_EXECUTABLE if <em>param_name</em> is CL_PROGRAM_NUM_KERNELS
-or CL_PROGRAM_KERNEL_NAMES and a successful program executable has not
-been built for at least one device in the list of devices associated
-with <em>program</em>.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetProgramBuildInfo(cl_program program,
-                             cl_device_id device,
-                             cl_program_build_info param_name,
-                             size_t param_value_size,
-                             void *param_value,
-                             size_t *param_value_size_ret)</pre>
-</div></div>
-<div class="paragraph"><p>returns build information for each device in the program object.</p></div>
-<div class="paragraph"><p><em>program</em> specifies the program object being queried.</p></div>
-<div class="paragraph"><p><em>device</em> specifies the device for which build information is being
-queried. <em>device</em> must be a valid device associated with <em>program</em>.</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>clGetProgramBuildInfo</strong> is described in <em>table 5.18</em>.</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 NULL, 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 &gt;= size of return type
-as described in <em>table 5.18.</em></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 NULL, it is
-ignored.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 24. <em>clGetProgramBuildInfo</em> <em>parameter queries.</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_program_build_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return Type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Info. returned in
-<em>param_value</em></strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_PROGRAM_BUILD_<br>
-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.
-<br>
-<br>
-This can be one of the following:
-<br>
-<br>
-CL_BUILD_NONE. The build status returned if
-no clBuildProgram, clCompileProgram or
-clLinkProgram has been performed on the
-specified program object for device.
-<br>
-<br>
-CL_BUILD_ERROR. The build status returned
-if clBuildProgram, clCompileProgram or
-clLinkProgram whichever was performed last
-on the specified program object for device
-generated an error.
-<br>
-<br>
-CL_BUILD_SUCCESS. The build status
-returned if clBuildProgram,
-clCompileProgram or clLinkProgram
-whichever was performed last on the specified
-program object for device was successful.
-<br>
-<br>
-CL_BUILD_IN_PROGRESS. The build status
-returned if clBuildProgram,
-clCompileProgram or clLinkProgram
-whichever was performed last on the specified
-program object for device has not finished.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">CL_PROGRAM_BUILD_<br>
-OPTIONS</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 build, compile or link options
-specified by the options argument in
-clBuildProgram, clCompileProgram or
-clLinkProgram, whichever was performed last
-on program for device.
-<br>
-<br>
-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_BUILD_<br>
-LOG</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 build or compile log for
-clBuildProgram or clCompileProgram
-whichever was performed last on program for
-device.
-<br>
-<br>
-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_<br>
-TYPE</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_program_<br>
- 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:
-<br>
-<br>
-CL_PROGRAM_BINARY_TYPE_NONE – There
-is no binary associated with device.
-<br>
-<br>
-CL_PROGRAM_BINARY_TYPE_
-COMPILED_OBJECT – A compiled binary is
-associated with device. This is the case if
-program was created using
-clCreateProgramWithSource and compiled
-using clCompileProgram or a compiled binary
-is loaded using clCreateProgramWithBinary.
-<br>
-<br>
-CL_PROGRAM_BINARY_TYPE_
-LIBRARY – A library binary is associated with
-device. This is the case if program was created
-by clLinkProgram which is called with the –
-create-library link option or if a library binary is
-loaded using clCreateProgramWithBinary.
-<br>
-<br>
-CL_PROGRAM_BINARY_TYPE_
-EXECUTABLE – An executable binary is
-associated with device. This is the case if
-program was created by clLinkProgram
-without the –create-library link option or
-program was created by clBuildProgram or an
-executable binary is loaded using
-clCreateProgramWithBinary.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROGRAM_BUILD_<br>
- GLOBAL_VARIABLE_<br>
- TOTAL_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">The total amount of storage, in bytes, used by
-program variables in the global address space.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><strong>clGetProgramBuildInfo</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>program</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 <em>table 5.18</em>
-and <em>param_value</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_PROGRAM if
-<em>program</em> is a not a valid program 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 class="paragraph"><p>NOTE:</p></div>
-<div class="paragraph"><p>A program binary (compiled binary, library binary or executable binary)
-built for a parent device can be used by all its sub-devices. If a
-program binary has not been built for a sub-device, the program binary
-associated with the parent device will be used.</p></div>
-<div class="paragraph"><p>A program binary for a device specified with <strong>clCreateProgramWithBinary</strong>
-or queried using <strong>clGetProgramInfo</strong> can be used as the binary for the
-associated root device, and all sub-devices created from the root-level
-device or sub-devices thereof.</p></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_kernel_objects">5.9. Kernel Objects</h3>
-<div class="paragraph"><p>A kernel is a function declared in a program. A kernel is identified
-by the <em>kernel qualifier applied to any function in a program. A
-kernel object encapsulates the specific </em>kernel function declared in a
-program and the argument values to be used when executing this __kernel
-function.</p></div>
-<div class="sect3">
-<h4 id="_creating_kernel_objects">5.9.1. Creating Kernel Objects</h4>
-<div class="paragraph"><p>To create a kernel object, use the function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_kernel clCreateKernel(cl_program program,
-                         const char *kernel_name,
-                         cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p><em>program</em> is a program object with a successfully built executable.</p></div>
-<div class="paragraph"><p><em>kernel_name</em> is a function name in the program declared with the
-__kernel qualifier.</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>clCreateKernel</strong> returns a valid non-zero kernel object and
-<em>errcode_ret</em> is set to CL_SUCCESS if the kernel 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_PROGRAM if
-_program_is not a valid program object.
-</p>
-</li>
-<li>
-<p>
-  CL_INVALID_PROGRAM_EXECUTABLE if there is no successfully built
-executable for <em>program</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_KERNEL_NAME if
-<em>kernel_name</em> is not found in <em>program</em>.
-</p>
-</li>
-<li>
-<p>
-  CL_INVALID_KERNEL_DEFINITION if the function definition for <em>_kernel
-function given by _kernel_name</em> such as the number of arguments, the
-argument types are not the same for all devices for which the <em>program</em>
-executable has been built.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>kernel_name</em> is NULL.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clCreateKernelsInProgram(cl_program program,
-                                cl_uint num_kernels,
-                                cl_kernel *kernels,
-                                cl_uint *num_kernels_ret)</pre>
-</div></div>
-<div class="paragraph"><p>creates kernel objects for all kernel functions in <em>program</em>. Kernel
-objects are not created for any <em>_kernel functions in _program</em> that do
-not have the same function definition across all devices for which a
-program executable has been successfully built.</p></div>
-<div class="paragraph"><p><em>program</em> is a program object with a successfully built executable.</p></div>
-<div class="paragraph"><p><em>num_kernels</em> is the size of memory pointed to by <em>kernels</em> specified as
-the number of cl_kernel entries.</p></div>
-<div class="paragraph"><p><em>kernels</em> is the buffer where the kernel objects for kernels in
-<em>program</em> will be returned. If <em>kernels</em> is NULL, it is ignored. If
-<em>kernels</em> is not NULL, <em>num_kernels</em> must be greater than or equal to
-the number of kernels in <em>program</em>.</p></div>
-<div class="paragraph"><p><em>num_kernels_ret</em> is the number of kernels in <em>program</em>. If
-<em>num_kernels_ret</em> is NULL, it is ignored.</p></div>
-<div class="paragraph"><p><strong>clCreateKernelsInProgram</strong> will return CL_SUCCESS if the kernel objects
-were successfully allocated. Otherwise, it returns one of the following
-errors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_INVALID_PROGRAM if
-<em>program</em> is not a valid program object.
-</p>
-</li>
-<li>
-<p>
-     CL_INVALID_PROGRAM_EXECUTABLE if there is no successfully built
-executable for any device in <em>program</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>kernels</em> is not NULL and <em>num_kernels</em> is less than the number of
-kernels in <em>program</em>.
-</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>Kernel objects can only be created once you have a program object with a
-valid program source or binary loaded into the program object and the
-program executable has been successfully built for one or more devices
-associated with program. No changes to the program executable are
-allowed while there are kernel objects associated with a program
-object. This means that calls to <strong>clBuildProgram</strong> and
-<strong>clCompileProgram</strong> return CL_INVALID_OPERATION if there are kernel
-objects attached to a program object. The OpenCL context associated
-with <em>program</em> will be the context associated with <em>kernel</em>. The list
-of devices associated with <em>program</em> are the devices associated with
-<em>kernel</em>. Devices associated with a program object for which a valid
-program executable has been built can be used to execute kernels
-declared in the program object.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clRetainKernel(cl_kernel kernel)</pre>
-</div></div>
-<div class="paragraph"><p>increments the <em>kernel</em> reference count. <strong>clRetainKernel</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_KERNEL if
-<em>kernel</em> is 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 class="paragraph"><p><strong>clCreateKernel</strong> or <strong>clCreateKernelsInProgram</strong> do an implicit retain.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clReleaseKernel(cl_kernel kernel)</pre>
-</div></div>
-<div class="paragraph"><p>decrements the <em>kernel</em> reference count. <strong>clReleaseKernel</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_KERNEL if
-<em>kernel</em> is 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 class="paragraph"><p>The kernel object is deleted once the number of instances that are
-retained to <em>kernel</em> become zero and the kernel object is no longer
-needed by any enqueued commands that use <em>kernel</em>. Using this function
-to release a reference that was not obtained by creating the object or
-by calling <strong>clRetainKernel</strong> causes undefined behavior.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_setting_kernel_arguments">5.9.2. Setting Kernel Arguments</h4>
-<div class="paragraph"><p>To execute a kernel, the kernel arguments must be set.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int  clSetKernelArg(cl_kernel kernel,
-                       cl_uint arg_index,
-                       size_t arg_size,
-                       const void *arg_value)</pre>
-</div></div>
-<div class="paragraph"><p>is used to set the argument value for a specific argument of a kernel.</p></div>
-<div class="paragraph"><p><em>kernel</em> is a valid kernel object.</p></div>
-<div class="paragraph"><p><em>arg_index</em> is the argument index. Arguments to the kernel are referred
-by indices that go from 0 for the leftmost argument to <em>n</em> - 1, where
-<em>n</em> is the total number of arguments declared by a kernel.</p></div>
-<div class="paragraph"><p>For example, consider the following kernel:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre> kernel void image_filter (int n,
-                           int m,
-                           constant float *filter_weights,
-                           read_only image2d_t src_image,
-                           write_only image2d_t dst_image)
- {
- ...
- }</pre>
-</div></div>
-<div class="paragraph"><p>Argument index values for image_filter will be 0 for n, 1 for m, 2 for
-filter_weights, 3 for src_image and 4 for dst_image.</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> 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 <em>kernel</em>
-(<strong>clEnqueueNDRangeKernel</strong>) until the argument value is changed by a call
-to <strong>clSetKernelArg</strong> for <em>kernel</em>.</p></div>
-<div class="paragraph"><p>If the argument is a memory object (buffer, pipe, image or image array),
-the <em>arg_value</em> entry will be a pointer to the appropriate buffer, pipe,
-image or image array object. The memory object must be created with the
-context associated with the kernel object. If the argument is a buffer
-object, the <em>arg_value</em> pointer can be NULL or point to a NULL value in
-which case a NULL value will be used as the value for the argument
-declared as a pointer to global or constant memory in the kernel. If
-the argument is declared with the local qualifier, the <em>arg_value</em> entry
-must be NULL. If the argument is of type <em>sampler_t</em>, the <em>arg_value</em>
-entry must be a pointer to the sampler object. If the argument is of
-type <em>queue_t</em>, the <em>arg_value</em> entry must be a pointer to the device
-queue object.</p></div>
-<div class="paragraph"><p>If the argument is declared to be a pointer of a built-in scalar or
-vector type, or a user defined structure type in the global or constant
-address space, the memory object specified as argument value must be a
-buffer object (or NULL). If the argument is declared with the constant
-qualifier, the size in bytes of the memory object cannot exceed
-CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE and the number of arguments declared
-as pointers to <em>constant</em> memory cannot exceed
-CL_DEVICE_MAX_CONSTANT_ARGS.</p></div>
-<div class="paragraph"><p>The memory object specified as argument value must be a pipe object if
-the argument is declared with the <em>pipe</em> qualifier.</p></div>
-<div class="paragraph"><p>The memory object specified as argument value must be a 2D image object
-if the argument is declared to be of type <em>image2d_t</em>. The memory
-object specified as argument value must be a 2D image object with image
-channel order = CL_DEPTH if the argument is declared to be of type
-<em>image2d_depth_t</em>. The memory object specified as argument value must
-be a 3D image object if argument is declared to be of type <em>image3d_t</em>.
-The memory object specified as argument value must be a 1D image object
-if the argument is declared to be of type <em>image1d_t</em>. The memory
-object specified as argument value must be a 1D image buffer object if
-the argument is declared to be of type <em>image1d_buffer_t</em>. The memory
-object specified as argument value must be a 1D image array object if
-argument is declared to be of type <em>image1d_array_t</em>. The memory object
-specified as argument value must be a 2D image array object if argument
-is declared to be of type <em>image2d_array_t</em>. The memory object
-specified as argument value must be a 2D image array object with image
-channel order = CL_DEPTH if argument is declared to be of type
-<em>image2d_array_depth_t</em>.</p></div>
-<div class="paragraph"><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 local qualifier, the size specified will be
-the size in bytes of the buffer that must be allocated for the local
-argument. If the argument is of type <em>sampler_t</em>, the <em>arg_size</em> value
-must be equal to sizeof(cl_sampler). If the argument is of type
-<em>queue_t</em>, the <em>arg_size</em> value must be equal to
-sizeof(cl_command_queue). For all other arguments, the size will be the
-size of argument type.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">A kernel object does not update the reference count for objects
-such as memory, sampler objects specified as argument values by
-<strong>clSetKernelArg</strong>, Users may not rely on a kernel object to retain
-objects specified as argument values to the kernel<span class="footnote"><br>[Implementations shall not allow cl_kernel objects to hold reference counts to  cl_kernel arguments, because no
-mechanism is provided for the user to tell the kernel to release that ownership right.  If the kernel holds ownership rights on kernel args, that would make it impossible for the user to tell with certainty when he may safel y release
-user allocated resources associated with OpenCL objects such as the cl_mem backing store used with
-CL_MEM_USE_HOST_PTR.]<br></span>:.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p><strong>clSetKernelArg</strong> returns CL_SUCCESS if the function was executed
-successfully. Otherwise, it returns one of the following errors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_INVALID_KERNEL if
-<em>kernel</em> is not a valid kernel object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_ARG_INDEX if
-<em>arg_index</em> is not a valid argument index.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_ARG_VALUE if
-<em>arg_value</em> specified is not a valid value.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT for
-an argument declared to be a memory object when the specified
-<em>arg_value</em> is not a valid memory object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_SAMPLER for an
-argument declared to be of type <em>sampler_t</em> when the specified
-<em>arg_value</em> is not a valid sampler object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_DEVICE_QUEUE
-for an argument declared to be of type <em>queue_t</em> when the specified
-<em>arg_value</em> is not a valid device queue object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_ARG_SIZE if
-<em>arg_size</em> does not match the size of the data type for an argument that
-is not a memory object or if the argument is a memory object and
-<em>arg_size</em> != sizeof(cl_mem) or if <em>arg_size</em> is zero and the argument
-is declared with the local qualifier or if the argument is a sampler and
-<em>arg_size</em> != sizeof(cl_sampler).
-</p>
-</li>
-<li>
-<p>
-     CL_MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory
-object (if the argument was declared with constant qualifier) or
-<em>arg_size</em> (if the argument was declared with local qualifier) exceed
-the maximum size restriction that was set with
-the optional language attribute. The optional attribute can be
-cl::max_size defined in OpenCL 2.2 C++ Kernel Languange specification or
-SpvDecorationMaxByteOffset defined in SPIR-V 1.2 Specification.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_ARG_VALUE if
-the argument is an image declared with the read_only qualifier and
-<em>arg_value</em> refers to an image object created with <em>cl_mem_flags</em> of
-CL_MEM_WRITE or if the image argument is declared with the write_only
-qualifier and <em>arg_value</em> refers to an image object created with
-<em>cl_mem_flags</em> of CL_MEM_READ.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int  clSetKernelArgSVMPointer(cl_kernel kernel,
-                                 cl_uint arg_index,
-                                 const void *arg_value)</pre>
-</div></div>
-<div class="paragraph"><p>is used to set a SVM pointer as the argument value for a specific
-argument of a kernel.</p></div>
-<div class="paragraph"><p><em>kernel</em> is a valid kernel object.</p></div>
-<div class="paragraph"><p><em>arg_index</em> is the argument index. Arguments to the kernel are referred
-by indices that go from 0 for the leftmost argument to <em>n</em> - 1, where
-<em>n</em> is the total number of arguments declared by a kernel.</p></div>
-<div class="paragraph"><p><em>arg_value</em> is the SVM pointer that should be used as the argument value
-for argument specified by <em>arg_index</em>. The SVM pointer specified is the
-value used by all API calls that enqueue <em>kernel</em>
-(<strong>clEnqueueNDRangeKernel</strong>) until the argument value is changed by a call
-to <strong>clSetKernelArgSVMPointer</strong> for <em>kernel</em>. The SVM pointer can only be
-used for arguments that are declared to be a pointer to global or
-constant memory. The SVM pointer value must be aligned according to the
-arguments type. For example, if the argument is declared to be global
-float4 p, the SVM pointer value passed for p must be at a minimum
-aligned to a float4. The SVM pointer value specified as the argument
-value can be the pointer 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 successfully. Otherwise, it returns one of the following
-errors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_INVALID_KERNEL if
-<em>kernel</em> is not a valid kernel object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_ARG_INDEX if
-<em>arg_index</em> is not a valid argument index.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_ARG_VALUE if
-<em>arg_value</em> specified is not a valid value.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int  clSetKernelExecInfo(cl_kernel kernel,
-                            cl_kernel_exec_info param_name,
-                            size_t param_value_size,
-                            const void *param_value)</pre>
-</div></div>
-<div class="paragraph"><p>can be used to pass additional information other than argument values to
-a kernel.</p></div>
-<div class="paragraph"><p><em>kernel</em> specifies the kernel object being queried.</p></div>
-<div class="paragraph"><p><em>param_name</em> specifies the information to be passed to kernel. The list
-of supported <em>param_name</em> types and the corresponding values passed in
-<em>param_value</em> is described in <em>table 5.19</em>.</p></div>
-<div class="paragraph"><p><em>param_value_size</em> specifies the size in bytes of the memory pointed to
-by <em>param_value</em>.</p></div>
-<div class="paragraph"><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 class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 25. <em>clSetKernelExecInfo</em> <em>parameter values.</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_kernel_exec_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Type</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"><strong>CL_KERNEL_EXEC_INFO_ SVM_PTRS</strong></p></td>
-<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.
-<br>
-<br>
-Non-argument SVM buffers must be
-specified by passing pointers to those
-buffers via clSetKernelExecInfo for
-coarse-grain and fine-grain buffer
-SVM allocations but not for finegrain system SVM allocations.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_EXEC_INFO_ SVM_FINE_GRAIN_SYSTEM</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">This flag
-indicates whether the kernel uses pointers that are fine grain system
-SVM allocations. These fine grain system SVM pointers may be passed as
-arguments or defined in SVM buffers that are passed as arguments to
-<em>kernel</em>.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><strong>clSetKernelExecInfo</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_KERNEL if
-<em>kernel</em> is a not a valid kernel object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>param_name</em> is not valid, if <em>param_value</em> is NULL or if the size
-specified by <em>param_value_size</em> is not valid.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-<em>param_name</em> = CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM and
-<em>param_value</em> = CL_TRUE but no devices in context associated with
-<em>kernel</em> support fine-grain system SVM allocations.
-</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>NOTES</p></div>
-<div class="paragraph"><p>Coarse-grain or fine-grain buffer SVM pointers used by a kernel
-which are not passed as a kernel arguments must be specified using
-<strong>clSetKernelExecInfo</strong> with CL_KERNEL_EXEC_INFO_SVM_PTRS. For example,
-if SVM buffer A contains a pointer to another SVM buffer B, and the
-kernel dereferences that pointer, then a pointer to B must either be
-passed as an argument in the call to that kernel or it must be made
-available to the kernel using <strong>clSetKernelExecInfo</strong>. For example, we
-might pass extra SVM pointers as follows:
- </p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>clSetKernelExecInfo(kernel,
-                    CL_KERNEL_EXEC_INFO_SVM_PTRS,
-                    num_ptrs * sizeof(void *),
-                    extra_svm_ptr_list);</pre>
-</div></div>
-<div class="paragraph"><p>Here num_ptrs specifies the number of additional SVM pointers while
-extra_svm_ptr_list specifies a pointer to memory containing those SVM
-pointers.</p></div>
-<div class="paragraph"><p>When calling <strong>clSetKernelExecInfo</strong> with CL_KERNEL_EXEC_INFO_SVM_PTRS to
-specify pointers to non-argument SVM buffers as extra arguments to a
-kernel, each of these pointers can be the SVM pointer returned by
-<strong>clSVMAlloc</strong> or can be a pointer + offset into the SVM region. It is
-sufficient to provide one pointer for each SVM buffer used.</p></div>
-<div class="paragraph"><p>CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM is used to indicate
-whether SVM pointers used by a kernel will refer to system allocations
-or not.</p></div>
-<div class="paragraph"><p>CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM = CL_FALSE indicates that the
-OpenCL implementation may assume that system pointers are not passed as
-kernel arguments and are not stored inside SVM allocations passed as
-kernel arguments.</p></div>
-<div class="paragraph"><p>CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM = CL_TRUE indicates that the
-OpenCL implementation must assume that system pointers might be passed
-as kernel arguments and/or stored inside SVM allocations passed as
-kernel arguments. In this case, if the device to which the kernel is
-enqueued does not support system SVM pointers, <strong>clEnqueueNDRangeKernel</strong>
-will return a CL_INVALID_OPERATION error. If none of the devices in the
-context associated with kernel support fine-grain system SVM
-allocations, <strong>clSetKernelExecInfo</strong> will return a CL_INVALID_OPERATION
-error.</p></div>
-<div class="paragraph"><p>If <strong>clSetKernelExecInfo</strong> has not been called with a value for
-<strong>CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM</strong>, the default value is used
-for this kernel attribute. The default value depends on whether the
-device on which the kernel is enqueued supports fine-grain system SVM
-allocations. If so, the default value used is CL_TRUE (system pointers
-might be passed); otherwise, the default is CL_FALSE.</p></div>
-<div class="paragraph"><p>A call to <strong>clSetKernelExecInfo</strong> for a given value of <em>param_name</em>
-replaces any prior value passed for that value of <em>param_name</em>. Only one
-<em>param_value</em> will be stored for each value of <em>param_name</em>.
- </p></div>
-</div>
-<div class="sect3">
-<h4 id="_copying_kernel_objects">5.9.3. Copying Kernel Objects</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_kernel clCloneKernel(cl_kernel source_kernel,
-                        cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p>is used to make a shallow copy of the kernel object, its arguments and
-any information passed to the kernel object using <strong>clSetKernelExecInfo</strong>.
-If the kernel object was ready to be enqueued before copying it, the
-clone of the kernel object is ready to enqueue.</p></div>
-<div class="paragraph"><p><em>source_kernel</em> is a valid cl_kernel object that will be copied.
-_source_kernel_will not be modified in any way by this function.</p></div>
-<div class="paragraph"><p><em>errcode_ret</em> will be assigned an appropriate error code. If
-_errcode_ret_is NULL, no error code is returned.</p></div>
-<div class="paragraph"><p><strong>clCloneKernel</strong> returns a valid non-zero kernel object and <em>errcode_ret</em>
-is set to CL_SUCCESS if the kernel is successfully copied. 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_KERNEL if
-<em>kernel</em> is 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 class="paragraph"><p>The returned kernel object is an exact copy of <em>source_kernel</em>, with one
-caveat: the reference count on the returned kernel object is set as if
-it had been returned by <strong>clCreateKernel</strong>. The reference count of
-<em>source_kernel will</em> not be changed.</p></div>
-<div class="paragraph"><p>The resulting kernel will be in the same state as if <strong>clCreateKernel</strong> is
-called to create the resultant kernel with the same arguments as those
-used to create <em>source_kernel</em>, the latest call to <strong>clSetKernelArg</strong> or
-<strong>clSetKernelArgSVMPointer</strong> for each argument index applied to kernel and
-the last call to <strong>clSetKernelExecInfo</strong> for each value of the param name
-parameter are applied to the new kernel object.</p></div>
-<div class="paragraph"><p>All arguments of the new kernel object must be intact and it may be
-correctly used in the same situations as kernel except those that assume
-a pre-existing reference count. Setting arguments on the new kernel
-object will not affect <em>source_kernel</em> except insofar as the argument
-points to a shared underlying entity and in that situation behavior is
-as if two kernel objects had been created and the same argument applied
-to each. Only the data stored in the kernel object is copied; data
-referenced by the kernels arguments are not copied. For example, if a
-buffer or pointer argument is set on a kernel object, the pointer is
-copied but the underlying memory allocation is not.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_kernel_object_queries">5.9.4. Kernel Object Queries</h4>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetKernelInfo*(cl_kernel kernel,
-                        cl_kernel_info param_name,
-                        size_t param_value_size,
-                        void *param_value,
-                        size_t *param_value_size_ret)</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>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>clGetKernelInfo</strong> is described in <em>table 5.20</em>.</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 NULL, 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 &gt;= size of return type
-as described in <em>table 5.20</em>.</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 NULL, it is
-ignored.
- </p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 26. <em>clGetKernelInfo</em> <em>parameter queries.</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_kernel_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return Type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Info. returned in <em>param_value</em></strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_FUNCTION_NAME</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 kernel function name.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_NUM_ARGS</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">Return the number of arguments to
-kernel.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">*CL_KERNEL_REFERENCE_ COUNT*<span class="footnote"><br>[The reference count returned should be considered immediately stale. It is unsuitable for general use in
-applications. This feature is provided for identifying memory leaks. ]<br></span>:</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">Return the <em>kernel</em> reference
-count.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_CONTEXT</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_context</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return the context associated with
-<em>kernel</em>.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_PROGRAM</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_program</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return the program object associated
-with kernel.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_ATTRIBUTES</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 any attributes specified using
-the <em>attribute</em> OpenCL Cqualifier  (or using an OpenCL C++ qualifier syntax [[]] ) 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.
-<br>
-<br>
-Attributes are returned as they were
-declared inside <em>attribute</em>&#8230;,
-with any surrounding whitespace and
-embedded newlines removed. When
-multiple attributes are present, they
-are returned as a single, space
-delimited string.
-<br>
-<br>
-For kernels not created from OpenCL
-C source and the
-clCreateProgramWithSource API
-call the string returned from this
-query will be empty.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><strong>clGetKernelInfo</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_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 <em>table
-5.20_and _param_value</em> is not NULL.
-</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 class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetKernelWorkGroupInfo(cl_kernel kernel,
-                                cl_device_id device,
-                                cl_kernel_work_group_info param_name,
-                                size_t param_value_size,
-                                void *param_value,
-                                size_t *param_value_size_ret)</pre>
-</div></div>
-<div class="paragraph"><p>returns information about the kernel object that may be specific to a
-device.</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 NULL
-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>clGetKernelWorkGroupInfo</strong> is described in <em>table 5.21</em>.</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 NULL, 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 &gt;= size of return type
-as described in <em>table 5.21</em>.</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 NULL, it is
-ignored.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 27. <em>clGetKernelWorkGroupInfo</em> <em>parameter queries.</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_kernel_work_group_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return Type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Info. returned in
-<em>param_value</em></strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_GLOBAL_ WORK_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">This provides a mechanism for the
-application to query the maximum global size that can be used to execute a kernel
-(i.e. global_work_size argument to
-clEnqueueNDRangeKernel) on a custom
-device given by device or a built-in kernel
-on an OpenCL device given by device.
-<br>
-<br>
-If device is not a custom device and kernel
-is not a built-in kernel,
-clGetKernelWorkGroupInfo returns the
-error CL_INVALID_VALUE.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_WORK_ GROUP_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">This provides a mechanism for the
-application to query the maximum workgroup size that can be used to execute the
-kernel on a specific 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.
-<br>
-<br>
-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.
-<br>
-<br>
-CL_KERNEL_WORK_GROUP_SIZE
-will be less than or equal to
-CL_DEVICE_MAX_WORK_GROUP_SI
-ZE for a given kernel object.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_COMPILE_<br>
- 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.
-<br>
-<br>
-If the work-group size is not specified in
-the kernel source or IL, (0, 0, 0) is
-returned.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_LOCAL_<br>
-MEM_SIZE</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Returns the amount of local memory in
-bytes being used by a kernel. This
-includes local memory that may be needed
-by an implementation to execute the
-kernel, variables declared inside the kernel
-with the <em>local address qualifier and
-local memory to be allocated for
-arguments to the kernel declared as
-pointers with the </em>local address
-qualifier and whose size is specified with
-clSetKernelArg.
-<br>
-<br>
-If the local memory size, for any pointer
-argument to the kernel declared with the
-__local address qualifier, is not
-specified, its size is assumed to be 0.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_PREFERRED_<br>
-WORK_GROUP_SIZE_MULTIPLE</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">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
-<strong>clEnqueueNDRangeKernel</strong> will not fail to enqueue the kernel for
-execution unless the work-group size specified is larger than the device
-maximum.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_PRIVATE_<br>
-MEM_SIZE</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Returns the minimum amount of
-private memory, in bytes, used by each work-item in the kernel. This
-value may include any private memory needed by an implementation to
-execute the kernel, including that used by the language built-ins and
-variable declared inside the kernel with the __private qualifier.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><strong>clGetKernelWorkGroupInfo</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 NULL 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 <em>table
-5.21_and _param_value</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>param_name</em> is CL_KERNEL_GLOBAL_WORK_SIZE and <em>device</em> is not a custom
-device and <em>kernel</em> is not a built-in kernel.
-</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 class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetKernelSubGroupInfo(cl_kernel kernel,
-                               cl_device_id device,
-                               cl_kernel_sub_group_info param_name,
-                               size_t input_value_size,
-                               const void *input_value,
-                               size_t param_value_size,
-                               void *param_value,
-                               size_t *param_value_size_ret)</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 NULL
-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>clGetKernelSubGroupInfo</strong> is described in <em>table 5.22</em>.</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
-NULL, 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 NULL, 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 &gt;= size of return type
-as described in <em>table 5.22</em>.</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 NULL, it is
-ignored.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 28. <em>clGetKernelSubGroupInfo</em> <em>parameter queries.</em></caption>
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_kernel_sub_group_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Input Type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return Type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Info.
-returned in <em>param_value</em></strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_MAX_ SUB_GROUP_SIZE_ FOR_NDRANGE</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.
-<br>
-<br>
-The input_value 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
-input_value_size.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_SUB_ GROUP_COUNT_ FOR_NDRANGE</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.
-<br>
-<br>
-The input_value 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
-input_value_size.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_LOCAL_ SIZE_FOR_SUB_ GROUP_COUNT</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 local size that will generate the requested number of sub-groups for
-the kernel. The output array must be an array of size_t values
-corresponding to the local size parameter. Any returned work-group will
-have one dimension. Other dimensions inferred from the value specified
-for param_value_size will be filled with the value 1. The returned value
-will produce an exact number of sub-groups and result in no partial
-groups for an executing kernel except in the case where the last
-work-group in a dimension has a size different from that of the other
-groups. If no work-group size can accommodate the requested number of
-sub-groups, 0 will be returned in each element of the return array.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_MAX_ NUM_SUB_GROUPS</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">ignored</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">This provides a
-mechanism for the application to query the maximum number of sub-groups
-that may make up each work-group to execute a kernel on a specific 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. The returned value may be used to compute a
-work-group size to enqueue the kernel with to give a round number of
-sub-groups for an enqueue.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_ COMPILE_NUM_ SUB_GROUPS</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">ignored</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 specified in the kernel source or IL. If the sub-group
-count is not specified using the above attribute then 0 is returned.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><strong>clGetKernelSubGroupInfo</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 NULL 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 <em>table 5.22</em>
-and <em>param_value</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>param_name</em> is CL_KERNEL_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 NULL.
-</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 class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetKernelArgInfo(cl_kernel kernel,
-                          cl_uint arg_indx,
-                          cl_kernel_arg_info param_name,
-                          size_t param_value_size,
-                          void *param_value,
-                          size_t *param_value_size_ret)</pre>
-</div></div>
-<div class="paragraph"><p>returns information about the arguments of a kernel.</p></div>
-<div class="paragraph"><p>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 was built with the -cl-kernel-arg-info option
-specified in options argument to <strong>clBuildProgram</strong> or <strong>clCompileProgram</strong>.</p></div>
-<div class="paragraph"><p><em>kernel</em> specifies the kernel object being queried.</p></div>
-<div class="paragraph"><p><em>arg_indx</em> is the argument index. Arguments to the kernel are referred
-by indices that go from 0 for the leftmost argument to <em>n</em> - 1, where
-<em>n</em> is the total number of arguments declared by a kernel.</p></div>
-<div class="paragraph"><p><em>param_name</em> specifies the argument information to query. The list of
-supported <em>param_name</em> types and the information returned in
-<em>param_value_by <strong>clGetKernelArgInfo</strong> is described in _table__5.23</em>.</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 NULL, 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 &gt; size of return type as
-described in <em>table__5.23</em>.</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 NULL, it is
-ignored.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 29. <em>clGetKernelArgInfo</em> <em>parameter queries.</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_kernel_arg_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return Type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Info. returned in <em>param_value</em></strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_ARG_<br>
- ADDRESS_QUALIFIER</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_kernel_arg_<br>
- address_qualifier</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Returns the address qualifier specified for the
-argument given by arg_indx. This can be one of the
-following values:
-CL_KERNEL_ARG_ADDRESS_ GLOBAL
-CL_KERNEL_ARG_ADDRESS_ LOCAL
-CL_KERNEL_ARG_ADDRESS_ CONSTANT
-CL_KERNEL_ARG_ADDRESS_ PRIVATE
-<br>
-<br>
-If no address qualifier is specified, the default
-address qualifier which is
-CL_KERNEL_ARG_ADDRESS_PRIVATE is
-returned.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_ARG_<br>
- ACCESS_QUALIFIER</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_kernel_arg_<br>
- access_qualifier</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Returns the access qualifier specified for the
-argument given by arg_indx. This can be one of the
-following values:
-CL_KERNEL_ARG_ACCESS_ READ_ONLY
-CL_KERNEL_ARG_ACCESS_ WRITE_ONLY
-CL_KERNEL_ARG_ACCESS_ READ_WRITE
-CL_KERNEL_ARG_ACCESS_ NONE
-<br>
-<br>
-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>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_ARG_TYPE_<br>
- NAME</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 type name specified for the argument given
-by <em>arg_indx</em>. The type name returned will be the argument type name as
-it was declared with any whitespace removed. If argument type name is
-an unsigned scalar type (i.e. unsigned char, unsigned short, unsigned
-int, unsigned long), uchar, ushort, uint and ulong will be returned.
-The argument type name returned does not include any type qualifiers.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_ARG_TYPE_<br>
- QUALIFIER</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_kernel_arg_<br>
- type_qualifier</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Returns the type qualifier specified for the argument
-given by arg_indx.  The returned value can be:
-CL_KERNEL_ARG_TYPE_ CONST
-CL_KERNEL_ARG_TYPE_ RESTRICT
-CL_KERNEL_ARG_TYPE_ VOLATILE, a
-combination of the above enums,
-CL_KERNEL_ARG_TYPE_PIPE or
-CL_KERNEL_ARG_TYPE_NONE
-<br>
-<br>
-NOTE: CL_KERNEL_ARG_ TYPE_VOLATILE is
-returned if the argument is a pointer and the
-referenced type is declared with the volatile
-qualifier.  For example, a kernel argument declared
-as global int volatile *x returns
-CL_KERNEL_ARG_TYPE_ VOLATILE but
-a kernel argument declared as global int *
-volatile x does not.  Similarly,
-CL_KERNEL_ARG_TYPE_CONST is returned if the
-argument is a pointer and the referenced type is
-declared with the restrict or const qualifier.  For
-example, a kernel argument declared as global
-int const *x returns
-CL_KERNEL_ARG_TYPE_CONST but
-a kernel argument declared as global int *
-const x does not.
-CL_KERNEL_ARG_TYPE_ RESTRICT will be returned
-if the pointer type is marked restrict. For example,
-global int * restrict x returns
-CL_KERNEL_ARG_TYPE_ RESTRICT.
-<br>
-<br>
-If the argument is declared with the constant address
-space qualifier, the
-CL_KERNEL_ARG_TYPE_CONST type qualifier
-will be set.
-<br>
-<br>
-CL_KERNEL_ARG_TYPE_NONE is returned for all parameters passed by value.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_KERNEL_ARG_NAME</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 name specified for the
-argument given by <em>arg_indx</em>.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p><strong>clGetKernelArgInfo</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_ARG_INDEX if
-<em>arg_indx</em> is not a valid argument index.
-</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</em> size is &lt; size of return type as described in_table 5.23_
-and <em>param_value</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-     
-CL_KERNEL_ARG_INFO_NOT_AVAILABLE if the argument information is not
-available for kernel.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_KERNEL if
-<em>kernel</em> is a not a valid kernel object.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_executing_kernels">5.10. Executing Kernels</h3>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueNDRangeKernel(cl_command_queue command_queue,
-                              cl_kernel kernel,
-                              cl_uint work_dim,
-                              const size_t *global_work_offset,
-                              const size_t *global_work_size,
-                              const size_t *local_work_size,
-                              cl_uint num_events_in_wait_list,
-                              const cl_event *event_wait_list,
-                              cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to execute a kernel on a device.</p></div>
-<div class="paragraph"><p><em>command_queue</em> is a valid host command-queue. The kernel will be
-queued for execution on the device associated with <em>command_queue</em>.</p></div>
-<div class="paragraph"><p><em>kernel</em> is a valid kernel object. The OpenCL context associated with
-<em>kernel</em> and <em>command-queue</em> must be the same.</p></div>
-<div class="paragraph"><p><em>work_dim</em> is the number of dimensions used to specify the global
-work-items and work-items in the work-group. <em>work_dim</em> must be
-greater than zero and less than or equal to
-CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS. If <em>global_work_size_is NULL, or the
-value in any passed dimension is 0 then the kernel command will
-trivially succeed after its event dependencies are satisfied and
-subsequently update its completion event. The behavior in this situation
-is similar to that of an enqueued marker, except that unlike a marker,
-an enqueued kernel with no events passed to _event_wait_list</em> may run at
-any time.</p></div>
-<div class="paragraph"><p><em>global_work_offset</em> can be used to specify an array of <em>work_dim</em>
-unsigned values that describe the offset used to calculate the global ID
-of a work-item. If <em>global_work_offset</em> is NULL, the global IDs start
-at offset (0, 0, 0).</p></div>
-<div class="paragraph"><p><em>global_work_size</em> points to an array of <em>work_dim</em> unsigned values that
-describe the number of global work-items in <em>work_dim</em> dimensions that
-will execute the kernel function. The total number of global work-items
-is computed as <em>global_work_size</em>[0] * &#8230; * <em>global_work_size</em>[<em>work_dim</em> - 1].</p></div>
-<div class="paragraph"><p><em>local_work_size</em> points to an array of <em>work_dim</em> unsigned values that
-describe the number of work-items that make up a work-group (also
-referred to as the size of the work-group) that will execute the kernel
-specified by <em>kernel</em>. The total number of work-items in a work-group
-is computed as <em>local_work_size</em>[0] * &#8230;  * <em>local_work_size</em>[<em>work_dim</em>
-- 1]. The total number of work-items in the work-group must be less than
-or equal to the CL_KERNEL_WORK_GROUP_SIZE value specified in <em>table
-5.21</em> and the number of work-items specified in <em>local_work_size</em>[0], &#8230;,
-<em>local_work_size</em>[<em>work_dim</em> - 1] must be less than or equal to the
-corresponding values specified by CL_DEVICE_MAX_WORK_ITEM_SIZES[0], &#8230;,
-CL_DEVICE_MAX_WORK_ITEM_SIZES[<em>work_dim</em> -1]. The explicitly specified
-<em>local_work_size</em> will be used to determine how to break the global
-work-items specified by <em>global_work_size</em> into appropriate work-group
-instances.</p></div>
-<div class="paragraph"><p>Enabling non-uniform work-groups requires the <em>kernel</em>'s program to be
-compiled without the -cl-uniform-work-group-size flag. If the program
-was created with clCreateProgramWithSource, non-uniform work-groups
-are enabled only if the program was compiled with the -cl-std=CL2.0
-flag and without the -cl-uniform-work-group-size flag.
-If the program was created using clLinkProgram and any of the linked
-programs were compiled in a way that only supports uniform work-group
-sizes, the linked program only supports uniform work group sizes. If
-<em>local_work_size</em> is specified and the OpenCL <em>kernel</em> is compiled without
-non-uniform work-groups enabled, the values specified in
-<em>global_work_size</em>[0], &#8230;, <em>global_work_size</em>[<em>work_dim</em> - 1] must be evenly
-divisible by the corresponding values specified in <em>local_work_size</em>[0],
-&#8230;, <em>local_work_size</em>[<em>work_dim</em> - 1].</p></div>
-<div class="paragraph"><p>If non-uniform work-groups are enabled for the kernel, any single
-dimension for which the global size is not divisible by the local size
-will be partitioned into two regions. One region will have work-groups
-that have the same number of work items as was specified by the local
-size parameter in that dimension. The other region will have work-groups
-with less than the number of work items specified by the local size
-parameter in that dimension. The global IDs and group IDs of the work
-items in the first region will be numerically lower than those in the
-second, and the second region will be at most one work-group wide in
-that dimension. Work-group sizes could be non-uniform in multiple
-dimensions, potentially producing work-groups of up to 4 different sizes
-in a 2D range and 8 different sizes in a 3D range.</p></div>
-<div class="paragraph"><p>If <em>local_work_size_is NULL and the kernel is compiled without support
-for non-uniform work-groups, the OpenCL runtime will implement the
-ND-range with uniform work-group sizes. If _local_work_size</em> is NULL and
-non-uniform-work-groups are enabled, the OpenCL runtime is free to
-implement the ND-range using uniform or non-uniform work-group sizes,
-regardless of the divisibility of the global work size. If the ND-range
-is implemented using non-uniform work-group sizes, the work-group sizes,
-global IDs and group IDs will follow the same pattern as described in
-above paragraph.</p></div>
-<div class="paragraph"><p>The work-group size to be used for <em>kernel</em> can also be specified in the
-program source or intermediate language. In this case the size of work
-group specified by <em>local_work_size</em> must match the value specified in
-the program source.</p></div>
-<div class="paragraph"><p>These work-group instances are executed in parallel across multiple
-compute units or concurrently on the same compute unit.</p></div>
-<div class="paragraph"><p>Each work-item is uniquely identified by a global identifier. The
-global ID, which can be read inside the kernel, is computed using the
-value given by <em>global_work_size_and_global_work_offset</em>. In addition,
-a work-item is also identified within a work-group by a unique local
-ID. The local ID, which can also be read by the kernel, is computed
-using the value given by <em>local_work_size</em>. The starting local ID is
-always (0, 0,  0).</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 NULL, then this particular command does not wait on
-any event to complete. If <em>event_wait_list</em> is NULL,
-<em>num_events_in_wait_list</em> must be 0. If <em>event_wait_list</em> is not NULL,
-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. The context
-associated with events in <em>event_wait_list</em> and <em>command_queue</em> must be
-the same. The memory associated with <em>event_wait_list</em> can be reused or
-freed after the function returns.</p></div>
-<div class="paragraph"><p><em>event</em> returns an event object that identifies this particular
-kernel-instance. Event objects are unique and can be used to identify a
-particular kernel-instance later on. If <em>event</em> is NULL, no event will
-be created for this kernel-instance and therefore it will not be
-possible for the application to query or queue a wait for this
-particular kernel-instance. If the <em>event_wait_list</em> and the <em>event</em>
-arguments are not NULL, 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>clEnqueueNDRangeKernel</strong> returns CL_SUCCESS if the kernel-instance was
-successfully queued. Otherwise, it returns one of the following errors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-     CL_INVALID_PROGRAM_EXECUTABLE if there is no successfully built program
-executable available for device associated with <em>command_queue</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_KERNEL if
-<em>kernel</em> is not a valid kernel object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if
-context associated with <em>command_queue</em> and <em>kernel</em> are not the same or
-if the context associated with <em>command_queue</em> and events in
-<em>event_wait_list</em> are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_KERNEL_ARGS if
-the kernel argument values have not been specified or if a kernel
-argument declared to be a pointer to a type does not point to a named
-address space.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_WORK_DIMENSION
-if <em>work_dim</em> is not a valid value (i.e. a value between 1 and 3).
-</p>
-</li>
-<li>
-<p>
-     CL_INVALID_GLOBAL_WORK_SIZE if any of the values specified in
-<em>global_work_size</em>[0],  <em>global_work_size</em>[<em>work_dim</em>  1] exceed the
-maximum value representable by size_t on the device on which the
-kernel-instance will be enqueued.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_GLOBAL_OFFSET
-if the value specified in <em>global_work_size</em> + the corresponding values
-in <em>global_work_offset</em> for any dimensions is greater than the maximum
-value representable by size t on the device on which the kernel-instance
-will be enqueued.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_WORK_GROUP_SIZE
-if <em>local_work_size</em> is specified and does not match the required
-work-group size for <em>kernel</em> in the program source.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_WORK_GROUP_SIZE
-if <em>local_work_size</em> is specified and is not consistent with the
-required number of sub-groups for <em>kernel</em> in the program source.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_WORK_GROUP_SIZE
-if <em>local_work_size</em> is specified and the total number of work-items in
-the work-group computed as <em>local_work_size</em>[0] *
-<em>local_work_size</em>[<em>work_dim</em>  1] is greater than the value specified by
-CL_KERNEL_WORK_GROUP_SIZE in <em>table 5.21</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_WORK_GROUP_SIZE
-if the program was compiled with cl-uniform-work-group-size and the
-number of work-items specified by <em>global_work_size</em> is not evenly
-divisible by size of work-group given by <em>local_work_size</em> or by the
-required work-group size specified in the kernel source.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_WORK_ITEM_SIZE
-if the number of work-items specified in any of <em>local_work_size</em>[0],
-<em>local_work_size</em>[<em>work_dim</em>  1] is greater than the corresponding
-values specified by CL_DEVICE_MAX_WORK_ITEM_SIZES[0], .
-CL_DEVICE_MAX_WORK_ITEM_SIZES[<em>work_dim</em> 1].
-</p>
-</li>
-<li>
-<p>
-     CL_MISALIGNED_SUB_BUFFER_OFFSET if a sub-buffer object is specified as
-the value for an argument that is a buffer object and the <em>offset</em>
-specified when the sub-buffer object is created is not aligned to
-CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with <em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_IMAGE_SIZE if
-an image object is specified as an argument value and the image
-dimensions (image width, height, specified or compute row and/or slice
-pitch) are not supported by device associated with <em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-    CL_IMAGE_FORMAT_NOT_SUPPORTED if an image object is specified as an
-argument value and the image format (image channel order and data type)
-is not supported by device associated with <em>queue</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_OUT_OF_RESOURCES if
-there is a failure to queue the execution instance of <em>kernel</em> on the
-command-queue because of insufficient resources needed to execute the
-kernel. For example, the explicitly specified <em>local_work_size</em> causes
-a failure to execute the kernel because of insufficient resources such
-as registers or local memory. Another example would be the number of
-read-only image args used in <em>kernel</em> exceed the
-CL_DEVICE_MAX_READ_IMAGE_ARGS value for device or the number of
-write-only and read-write image args used in <em>kernel</em> exceed the
-CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS value for device or the number of
-samplers used in <em>kernel</em> exceed CL_DEVICE_MAX_SAMPLERS for device.
-</p>
-</li>
-<li>
-<p>
-    CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for data store associated with image or buffer objects specified
-as arguments to <em>kernel</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_INVALID_OPERATION if
-SVM pointers are passed as arguments to a kernel and the device does not
-support SVM or if system pointers are passed as arguments to a kernel
-and/or stored inside SVM allocations passed as kernel arguments and the
-device does not support fine grain system SVM allocations.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueNativeKernel(cl_command_queue command_queue,
-                             void (CL_CALLBACK *user_func)(void *),
-                             void *args,
-                             size_t cb_args,
-                             cl_uint num_mem_objects,
-                             const cl_mem *mem_list,
-                             const void **args_mem_loc,
-                             cl_uint num_events_in_wait_list,
-                             const cl_event *event_wait_list,
-                             cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a command to execute a native C/C++ function not compiled using
-the OpenCL compiler.</p></div>
-<div class="paragraph"><p><em>command_queue</em> is a valid host command-queue. A native user function
-can only be executed on a command-queue created on a device that has
-CL_EXEC_NATIVE_KERNEL capability set in CL_DEVICE_EXECUTION_CAPABILITIES
-as specified in <em>table 4.3</em>.</p></div>
-<div class="paragraph"><p><em>user_func</em> is a pointer to a host-callable user function.</p></div>
-<div class="paragraph"><p><em>args</em> is a pointer to the args list that <em>user_func</em> should be called
-with.</p></div>
-<div class="paragraph"><p><em>cb_args</em> is the size in bytes of the args list that <em>args</em> points to.</p></div>
-<div class="paragraph"><p>The data pointed to by <em>args</em> and <em>cb_args</em> bytes in size will be copied
-and a pointer to this copied region will be passed to <em>user_func</em>. The
-copy needs to be done because the memory objects (cl_mem values) that
-<em>args</em> may contain need to be modified and replaced by appropriate
-pointers to global memory. When <strong>clEnqueueNativeKernel</strong> returns, the
-memory region pointed to by <em>args</em> can be reused by the application.</p></div>
-<div class="paragraph"><p><em>num_mem_objects</em> is the number of buffer objects that are passed in
-<em>args</em>.</p></div>
-<div class="paragraph"><p><em>mem_list</em> is a list of valid buffer objects, if <em>num_mem_objects</em> &gt; 0.
-The buffer object values specified in <em>mem_list</em> are memory object
-handles (cl_mem values) returned by <strong>clCreateBuffer</strong> or NULL.</p></div>
-<div class="paragraph"><p><em>args_mem_loc</em> is a pointer to appropriate locations that <em>args</em> points
-to where memory object handles (cl_mem values) are stored. Before the
-user function is executed, the memory object handles are replaced by
-pointers to global memory.</p></div>
-<div class="paragraph"><p><em>event_wait_list, num_events_in_wait_list and</em> <em>event</em> are as described
-in <strong>clEnqueueNDRangeKernel</strong>.</p></div>
-<div class="paragraph"><p><strong>clEnqueueNativeKernel</strong> returns CL_SUCCESS if the user function
-execution instance was successfully queued. Otherwise, it returns one
-of the following errors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_INVALID_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if
-context associated with <em>command_queue</em> and events in <em>event_wait_list</em>
-are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>user_func</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if <em>args</em>
-is a NULL value and <em>cb_args</em> &gt; 0, or if <em>args</em> is a NULL value and
-<em>num_mem_objects</em> &gt; 0.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>args</em> is not NULL and <em>cb_args</em> is 0.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>num_mem_objects</em> &gt; 0 and <em>mem_list</em> or <em>args_mem_loc</em> are NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>num_mem_objects</em> = 0 and <em>mem_list</em> or <em>args_mem_loc</em> are not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-the device associated with <em>command_queue</em> cannot execute the native
-kernel.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_MEM_OBJECT if
-one or more memory objects specified in <em>mem_list</em> are not valid or are
-not buffer objects.
-</p>
-</li>
-<li>
-<p>
-      CL_OUT_OF_RESOURCES if
-there is a failure to queue the execution instance of <em>kernel</em> on the
-command-queue because of insufficient resources needed to execute the
-kernel.
-</p>
-</li>
-<li>
-<p>
-     CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
-memory for data store associated with buffer objects specified as
-arguments to <em>kernel</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_INVALID_OPERATION if
-SVM pointers are passed as arguments to a kernel and the device does not
-support SVM or if system pointers are passed as arguments to a kernel
-and/or stored inside SVM allocations passed as kernel arguments and the
-device does not support fine grain system SVM allocations.
-</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>NOTE:</p></div>
-<div class="paragraph"><p>The total number of read-only images specified as arguments to a kernel
-cannot exceed CL_DEVICE_MAX_READ_IMAGE_ARGS. Each image array argument
-to a kernel declared with the read_only qualifier counts as one image.
-The total number of write-only images specified as arguments to a kernel
-cannot exceed CL_DEVICE_MAX_WRITE_IMAGE_ARGS. Each image array argument to a kernel
-declared with the write_only qualifier counts as one image.</p></div>
-<div class="paragraph"><p>The total number of read-write images specified as arguments to a kernel
-cannot exceed CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS. Each image array
-argument to a kernel declared with the read_write qualifier counts as
-one image.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_event_objects">5.11. Event Objects</h3>
-<div class="paragraph"><p>Event objects can be used to refer to a kernel-instance command
-(<strong>clEnqueueNDRangeKernel, clEnqueueNativeKernel</strong>), read, write, map and
-copy commands on memory objects (<strong>clEnqueue{Read|Write|Map}Buffer,
-clEnqueueUnmapMemObject</strong>, <strong>clEnqueue{Read|Write}BufferRect</strong>,
-<strong>clEnqueue{Read|Write|Map}Image</strong>, <strong>clEnqueueCopy{Buffer|Image}</strong>,
-<strong>clEnqueueCopyBufferRect</strong>, <strong>clEnqueueCopyBufferToImage</strong>,
-<strong>clEnqueueCopyImageToBuffer),</strong> <strong>clEnqueueSVMMemcpy</strong>,
-<strong>clEnqueueSVMMemFill</strong>, <strong>clEnqueueSVMMap</strong>, <strong>clEnqueueSVMUnmap</strong>,
-<strong>clEnqueueSVMFree</strong>,
-<strong>clEnqueueMarkerWithWaitList</strong>,<strong>clEnqueueBarrierWithWaitList</strong>(refer to
-<em>section 5.12</em>) or user events.</p></div>
-<div class="paragraph"><p>An event object can be used to track the execution status of a command.
-The API calls that enqueue commands to a command-queue create a new
-event object that is returned in the <em>event</em> argument. In case of an
-error enqueuing the command in the command-queue the event argument does
-not return an event object.</p></div>
-<div class="paragraph"><p>The execution status of an enqueued command at any given point in time
-can be one of the following:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_QUEUED  This indicates
-that the command has been enqueued in a command-queue. This is the
-initial state of all events except user events.
-</p>
-</li>
-<li>
-<p>
-      CL_SUBMITTED  This is the
-initial state for all user events. For all other events, this indicates
-that the command has been submitted by the host to the device.
-</p>
-</li>
-<li>
-<p>
-      CL_RUNNING  This
-indicates that the device has started executing this command. In order
-for the execution status of an enqueued command to change from
-CL_SUBMITTED to CL_RUNNING, all events that this command is waiting on
-must have completed successfully i.e. their execution status must be
-CL_COMPLETE.
-</p>
-</li>
-<li>
-<p>
-      CL_COMPLETE  This
-indicates that the command has successfully completed.
-</p>
-</li>
-<li>
-<p>
-      Error code  The error
-code is a negative integer value and indicates that the command was
-abnormally terminated. Abnormal termination may occur for a number of
-reasons such as a bad memory access.
-</p>
-</li>
-</ul></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">A command is considered to be complete if its execution status is
-CL_COMPLETE or is a negative integer value.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>If the execution of a command is terminated, the command-queue
-associated with this terminated command, and the associated context (and
-all other command-queues in this context) may no longer be available.
-The behavior of OpenCL API calls that use this context (and
-command-queues associated with this context) are now considered to be
-implementation-defined. The user registered callback function specified
-when context is created can be used to report appropriate error
-information.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_event clCreateUserEvent(cl_context context,
-                           cl_int *errcode_ret)</pre>
-</div></div>
-<div class="paragraph"><p>creates a user event object. User events allow applications to enqueue
-commands that wait on a user event to finish before the command is
-executed by the device.</p></div>
-<div class="paragraph"><p><em>context</em> must be a valid OpenCL context.</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>clCreateUserEvent</strong> returns a valid non-zero event object and
-<em>errcode_ret_is set to CL_SUCCESS if the user event object is created
-successfully. Otherwise, it returns a NULL value with one of the
-following error values returned in _errcode_ret</em>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_INVALID_CONTEXT if
-_context_is not a valid context.
-</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 execution status of the user event object created is set to
-CL_SUBMITTED.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clSetUserEventStatus(cl_event event,
-                            cl_int execution_status)</pre>
-</div></div>
-<div class="paragraph"><p>sets the execution status of a user event object.</p></div>
-<div class="paragraph"><p><em>event</em> is a user event object created using <strong>clCreateUserEvent</strong>.</p></div>
-<div class="paragraph"><p><em>execution_status</em> specifies the new execution status to be set and can
-be CL_COMPLETE or a negative integer value to indicate an error. A
-negative integer value causes all enqueued commands that wait on this
-user event to be terminated. <strong>clSetUserEventStatus</strong> can only be called
-once to change the execution status of <em>event</em>.</p></div>
-<div class="paragraph"><p><strong>clSetUserEventStatus</strong> returns CL_SUCCESS if the function was executed
-successfully. Otherwise, it returns one of the following errors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_INVALID_EVENT if
-<em>event</em> is not a valid user event object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if the
-<em>execution_status</em> is not CL_COMPLETE or a negative integer value.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_OPERATION if
-the <em>execution_status</em> for <em>event</em> has already been changed by a
-previous call to <strong>clSetUserEventStatus</strong>.
-</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="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">If there are enqueued commands with user events in the
-<em>event_wait_list</em> argument of <strong>clEnqueue</strong> commands, the user must
-ensure that the status of these user events being waited on are set
-using <strong>clSetUserEventStatus</strong> before any OpenCL APIs that release OpenCL
-objects except for event objects are called; otherwise the behavior is
-undefined.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>For example, the following code sequence will result in undefined
-behavior of <strong>clReleaseMemObject</strong>.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>ev1 = clCreateUserEvent(ctx, NULL);
-
-clEnqueueWriteBuffer(cq, buf1, CL_FALSE, ..., 1, &amp;ev1, NULL);
-
-clEnqueueWriteBuffer(cq, buf2, CL_FALSE,...);
-
-clReleaseMemObject(buf2);
-
-clSetUserEventStatus(ev1, CL_COMPLETE);</pre>
-</div></div>
-<div class="paragraph"><p>The following code sequence, however, works correctly.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>ev1 = clCreateUserEvent(ctx, NULL);
-
-clEnqueueWriteBuffer(cq, buf1, CL_FALSE, ...,1, &amp;ev1, NULL);
-
-clEnqueueWriteBuffer(cq, buf2, CL_FALSE,...);
-
-clSetUserEventStatus(ev1, CL_COMPLETE);
-
-clReleaseMemObject(buf2);</pre>
-</div></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clWaitForEvents(cl_uint num_events,
-                       const cl_event *event_list)</pre>
-</div></div>
-<div class="paragraph"><p>waits on the host thread for commands identified by event objects in
-<em>event_list</em> to complete. A command is considered complete if its
-execution status is CL_COMPLETE or a negative value. The events
-specified in <em>event_list</em> act as synchronization points.</p></div>
-<div class="paragraph"><p><strong>clWaitForEvents</strong> returns CL_SUCCESS if the execution status of all
-events in <em>event_list</em> is CL_COMPLETE. Otherwise, it returns one of the
-following errors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>num_events</em> is zero or <em>event_list</em> is NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if
-events specified in <em>event_list</em> do not belong to the same context.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT if event
-objects specified in <em>event_list</em> are not valid event objects.
-</p>
-</li>
-<li>
-<p>
-  CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the execution status of
-any of the events in <em>event_list</em> is a negative integer value.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetEventInfo(cl_event event,
-                      cl_event_info param_name,
-                      size_t param_value_size,
-                      void *param_value,
-                      size_t *param_value_size_ret)</pre>
-</div></div>
-<div class="paragraph"><p>returns information about the event object.</p></div>
-<div class="paragraph"><p><em>event</em> specifies the event object being queried.</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>clGetEventInfo</strong> is described in <em>table 5.24</em>.</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 NULL, 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 &gt;= size of return type
-as described in <em>table 5.24</em>.</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 NULL, it is
-ignored.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 30. <em>clGetEventInfo</em> <em>parameter queries.</em></caption>
-<col style="width:30%;">
-<col style="width:33%;">
-<col style="width:37%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_event_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return Type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Info. returned in <em>param_value</em></strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_EVENT_COMMAND_<br>
- QUEUE</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_command_<br>
- queue</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return the command-queue associated with <em>event</em>. For user
-event objects, a NULL value is returned.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_EVENT_CONTEXT</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_context</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Return the context associated with
-<em>event</em>.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_EVENT_COMMAND_<br>
- 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:
-CL_COMMAND_NDRANGE_KERNEL
-CL_COMMAND_NATIVE_KERNEL
-CL_COMMAND_READ_BUFFER
-CL_COMMAND_WRITE_BUFFER
-CL_COMMAND_COPY_BUFFER
-CL_COMMAND_READ_IMAGE
-CL_COMMAND_WRITE_IMAGE
-CL_COMMAND_COPY_IMAGE
-CL_COMMAND_COPY_BUFFER_ TO_IMAGE
-CL_COMMAND_COPY_IMAGE_ TO_BUFFER
-CL_COMMAND_MAP_BUFFER
-CL_COMMAND_MAP_IMAGE
-CL_COMMAND_UNMAP_MEM_ OBJECT
-CL_COMMAND_MARKER
-CL_COMMAND_ACQUIRE_ GL_OBJECTS
-CL_COMMAND_RELEASE_ GL_OBJECTS
-CL_COMMAND_READ_ BUFFER_RECT
-CL_COMMAND_WRITE_ BUFFER_RECT
-CL_COMMAND_COPY_ BUFFER_RECT
-CL_COMMAND_USER
-CL_COMMAND_BARRIER
-CL_COMMAND_MIGRATE_ MEM_OBJECTS
-CL_COMMAND_FILL_BUFFER
-CL_COMMAND_FILL_IMAGE
-CL_COMMAND_SVM_FREE
-CL_COMMAND_SVM_MEMCPY
-CL_COMMAND_SVM_MEMFILL
-CL_COMMAND_SVM_MAP
-CL_COMMAND_SVM_UNMAP</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">*CL_EVENT_COMMAND_ EXECUTION_STATUS*<span class="footnote"><br>[The error code values are negative, and event state values are positive.  The event state values are ordered from
-the largest value (CL_QUEUED) for the first or initial state to the smallest value  (CL_COMPLETE or negative
-integer value) for the last or complete state. The value of CL_COMPLETE and CL_SUCCESS are the same.]<br></span>:</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:
-<br>
-<br>
-CL_QUEUED (command has been enqueued n the command-queue),
-<br>
-<br>
-CL_SUBMITTED (enqueued command has
-been submitted by the host to the device
-associated with the command-queue),
-<br>
-<br>
-CL_RUNNING (device is currently executing
-this command),
-<br>
-<br>
-CL_COMPLETE (the command has
-completed), or
-<br>
-<br>
-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 returned from the
-platform or runtime API calls as return
-values or errcode_ret values.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">*CL_EVENT_REFERENCE_ COUNT*<span class="footnote"><br>[The reference count returned should be considered immediately stale. It is unsuitable for general use in
-applications. This feature is provided for identifying memory leaks.]<br></span>:</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">Return the <em>event</em> reference
-count.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>Using <strong>clGetEventInfo</strong> to determine if a command identified by <em>event</em>
-has finished execution (i.e. CL_EVENT_COMMAND_EXECUTION_STATUS returns
-CL_COMPLETE) is not a synchronization point. There are no guarantees
-that the memory objects being modified by command associated with
-<em>event</em> will be visible to other enqueued commands.</p></div>
-<div class="paragraph"><p><strong>clGetEventInfo</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_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 <em>table 5.23</em>
-and <em>param_value</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-information to query given in <em>param_name</em> cannot be queried for
-<em>event</em>.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT if
-<em>event</em> is a not a valid event 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 class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clSetEventCallback(cl_event event,
-                          cl_int command_exec_callback_type,
-                          void (CL_CALLBACK *pfn_event_notify)(
-                              cl_event event,
-                              cl_int event_command_exec_status,
-                              void *user_data),
-                          void *user_data)</pre>
-</div></div>
-<div class="paragraph"><p>registers a user callback function for a specific command execution
-status. The registered callback function will be called when the
-execution status of command associated with <em>event</em> changes to an
-execution status equal to or past the status specified by
-<em>command_exec_status</em>.</p></div>
-<div class="paragraph"><p>Each call to <strong>clSetEventCallback</strong> registers the specified user callback
-function on a callback stack associated with <em>event</em>. The order in
-which the registered user callback functions are called is undefined.</p></div>
-<div class="paragraph"><p><em>event</em> is a valid event object.</p></div>
-<div class="paragraph"><p><em>command_exec_callback_type</em> specifies the command execution status for
-which the callback is registered. The command execution callback
-values for which a callback can be registered are: CL_SUBMITTED,
-CL_RUNNING or CL_COMPLETE<span class="footnote"><br>[The callback function registered for a command_exec_callback_type value of CL_COMPLETE will be called
-when the command has completed successfully or is abnormally terminated.]<br></span>:. There is no guarantee that
-the callback functions registered for various execution status values
-for an event will be called in the exact order that the execution status
-of a command changes. Furthermore, it should be noted that receiving a
-call back for an event with a status other than CL_COMPLETE, in no way
-implies that the memory model or execution model as defined by the
-OpenCL specification has changed. For example, it is not valid to assume
-that a corresponding memory transfer has completed unless the event is
-in a state CL_COMPLETE.</p></div>
-<div class="paragraph"><p><em>pfn_event_notify</em> is the event callback function that can be registered
-by the application. This callback function may be called asynchronously
-by the OpenCL implementation. It is the applications responsibility to
-ensure that the callback function is thread-safe. The parameters to
-this callback function are:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      <em>event</em> is the event
-object for which the callback function is invoked.
-</p>
-</li>
-<li>
-<p>
-     <em>event_command_ _exec_status</em> is equal to the
-<em>command_exec_callback_type</em> used while registering the callback. Refer
-to table 5.23 for the command execution status values. If the callback
-is called as the result of the command associated with event being
-abnormally terminated, an appropriate error code for the error that
-caused the termination will be passed to <em>event_command_exec_status</em>
-instead.
-</p>
-</li>
-<li>
-<p>
-      <em>user_data</em> is a pointer to user supplied data.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><em>user_data</em> will be passed as the <em>user_data</em> argument when <em>pfn_notify</em>
-is called. <em>user_data</em> can be NULL.</p></div>
-<div class="paragraph"><p>All callbacks registered for an event object must be called. All
-enqueued callbacks shall be called before the event object is
-destroyed. Callbacks must return promptly.   The behavior of calling
-expensive system routines, OpenCL API calls to create contexts or
-command-queues, or blocking OpenCL operations from the following list
-below, in a callback is undefined.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>clFinish</strong>, 
-</p>
-</li>
-<li>
-<p>
-<strong>clWaitForEvents</strong>, 
-</p>
-</li>
-<li>
-<p>
-blocking calls to <strong>clEnqueueReadBuffer</strong>, <strong>clEnqueueReadBufferRect</strong>,
-</p>
-</li>
-<li>
-<p>
-<strong>clEnqueueWriteBuffer</strong>, <strong>clEnqueueWriteBufferRect</strong>,
-</p>
-</li>
-<li>
-<p>
-blocking calls to <strong>clEnqueueReadImage</strong> and <strong>clEnqueueWriteImage</strong>,
-</p>
-</li>
-<li>
-<p>
-blocking calls to <strong>clEnqueueMapBuffer</strong> and <strong>clEnqueueMapImage</strong>,
-</p>
-</li>
-<li>
-<p>
-blocking calls to <strong>clBuildProgram</strong>, <strong>clCompileProgram</strong> or <strong>clLinkProgram</strong>,
-</p>
-</li>
-<li>
-<p>
-blocking calls to <strong>clEnqueueSVMMemcpy</strong> or <strong>clEnqueueSVMMap</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If an application needs to wait for completion of a routine from the
-above list in a callback, please use the non-blocking form of the
-function, and assign a completion callback to it to do the remainder of
-your work.  Note that when a callback (or other code) enqueues commands
-to a command-queue, the commands are not required to begin execution
-until the queue is flushed. In standard usage, blocking enqueue calls
-serve this role by implicitly flushing the queue. Since blocking calls
-are not permitted in callbacks, those callbacks that enqueue commands on
-a command queue should either call <strong>clFlush</strong> on the queue before
-returning or arrange for <strong>clFlush</strong> to be called later on another thread.</p></div>
-<div class="paragraph"><p><strong>clSetEventCallback</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_EVENT if
-<em>event</em> is not a valid event object.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_VALUE if
-<em>pfn_event_notify</em> is NULL or if <em>command_exec_callback_type</em> is not
-CL_SUBMITTED, CL_RUNNING or CL_COMPLETE.
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clRetainEvent(cl_event event)</pre>
-</div></div>
-<div class="paragraph"><p>increments the <em>event</em> reference count. The OpenCL commands that return
-an event perform an implicit retain.</p></div>
-<div class="paragraph"><p><strong>clRetainEvent</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_EVENT if
-<em>event</em> is not a valid event 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 class="paragraph"><p>To release an event, use the following function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clReleaseEvent(cl_event event)</pre>
-</div></div>
-<div class="paragraph"><p>decrements the <em>event</em> reference count.</p></div>
-<div class="paragraph"><p><strong>clReleaseEvent</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_EVENT if
-<em>event</em> is not a valid event 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 class="paragraph"><p>The event object is deleted once the reference count becomes zero, the
-specific command identified by this event has completed (or terminated)
-and there are no commands in the command-queues of a context that
-require a wait for this event to complete. Using this function to
-release a reference that was not obtained by creating the object or by
-calling <strong>clRetainEvent</strong> causes undefined behavior.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">Developers should be careful when releasing their last reference
-count on events created by <strong>clCreateUserEvent</strong> that have not yet been
-set to status of CL_COMPLETE or an error. If the user event was used in
-the event_wait_list argument passed to a <strong>clEnqueue</strong> API or another
-application host thread is waiting for it in <strong>clWaitForEvents</strong>, those
-commands and host threads will continue to wait for the event status to
-reach CL_COMPLETE or error, even after the application has released the
-object. Since in this scenario the application has released its last
-reference count to the user event, it would be in principle no longer
-valid for the application to change the status of the event to unblock
-all the other machinery. As a result the waiting tasks will wait
-forever, and associated events, cl_mem objects, command queues and
-contexts are likely to leak. In-order command queues caught up in this
-deadlock may cease to do any work.</td>
-</tr></table>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_markers_barriers_and_waiting_for_events">5.12. Markers, Barriers and Waiting for Events</h3>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueMarkerWithWaitList(cl_command_queue command_queue,
-                                   cl_uint num_events_in_wait_list,
-                                   const cl_event *event_wait_list,
-                                   cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a marker command which waits for either a list of events to
-complete, or if the list is empty it waits for all commands previously
-enqueued in <em>command_queue</em> to complete before it completes. This
-command returns an <em>event</em> which can be waited on, i.e. this event can
-be waited on to insure that all events either in the <em>event_wait_list</em>
-or all previously enqueued commands, queued before this command to
-<em>command_queue</em>, have completed.</p></div>
-<div class="paragraph"><p><em>command_queue</em> is a valid host command-queue.</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.</p></div>
-<div class="paragraph"><p>If <em>event_wait_list</em> is NULL, <em>num_events_in_wait_list</em> must be 0. If
-<em>event_wait_list</em> is not NULL, 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. The context associated with events in
-<em>event_wait_list</em> and <em>command_queue</em> must be the same. The memory
-associated with <em>event_wait_list</em> can be reused or freed after the
-function returns.</p></div>
-<div class="paragraph"><p>If <em>event_wait_list</em> is NULL, then this particular command waits until
-all previous enqueued commands to <em>command_queue</em> have completed.</p></div>
-<div class="paragraph"><p><em>event</em> returns an event object that identifies this particular
-command. Event objects are unique and can be used to identify this
-marker command later on. <em>event</em> can be NULL 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 NULL, 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>clEnqueueMarkerWithWaitList</strong> returns CL_SUCCESS if the function is
-successfully executed. Otherwise, it returns one of the following
-errors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_INVALID_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if
-context associated with <em>command_queue</em> and events in <em>event_wait_list</em>
-are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL and <em>num_events_in_wait_list</em> is 0, or if
-event objects in <em>event_wait_list</em> are not valid events. <br>
-</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 function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clEnqueueBarrierWithWaitList(cl_command_queue command_queue,
-                                    cl_uint num_events_in_wait_list,
-                                    const cl_event *event_wait_list,
-                                    cl_event *event)</pre>
-</div></div>
-<div class="paragraph"><p>enqueues a barrier command which waits for either a list of events to
-complete, or if the list is empty it waits for all commands previously
-enqueued in <em>command_queue</em> to complete before it completes. This
-command blocks command execution, that is, any following commands
-enqueued after it do not execute until it completes. This command
-returns an <em>event</em> which can be waited on, i.e. this event can be waited
-on to insure that all events either in the <em>event_wait_list</em> or all
-previously enqueued commands, queued before this command to
-<em>command_queue</em>, have completed</p></div>
-<div class="paragraph"><p><em>command_queue</em> is a valid host command-queue.</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.</p></div>
-<div class="paragraph"><p>If <em>event_wait_list</em> is NULL, <em>num_events_in_wait_list</em> must be 0. If
-<em>event_wait_list</em> is not NULL, 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. The context associated with events in
-<em>event_wait_list</em> and <em>command_queue</em> must be the same. The memory
-associated with <em>event_wait_list</em> can be reused or freed after the
-function returns.</p></div>
-<div class="paragraph"><p>If <em>event_wait_list</em> is NULL, then this particular command waits until
-all previous enqueued commands to <em>command_queue</em> have completed.</p></div>
-<div class="paragraph"><p><em>event</em> returns an event object that identifies this particular
-command. Event objects are unique and can be used to identify this
-barrier command later on. <em>event</em> can be NULL 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 NULL, 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>clEnqueueBarrierWithWaitList</strong> returns CL_SUCCESS if the function is
-successfully executed. Otherwise, it returns one of the following
-errors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_INVALID_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_CONTEXT if
-context associated with <em>command_queue</em> and events in <em>event_wait_list</em>
-are not the same.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT_WAIT_LIST
-if <em>event_wait_list</em> is NULL and <em>num_events_in_wait_list</em> &gt; 0, or
-<em>event_wait_list</em> is not NULL 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_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="_out_of_order_execution_of_kernels_and_memory_object_commands">5.13. Out-of-order Execution of Kernels and Memory Object Commands</h3>
-<div class="paragraph"><p>The OpenCL functions that are submitted to a command-queue are enqueued
-in the order the calls are made but can be configured to execute
-in-order or out-of-order. The _properties_argument in
-<strong>clCreateCommandQueueWithProperties</strong> can be used to specify the
-execution order.</p></div>
-<div class="paragraph"><p>If the CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE property of a
-command-queue is not set, the commands enqueued to a command-queue
-execute in order. For example, if an application calls
-<strong>clEnqueueNDRangeKernel</strong> to execute kernel A followed by a
-<strong>clEnqueueNDRangeKernel</strong> to execute kernel B, the application can assume
-that kernel A finishes first and then kernel B is executed. If the
-memory objects output by kernel A are inputs to kernel B then kernel B
-will see the correct data in memory objects produced by execution of
-kernel A. If the CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE property of a
-command-queue is set, then there is no guarantee that kernel A will
-finish before kernel B starts execution.</p></div>
-<div class="paragraph"><p>Applications can configure the commands enqueued to a command-queue to
-execute out-of-order by setting the
-CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE property of the command-queue.
-This can be specified when the command-queue is created. In
-out-of-order execution mode there is no guarantee that the enqueued
-commands will finish execution in the order they were queued. As there
-is no guarantee that kernels will be executed in order, i.e. based on
-when the <strong>clEnqueueNDRangeKernel</strong> calls are made within a
-command-queue, it is therefore possible that an earlier
-<strong>clEnqueueNDRangeKernel</strong> call to execute kernel A identified by event A
-may execute and/or finish later than a <strong>clEnqueueNDRangeKernel</strong> call to
-execute kernel B which was called by the application at a later point in
-time. To guarantee a specific order of execution of kernels, a wait on
-a particular event (in this case event A) can be used. The wait for
-event A can be specified in the <em>event_wait_list</em> argument to
-<strong>clEnqueueNDRangeKernel</strong> for kernel B.</p></div>
-<div class="paragraph"><p>In addition, a marker (<strong>clEnqueueMarkerWithWaitList</strong>) or a barrier
-(<strong>clEnqueueBarrierWithWaitList</strong>) command can be enqueued to the
-command-queue. The marker command ensures that previously enqueued
-commands identified by the list of events to wait for (or all previous
-commands) have finished. A barrier command is similar to a marker
-command, but additionally guarantees that no later-enqueued commands
-will execute until the waited-for commands have executed.</p></div>
-<div class="paragraph"><p>Similarly, commands to read, write, copy or map memory objects that are
-enqueued after <strong>clEnqueueNDRangeKernel</strong> or <strong>clEnqueueNativeKernel</strong>
-commands are not guaranteed to wait for kernels scheduled for execution
-to have completed (if the CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
-property is set). To ensure correct ordering of commands, the event
-object returned by <strong>clEnqueueNDRangeKernel</strong> or <strong>clEnqueueNativeKernel</strong>
-can be used to enqueue a wait for event or a barrier command can be
-enqueued that must complete before reads or writes to the memory
-object(s) occur.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_profiling_operations_on_memory_objects_and_kernels">5.14. Profiling Operations on Memory Objects and Kernels</h3>
-<div class="paragraph"><p>This section describes profiling of OpenCL functions that are enqueued
-as commands to a command-queue. The specific
-functions<span class="footnote"><br>[clEnqueueAcquireGLObjects and clEnqueueReleaseGLObjects defined in section 9.6.6 of the
-OpenCL 2.0 Extension Specification are also included.]<br></span>: being referred to are:
-<strong>clEnqueue{Read|Write|Map}Buffer, clEnqueue{Read|Write}BufferRect,
-clEnqueue{Read|Write|Map}Image,
-clEnqueueUnmapMemObject</strong>,<strong>clEnqueueSVMMemcpy</strong>, <strong>clEnqueueSVMMemFill</strong>,
-<strong>clEnqueueSVMMap</strong>, <strong>clEnqueueSVMUnmap</strong>,
-<strong>clEnqueueSVMFree</strong>,<strong>clEnqueueCopyBuffer, clEnqueueCopyBufferRect,
-clEnqueueCopyImage, clEnqueueCopyImageToBuffer,
-clEnqueueCopyBufferToImage,</strong> <strong>clEnqueueNDRangeKernel</strong> and
-<strong>clEnqueueNativeKernel</strong>. These enqueued commands are identified by
-unique event objects.</p></div>
-<div class="paragraph"><p>Event objects can be used to capture profiling information that measure
-execution time of a command. Profiling of OpenCL commands can be
-enabled either by using a command-queue created with
-CL_QUEUE_PROFILING_ENABLE flag set in _properties_argument to
-<strong>clCreateCommandQueueWithProperties</strong>.</p></div>
-<div class="paragraph"><p>If profiling is enabled, the function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clGetEventProfilingInfo(cl_event event,
-                               cl_profiling_info param_name,
-                               size_t param_value_size,
-                               void *param_value,
-                               size_t *param_value_size_ret)</pre>
-</div></div>
-<div class="paragraph"><p>returns profiling information for the command associated with event.</p></div>
-<div class="paragraph"><p><em>event</em> specifies the event object.</p></div>
-<div class="paragraph"><p><em>param_name</em> specifies the profiling data to query. The list of
-supported <em>param_name</em> types and the information returned in
-<em>param_value</em> by <strong>clGetEventProfilingInfo</strong> is described in <em>table 5.25</em></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 NULL, 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 &gt;= size of return type
-as described in <em>table 5.25</em>.</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 NULL, it is
-ignored.</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<caption class="title">Table 31. <em>clGetEventProfilingInfo</em> <em>parameter queries.</em></caption>
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_profiling_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return Type</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Info. returned in <em>param_value</em></strong></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROFILING_COMMAND_ QUEUED</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 64-bit value that describes the
-current device time counter in
-nanoseconds when the command
-identified by event is enqueued in a
-command-queue by the host.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROFILING_COMMAND_ SUBMIT</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 64-bit value that describes the
-current device time counter in
-nanoseconds when the command
-identified by event that has been
-enqueued is submitted by the host to
-the device associated with the
-command-queue.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROFILING_COMMAND_ START</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 64-bit value that describes the
-current device time counter in
-nanoseconds when the command
-identified by event starts execution on
-the device.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROFILING_COMMAND_ END</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 64-bit value that describes the
-current device time counter in
-nanoseconds when the command
-identified by event has finished
-execution on the device.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_PROFILING_COMMAND_ COMPLETE</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">A 64-bit value that describes the current device
-time counter in nanoseconds when the command identified by event and any
-child commands enqueued by this command on the device have finished
-execution.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p> 
-The unsigned 64-bit values returned can be used to measure the time in
-nano-seconds consumed by OpenCL commands.</p></div>
-<div class="paragraph"><p>OpenCL devices are required to correctly track time across changes in
-device frequency and power states. The
-CL_DEVICE_PROFILING_TIMER_RESOLUTION specifies the resolution of the
-timer i.e. the number of nanoseconds elapsed before the timer is
-incremented.</p></div>
-<div class="paragraph"><p><strong>clGetEventProfilingInfo</strong> returns CL_SUCCESS if the function is executed
-successfully and the profiling information has been recorded.
-Otherwise, it returns one of the following errors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-     CL_PROFILING_INFO_NOT_AVAILABLE if the CL_QUEUE_PROFILING_ENABLE flag is
-not set for the command-queue, if the execution status of the command
-identified by <em>event</em> is not CL_COMPLETE or if <em>event</em> refers to the
-<strong>clEnqueueSVMFree</strong> command or is a user event object.
-</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 <em>table 5.25</em>
-and <em>param_value</em> is not NULL.
-</p>
-</li>
-<li>
-<p>
-      CL_INVALID_EVENT if
-<em>event</em> is a not a valid event 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="_flush_and_finish">5.15. Flush and Finish</h3>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clFlush(cl_command_queue command_queue)</pre>
-</div></div>
-<div class="paragraph"><p>issues all previously queued OpenCL commands in <em>command_queue_to the
-device associated with_command_queue</em>. <strong>clFlush</strong> only guarantees that
-all queued commands to <em>command_queue</em> will eventually be submitted to
-the appropriate device. There is no guarantee that they will be
-complete after <strong>clFlush</strong> returns.</p></div>
-<div class="paragraph"><p><strong>clFlush</strong> returns CL_SUCCESS if the function call was executed
-successfully. Otherwise, it returns one of the following errors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_INVALID_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</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>Any blocking commands queued in a command-queue and
-<strong>clReleaseCommandQueue</strong> perform an implicit flush of the command-queue.
-These blocking commands are <strong>clEnqueueReadBuffer</strong>,
-<strong>clEnqueueReadBufferRect</strong>, <strong>clEnqueueReadImage</strong>, with <em>blocking_read</em>
-set to CL_TRUE;
-<strong>clEnqueueWriteBuffer</strong>,<strong>clEnqueueWriteBufferRect</strong>,<strong>clEnqueueWriteImage</strong>
-with <em>blocking_write</em> set to CL_TRUE; <strong>clEnqueueMapBuffer</strong>,
-<strong>clEnqueueMapImage</strong> with <em>blocking_map</em> set to CL_TRUE;
-<strong>clEnqueueSVMMemcpy</strong> with <em>blocking_copy</em> set to CL_TRUE;
-<strong>clEnqueueSVMMap</strong> with <em>blocking_map</em> set to CL_TRUE or
-<strong>clWaitForEvents</strong>.</p></div>
-<div class="paragraph"><p>To use event objects that refer to commands enqueued in a command-queue
-as event objects to wait on by commands enqueued in a different
-command-queue, the application must call a <strong>clFlush</strong> or any blocking
-commands that perform an implicit flush of the command-queue where the
-commands that refer to these event objects are enqueued.</p></div>
-<div class="paragraph"><p>The function</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_int clFinish(cl_command_queue command_queue)</pre>
-</div></div>
-<div class="paragraph"><p>blocks until all previously queued OpenCL commands in <em>command_queue</em>
-are issued to the associated device and have completed. <strong>clFinish</strong> does
-not return until all previously queued commands in <em>command_queue</em> have
-been processed and completed. <strong>clFinish</strong> is also a synchronization
-point.</p></div>
-<div class="paragraph"><p><strong>clFinish</strong> returns CL_SUCCESS if the function call was executed
-successfully. Otherwise, it returns one of the following errors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-      CL_INVALID_COMMAND_QUEUE
-if <em>command_queue</em> is not a valid host command-queue.
-</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>
-</div>
-<div class="sect1">
-<h2 id="_associated_opencl_specification">6. Associated OpenCL specification</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_spir_v_intermediate_language">6.1. SPIR-V Intermediate language</h3>
-<div class="paragraph"><p>The OpenCL 2.2 specification requires support for the SPIR-V
-intermediate language that allows offline, or linked online, compilation
-to a binary format that may be consumed by the <strong>clCreateProgramWithIL</strong>
-interface.</p></div>
-<div class="paragraph"><p>The OpenCL specification includes a specification for the SPIR-V 1.2
-intermediate language as a cross-platform input language. In addition,
-platform vendors may support their own IL if this is appropriate. The
-OpenCL runtime will return a list of supported IL versions using the
-<strong>CL_DEVICE_IL_VERSION</strong> parameter to the *clGetDeviceInfo*query.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_extensions_to_opencl">6.2. Extensions to OpenCL</h3>
-<div class="paragraph"><p>In addition to the specification of core features, OpenCL provides a
-number of extensions to the API, kernel language or intermediate
-representation. These features are defined in the OpenCL 2.2 extensions
-specification document.</p></div>
-<div class="paragraph"><p>Extensions defined against earlier versions of the OpenCL
-specifications, whether the API or language specification, are defined
-in the matching versions of the extension specification document.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_support_for_earlier_opencl_c_kernel_languages">6.3. Support for earlier OpenCL C kernel languages</h3>
-<div class="paragraph"><p>The OpenCL C kernel language is not defined in the OpenCL 2.2
-specification. New language features are described in the OpenCL C++
-specification as well as the SPIR-V 1.2 specification and in kernel
-languages that target it. A kernel language defined by any of the OpenCL
-1.0, OpenCL 1.1, OpenCL 1.2 and OpenCL 2.0 kernel language
-specifications as well as kernels language extensions defined by the
-matching versions of OpenCL extension specifications are valid to pass
-to <strong>clCreateProgramWithSource</strong> executing against an OpenCL 2.2 runtime.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_opencl_embedded_profile">7. OpenCL Embedded Profile</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The OpenCL 2.2specification describes the feature requirements for
-desktop platforms. This section describes the OpenCL 2.2embedded
-profile that allows us to target a subset of the OpenCL 2.2specification
-for handheld and embedded platforms. The optional extensions defined in
-the OpenCL 2.2Extension Specification apply to both profiles.</p></div>
-<div class="paragraph"><p>The OpenCL 2.2 embedded profile has the following restrictions:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-64 bit integers i.e. long, ulong including the appropriate vector
-data types and operations on 64-bit integers are optional. The
-*cles_khr_int64<span class="footnote"><br>[Note that the performance of 64-bit integer arithmetic
-can vary significantly between embedded devices.]<br></span>: extension string will be reported
-if the embedded profile implementation supports 64-bit integers.
-</p>
-</li>
-<li>
-<p>
-[line-through] Support for 3D images is optional.
-</p>
-</li>
-<li>
-<p>
-If [line-through] <strong>CL_DEVICE_IMAGE3D_MAX_WIDTH</strong>, [line-through] <strong>CL_DEVICE_IMAGE3D_MAX_HEIGHT</strong>
-and [line-through] <strong>CL_DEVICE_IMAGE3D_MAX_DEPTH</strong> are zero, the call to
-<strong>clCreateImage</strong> in the embedded profile will fail to create the 3D
-image. The <em>errcode_ret</em> argument in <strong>clCreateImage</strong>
-returns [line-through] CL_INVALID_OPERATION. Declaring arguments of
-type*[line-through]*image3d_t in a kernel will result in a compilation
-error.
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p>If
-[line-through] <strong>CL_DEVICE_IMAGE3D_MAX_WIDTH</strong>, [line-through] <strong>CL_DEVICE_IMAGE3D_HEIGHT</strong> and
-[line-through] CL_DEVICE_IMAGE3D_MAX_DEPTH &gt; 0, 3D images are supported by the OpenCL embedded profile implementation.
-[line-through] <strong>clCreateImage</strong> will work as defined by the OpenCL specification. The
-[line-through] image3d_t data type can be used in a kernel(s).</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-[line-through] Support for 2D image array writes is optional. If the <strong>cles_khr_2d_image_array_writes</strong> extension is supported by the
-[line-through] embedded profile, writes to 2D image arrays are supported.
-</p>
-</li>
-<li>
-<p>
-[line-through] Image and image arrays created with an
-[line-through] image_channel_data_type value of
-[line-through] CL_FLOAT or
-[line-through] CL_HALF_FLOAT can only be used with samplers that use a filter mode of
-[line-through] CL_FILTER_NEAREST. The values returned by <strong>read_imagef</strong> and *read_imageh*<span class="footnote"><br>[If cl_khr_fp16 extension is supported.]<br></span>: for 2D and 3D images if
-[line-through] image_channel_data_type value is
-[line-through] CL_FLOAT or
-[line-through] CL_HALF_FLOAT and sampler with
-[line-through] filter_mode =CL_FILTER_LINEAR are undefined.
-</p>
-</li>
-<li>
-<p>
-The mandated minimum single precision floating-point capability
-given by CL_DEVICE_SINGLE_FP_CONFIG is CL_FP_ROUND_TO_ZERO or
-CL_FP_ROUND_TO_NEAREST. If CL_FP_ROUND_TO_NEAREST is supported, the
-default rounding mode will be round to nearest even; otherwise the
-default rounding mode will be round to zero. <br>
-</p>
-</li>
-<li>
-<p>
-The single precision floating-point operations (addition,
-subtraction and multiplication) shall be correctly rounded. Zero
-results may always be positive 0.0. The accuracy of division and sqrt
-are given in the SPIR-V OpenCL environment specification.
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p>If CL_FP_INF_NAN is not set in CL_DEVICE_SINGLE_FP_CONFIG, and one of
-the operands or the result of addition, subtraction, multiplication or
-division would signal the overflow or invalid exception (see IEEE 754
-specification), the value of the result is implementation-defined.
-Likewise, single precision comparison operators (&lt;, &gt;, &#8656;, &gt;=, ==, !=)
-return implementation-defined values when one or more operands is a
-NaN.</p></div>
-<div class="paragraph"><p>In all cases, conversions (see the SPIR-V OpenCL environment
-specification) shall be correctly rounded as described for the
-FULL_PROFILE, including those that consume or produce an INF or NaN.
-The built-in math functions shall behave as described for the
-FULL_PROFILE, including edge case behavior but with slightly different
-accuracy rules. Edge case behavior and accuracy rules are described in
-the SPIR-V OpenCL environment specification. <br></p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-NOTE
-</dt>
-<dd>
-<p>
-If addition, subtraction and multiplication have default round
-to zero rounding mode, then <strong>fract</strong>, <strong>fma</strong> and <strong>fdim</strong> shall produce the
-correctly rounded result for round to zero rounding mode.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>This relaxation of the requirement to adhere to IEEE 754 requirements
-for basic floating-point operations, though extremely undesirable, is to
-provide flexibility for embedded devices that have lot stricter
-requirements on hardware area budgets.</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-Denormalized numbers for the half data type which may be generated
-when converting a float to a half using variants of the <strong>vstore_half</strong>
-function or when converting from a half to a float using variants of the
-<strong>vload_half</strong> function can be flushed to zero. The SPIR-V environment
-specification for details.
-</p>
-</li>
-<li>
-<p>
-The precision of conversions from CL_UNORM_INT8, CL_SNORM_INT8,
-CL_UNORM_INT16, CL_SNORM_INT16, CL_UNORM_INT_101010 and
-CL_UNORM_INT_101010_2 to float is &#8656; 2 ulp for the embedded profile
-instead of &#8656; 1.5 ulp as defined in the full profile. The exception
-cases described in the full profile and given below apply to the
-embedded profile.
-</p>
-</li>
-</ol></div>
-<div class="paragraph"><p>For CL_UNORM_INT8</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-0 must convert to 0.0f and
-</p>
-</li>
-<li>
-<p>
-255 must convert to 1.0f
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For CL_UNORM_INT16</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-0 must convert to 0.0f and
-</p>
-</li>
-<li>
-<p>
-65535 must convert to 1.0f
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For CL_SNORM_INT8</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
--128 and -127 must convert to -1.0f,
-</p>
-</li>
-<li>
-<p>
-0 must convert to 0.0f and
-</p>
-</li>
-<li>
-<p>
-127 must convert to 1.0f
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For CL_SNORM_INT16</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
--32768 and -32767 must convert to -1.0f,
-</p>
-</li>
-<li>
-<p>
-0 must convert to 0.0f and
-</p>
-</li>
-<li>
-<p>
-32767 must convert to 1.0f
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For CL_UNORM_INT_101010</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-0 must convert to 0.0f and
-</p>
-</li>
-<li>
-<p>
-1023 must convert to 1.0f
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>For CL_UNORM_INT_101010_2</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-0  must convert to 0.0f and
-</p>
-</li>
-<li>
-<p>
-1023 must convert to 1.0f (for RGB)
-</p>
-</li>
-<li>
-<p>
-3 must convert to 1.0f (for A)
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following optional extensions defined in the OpenCL 2.2 Extension
-Specification are available to the embedded profile:</p></div>
-<div class="paragraph"><p><strong>cl_khr_int64_base_atomics</strong></p></div>
-<div class="paragraph"><p><strong>cl_khr_int64_extended_atomics</strong></p></div>
-<div class="paragraph"><p><strong>cl_khr_fp16</strong></p></div>
-<div class="paragraph"><p><strong>cles_khr_int64</strong>.</p></div>
-<div class="paragraph"><p>If double precision is supported i.e. CL_DEVICE_DOUBLE_FP_CONFIG is not
-zero, then cles_khr_int64 must also be supported.</p></div>
-<div class="paragraph"><p>CL_PLATFORM_PROFILE defined in <em>table 4.1</em> will return the string
-EMBEDDED_PROFILE if the OpenCL implementation supports the embedded
-profile only.</p></div>
-<div class="paragraph"><p>The minimum maximum values specified in <em>table 4.3</em> that have been
-modified for the OpenCL embedded profile are listed below:</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:34%;">
-<col style="width:33%;">
-<col style="width:33%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>cl_device_info</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>Return Type</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"><strong>CL_DEVICE_MAX_READ_ IMAGE_ARGS</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">Max number of image objects
-arguments of a kernel declared with the read_only qualifier. 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_WRITE_ IMAGE_ARGS</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">Max number of image objects
-arguments of a kernel declared with the write_only qualifier. 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_READ_ WRITE_IMAGE_ARGS</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">Max number of image
-objects arguments of a kernel declared with the write_only or read_write
-qualifier. 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_IMAGE2D_ MAX_WIDTH</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 width of 2D image in
-pixels. 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_IMAGE2D_ MAX_HEIGHT</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 height of 2D image in
-pixels. 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_IMAGE3D_ MAX_WIDTH</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 width of 3D image in
-pixels. 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_IMAGE3D_ MAX_HEIGHT</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 height of 3D image in
-pixels. The minimum value is 2048.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DEVICE_IMAGE3D_ MAX_DEPTH</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 depth of 3D image in pixels.
-The minimum value is 2048.</p></td>
-</tr>
-<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.
-<br>
-<br>
-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.
-<br>
-<br>
-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.
-<br>
-<br>
-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>
-<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. The minimum value is 256
-bytes for devices that are not of type CL_DEVICE_TYPE_CUSTOM.</p></td>
-</tr>
-<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_<br>
- fp_config</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Describes single precision floatingpoint capability of the device. This is
-a bit-field that describes one or more
-of the following values:
-<br>
-<br>
-CL_FP_DENORM – denorms are supported
-<br>
-<br>
-CL_FP_INF_NAN – INF and quiet NaNs are
-supported.
-<br>
-<br>
-CL_FP_ROUND_TO_NEAREST– round to
-nearest even rounding mode supported
-<br>
-<br>
-CL_FP_ROUND_TO_ZERO – round to zero
-rounding mode supported
-<br>
-<br>
-CL_FP_ROUND_TO_INF – round to positive
-and negative infinity rounding modes
-supported
-<br>
-<br>
-CL_FP_FMA – IEEE754-2008 fused
-multiply-add is supported.
-<br>
-<br>
-CL_FP_CORRECTLY_ ROUNDED_DIVIDE
-_SQRT – divide and sqrt are correctly
-rounded as defined by the IEEE754
-specification.
-<br>
-<br>
-CL_FP_SOFT_FLOAT –  Basic floatingpoint operations (such as addition, subtraction,
-multiplication) are implemented in software.
-<br>
-<br>
-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>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DEVICE_MAX_CONSTANT_ BUFFER_SIZE</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Max size in bytes
-of a constant buffer allocation. The minimum value is 1 KB for devices
-that are not of type CL_DEVICE_TYPE_CUSTOM.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DEVICE_MAX_CONSTANT_ ARGS</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">Max number of arguments
-declared with the __constant qualifier in a kernel. The minimum value
-is 4 for devices that are not of type CL_DEVICE_TYPE_CUSTOM.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DEVICE_LOCAL_MEM_ SIZE</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">cl_ulong</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Size of local memory arena in
-bytes. The minimum value is 1 KB for devices that are not of type
-CL_DEVICE_TYPE_CUSTOM.</p></td>
-</tr>
-<tr>
-<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.
-<br>
-<br>
-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.
-<br>
-<br>
-This can be CL_FALSE for the
-embedded platform profile only.
-<br>
-<br>
-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>
-<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 max. size of the
-device queue in bytes. The minimum value is 64 KB for the embedded
-profile</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DEVICE_PRINTF_ 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">Maximum size in bytes of the
-internal buffer that holds the output of printf calls from a kernel.
-The minimum value for the EMBEDDED profile is 1 KB.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>If CL_DEVICE_IMAGE_SUPPORT specified in <em>table 4.3</em> is CL_TRUE, the
-values assigned to CL_DEVICE_MAX_READ_IMAGE_ARGS,
-CL_DEVICE_MAX_WRITE_IMAGE_ARGS, CL_DEVICE_IMAGE2D_MAX_WIDTH,
-CL_DEVICE_IMAGE2D_MAX_HEIGHT, CL_DEVICE_IMAGE3D_MAX_WIDTH,
-CL_DEVICE_IMAGE3D_MAX_HEIGHT, CL_DEVICE_IMAGE3D_MAX_DEPTH and
-CL_DEVICE_MAX_SAMPLERS by the implementation must be greater than or
-equal to the minimum values specified in the embedded profile version of
-<em>table 4.3</em> given above.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_appendix_a">8. Appendix A</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_a_1_shared_opencl_objects">8.1. A.1 Shared OpenCL Objects</h3>
-<div class="paragraph"><p>This section describes which objects can be shared across multiple
-command-queues created within a host process.</p></div>
-<div class="paragraph"><p>OpenCL memory objects, program objects and kernel objects are created
-using a context and can be shared across multiple command-queues created
-using the same context. Event objects can be created when a command is
-queued to a command-queue. These event objects can be shared across
-multiple command-queues created using the same context.</p></div>
-<div class="paragraph"><p>The application needs to implement appropriate synchronization across
-threads on the host processor to ensure that the changes to the state of
-a shared object (such as a command-queue object, memory object, program
-or kernel object) happen in the correct order (deemed correct by the
-application) when multiple command-queues in multiple threads are making
-changes to the state of a shared object.</p></div>
-<div class="paragraph"><p>A command-queue can cache changes to the state of a memory object on the
-device associated with the command-queue. To synchronize changes to a
-memory object across command-queues, the application must do the
-following:</p></div>
-<div class="paragraph"><p>In the command-queue that includes commands that modify the state of a
-memory object, the application must do the following:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Get appropriate event objects for commands that modify the state of the shared memory object.
-</p>
-</li>
-<li>
-<p>
-Call the <strong>clFlush</strong> (or <strong>clFinish</strong>) API to issue any outstanding commands from this command-queue.

-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>In the command-queue that wants to synchronize to the latest state of a
-memory object, commands queued by the application must use the
-appropriate event objects that represent commands that modify the state
-of the shared memory object as event objects to wait on. This is to
-ensure that commands that use this shared memory object complete in the
-previous command-queue before the memory objects are used by commands
-executing in this command-queue.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The results of modifying a shared resource in one command-queue while it
-is being used by another command-queue are undefined.
- </p></div>
-</div>
-<div class="sect2">
-<h3 id="_a_2_multiple_host_threads">8.2. A.2 Multiple Host Threads</h3>
-<div class="paragraph"><p>All OpenCL API calls are thread-safe<span class="footnote"><br>[Please refer to the OpenCL glossary
-for the OpenCL definition of thread -safe. This definition may be different
-from usage of the term in other contexts.]<br></span>: except those that
-modify the state of cl_kernel objects: <strong>clSetKernelArg,
-clSetKernelArgSVMPointer, clSetKernelExecInfo*and *clCloneKernel</strong>.
-<strong>clSetKernelArg</strong> , <strong>clSetKernelArgSVMPointer</strong>, <strong>clSetKernelExecInfo</strong>
-and <strong>clCloneKernel*are safe to call from any host thread, and safe to
-call re-entrantly so long as concurrent calls to any combination of
-these API calls operate on different cl_kernel objects. The state of
-the cl_kernel object is undefined if *clSetKernelArg</strong>,
-<strong>clSetKernelArgSVMPointer</strong>, <strong>clSetKernelExecInfo</strong> or *clCloneKernel*are
-called from multiple host threads on the same cl_kernel object at the
-same time<span class="footnote"><br>[There is an inherent race condition in the design of OpenCL that occurs between setting a kernel argument and
-using the kernel with clEnqueueNDRangeKernel. Another host thread might change the kernel arguments between
-when a host thread sets the kernel arguments and then enqueues the kernel, causing the wrong kernel arguments to
-be enqueued. Rather than attempt to share cl_kernel objects among multiple host threads, applications are strongly
-encouraged to make additional cl_kernel objects for kernel functions for each host thread.]<br></span>:. Please note that there are additional
-limitations as to which OpenCL APIs may be called from OpenCL callback
-functions&#8201;&#8212;&#8201;please see <em>section 5.11</em>.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The behavior of OpenCL APIs called from an interrupt or signal handler
-is implementation-defined</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The OpenCL implementation should be able to create multiple
-command-queues for a given OpenCL context and multiple OpenCL contexts
-in an application running on the host processor.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_appendix_b_portability">9. Appendix B Portability</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>OpenCL is designed to be portable to other architectures and hardware
-designs. OpenCL has used at its core a C99 based programming language
-and follows rules based on that heritage. Floating-point arithmetic is
-based on the <strong>IEEE-754</strong> and <strong>IEEE-754-2008</strong> standards. The memory
-objects, pointer qualifiers and weakly ordered memory are designed to
-provide maximum compatibility with discrete memory architectures
-implemented by OpenCL devices.   Command-queues and barriers allow for
-synchronization between the host and OpenCL devices. The design,
-capabilities and limitations of OpenCL are very much a reflection of the
-capabilities of underlying hardware. </p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Unfortunately, there are a number of areas where idiosyncrasies of one
-hardware platform may allow it to do some things that do not work on
-another. By virtue of the rich operating system resident on the CPU, on
-some implementations the kernels executing on a CPU may be able to call
-out to system services whereas the same calls on the GPU will likely
-fail for now. Since there is some advantage to having these services
-available for debugging purposes, implementations can use the OpenCL
-extension mechanism to implement these services.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Likewise, the heterogeneity of computing architectures might mean that a
-particular loop construct might execute at an acceptable speed on the
-CPU but very poorly on a GPU, for example. CPUs are designed in general
-to work well on latency sensitive algorithms on single threaded tasks,
-whereas common GPUs may encounter extremely long latencies, potentially
-orders of magnitude worse. A developer interested in writing portable
-code may find that it is necessary to test his design on a diversity of
-hardware designs to make sure that key algorithms are structured in a
-way that works well on a diversity of hardware.  We suggest favoring
-more work-items over fewer. It is anticipated that over the coming
-months and years experience will produce a set of best practices that
-will help foster a uniformly favorable experience on a diversity of
-computing devices.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Of somewhat more concern is the topic of endianness. Since a majority
-of devices supported by the initial implementation of OpenCL are
-little-endian, developers need to make sure that their kernels are
-tested on both big-endian and little-endian devices to ensure source
-compatibility with OpenCL devices now and in the future. The endian
-attribute qualifier is supported by the SPIR-V IL to allow developers to
-specify whether the data uses the endianness of the host or the OpenCL
-device. This allows the OpenCL compiler to do appropriate
-endian-conversion on load and store operations from or to this data.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>We also describe how endianness can leak into an implementation causing
-kernels to produce unintended results:</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>When a big-endian vector machine (e.g. AltiVec, CELL SPE) loads a
-vector, the order of the data is retained. That is both the order of
-the bytes within each element and the order of the elements in the
-vector are the same as in memory.  When a little-endian vector machine
-(e.g. SSE) loads a vector, the order of the data in register (where all
-the work is done) is reversed. *Both* the order of the bytes within
-each element and the order of the elements with respect to one another
-in the vector are reversed. </p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Memory:</p></div>
-<div class="paragraph"><p>uint4 a =</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x00010203</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x04050607</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x08090A0B</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x0C0D0E0F</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>In register (big-endian):</p></div>
-<div class="paragraph"><p>uint4 a =</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x00010203</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x04050607</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x08090A0B</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x0C0D0E0F</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>In register (little-endian):</p></div>
-<div class="paragraph"><p>uint4 a =</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x0F0E0D0C</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x0B0A0908</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x07060504</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x03020100</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>This allows little-endian machines to use a single vector load to load
-little-endian data, regardless of how large each piece of data is in the
-vector. That is the transformation is equally valid whether that vector
-was a uchar16 or a ulong2.  Of course, as is well known, little-endian
-machines actually<span class="footnote"><br>[Note that we are talking about the programming model here. In reality, little endian systems might choose to
-simply address their bytes from "the right" or reverse the "order" of the bits in the byte. Either of these choices
-would mean that no big swap would need to occur in hardware.]<br></span>: store their data in reverse byte
-order to compensate for the little-endian storage format of the array
-elements:</p></div>
-<div class="paragraph"><p>Memory (big-endian):</p></div>
-<div class="paragraph"><p>uint4 a =</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x00010203</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x04050607</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x08090A0B</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x0C0D0E0F</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p>Memory (little-endian):</p></div>
-<div class="paragraph"><p>uint4 a =</p></div>
-<div class="paragraph"><p> </p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x03020100</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x07060504</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x0B0A0908</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x0F0E0D0C</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Once that data is loaded into a vector, we end up with this:</p></div>
-<div class="paragraph"><p>In register (big-endian):</p></div>
-<div class="paragraph"><p>uint4 a =  </p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x00010203</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x04050607</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x08090A0B</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x0C0D0E0F</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>In register (little-endian):</p></div>
-<div class="paragraph"><p>uint4 a =</p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<col style="width:25%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x0C0D0E0F</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x08090A0B</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x04050607</p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">0x00010203</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>That is, in the process of correcting the endianness of the bytes within
-each element, the machine ends up reversing the order that the elements
-appear in the vector with respect to each other within the vector.
-0x00010203 appears at the left of the big-endian vector and at the
-right of the little-endian vector.</p></div>
-<div class="paragraph"><p>When the host and device have different endianness, the developer must
-ensure that kernel argument values are processed correctly. The
-implementation may or may not automatically convert endianness of kernel
-arguments. Developers should consult vendor documentation for guidance
-on how to handle kernel arguments in these situations.</p></div>
-<div class="paragraph"><p>OpenCL provides a consistent programming model across architectures by
-numbering elements according to their order in memory. Concepts such as
-even/odd and high/low follow accordingly.  Once the data is loaded into
-registers, we find that element 0 is at the left of the big-endian
-vector and element 0 is at the right of the little-endian vector:</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>float x[4];
-
-float4 v = vload4( 0, x );</pre>
-</div></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Big-endian:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>v contains { x[0], x[1], x[2], x[3] }</pre>
-</div></div>
-<div class="paragraph"><p>Little-endian:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>v contains { x[3], x[2], x[1], x[0] }</pre>
-</div></div>
-<div class="paragraph"><p>The compiler is aware that this swap occurs and references elements
-accordingly. So long as we refer to them by a numeric index such as
-.s0123456789abcdef or by descriptors such as .xyzw, .hi, .lo, .even and
-.odd, everything works transparently. Any ordering reversal is undone
-when the data is stored back to memory. The developer should be able to
-work with a big endian programming model and ignore the element ordering
-problem in the vector &#8230; for most problems. This mechanism relies on
-the fact that we can rely on a consistent element numbering. Once we
-change numbering system, for example by conversion-free casting (using
-as_type_n_) a vector to another vector of the same size but a different
-number of elements, then we get different results on different
-implementations depending on whether the system is big- endian, or
-little-endian or indeed has no vector unit at all. (Thus, the behavior
-of bitcasts to vectors of different numbers of elements is
-implementation-defined, see section 1.2.4 of OpenCL 2.0C specification)</p></div>
-<div class="paragraph"><p>An example follows:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>float x[4] = { 0.0f, 1.0f, 2.0f, 3.0f };
-
-float4 v = vload4( 0, x );
-
-uint4 y = as_uint4(v);  legal, portable 
-
-ushort8 z = as_ushort8(v);  legal, not portable  
-
- element size changed</pre>
-</div></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Big-endian:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>v contains { 0.0f, 1.0f, 2.0f, 3.0f }</pre>
-</div></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>y contains { 0x00000000, 0x3f800000, 0x40000000, 0x40400000 }</pre>
-</div></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>z contains { 0x0000, 0x0000, *0x3f80*, 0x0000, 0x4000, 0x0000, 0x4040, 0x0000 }</pre>
-</div></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>z.z is 0x3f80</pre>
-</div></div>
-<div class="paragraph"><p>Little-endian:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>v contains { 3.0f, 2.0f, 1.0f, 0.0f }</pre>
-</div></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>y contains { 0x40400000, 0x40000000, 0x3f800000, 0x00000000 }</pre>
-</div></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>z contains { 0x4040, 0x0000, 0x4000, 0x0000, 0x3f80, *0x0000*, 0x0000, 0x0000 }</pre>
-</div></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>z.z is 0</pre>
-</div></div>
-<div class="paragraph"><p>Here, the value in z.z is not the same between big- and little-endian
-vector machines </p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>OpenCL could have made it illegal to do a conversion free cast that
-changes the number of elements in the name of portability. However,
-while OpenCL provides a common set of operators drawing from the set
-that are typically found on vector machines, it can not provide access
-to everything every ISA may offer in a consistent uniform portable
-manner. Many vector ISAs provide special purpose instructions that
-greatly accelerate specific operations such as DCT, SAD, or 3D
-geometry. It is not intended for OpenCL to be so heavy handed that
-time-critical performance sensitive algorithms can not be written by
-knowledgeable developers to perform at near peak performance. Developers
-willing to throw away portability should be able to use the
-platform-specific instructions in their code. For this reason, OpenCL is
-designed to allow traditional vector C language programming extensions,
-such as the AltiVec C Programming Interface or the Intel C programming
-interfaces (such as those found in emmintrin.h) to be used directly in
-OpenCL with OpenCL data types as an extension to OpenCL.  As these
-interfaces rely on the ability to do conversion-free casts that change
-the number of elements in the vector to function properly, OpenCL allows
-them too. </p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>As a general rule, any operation that operates on vector types in
-segments that are not the same size as the vector element size may break
-on other hardware with different endianness or different vector
-architecture.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Examples might include:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Combining two uchar8&#8217;s containing high and low bytes of a ushort, to make a ushort8 using
-.even and .odd operators  (please use <strong>upsample()</strong> for this)
-</p>
-</li>
-<li>
-<p>
-Any bitcast that changes
-the number of elements in the vector. (Operations on the new type are
-non-portable.)
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>* Swizzle operations that
-change the order of data using chunk sizes that are not the same as the
-element size</p></div>
-<div class="paragraph"><p>Examples of operations that are portable:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Combining two uint8&#8217;s to
-make a uchar16 using .even and .odd operators. For example to
-interleave left and right audio streams.
-</p>
-</li>
-<li>
-<p>
-Any bitcast that does not
-change the number of elements (e.g.  (float4) unit4&#8201;&#8212;&#8201;we define the
-storage format for floating-point types)
-</p>
-</li>
-<li>
-<p>
-Swizzle operations that
-swizzle elements of the same size as the elements of the vector.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>OpenCL has made some additions to C to make application behavior more
-dependable than C. Most notably in a few cases OpenCL defines the
-behavior of some operations that are undefined in C99:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-OpenCL provides convert_
-operators for conversion between all types. C99 does not define what
-happens when a floating-point type is converted to integer type and the
-floating-point value lies outside the representable range of the integer
-type after rounding. When the <em>sat variant of the conversion is used,
-the float shall be converted to the nearest representable integer value.
- Similarly, OpenCL also makes recommendations about what should happen
-with NaN. Hardware manufacturers that provide the saturated conversion
-in hardware may use the saturated conversion hardware for both the
-saturated and non-saturated versions of the OpenCL convert</em> operator.
-OpenCL does not define what happens for the non-saturated conversions
-when floating-point operands are outside the range representable
-integers after rounding.
-</p>
-</li>
-<li>
-<p>
-The format of half, float,
-and double types is defined to be the binary16, binary32 and binary64
-formats in the draft IEEE-754 standard. (The latter two are identical to
-the existing IEEE-754 standard.) You may depend on the positioning and
-meaning of the bits in these types.
-</p>
-</li>
-<li>
-<p>
-OpenCL defines behavior
-for oversized shift values. Shift operations that shift greater than or
-equal to the number of bits in the first operand reduce the shift value
-modulo the number of bits in the element. For example,  if we shift an
-int4 left by 33 bits, OpenCL treats this as shift left by 33%32 = 1 bit.
-</p>
-</li>
-<li>
-<p>
-A number of edge cases for
-math library functions are more rigorously defined than in C99. Please
-see _section 3.5_of the OpenCL 2.0 C specification.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p> </p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_appendix_c_application_data_types">10. Appendix C  Application Data Types</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This section documents the provided host application types and constant
-definitions. The documented material describes the commonly defined
-data structures, types and constant values available to all platforms
-and architectures. The addition of these details demonstrates our
-commitment to maintaining a portable programming environment and
-potentially deters changes to the supplied headers.</p></div>
-<div class="sect2">
-<h3 id="_c_1_shared_application_scalar_data_types">10.1. C.1 Shared Application Scalar Data Types</h3>
-<div class="paragraph"><p>The following application scalar types are provided for application
-convenience.</p></div>
-<div class="paragraph"><p>cl_char</p></div>
-<div class="paragraph"><p>cl_uchar</p></div>
-<div class="paragraph"><p>cl_short</p></div>
-<div class="paragraph"><p>cl_ushort</p></div>
-<div class="paragraph"><p>cl_int</p></div>
-<div class="paragraph"><p>cl_uint</p></div>
-<div class="paragraph"><p>cl_long</p></div>
-<div class="paragraph"><p>cl_ulong</p></div>
-<div class="paragraph"><p>cl_half</p></div>
-<div class="paragraph"><p>cl_float</p></div>
-<div class="paragraph"><p>cl_double</p></div>
-<div class="paragraph"><p> </p></div>
-</div>
-<div class="sect2">
-<h3 id="_c_2_supported_application_vector_data_types">10.2. C.2 Supported Application Vector Data Types</h3>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Application vector types are unions used to create vectors of the above
-application scalar types. The following application vector types are
-provided for application convenience.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>cl_char_n_</p></div>
-<div class="paragraph"><p>cl_uchar_n_</p></div>
-<div class="paragraph"><p>cl_short_n_</p></div>
-<div class="paragraph"><p>cl_ushort_n_</p></div>
-<div class="paragraph"><p>cl_int_n_</p></div>
-<div class="paragraph"><p>cl_uint_n_</p></div>
-<div class="paragraph"><p>cl_long_n_</p></div>
-<div class="paragraph"><p>cl_ulong_n_</p></div>
-<div class="paragraph"><p>cl_half_n_</p></div>
-<div class="paragraph"><p>cl_float_n_</p></div>
-<div class="paragraph"><p>cl_double_n_</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p><em>n</em> can be 2, 3, 4, 8 or 16.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The application scalar and vector data types are defined in the
-<strong>cl_platform.h</strong> header file.</p></div>
-<div class="paragraph"><p> </p></div>
-</div>
-<div class="sect2">
-<h3 id="_c_3_alignment_of_application_data_types">10.3. C.3 Alignment of Application Data Types</h3>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The user is responsible for ensuring that pointers passed into and out
-of OpenCL kernels are natively aligned relative to the data type of the
-parameter as defined in the kernel language and SPIR-V specifications.  
-This implies that OpenCL buffers created with CL_MEM_USE_HOST_PTR need
-to provide an appropriately aligned host memory pointer that is aligned
-to the data types used to access these buffers in a kernel(s), that SVM
-allocations must correctly align and that pointers into SVM allocations
-must also be correctly aligned. The user is also responsible for
-ensuring image data passed is aligned to the granularity of the data
-representing a single pixel (e.g. image_num_channels *
-sizeof(image_channel_data_type)) except for CL_RGB and CL_RGBx images
-where the data must be aligned to the granularity of a single channel in
-a pixel (i.e. sizeof(image_channel_data_type)). This implies that OpenCL
-images created with CL_MEM_USE_HOST_PTR must align correctly. The image
-alignment value can be queried using the
-CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT query. In addition,</p></div>
-<div class="paragraph"><p>source pointers for clEnqueueWriteImage and other operations that copy
-to the OpenCL runtime, as well as destination pointers for
-clEnqueueReadImage and other operations that copy from the OpenCL
-runtime must follow the same alignment rules.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>OpenCL makes no requirement about the alignment of OpenCL application
-defined data types outside of buffers and images, except that the
-underlying vector primitives (e.g. <em>_cl_float4) where defined shall be
-directly accessible as such using appropriate named fields in the
-cl_type union (see _section C.5</em>). Nevertheless, it is recommended that
-the <strong>cl_platform.h</strong> header should attempt to naturally align OpenCL
-defined application data types (e.g. cl_float4) according to their type.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_c_4_vector_literals">10.4. C.4 Vector Literals</h3>
-<div class="paragraph"><p>Application vector literals may be used in assignments of individual
-vector components. Literal usage follows the convention of the
-underlying application compiler.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>cl_float2 foo = { .s[1] = 2.0f };
-
-cl_int8 bar = {{ 2, 4, 6, 8, 10, 12, 14, 16 }};</pre>
-</div></div>
-</div>
-<div class="sect2">
-<h3 id="_c_5_vector_components">10.5. C.5 Vector Components</h3>
-<div class="paragraph"><p>The components of application vector types can be addressed using the
-&lt;vector_name&gt;.s[&lt;index&gt;] notation.</p></div>
-<div class="paragraph"><p>For example:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>foo.s[0] = 1.0f; // Sets the 1st vector component of foo
-
-pos.s[6] = 2; // Sets the 7th vector component of bar</pre>
-</div></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>In some cases vector components may also be accessed using the following
-notations. These notations are not guaranteed to be supported on all
-implementations, so their use should be accompanied by a check of the
-corresponding preprocessor symbol.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="sect3">
-<h4 id="_c_5_1_named_vector_components_notation">10.5.1. C.5.1 Named vector components notation</h4>
-<div class="paragraph"><p>Vector data type components may be accessed using the .sN, .sn or .xyzw
-field naming convention, similar to how they are used within the OpenCL
-language. Use of the .xyzw field naming convention only allows
-accessing of the first 4 component fields. Support of these notations
-is identified by the CL_HAS_NAMED_VECTOR_FIELDS preprocessor symbol.
-For example:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>#ifdef CL_HAS_NAMED_VECTOR_FIELDS
-
-cl_float4 foo;
-
-cl_int16 bar;
-
-foo.x = 1.0f; // Set first component
-
-foo.s0 = 1.0f; // Same as above
-
-bar.z = 3;  // Set third component
-
-bar.se = 11;  // Same as bar.s[0xe]
-
-bar.sD = 12;  // Same as bar.s[0xd]
-
-#endif</pre>
-</div></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Unlike the OpenCL language type usage of named vector fields, only one
-component field may be accessed at a time. This restriction prevents
-the ability to swizzle or replicate components as is possible with the
-OpenCL language types. Attempting to access beyond the number of
-components for a type also results in a failure.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>foo.xy  // illegal - illegal field name combination
-
-bar.s1234 // illegal - illegal field name combination
-
-foo.s7  // illegal - no component s7</pre>
-</div></div>
-<div class="paragraph"><p> </p></div>
-</div>
-<div class="sect3">
-<h4 id="_c_5_2_high_low_vector_component_notation">10.5.2. C.5.2 High/Low vector component notation</h4>
-<div class="paragraph"><p>Vector data type components may be accessed using the .hi and .lo
-notation similar to that supported within the language types. Support
-of this notation is identified by the CL_HAS_HI_LO_VECTOR_FIELDS
-preprocessor symbol. For example:</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>#ifdef CL_HAS_HI_LO_VECTOR_FIELDS
-
-cl_float4 foo;
-
-cl_float2 new_hi = 2.0f, new_lo = 4.0f;
-
-foo.hi = new_hi;
-
-foo.lo = new_lo;
-
-#endif</pre>
-</div></div>
-</div>
-<div class="sect3">
-<h4 id="_c_5_3_native_vector_type_notation">10.5.3. C.5.3 Native vector type notation</h4>
-<div class="paragraph"><p>Certain native vector types are defined for providing a mapping of
-vector types to architecturally builtin vector types. Unlike the above
-described application vector types, these native types are supported on
-a limited basis depending on the supporting architecture and compiler.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>These types are not unions, but rather convenience mappings to the
-underlying architectures' builtin vector types. The native types share
-the name of their application counterparts but are preceded by a double
-underscore "__".</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>For example, <em>cl_float4 is the native builtin vector type equivalent of
-the cl_float4 application vector type. The </em>cl_float4 type may provide
-direct access to the architectural builtin __m128 or vector float type,
-whereas the cl_float4 is treated as a union.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>In addition, the above described application data types may have native
-vector data type members for access convenience. The native components
-are accessed using the .vN sub-vector notation, where N is the number of
-elements in the sub-vector. In cases where the native type is a subset
-of a larger type (more components), the notation becomes an index based
-array of the sub-vector type.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Support of the native vector types is identified by a <em>CL_TYPEN</em>
-preprocessor symbol matching the native type name. For example:</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>#ifdef __CL_FLOAT4__ // Check for native cl_float4 type
-
-cl_float8 foo;
-
-__cl_float4 bar; // Use of native type
-
-bar = foo.v4[1]; // Access the second native float4 vector
-
-#endif</pre>
-</div></div>
-<div class="paragraph"><p> </p></div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_c_6_implicit_conversions">10.6. C.6 Implicit Conversions</h3>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Implicit conversions between application vector types are not supported.</p></div>
-<div class="paragraph"><p> </p></div>
-</div>
-<div class="sect2">
-<h3 id="_c_7_explicit_casts">10.7. C.7 Explicit Casts</h3>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>Explicit casting of application vector types (cl_typen) is not
-supported. Explicit casting of native vector types (__cl_typen) is
-defined by the external compiler.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p> </p></div>
-</div>
-<div class="sect2">
-<h3 id="_c_8_other_operators_and_functions">10.8. C.8 Other operators and functions</h3>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The behavior of standard operators and function on both application
-vector types (cl_typen) and native vector types (__cl_typen) is defined
-by the external compiler.</p></div>
-<div class="paragraph"><p> </p></div>
-</div>
-<div class="sect2">
-<h3 id="_c_9_application_constant_definitions">10.9. C.9 Application constant definitions</h3>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>In addition to the above application type definitions, the following
-literal defintions are also available.</p></div>
-<div class="paragraph"><p> </p></div>
-<table class="tableblock frame-all grid-all"
-style="
-width:100%;
-">
-<col style="width:50%;">
-<col style="width:50%;">
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_CHAR_BIT</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Bit width of a character</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_SCHAR_MAX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum value of a type cl_char</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_SCHAR_MIN</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Minimum value of a type cl_char</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_CHAR_MAX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum value of a type cl_char</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_CHAR_MIN</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Minimum value of a type cl_char</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_UCHAR_MAX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum value of a type cl_uchar</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_SHORT_MAX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum value of a type cl_short</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_SHORT_MIN</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Minimum value of a type cl_short</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_USHORT_MAX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum value of a type cl_ushort</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_INT_MAX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum value of a type cl_int</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_INT_MIN</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Minimum value of a type cl_int</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_UINT_MAX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum value of a type cl_uint</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_LONG_MAX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum value of a type cl_long</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_LONG_MIN</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Minimum value of a type cl_long</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_ULONG_MAX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum value of a type cl_ulong</p></td>
-</tr>
-<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>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_FLT_DIAG</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Number of decimal digits of precision for the type
-cl_float</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_FLT_MANT_DIG</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Number of digits in the mantissa of type cl_float</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_FLT_MAX_10_EXP</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum positive integer such that 10 raised to
-this power minus one can be represented as a normalized floating-point
-number of type cl_float</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_FLT_MAX_EXP</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum exponent value of type cl_float</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_FLT_MIN_10_EXP</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Minimum negative integer such that 10 raised to
-this power minus one can be represented as a normalized floating-point
-number of type cl_float</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_FLT_MIN_EXP</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Minimum exponent value of type cl_float</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_FLT_RADIX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Base value of type cl_float</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_FLT_MAX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum value of type cl_float</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_FLT_MIN</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Minimum value of type cl_float</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_FLT_EPSILON</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Minimum positive floating-point number of type
-cl_float such that 1.0 + CL_FLT_EPSILON != 1 is true.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DBL_DIG</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Number of decimal digits of precision for the type
-cl_double</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DBL_MANT_DIG</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Number of digits in the mantissa of type cl_double</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DBL_MAX_10_EXP</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum positive integer such that 10 raised to
-this power minus one can be represented as a normalized floating-point
-number of type cl_double</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DBL_MAX_EXP</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum exponent value of type cl_double</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DBL_MIN_10_EXP</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Minimum negative integer such that 10 raised to
-this power minus one can be represented as a normalized floating-point
-number of type cl_double</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DBL_MIN_EXP</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Minimum exponent value of type cl_double</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DBL_RADIX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Base value of type cl_double</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DBL_MAX</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum value of type cl_double</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DBL_MIN</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Minimum value of type cl_double</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_DBL_EPSILON</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Minimum positive floating-point number of type
-cl_double such that 1.0 + CL_DBL_EPSILON != 1 is true.</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_NAN</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Macro expanding to a value representing NaN</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_HUGE_VALF</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Largest representative value of type cl_float</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_HUGE_VAL</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Largest representative value of type cl_double</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>CL_MAXFLOAT</strong></p></td>
-<td class="tableblock halign-left valign-top" ><p class="tableblock">Maximum value of type cl_float</p></td>
-</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>
-</tr>
-</tbody>
-</table>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>These literal definitions are defined in the <strong>cl_platform.h</strong> header.</p></div>
-<div class="paragraph"><p> </p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_appendix_d_cl_mem_copy_overlap">11. Appendix D CL_MEM_COPY_OVERLAP</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following code describes how to determine if there is overlap
-between the source and destination rectangles specified to
-<strong>clEnqueueCopyBufferRect</strong> provided the source and destination buffers
-refer to the same buffer object.</p></div>
-<div class="listingblock">
-<div class="content monospaced">
-<pre>unsigned int
-
-check_copy_overlap(const size_t src_origin[],
-                   const size_t dst_origin[],
-                   const size_t region[],
-                   const size_t row_pitch,
-                   const size_t slice_pitch )
-{
-
-  const size_t slice_size = (region[1] - 1) * row_pitch + region[0];
-  const size_t block_size = (region[2] - 1) * slice_pitch + slice_size;
-  const size_t src_start = src_origin[2] * slice_pitch +
-  src_origin[1] * row_pitch +
-  src_origin[0];
-  const size_t src_end = src_start + block_size;
-  const size_t dst_start = dst_origin[2] * slice_pitch
-                           + dst_origin[1] * row_pitch
-                           +  dst_origin[0];
-
-  F  const size_t dst_end = dst_start + block_size;
-
-  /* No overlap if dst ends before src starts or if src ends
-
-   * before dst starts.
-
-   */
-
-  if( (dst_end &lt;= src_start) || (src_end &lt;= dst_start) ){
-    return 0;
-  }
-
-  /* No overlap if region[0] for dst or src fits in the gap
-
-   * between region[0] and row_pitch.
-
-   */
-
-  {
-
-    const size_t src_dx = src_origin[0] % row_pitch;
-    const size_t dst_dx = dst_origin[0] % row_pitch;
-
-    if( ((dst_dx &gt;= src_dx + region[0]) &amp;&amp;
-
-        (dst_dx + region[0] &lt;= src_dx + row_pitch)) ||
-
-        ((src_dx &gt;= dst_dx + region[0]) &amp;&amp;
-
-       (src_dx + region[0] &lt;= dst_dx + row_pitch)) )
-
-      {
-        return 0;
-      }
-
-  }
-

-  /* No overlap if region[1] for dst or src fits in the gap
-
-   * between region[1] and slice_pitch.
-
-   */
-
-   {
-
-      const size_t src_dy =
-
-        (src_origin[1] * row_pitch + src_origin[0]) % slice_pitch;
-
-      const size_t dst_dy =
-
-        (dst_origin[1] * row_pitch + dst_origin[0]) % slice_pitch;
-
-
-      if( ((dst_dy &gt;= src_dy + slice_size) &amp;&amp;
-
-          (dst_dy + slice_size &lt;= src_dy + slice_pitch)) ||
-
-          ((src_dy &gt;= dst_dy + slice_size) &amp;&amp;
-
-          (src_dy + slice_size &lt;= dst_dy + slice_pitch)) ) {
-        return 0;
-
-      }
-
-   }
-

- /* Otherwise src and dst overlap. */
-
- return 1;
-
-}</pre>
-</div></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_appendix_e_changes">12. Appendix E  Changes</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_e_1_summary_of_changes_from_opencl_1_0">12.1. E.1 Summary of changes from OpenCL 1.0</h3>
-<div class="paragraph"><p>The following features are added to the OpenCL 1.1 platform layer and
-runtime (<em>sections 4 and 5</em>):</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Following queries to <em>table 4.3</em>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>o   CL_DEVICE_NATIVE_VECTOR_WIDTH_{CHAR | SHORT | INT | LONG | FLOAT |
-DOUBLE | HALF}</p></div>
-<div class="paragraph"><p>o   CL_DEVICE_HOST_UNIFIED_MEMORY</p></div>
-<div class="paragraph"><p>o   CL_DEVICE_OPENCL_C_VERSION</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-CL_CONTEXT_NUM_DEVICES to
-the list of queries specified to <strong>clGetContextInfo</strong>.
-</p>
-</li>
-<li>
-<p>
-Optional image formats: CL_Rx, CL_RGx and CL_RGBx.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><strong> Support for sub-buffer objects  ability to create a buffer object that refers to a specific
-region in another buffer object using *clCreateSubBuffer</strong>.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>clEnqueueReadBufferRect</strong>, <strong>clEnqueueWriteBufferRect</strong> and <strong>clEnqueueCopyBufferRect</strong> APIs to read
-from, write to and copy a rectangular region of a buffer object
-respectively.
-</p>
-</li>
-<li>
-<p>
-<strong>clSetMemObjectDestructorCallback</strong> API to allow a user to register a
-callback function that will be called when the memory object is deleted
-and its resources freed.
-</p>
-</li>
-<li>
-<p>
-Options that control the
-OpenCL C version used when building a program executable. These are
-described in <em>section 5.8.4.5</em>.
-</p>
-</li>
-<li>
-<p>
-CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE to the list of queries
-specified to <strong>clGetKernelWorkGroupInfo</strong>.
-</p>
-</li>
-<li>
-<p>
-Support for user events.
-User events allow applications to enqueue commands that wait on a user
-event to finish before the command is executed by the device. Following
-new APIs are added*- clCreateUserEvent*and <strong>clSetUserEventStatus</strong>.
-</p>
-</li>
-<li>
-<p>
-<strong>clSetEventCallback</strong> API to register a callback function for a specific command execution status.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following modifications are made to the OpenCL 1.1 platform layer
-and runtime (<em>sections 4 and 5</em>):</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Following queries in <em>table 4.3</em>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>o   CL_DEVICE_MAX_PARAMETER_SIZE from 256 to 1024 bytes</p></div>
-<div class="paragraph"><p>o   CL_DEVICE_LOCAL_MEM_SIZE from 16 KB to 32 KB.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The <em>global_work_offset</em> argument in <strong>clEnqueueNDRangeKernel</strong> can be a non-NULL value.
-</p>
-</li>
-<li>
-<p>
-All API calls except <strong>clSetKernelArg</strong> are thread-safe.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following features are added to the OpenCL C programming language
-(<em>section 6</em>) in OpenCL 1.1:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-3-component vector data types.
-</p>
-</li>
-<li>
-<p>
-New built-in functions
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>o   <strong>get_global_offset</strong> work-item function defined in section <em>6.12.1</em>.</p></div>
-<div class="paragraph"><p>o   <strong>minmag</strong>, <strong>maxmag</strong> math functions defined in section <em>6.12.2</em>.</p></div>
-<div class="paragraph"><p>o   <strong>clamp</strong> integer function defined in <em>section 6.12.3</em>.</p></div>
-<div class="paragraph"><p>o   (vector, scalar) variant of integer functions <strong>min</strong> and <strong>max</strong> in
-<em>section 6.12.3</em>.</p></div>
-<div class="paragraph"><p>o   <strong>async_work_group_strided_copy</strong> defined in section <em>6.12.10</em>.</p></div>
-<div class="paragraph"><p>o   <strong>vec_step</strong>, <strong>shuffle</strong> and <strong>shuffle2</strong> defined in section <em>6.12.12</em>.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>cl_khr_byte_addressable_store</strong> extension is a core feature.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><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*extensions are core features. The
-built-in atomic function names are changed to use the *atomic_</strong> prefix
-instead of <strong>atom_</strong>.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Macros CL_VERSION_1_0 and CL_VERSION_1_1.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following features in OpenCL 1.0 are deprecated (see glossary) in
-OpenCL 1.1:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The <strong>clSetCommandQueueProperty</strong> API is no longer supported in OpenCL 1.1.
-</p>
-</li>
-<li>
-<p>
-The <em>ROUNDING_MODE</em> macro is no longer supported in OpenCL C 1.1.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><strong>      The cl-strict-aliasing
-option that can be specified in <em>options</em> argument to *clBuildProgram</strong>
-is no longer supported in OpenCL 1.1.</p></div>
-<div class="paragraph"><p>The following new extensions are added to <em>section 9</em> in OpenCL 1.1:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>cl_khr_gl_event</strong> for creating a CL event object from a GL sync object.
-</p>
-</li>
-<li>
-<p>
-<strong>cl_khr_d3d10_sharing</strong> for sharing memory objects with Direct3D 10.

-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following modifications are made to the OpenCL ES Profile described
-in <em>section 10</em> in OpenCL 1.1:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-64-bit integer support is optional.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect2">
-<h3 id="_e_2_summary_of_changes_from_opencl_1_1">12.2. E.2 Summary of changes from OpenCL 1.1</h3>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p>The following features are added to the OpenCL 1.2 platform layer and
-runtime (<em>sections 4 and 5</em>):</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Custom devices and built-in kernels are supported.
-</p>
-</li>
-<li>
-<p>
-Device partitioning that
-allows a device to be partitioned based on a number of partitioning
-schemes supported by the device.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>* Extend <em>cl_mem_flags</em> to
-describe how the host accesses the data in a cl_mem object.</p></div>
-<div class="paragraph"><p><strong> *clEnqueueFillBuffer</strong> and
-<strong>clEnqueueFillImage</strong> to support filling a buffer with a pattern or an
-image with a color.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Add
-CL_MAP_WRITE_INVALIDATE_REGION to <em>cl_map_flags</em>. Appropriate
-clarification to the behavior of CL_MAP_WRITE has been added to the
-spec.
-</p>
-</li>
-<li>
-<p>
-New image types: 1D image,
-1D image from a buffer object, 1D image array and 2D image arrays.
-</p>
-</li>
-<li>
-<p>
-<strong>clCreateImage</strong> to create
-an image object.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><strong> *clEnqueueMigrateMemObjects</strong> API that allows a developer to have
-explicit control over the location of memory objects or to migrate a
-memory object from one device to another.</p></div>
-<div class="paragraph"><p>* Support separate compilation and linking of programs.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Additional queries to get
-the number of kernels and kernel names in a program have been added to
-<strong>clGetProgramInfo</strong>.
-</p>
-</li>
-<li>
-<p>
-Additiional queries to get
-the compile and link status and options have been added to
-<strong>clGetProgramBuildInfo</strong>.
-</p>
-</li>
-<li>
-<p>
-<strong>clGetKernelArgInfo</strong> API
-that returns information about the arguments of a kernel.
-</p>
-</li>
-<li>
-<p>
-<strong>clEnqueueMarkerWithWaitList</strong> and <strong>clEnqueueBarrierWithWaitList</strong> APIs.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following features are added to the OpenCL C programming language
-(<em>section 6</em>) in OpenCL 1.2:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Double-precision is now an optional core feature instead of an extension.
-</p>
-</li>
-<li>
-<p>
-New built in image types: <strong>image1d_t</strong> , <strong>image1d_array_t</strong> and <strong>image2d_array_t</strong> .
-</p>
-</li>
-<li>
-<p>
-New built-in functions
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>o   Functions to read from and write to a 1D image, 1D and 2D image
-arrays described in <em>sections 6.12.14.2</em>, <em>6.12.14.3</em> and <em>6.12.14.4</em>.</p></div>
-<div class="paragraph"><p>o   Sampler-less image read functions described in <em>section 6.12.14.3</em>.</p></div>
-<div class="paragraph"><p>o   <strong>popcount</strong> integer function described in <em>section 6.12.3</em>.</p></div>
-<div class="paragraph"><p>o   <strong>printf</strong> function described in <em>section 6.12.13</em>.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Storage class specifiers extern and static as described in <em>section 6.8</em>.
-</p>
-</li>
-<li>
-<p>
-Macros CL_VERSION_1_2 and <em>OPENCL_C_VERSION</em>.

-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following APIs in OpenCL 1.1 are deprecated (see glossary) in OpenCL
-1.2:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>clEnqueueMarker</strong>, <strong>clEnqueueBarrier</strong> and <strong>clEnqueueWaitForEvents</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>clCreateImage2D</strong> and <strong>clCreateImage3D</strong>
-</p>
-</li>
-<li>
-<p>
-<strong>clUnloadCompiler*and*clGetExtensionFunctionAddress</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p><strong> *clCreateFromGLTexture2D</strong> and <strong>clCreateFromGLTexture3D</strong>
- </p></div>
-<div class="paragraph"><p>The following queries are deprecated (see glossary) in OpenCL 1.2:</p></div>
-<div class="paragraph"><p><strong> *CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE</strong> in <em>table 4.3</em> queried using <strong>clGetDeviceInfo</strong>.</p></div>
-<div class="paragraph"><p> </p></div>
-</div>
-<div class="sect2">
-<h3 id="_e_3_summary_of_changes_from_opencl_1_2">12.3. E.3 Summary of changes from OpenCL 1.2</h3>
-<div class="paragraph"><p>The following features are added to the OpenCL 2.0 platform layer and
-runtime (<em>sections 4 and 5</em>):</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Shared virtual memory.
-</p>
-</li>
-<li>
-<p>
-Device queues used to enqueue kernels on the device.
-</p>
-</li>
-<li>
-<p>
-Pipes.
-</p>
-</li>
-<li>
-<p>
-Images  support for 2D image from buffer, depth images and sRGB images.

-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following modifications are made to the OpenCL 2.0 platform layer
-and runtime (sections 4 and 5):
-<strong>      All API calls except
-*clSetKernelArg</strong>, <strong>clSetKernelArgSVMPointer</strong> and <strong>clSetKernelExecInfo</strong>
-are thread-safe.
- </p></div>
-<div class="paragraph"><p>The following features are added to the OpenCL C programming language
-(<em>section 6</em>) in OpenCL 2.0:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Clang Blocks.
-</p>
-</li>
-<li>
-<p>
-Kernels enqueing kernels to a device queue.
-</p>
-</li>
-<li>
-<p>
-Program scope variables in global address space.
-</p>
-</li>
-<li>
-<p>
-Generic address space.
-</p>
-</li>
-<li>
-<p>
-C1x atomics.
-</p>
-</li>
-<li>
-<p>
-New built-in functions   (sections 6.13.9, 6.13.11, 6.13.15 and 6.14).
-</p>
-</li>
-<li>
-<p>
-Support images with the read_write qualifier.
-</p>
-</li>
-<li>
-<p>
-3D image writes are a core feature.
-</p>
-</li>
-<li>
-<p>
-The CL_VERSION_2_0 macro.

-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following APIs are deprecated (see glossary) in OpenCL 2.0:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>clCreateCommandQueue</strong> , <strong>clCreateSampler</strong> and <strong>clEnqueueTask</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following queries are deprecated (see glossary) in OpenCL 2.0:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>CL_DEVICE_HOST_UNIFIED_MEMORY</strong> in <em>table 4.3</em> queried using
-<strong>clGetDeviceInfo</strong>.
-</p>
-</li>
-<li>
-<p>
-<strong>CL_IMAGE_BUFFER</strong> in <em>table 5.10</em> is deprecated.
-</p>
-</li>
-<li>
-<p>
-<strong>CL_DEVICE_QUEUE_PROPERTIES*is replaced by *CL_DEVICE_QUEUE_ON_HOST_PROPERTIES</strong>.
-</p>
-</li>
-<li>
-<p>
-The explicit memory fence functions defined in section 6.12.9 of the OpenCL 1.2 specification.
-</p>
-</li>
-<li>
-<p>
-The OpenCL 1.2 atomic built-in functions for 32-bit integer and floating-point data types
-defined in section 6.12.11 of the OpenCL 1.2 specification.
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect2">
-<h3 id="_e_4_summary_of_changes_from_opencl_2_0">12.4. E.4 Summary of changes from OpenCL 2.0</h3>
-<div class="paragraph"><p>The following features are added to the OpenCL 2.1 platform layer and
-runtime (<em>sections 4 and 5</em>):</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>clGetKernelSubGroupInfo</strong> API call.
-</p>
-</li>
-<li>
-<p>
-<strong>CL_KERNEL_MAX_NUM_SUB_GROUPS</strong>, <strong>CL_KERNEL_COMPILE_NUM_SUB_GROUPS</strong> additions to table 5.21 of the API specification.
-</p>
-</li>
-<li>
-<p>
-<strong>clCreateProgramWithIL</strong> API call.
-</p>
-</li>
-<li>
-<p>
-<strong>clGetHostTimer</strong> and <strong>clGetDeviceAndHostTimer</strong> API calls.
-</p>
-</li>
-<li>
-<p>
-<strong>clEnqueueSVMMigrateMem</strong> API call.
-</p>
-</li>
-<li>
-<p>
-<strong>clCloneKernel</strong> API call.
-</p>
-</li>
-<li>
-<p>
-<strong>clSetDefaultDeviceCommandQueue</strong> API call.
-</p>
-</li>
-<li>
-<p>
-<strong>CL_PLATFORM_HOST_TIMER_RESOLUTION</strong> added to table 4.1 of the API specification.
-</p>
-</li>
-<li>
-<p>
-<strong>CL_DEVICE_IL_VERSION</strong>, <strong>CL_DEVICE_MAX_NUM_SUB_GROUPS</strong>, <strong>CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS</strong> added
-to table 4.3 of the API specification.
-</p>
-</li>
-<li>
-<p>
-*CL_PROGRAM_IL*to table 5.17 of the API specification.
-</p>
-</li>
-<li>
-<p>
-<strong>CL_QUEUE_DEVICE_DEFAULT</strong> added to table 5.2 of the API specification.
-</p>
-</li>
-<li>
-<p>
-Added table 5.22 to the API specification with the enums: <strong>CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE</strong> ,
-<strong>CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE</strong> and <strong>CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT</strong>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following modifications are made to the OpenCL 2.1 platform layer
-and runtime (sections 4 and 5):</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-All API calls except <strong>clSetKernelArg</strong> , <strong>clSetKernelArgSVMPointer</strong> , <strong>clSetKernelExecInfo</strong> and
-*clCloneKernel*are thread-safe.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The OpenCL C kernel language is no longer chapter 6. The OpenCL C kernel
-language is not updated for OpenCL 2.1. The OpenCL 2.0 kernel language
-will still be consumed by OpenCL 2.1 runtimes.</p></div>
-<div class="paragraph"><p>The SPIR-V IL specification has been added.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_e_5_summary_of_changes_from_opencl_2_1">12.5. E.5 Summary of changes from OpenCL 2.1</h3>
-<div class="paragraph"><p>The following changes have been made to the OpenCL 2.2 execution model
-(section 3)</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Added the third prerequisite (executing non-trivial constructors for program scope global variables).
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following features are added to the OpenCL 2.2 platform layer and
-runtime (<em>sections 4 and 5</em>):</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>clSetProgramSpecializationConstant</strong> API call
-</p>
-</li>
-<li>
-<p>
-<strong>clSetProgramReleaseCallback</strong> API call
-</p>
-</li>
-<li>
-<p>
-Queries for  CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT, CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>The following modifications are made to the OpenCL 2.2 platform layer
-and runtime (section 4 and 5):</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Modified description of CL_DEVICE_MAX_CLOCK_FREQUENCY query.
-</p>
-</li>
-<li>
-<p>
-Added a new error code CL_MAX_SIZE_RESTRICTION_EXCEEDED to <strong>clSetKernelArg</strong> API call
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Added definition of Deprecation and Specialization constants to the
-glossary.</p></div>
-<div class="paragraph"><p> </p></div>
-<div class="paragraph"><p> </p></div>
-</div>
-</div>
-</div>
-</div>
-<div id="footnotes"><hr></div>
-<div id="footer">
-<div id="footer-text">
-Version v2.2-3<br>
-Last updated
- 2017-05-12 11:30:12 PDT
-</div>
-</div>
-</body>
-</html>
diff --git a/specs/opencl-2.2.pdf b/specs/opencl-2.2.pdf
deleted file mode 100644
index 12cb79e..0000000
--- a/specs/opencl-2.2.pdf
+++ /dev/null
Binary files differ