Release OpenCL 2.2-11 maintenance revision (#68)

* Release OpenCL 2.2-11 maintenance revision

* Update spec release dates on registry index page
diff --git a/index.php b/index.php
index c28aef2..5646be7 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>)
-     (February 5, 2019). </li>
+     (July 19, 2019). </li>
 <li> OpenCL Extension Specification
      (<a href="specs/2.2/html/OpenCL_Ext.html">HTML</a>)
      (<a href="specs/2.2/pdf/OpenCL_Ext.pdf">PDF</a>)
-     (February 5, 2019). </li>
+     (July 19, 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>)
-     (February 5, 2019). </li>
+     (July 19, 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>)
-     (February 5, 2019). </li>
+     (July 19, 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>)
-     (February 5, 2019). </li>
+     (July 19, 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>)
-     (February 5, 2019). </li>
+     (July 19, 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 17a77c5..63c3b31 100644
--- a/specs/2.2/html/OpenCL_API.html
+++ b/specs/2.2/html/OpenCL_API.html
@@ -841,9 +841,9 @@
 <h1>The OpenCL<sup>&#8482;</sup> Specification</h1>
 <div class="details">
 <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>
+<span id="revnumber">version V2.2-11,</span>
+<span id="revdate">Fri, 19 Jul 2019 14:08:01 +0000</span>
+<br><span id="revremark">from git branch: master commit: 2aaf7b58ead9567d8799b22ecc748b4892a1e04e</span>
 </div>
 <div id="toc" class="toc2">
 <div id="toctitle">Table of Contents</div>
@@ -907,7 +907,7 @@
 <li><a href="#_portability">Appendix B: Portability</a></li>
 <li><a href="#data-types">Appendix C: Application Data Types</a>
 <ul class="sectlevel2">
-<li><a href="#scalar-data-types">Shared Application Scalar Data Types</a></li>
+<li><a href="#scalar-data-types">Supported Application Scalar Data Types</a></li>
 <li><a href="#vector-data-types">Supported Application Vector Data Types</a></li>
 <li><a href="#alignment-app-data-types">Alignment of Application Data Types</a></li>
 <li><a href="#_vector_literals">Vector Literals</a></li>
@@ -918,16 +918,18 @@
 <li><a href="#_application_constant_definitions">Application constant definitions</a></li>
 </ul>
 </li>
-<li><a href="#check-copy-overlap">Appendix D: CL_MEM_COPY_OVERLAP</a></li>
-<li><a href="#_changes">Appendix E: Changes</a>
+<li><a href="#check-copy-overlap">Appendix D: Checking for Memory Copy Overlap</a></li>
+<li><a href="#changes_to_opencl">Appendix E: Changes to OpenCL</a>
 <ul class="sectlevel2">
-<li><a href="#_summary_of_changes_from_opencl_1_0">Summary of changes from OpenCL 1.0</a></li>
-<li><a href="#_summary_of_changes_from_opencl_1_1">Summary of changes from OpenCL 1.1</a></li>
-<li><a href="#_summary_of_changes_from_opencl_1_2">Summary of changes from OpenCL 1.2</a></li>
-<li><a href="#_summary_of_changes_from_opencl_2_0">Summary of changes from OpenCL 2.0</a></li>
-<li><a href="#_summary_of_changes_from_opencl_2_1">Summary of changes from OpenCL 2.1</a></li>
+<li><a href="#_summary_of_changes_from_opencl_1_0_to_opencl_1_1">Summary of changes from OpenCL 1.0 to OpenCL 1.1</a></li>
+<li><a href="#_summary_of_changes_from_opencl_1_1_to_opencl_1_2">Summary of changes from OpenCL 1.1 to OpenCL 1.2</a></li>
+<li><a href="#_summary_of_changes_from_opencl_1_2_to_opencl_2_0">Summary of changes from OpenCL 1.2 to OpenCL 2.0</a></li>
+<li><a href="#_summary_of_changes_from_opencl_2_0_to_opencl_2_1">Summary of changes from OpenCL 2.0 to OpenCL 2.1</a></li>
+<li><a href="#_summary_of_changes_from_opencl_2_1_to_opencl_2_2">Summary of changes from OpenCL 2.1 to OpenCL 2.2</a></li>
 </ul>
 </li>
+<li><a href="#error_codes">Appendix F: Error Codes</a></li>
+<li><a href="#_acknowledgements">Acknowledgements</a></li>
 </ul>
 </div>
 </div>
@@ -978,183 +980,6 @@
 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>
-Jon Leech, Independent<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>
-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, StreamHPC<br>
-Jakub Szuppe, StreamHPC<br>
-Vincent Hindriksen, StreamHPC<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">
@@ -1754,9 +1579,9 @@
 </dd>
 <dt class="hdlist1">Kernel Object </dt>
 <dd>
-<p>A <em>kernel object</em> encapsulates a specific <code>__kernel</code> function declared
+<p>A <em>kernel object</em> encapsulates a specific <code><em>kernel</code> function declared
 in a <em>program</em> and the argument values to be used when executing this
-<code>__kernel</code> function.</p>
+<code></em>kernel</code> function.</p>
 </dd>
 <dt class="hdlist1">Kernel Language </dt>
 <dd>
@@ -1961,10 +1786,10 @@
 When you create an object in OpenCL, its <em>reference count</em> is set to
 one.
 Subsequent calls to the appropriate <em>retain</em> API (such as
-<strong>clRetainContext</strong>, <strong>clRetainCommandQueue</strong>) increment the <em>reference
+<a href="#clRetainContext"><strong>clRetainContext</strong></a>, <a href="#clRetainCommandQueue"><strong>clRetainCommandQueue</strong></a>) increment the <em>reference
 count</em>.
-Calls to the appropriate <em>release</em> API (such as <strong>clReleaseContext</strong>,
-<strong>clReleaseCommandQueue</strong>) decrement the <em>reference count</em>.
+Calls to the appropriate <em>release</em> API (such as <a href="#clReleaseContext"><strong>clReleaseContext</strong></a>,
+<a href="#clReleaseCommandQueue"><strong>clReleaseCommandQueue</strong></a>) 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.
@@ -2499,7 +2324,7 @@
 <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 <strong>clFlush</strong>) or implicitly by some other command.</p>
+(a call to <a href="#clFlush"><strong>clFlush</strong></a>) or implicitly by some other command.</p>
 </li>
 <li>
 <p><strong>Submitted</strong>: The command is flushed from the command-queue and submitted
@@ -2531,7 +2356,7 @@
 <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>
+is set to <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>.</p>
 </li>
 </ol>
 </div>
@@ -2555,7 +2380,7 @@
 <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.
+with a command to <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>.
 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
@@ -2587,8 +2412,8 @@
 </li>
 <li>
 <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
+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++
 construction.
 These kernels must be executed by OpenCL runtime on a device before any
@@ -2610,7 +2435,7 @@
 linked together) is undefined.</p>
 </div>
 <div class="paragraph">
-<p>Note that C initializers, C constructors, or C destructors for program
+<p>Note that C initializers, C++ constructors, or C++ destructors for program
 scope variables cannot use pointers to coarse grain and fine grain SVM
 allocations.</p>
 </div>
@@ -2869,7 +2694,7 @@
 </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>
+kernel-instance was enqueued are set to <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>.</p>
 </li>
 </ul>
 </div>
@@ -2886,7 +2711,7 @@
 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.</p>
+to <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>.</p>
 </div>
 <div class="paragraph">
 <p>While a command-queue is associated with only one device, a single device
@@ -2974,16 +2799,16 @@
 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
+When these prerequisite events take on the value <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>, 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
+to <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a> until all child kernels have ended execution and have
 signaled completion by setting any associated events to the value
-CL_COMPLETE.
+<a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>.
 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
@@ -3068,7 +2893,7 @@
 <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>
+all events that kernel is waiting-on have been set to <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>.</p>
 </li>
 <li>
 <p><strong>Ending a command:</strong> Child kernels may be enqueued such that they wait
@@ -3083,7 +2908,7 @@
 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>
+kernel to <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>.</p>
 </li>
 <li>
 <p><strong>Blocking Commands:</strong> A blocking command defines a synchronization point
@@ -3096,9 +2921,9 @@
 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 <strong>clFinish</strong> defines a
-synchronization point and the <strong>clFinish</strong> function returns.</p>
+<p><a href="#clFinish"><strong>clFinish</strong></a>: This function blocks until all previously enqueued commands
+in the command queue have completed after which <a href="#clFinish"><strong>clFinish</strong></a> defines a
+synchronization point and the <a href="#clFinish"><strong>clFinish</strong></a> function returns.</p>
 </li>
 </ul>
 </div>
@@ -3411,7 +3236,7 @@
 <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).
+(<a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a>).
 Alternatively, the physical memory can be managed by the OpenCL runtime and
 not be directly accessible to the host program.</p>
 </div>
@@ -3616,21 +3441,21 @@
 <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"><strong>clCreateBuffer</strong></p></td>
+<td class="tableblock halign-center valign-top"><p class="tableblock"><a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a></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"><strong>clSVMAlloc</strong></p></td>
+<td class="tableblock halign-center valign-top"><p class="tableblock"><a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a></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"><strong>clSVMAlloc</strong></p></td>
+<td class="tableblock halign-center valign-top"><p class="tableblock"><a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a></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>
@@ -3811,7 +3636,7 @@
 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
+does not have the <a href="#CL_MEM_SVM_ATOMICS"><code>CL_&#8203;MEM_&#8203;SVM_&#8203;ATOMICS</code></a> 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).</p>
 </li>
@@ -4472,7 +4297,7 @@
 </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
+provision of the <a href="#CL_MEM_SVM_ATOMICS"><code>CL_&#8203;MEM_&#8203;SVM_&#8203;ATOMICS</code></a> flag must be supported by the device
 and the flag provided to the SVM buffer on allocation.</p>
 </li>
 <li>
@@ -4771,10 +4596,10 @@
 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 <strong>clEnqueueMapBuffer</strong> to enqueue a
+To do this, the host thread can call <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> 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 <strong>clEnqueueMapBuffer</strong> returns, any memory operations performed by
+When <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> 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>
@@ -4787,7 +4612,7 @@
 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 <strong>clWaitForEvents</strong> function
+wait-for-events function on <strong>E</strong> (e.g. the <a href="#clWaitForEvents"><strong>clWaitForEvents</strong></a> function
 called from a host thread), then <strong>E</strong> global-synchronizes-with that
 wait-for-events function call.</p>
 </li>
@@ -4814,7 +4639,7 @@
 command-queue.</p>
 </li>
 <li>
-<p>If a host thread executes a <strong>clFinish</strong> call <strong>X</strong>, then the events of all
+<p>If a host thread executes a <a href="#clFinish"><strong>clFinish</strong></a> 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>
@@ -4839,8 +4664,8 @@
 <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
-<strong>clSetUserEventStatus</strong> function), then <strong>X</strong> global-synchronizes-with <strong>C</strong>.</p>
+<a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a> (for example, from a host thread using a
+<a href="#clSetUserEventStatus"><strong>clSetUserEventStatus</strong></a> 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
@@ -4895,8 +4720,8 @@
 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 <strong>clEnqueueMapBuffer</strong> and
-<strong>clEnqueueUnmapMemObject</strong>.
+without the need for calls to <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> and
+<a href="#clEnqueueUnmapMemObject"><strong>clEnqueueUnmapMemObject</strong></a>.
 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
@@ -4916,7 +4741,7 @@
 synchronization points.</p>
 </div>
 <div class="paragraph">
-<p>A map operation (<strong>clEnqueueMapBuffer</strong> or <strong>clEnqueueMapImage</strong>) performed on a
+<p>A map operation (<a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> or <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>) 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
@@ -4982,7 +4807,7 @@
 <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>.
+<a href="#clGetDeviceInfo"><strong>clGetDeviceInfo</strong></a>.
 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).
@@ -5029,8 +4854,8 @@
 <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>
+Intermediate language versioning is encoded as a part of the binary
+object and no flags are required to be passed to the compiler.</p>
 </li>
 </ol>
 </div>
@@ -5049,98 +4874,113 @@
 </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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetPlatformIDs(cl_uint num_entries,
-                        cl_platform_id *platforms,
-                        cl_uint *num_platforms)</code></pre>
-</div>
-</div>
 <div class="paragraph">
+<p>The list of platforms available can be obtained with the function:</p>
+</div>
+<div id="clGetPlatformIDs" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetPlatformIDs(
+    cl_uint num_entries,
+    cl_platform_id* platforms,
+    cl_uint* num_platforms);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <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>, the <em>num_entries</em> must be greater than zero.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>platforms</em> returns a list of OpenCL platforms found.
-The cl_platform_id_ values returned in <em>platforms</em> can be used to identify a
+The cl_platform_id values returned in <em>platforms</em> can be used to identify a
 specific OpenCL platform.
-If <em>platforms</em> argument is <code>NULL</code>, this argument is ignored.
+If <em>platforms</em> is <code>NULL</code>, 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">
+</li>
+<li>
 <p><em>num_platforms</em> returns the number of OpenCL platforms available.
 If <em>num_platforms</em> is <code>NULL</code>, this argument is ignored.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clGetPlatformIDs</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clGetPlatformIDs"><strong>clGetPlatformIDs</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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>
 </li>
 <li>
-<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetPlatformInfo(cl_platform_id platform,
-                         cl_platform_info param_name,
-                         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>gets specific information about the OpenCL platform.
-The information that can be queried using <strong>clGetPlatformInfo</strong> is specified
-in the <a href="#platform-queries-table">Platform Queries</a> table.</p>
+<p>Specific information about an OpenCL platform can be obtained with
+the function:</p>
 </div>
-<div class="paragraph">
-<p><em>platform</em> refers to the platform ID returned by <strong>clGetPlatformIDs</strong> or can
+<div id="clGetPlatformInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetPlatformInfo(
+    cl_platform_id platform,
+    cl_platform_info param_name,
+    size_t param_value_size,
+    <span class="directive">void</span>* param_value,
+    size_t* param_value_size_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>platform</em> refers to the platform ID returned by <a href="#clGetPlatformIDs"><strong>clGetPlatformIDs</strong></a> or can
 be <code>NULL</code>.
 If <em>platform</em> is <code>NULL</code>, the behavior is implementation-defined.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><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 the
 <a href="#platform-queries-table">Platform Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>param_value</em> is a pointer to memory location where appropriate values for a
 given <em>param_name</em>, as specified in the <a href="#platform-queries-table">Platform
 Queries</a> table, will be returned.
 If <em>param_value</em> is <code>NULL</code>, it is ignored.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><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 ≥ size of return type specified in the
 <a href="#platform-queries-table">Platform Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The information that can be queried using <a href="#clGetPlatformInfo"><strong>clGetPlatformInfo</strong></a> is specified
+in the <a href="#platform-queries-table">Platform Queries</a> table.</p>
 </div>
 <table id="platform-queries-table" class="tableblock frame-all grid-all stretch">
-<caption class="title">Table 3. OpenCL Platform Queries</caption>
+<caption class="title">Table 3. List of supported param_names by <a href="#clGetPlatformInfo">clGetPlatformInfo</a></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 10%;">
@@ -5155,7 +4995,7 @@
 </thead>
 <tbody>
 <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"><a id="CL_PLATFORM_PROFILE"></a><a href="#CL_PLATFORM_PROFILE"><code>CL_&#8203;PLATFORM_&#8203;PROFILE</code></a></p></td>
 <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.
@@ -5171,7 +5011,7 @@
         <a href="#opencl-embedded-profile">OpenCL Embedded Profile</a>.</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"><a id="CL_PLATFORM_VERSION"></a><a href="#CL_PLATFORM_VERSION"><code>CL_&#8203;PLATFORM_&#8203;VERSION</code></a></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.
@@ -5181,17 +5021,17 @@
 <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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_PLATFORM_NAME"></a><a href="#CL_PLATFORM_NAME"><code>CL_&#8203;PLATFORM_&#8203;NAME</code></a></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"><a id="CL_PLATFORM_VENDOR"></a><a href="#CL_PLATFORM_VENDOR"><code>CL_&#8203;PLATFORM_&#8203;VENDOR</code></a></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"><a id="CL_PLATFORM_EXTENSIONS"></a><a href="#CL_PLATFORM_EXTENSIONS"><code>CL_&#8203;PLATFORM_&#8203;EXTENSIONS</code></a></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
@@ -5200,31 +5040,31 @@
         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"><a id="CL_PLATFORM_HOST_TIMER_RESOLUTION"></a><a href="#CL_PLATFORM_HOST_TIMER_RESOLUTION"><code>CL_&#8203;PLATFORM_&#8203;HOST_&#8203;TIMER_&#8203;RESOLUTION</code></a></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>
+        <a href="#clGetDeviceAndHostTimer"><strong>clGetDeviceAndHostTimer</strong></a>.</p></td>
 </tr>
 </tbody>
 </table>
 <div class="paragraph">
-<p><strong>clGetPlatformInfo</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clGetPlatformInfo"><strong>clGetPlatformInfo</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the function is executed
 successfully.
 Otherwise, it returns one of the following errors<sup>2</sup>.</p>
 </div>
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_PLATFORM if <em>platform</em> is not a valid platform.</p>
+<p><a href="#CL_INVALID_PLATFORM"><code>CL_&#8203;INVALID_&#8203;PLATFORM</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 the <a href="#platform-queries-table">OpenCL Platform
 Queries</a> table, and <em>param_value</em> is not a <code>NULL</code> value.</p>
 </li>
 <li>
-<p>CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 <div class="dlist">
 <dl>
@@ -5244,44 +5084,72 @@
 </ul>
 </div>
 </div>
+</div>
+</div>
 <div class="sect2">
 <h3 id="platform-querying-devices">4.2. Querying Devices</h3>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The list of devices available on a platform can be obtained using the
-following function<sup>3</sup>.</p>
+function<sup>3</sup>:</p>
 </div>
-<div class="listingblock">
+<div id="clGetDeviceIDs" class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetDeviceIDs(cl_platform_id platform,
-                      cl_device_type device_type,
-                      cl_uint num_entries,
-                      cl_device_id * devices,
-                      cl_uint *num_devices)</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetDeviceIDs(
+    cl_platform_id platform,
+    cl_device_type device_type,
+    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> or can
+<div class="ulist">
+<ul>
+<li>
+<p><em>platform</em> refers to the platform ID returned by <a href="#clGetPlatformIDs"><strong>clGetPlatformIDs</strong></a> or can
 be <code>NULL</code>.
 If <em>platform</em> is <code>NULL</code>, the behavior is implementation-defined.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 the
 <a href="#device-categories-table">Device Categories</a> table.</p>
-</div>
+</li>
+<li>
+<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>, the <em>num_entries</em> must be greater than zero.</p>
+</li>
+<li>
+<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> or the number of OpenCL devices whose type matches
+<em>device_type</em>.</p>
+</li>
+<li>
+<p><em>num_devices</em> returns the number of OpenCL devices available that match
+<em>device_type</em>.
+If <em>num_devices</em> is <code>NULL</code>, this argument is ignored.</p>
 <div class="dlist">
 <dl>
 <dt class="hdlist1">3</dt>
 <dd>
-<p><strong>clGetDeviceIDs</strong> may return all or a subset of the actual physical
+<p><a href="#clGetDeviceIDs"><strong>clGetDeviceIDs</strong></a> may return all or a subset of the actual physical
 devices present in the platform and that match <em>device_type</em>.</p>
 </dd>
 </dl>
 </div>
+</li>
+</ul>
+</div>
 <table id="device-categories-table" class="tableblock frame-all grid-all stretch">
-<caption class="title">Table 4. List of OpenCL Device Categories</caption>
+<caption class="title">Table 4. List of supported device_types by <a href="#clGetDeviceIDs">clGetDeviceIDs</a></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -5294,143 +5162,155 @@
 </thead>
 <tbody>
 <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"><a id="CL_DEVICE_TYPE_CPU"></a><a href="#CL_DEVICE_TYPE_CPU"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CPU</code></a></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"><a id="CL_DEVICE_TYPE_GPU"></a><a href="#CL_DEVICE_TYPE_GPU"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;GPU</code></a></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"><a id="CL_DEVICE_TYPE_ACCELERATOR"></a><a href="#CL_DEVICE_TYPE_ACCELERATOR"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;ACCELERATOR</code></a></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"><a id="CL_DEVICE_TYPE_CUSTOM"></a><a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a></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"><a id="CL_DEVICE_TYPE_DEFAULT"></a><a href="#CL_DEVICE_TYPE_DEFAULT"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;DEFAULT</code></a></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>
+    The default device cannot be a <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a> 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"><a id="CL_DEVICE_TYPE_ALL"></a><a href="#CL_DEVICE_TYPE_ALL"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;ALL</code></a></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>
+    <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a> 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</em>.
-If <em>devices</em> is not <code>NULL</code>, 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.
-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 <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> 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 available that match
-<em>device_type</em>.
-If <em>num_devices</em> is <code>NULL</code>, this argument is ignored.</p>
-</div>
-<div class="paragraph">
-<p><strong>clGetDeviceIDs</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clGetDeviceIDs"><strong>clGetDeviceIDs</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_PLATFORM"><code>CL_&#8203;INVALID_&#8203;PLATFORM</code></a> 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>
+<p><a href="#CL_INVALID_DEVICE_TYPE"><code>CL_&#8203;INVALID_&#8203;DEVICE_&#8203;TYPE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <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 matched <em>device_type</em> were
+<p><a href="#CL_DEVICE_NOT_FOUND"><code>CL_&#8203;DEVICE_&#8203;NOT_&#8203;FOUND</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>.
+returned by <a href="#clGetDeviceIDs"><strong>clGetDeviceIDs</strong></a>.
 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetDeviceInfo(cl_device_id device,
-                       cl_device_info param_name,
-                       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>gets specific information about an OpenCL device.</p>
+<p>To get specific information about an OpenCL device, call the function:</p>
 </div>
-<div class="paragraph">
-<p><em>device</em> may be a device returned by <strong>clGetDeviceIDs</strong> or a sub-device
-created by <strong>clCreateSubDevices</strong>.
+<div id="clGetDeviceInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetDeviceInfo(
+    cl_device_id device,
+    cl_device_info param_name,
+    size_t param_value_size,
+    <span class="directive">void</span>* param_value,
+    size_t* param_value_size_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>device</em> may be a device returned by <a href="#clGetDeviceIDs"><strong>clGetDeviceIDs</strong></a> or a sub-device
+created by <a href="#clCreateSubDevices"><strong>clCreateSubDevices</strong></a>.
 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
+The information that can be queried using <a href="#clGetDeviceInfo"><strong>clGetDeviceInfo</strong></a> is specified in
 the <a href="#device-queries-table">Device Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><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 the
 <a href="#device-queries-table">Device Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>param_value</em> is a pointer to memory location where appropriate values for a
 given <em>param_name</em>, as specified in the <a href="#device-queries-table">Device
 Queries</a> table, will be returned.
 If <em>param_value</em> is <code>NULL</code>, it is ignored.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><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 ≥ size of return type specified in the
 <a href="#device-queries-table">Device Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The device queries described in the <a href="#device-queries-table">Device Queries</a>
+table should return the same information for a root-level device i.e. a
+device returned by <a href="#clGetDeviceIDs"><strong>clGetDeviceIDs</strong></a> and any sub-devices created from this
+device except for the following queries:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#CL_DEVICE_GLOBAL_MEM_CACHE_SIZE"><code>CL_&#8203;DEVICE_&#8203;GLOBAL_&#8203;MEM_&#8203;CACHE_&#8203;SIZE</code></a></p>
+</li>
+<li>
+<p><a href="#CL_DEVICE_BUILT_IN_KERNELS"><code>CL_&#8203;DEVICE_&#8203;BUILT_&#8203;IN_&#8203;KERNELS</code></a></p>
+</li>
+<li>
+<p><a href="#CL_DEVICE_PARENT_DEVICE"><code>CL_&#8203;DEVICE_&#8203;PARENT_&#8203;DEVICE</code></a></p>
+</li>
+<li>
+<p><a href="#CL_DEVICE_PARTITION_TYPE"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;TYPE</code></a></p>
+</li>
+<li>
+<p><a href="#CL_DEVICE_REFERENCE_COUNT"><code>CL_&#8203;DEVICE_&#8203;REFERENCE_&#8203;COUNT</code></a></p>
+</li>
+</ul>
 </div>
 <table id="device-queries-table" class="tableblock frame-all grid-all stretch">
-<caption class="title">Table 5. OpenCL Device Queries</caption>
+<caption class="title">Table 5. List of supported param_names by <a href="#clGetDeviceInfo">clGetDeviceInfo</a></caption>
 <colgroup>
 <col style="width: 30%;">
 <col style="width: 20%;">
@@ -5445,96 +5325,96 @@
 </thead>
 <tbody>
 <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"><a id="CL_DEVICE_TYPE"></a><a href="#CL_DEVICE_TYPE"><code>CL_&#8203;DEVICE_&#8203;TYPE</code></a></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,
-        CL_DEVICE_TYPE_DEFAULT, a combination of the above types or
-        CL_DEVICE_TYPE_CUSTOM.</p></td>
+<p class="tableblock">        <a href="#CL_DEVICE_TYPE_CPU"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CPU</code></a>, <a href="#CL_DEVICE_TYPE_GPU"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;GPU</code></a>, <a href="#CL_DEVICE_TYPE_ACCELERATOR"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;ACCELERATOR</code></a>,
+        <a href="#CL_DEVICE_TYPE_DEFAULT"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;DEFAULT</code></a>, a combination of the above types, or
+        <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.</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"><a id="CL_DEVICE_VENDOR_ID"></a><a href="#CL_DEVICE_VENDOR_ID"><code>CL_&#8203;DEVICE_&#8203;VENDOR_&#8203;ID</code></a></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"><a id="CL_DEVICE_MAX_COMPUTE_UNITS"></a><a href="#CL_DEVICE_MAX_COMPUTE_UNITS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;COMPUTE_&#8203;UNITS</code></a></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_DEVICE_MAX_WORK_ITEM_DIMENSIONS</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS"></a><a href="#CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WORK_&#8203;ITEM_&#8203;DIMENSIONS</code></a></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>).
+        <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a>).
         The minimum value is 3 for devices that are not of type
-        CL_DEVICE_TYPE_CUSTOM.</p></td>
+        <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.</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"><a id="CL_DEVICE_MAX_WORK_ITEM_SIZES"></a><a href="#CL_DEVICE_MAX_WORK_ITEM_SIZES"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WORK_&#8203;ITEM_&#8203;SIZES</code></a></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>
+        of the work-group to <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a>.</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>
+        query for <a href="#CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WORK_&#8203;ITEM_&#8203;DIMENSIONS</code></a>.</p>
 <p class="tableblock">        The minimum value is (1, 1, 1) for devices that are not of type
-        CL_DEVICE_TYPE_CUSTOM.</p></td>
+        <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.</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"><a id="CL_DEVICE_MAX_WORK_GROUP_SIZE"></a><a href="#CL_DEVICE_MAX_WORK_GROUP_SIZE"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a></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</strong> and CL_KERNEL_WORK_GROUP_SIZE ).
+        <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> and <a href="#CL_KERNEL_WORK_GROUP_SIZE"><code>CL_&#8203;KERNEL_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a> ).
         The minimum value is 1.
         The returned value is an upper limit and will not necessarily
         maximize performance.
         This maximum may be larger than supported by a specific kernel
-        (refer to the CL_KERNEL_WORK_GROUP_SIZE query of <strong>clGetKernelWorkGroupInfo</strong>).</p></td>
+        (refer to the <a href="#CL_KERNEL_WORK_GROUP_SIZE"><code>CL_&#8203;KERNEL_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a> query of <a href="#clGetKernelWorkGroupInfo"><strong>clGetKernelWorkGroupInfo</strong></a>).</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR  <br>
-  CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT <br>
-  CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT   <br>
-  CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG  <br>
-  CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT <br>
-  CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE<br>
-  CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR"></a><a href="#CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR"><code>CL_&#8203;DEVICE_&#8203;PREFERRED_&#8203;VECTOR_&#8203;WIDTH_&#8203;CHAR</code></a>  <br>
+  <a id="CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT"></a><a href="#CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT"><code>CL_&#8203;DEVICE_&#8203;PREFERRED_&#8203;VECTOR_&#8203;WIDTH_&#8203;SHORT</code></a> <br>
+  <a id="CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT"></a><a href="#CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT"><code>CL_&#8203;DEVICE_&#8203;PREFERRED_&#8203;VECTOR_&#8203;WIDTH_&#8203;INT</code></a>   <br>
+  <a id="CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG"></a><a href="#CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG"><code>CL_&#8203;DEVICE_&#8203;PREFERRED_&#8203;VECTOR_&#8203;WIDTH_&#8203;LONG</code></a>  <br>
+  <a id="CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT"></a><a href="#CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT"><code>CL_&#8203;DEVICE_&#8203;PREFERRED_&#8203;VECTOR_&#8203;WIDTH_&#8203;FLOAT</code></a> <br>
+  <a id="CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE"></a><a href="#CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE"><code>CL_&#8203;DEVICE_&#8203;PREFERRED_&#8203;VECTOR_&#8203;WIDTH_&#8203;DOUBLE</code></a><br>
+  <a id="CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF"></a><a href="#CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF"><code>CL_&#8203;DEVICE_&#8203;PREFERRED_&#8203;VECTOR_&#8203;WIDTH_&#8203;HALF</code></a></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.</p>
 <p class="tableblock">        If double precision is not supported,
-        CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE must return 0.</p>
+        <a href="#CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE"><code>CL_&#8203;DEVICE_&#8203;PREFERRED_&#8203;VECTOR_&#8203;WIDTH_&#8203;DOUBLE</code></a> 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>
+        <a href="#CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF"><code>CL_&#8203;DEVICE_&#8203;PREFERRED_&#8203;VECTOR_&#8203;WIDTH_&#8203;HALF</code></a> must return 0.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR  <br>
-  CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT <br>
-  CL_DEVICE_NATIVE_VECTOR_WIDTH_INT   <br>
-  CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG  <br>
-  CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT <br>
-  CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE<br>
-  CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR"></a><a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;CHAR</code></a>  <br>
+  <a id="CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT"></a><a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;SHORT</code></a> <br>
+  <a id="CL_DEVICE_NATIVE_VECTOR_WIDTH_INT"></a><a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_INT"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;INT</code></a>   <br>
+  <a id="CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG"></a><a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;LONG</code></a>  <br>
+  <a id="CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT"></a><a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;FLOAT</code></a> <br>
+  <a id="CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE"></a><a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;DOUBLE</code></a><br>
+  <a id="CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF"></a><a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;HALF</code></a></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.</p>
 <p class="tableblock">        If double precision is not supported,
-        CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE must return 0.</p>
+        <a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;DOUBLE</code></a> 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>
+        <a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;HALF</code></a> 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"><a id="CL_DEVICE_MAX_CLOCK_FREQUENCY"></a><a href="#CL_DEVICE_MAX_CLOCK_FREQUENCY"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;CLOCK_&#8203;FREQUENCY</code></a></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.
@@ -5544,107 +5424,107 @@
         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"><a id="CL_DEVICE_ADDRESS_BITS"></a><a href="#CL_DEVICE_ADDRESS_BITS"><code>CL_&#8203;DEVICE_&#8203;ADDRESS_&#8203;BITS</code></a></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"><a id="CL_DEVICE_MAX_MEM_ALLOC_SIZE"></a><a href="#CL_DEVICE_MAX_MEM_ALLOC_SIZE"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;MEM_&#8203;ALLOC_&#8203;SIZE</code></a></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 CL_DEVICE_GLOBAL_MEM_SIZE), 32 × 1024 × 1024) for
-        devices that are not of type CL_DEVICE_TYPE_CUSTOM.</p></td>
+        of <a href="#CL_DEVICE_GLOBAL_MEM_SIZE"><code>CL_&#8203;DEVICE_&#8203;GLOBAL_&#8203;MEM_&#8203;SIZE</code></a>), 32 × 1024 × 1024) for
+        devices that are not of type <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.</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"><a id="CL_DEVICE_IMAGE_SUPPORT"></a><a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a></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
+<td class="tableblock halign-left valign-top"><p class="tableblock">Is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> if images are supported by the OpenCL device and <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>
         otherwise.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_MAX_READ_IMAGE_ARGS<sup>4</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_MAX_READ_IMAGE_ARGS"></a><a href="#CL_DEVICE_MAX_READ_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;READ_&#8203;IMAGE_&#8203;ARGS</code></a><sup>4</sup></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>
+        The minimum value is 128 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a id="CL_DEVICE_MAX_WRITE_IMAGE_ARGS"></a><a href="#CL_DEVICE_MAX_WRITE_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WRITE_&#8203;IMAGE_&#8203;ARGS</code></a></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>
+        The minimum value is 64 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS<sup>5</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS"></a><a href="#CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;READ_&#8203;WRITE_&#8203;IMAGE_&#8203;ARGS</code></a><sup>5</sup></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>
+        The minimum value is 64 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a id="CL_DEVICE_IL_VERSION"></a><a href="#CL_DEVICE_IL_VERSION"><code>CL_&#8203;DEVICE_&#8203;IL_&#8203;VERSION</code></a></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.
+        <a href="#clCreateProgramWithIL"><strong>clCreateProgramWithIL</strong></a> 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"><a id="CL_DEVICE_IMAGE2D_MAX_WIDTH"></a><a href="#CL_DEVICE_IMAGE2D_MAX_WIDTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE2D_&#8203;MAX_&#8203;WIDTH</code></a></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>
+<p class="tableblock">        The minimum value is 16384 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a id="CL_DEVICE_IMAGE2D_MAX_HEIGHT"></a><a href="#CL_DEVICE_IMAGE2D_MAX_HEIGHT"><code>CL_&#8203;DEVICE_&#8203;IMAGE2D_&#8203;MAX_&#8203;HEIGHT</code></a></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>
+<p class="tableblock">        The minimum value is 16384 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a id="CL_DEVICE_IMAGE3D_MAX_WIDTH"></a><a href="#CL_DEVICE_IMAGE3D_MAX_WIDTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;WIDTH</code></a></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>
+<p class="tableblock">        The minimum value is 2048 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a id="CL_DEVICE_IMAGE3D_MAX_HEIGHT"></a><a href="#CL_DEVICE_IMAGE3D_MAX_HEIGHT"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;HEIGHT</code></a></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>
+<p class="tableblock">        The minimum value is 2048 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a id="CL_DEVICE_IMAGE3D_MAX_DEPTH"></a><a href="#CL_DEVICE_IMAGE3D_MAX_DEPTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;DEPTH</code></a></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>
+<p class="tableblock">        The minimum value is 2048 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a id="CL_DEVICE_IMAGE_MAX_BUFFER_SIZE"></a><a href="#CL_DEVICE_IMAGE_MAX_BUFFER_SIZE"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;MAX_&#8203;BUFFER_&#8203;SIZE</code></a></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>
+<p class="tableblock">        The minimum value is 65536 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a id="CL_DEVICE_IMAGE_MAX_ARRAY_SIZE"></a><a href="#CL_DEVICE_IMAGE_MAX_ARRAY_SIZE"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;MAX_&#8203;ARRAY_&#8203;SIZE</code></a></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>
+<p class="tableblock">        The minimum value is 2048 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a id="CL_DEVICE_MAX_SAMPLERS"></a><a href="#CL_DEVICE_MAX_SAMPLERS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;SAMPLERS</code></a></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>
+<p class="tableblock">        The minimum value is 16 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a id="CL_DEVICE_IMAGE_PITCH_ALIGNMENT"></a><a href="#CL_DEVICE_IMAGE_PITCH_ALIGNMENT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;PITCH_&#8203;ALIGNMENT</code></a></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.
@@ -5652,24 +5532,24 @@
 <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"><a id="CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT"></a><a href="#CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;BASE_&#8203;ADDRESS_&#8203;ALIGNMENT</code></a></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.
+        which was created using <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a>.
         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>
+        specified to <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a>.</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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_MAX_PIPE_ARGS"></a><a href="#CL_DEVICE_MAX_PIPE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;PIPE_&#8203;ARGS</code></a></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"><a id="CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS"></a><a href="#CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS"><code>CL_&#8203;DEVICE_&#8203;PIPE_&#8203;MAX_&#8203;ACTIVE_&#8203;RESERVATIONS</code></a></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.
@@ -5678,117 +5558,118 @@
         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"><a id="CL_DEVICE_PIPE_MAX_PACKET_SIZE"></a><a href="#CL_DEVICE_PIPE_MAX_PACKET_SIZE"><code>CL_&#8203;DEVICE_&#8203;PIPE_&#8203;MAX_&#8203;PACKET_&#8203;SIZE</code></a></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"><a id="CL_DEVICE_MAX_PARAMETER_SIZE"></a><a href="#CL_DEVICE_MAX_PARAMETER_SIZE"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;PARAMETER_&#8203;SIZE</code></a></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
-        CL_DEVICE_TYPE_CUSTOM.
+        <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.
         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"><a id="CL_DEVICE_MEM_BASE_ADDR_ALIGN"></a><a href="#CL_DEVICE_MEM_BASE_ADDR_ALIGN"><code>CL_&#8203;DEVICE_&#8203;MEM_&#8203;BASE_&#8203;ADDR_&#8203;ALIGN</code></a></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>
+        type <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_SINGLE_FP_CONFIG<sup>6</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_SINGLE_FP_CONFIG"></a><a href="#CL_DEVICE_SINGLE_FP_CONFIG"><code>CL_&#8203;DEVICE_&#8203;SINGLE_&#8203;FP_&#8203;CONFIG</code></a><sup>6</sup></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:</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
+<p class="tableblock">        <a id="CL_FP_DENORM"></a><a href="#CL_FP_DENORM"><code>CL_&#8203;FP_&#8203;DENORM</code></a> - denorms are supported</p>
+<p class="tableblock">        <a id="CL_FP_INF_NAN"></a><a href="#CL_FP_INF_NAN"><code>CL_&#8203;FP_&#8203;INF_&#8203;NAN</code></a> - INF and quiet NaNs are supported.</p>
+<p class="tableblock">        <a id="CL_FP_ROUND_TO_NEAREST"></a><a href="#CL_FP_ROUND_TO_NEAREST"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;NEAREST</code></a>-- 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
+<p class="tableblock">        <a id="CL_FP_ROUND_TO_ZERO"></a><a href="#CL_FP_ROUND_TO_ZERO"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;ZERO</code></a> - round to zero rounding mode supported</p>
+<p class="tableblock">        <a id="CL_FP_ROUND_TO_INF"></a><a href="#CL_FP_ROUND_TO_INF"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;INF</code></a> - 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
+<p class="tableblock">        <a id="CL_FP_FMA"></a><a href="#CL_FP_FMA"><code>CL_&#8203;FP_&#8203;FMA</code></a> - IEEE754-2008 fused multiply-add is supported.</p>
+<p class="tableblock">        <a id="CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT"></a><a href="#CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT"><code>CL_&#8203;FP_&#8203;CORRECTLY_&#8203;ROUNDED_&#8203;DIVIDE_&#8203;SQRT</code></a> - 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
+<p class="tableblock">        <a id="CL_FP_SOFT_FLOAT"></a><a href="#CL_FP_SOFT_FLOAT"><code>CL_&#8203;FP_&#8203;SOFT_&#8203;FLOAT</code></a> - 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>
+        for devices that are not of type <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a> is:
+        <a href="#CL_FP_ROUND_TO_NEAREST"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;NEAREST</code></a> | <a href="#CL_FP_INF_NAN"><code>CL_&#8203;FP_&#8203;INF_&#8203;NAN</code></a>.</p>
+<p class="tableblock">        For the embedded profile, see the
+        <a href="#embedded-profile-single-fp-config-requirements">dedicated table</a>.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_DEVICE_DOUBLE_FP_CONFIG<sup>7</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_DOUBLE_FP_CONFIG"></a><a href="#CL_DEVICE_DOUBLE_FP_CONFIG"><code>CL_&#8203;DEVICE_&#8203;DOUBLE_&#8203;FP_&#8203;CONFIG</code></a><sup>7</sup></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 - 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
+<p class="tableblock">        <a href="#CL_FP_DENORM"><code>CL_&#8203;FP_&#8203;DENORM</code></a> - denorms are supported</p>
+<p class="tableblock">        <a href="#CL_FP_INF_NAN"><code>CL_&#8203;FP_&#8203;INF_&#8203;NAN</code></a> - INF and NaNs are supported.</p>
+<p class="tableblock">        <a href="#CL_FP_ROUND_TO_NEAREST"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;NEAREST</code></a> - 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
+<p class="tableblock">        <a href="#CL_FP_ROUND_TO_ZERO"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;ZERO</code></a> - round to zero rounding mode supported.</p>
+<p class="tableblock">        <a href="#CL_FP_ROUND_TO_INF"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;INF</code></a> - 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
+<p class="tableblock">        <a href="#CL_FP_FMA"><code>CL_&#8203;FP_&#8203;FMA</code></a> - IEEE754-2008 fused multiply-add is supported.</p>
+<p class="tableblock">        <a href="#CL_FP_SOFT_FLOAT"><code>CL_&#8203;FP_&#8203;SOFT_&#8203;FLOAT</code></a> - 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>
-        CL_FP_INF_NAN |<br>
-        CL_FP_DENORM.</p></td>
+        <a href="#CL_FP_FMA"><code>CL_&#8203;FP_&#8203;FMA</code></a> |<br>
+        <a href="#CL_FP_ROUND_TO_NEAREST"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;NEAREST</code></a> |<br>
+        <a href="#CL_FP_INF_NAN"><code>CL_&#8203;FP_&#8203;INF_&#8203;NAN</code></a> |<br>
+        <a href="#CL_FP_DENORM"><code>CL_&#8203;FP_&#8203;DENORM</code></a>.</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"><a id="CL_DEVICE_GLOBAL_MEM_CACHE_TYPE"></a><a href="#CL_DEVICE_GLOBAL_MEM_CACHE_TYPE"><code>CL_&#8203;DEVICE_&#8203;GLOBAL_&#8203;MEM_&#8203;CACHE_&#8203;TYPE</code></a></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>
+        Valid values are: <a href="#CL_NONE"><code>CL_&#8203;NONE</code></a>, <a id="CL_READ_ONLY_CACHE"></a><a href="#CL_READ_ONLY_CACHE"><code>CL_&#8203;READ_&#8203;ONLY_&#8203;CACHE</code></a>, and
+        <a id="CL_READ_WRITE_CACHE"></a><a href="#CL_READ_WRITE_CACHE"><code>CL_&#8203;READ_&#8203;WRITE_&#8203;CACHE</code></a>.</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"><a id="CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE"></a><a href="#CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE"><code>CL_&#8203;DEVICE_&#8203;GLOBAL_&#8203;MEM_&#8203;CACHELINE_&#8203;SIZE</code></a></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"><a id="CL_DEVICE_GLOBAL_MEM_CACHE_SIZE"></a><a href="#CL_DEVICE_GLOBAL_MEM_CACHE_SIZE"><code>CL_&#8203;DEVICE_&#8203;GLOBAL_&#8203;MEM_&#8203;CACHE_&#8203;SIZE</code></a></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"><a id="CL_DEVICE_GLOBAL_MEM_SIZE"></a><a href="#CL_DEVICE_GLOBAL_MEM_SIZE"><code>CL_&#8203;DEVICE_&#8203;GLOBAL_&#8203;MEM_&#8203;SIZE</code></a></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"><a id="CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE"></a><a href="#CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;CONSTANT_&#8203;BUFFER_&#8203;SIZE</code></a></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>
+        <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.</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"><a id="CL_DEVICE_MAX_CONSTANT_ARGS"></a><a href="#CL_DEVICE_MAX_CONSTANT_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;CONSTANT_&#8203;ARGS</code></a></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 <code>__constant</code> qualifier
         in a kernel.
         The minimum value is 8 for devices that are not of type
-        CL_DEVICE_TYPE_CUSTOM.</p></td>
+        <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.</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"><a id="CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE"></a><a href="#CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;GLOBAL_&#8203;VARIABLE_&#8203;SIZE</code></a></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
@@ -5796,7 +5677,7 @@
 <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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE"></a><a href="#CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE"><code>CL_&#8203;DEVICE_&#8203;GLOBAL_&#8203;VARIABLE_&#8203;PREFERRED_&#8203;TOTAL_&#8203;SIZE</code></a></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.
@@ -5807,102 +5688,102 @@
         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"><a id="CL_DEVICE_LOCAL_MEM_TYPE"></a><a href="#CL_DEVICE_LOCAL_MEM_TYPE"><code>CL_&#8203;DEVICE_&#8203;LOCAL_&#8203;MEM_&#8203;TYPE</code></a></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.</p>
-<p class="tableblock">        For custom devices, CL_NONE can also be returned indicating no local
+        This can be set to <a id="CL_LOCAL"></a><a href="#CL_LOCAL"><code>CL_&#8203;LOCAL</code></a> implying dedicated local memory storage
+        such as SRAM , or <a id="CL_GLOBAL"></a><a href="#CL_GLOBAL"><code>CL_&#8203;GLOBAL</code></a>.</p>
+<p class="tableblock">        For custom devices, <a href="#CL_NONE"><code>CL_&#8203;NONE</code></a> 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"><a id="CL_DEVICE_LOCAL_MEM_SIZE"></a><a href="#CL_DEVICE_LOCAL_MEM_SIZE"><code>CL_&#8203;DEVICE_&#8203;LOCAL_&#8203;MEM_&#8203;SIZE</code></a></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>
+        <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.</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"><a id="CL_DEVICE_ERROR_CORRECTION_SUPPORT"></a><a href="#CL_DEVICE_ERROR_CORRECTION_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;ERROR_&#8203;CORRECTION_&#8203;SUPPORT</code></a></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
+<td class="tableblock halign-left valign-top"><p class="tableblock">Is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> 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>
+        Is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> 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"><a id="CL_DEVICE_PROFILING_TIMER_RESOLUTION"></a><a href="#CL_DEVICE_PROFILING_TIMER_RESOLUTION"><code>CL_&#8203;DEVICE_&#8203;PROFILING_&#8203;TIMER_&#8203;RESOLUTION</code></a></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 <a href="#profiling-operations">Profiling Operations</a> 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"><a id="CL_DEVICE_ENDIAN_LITTLE"></a><a href="#CL_DEVICE_ENDIAN_LITTLE"><code>CL_&#8203;DEVICE_&#8203;ENDIAN_&#8203;LITTLE</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> if the OpenCL device is a little endian device and
+        <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> 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"><a id="CL_DEVICE_AVAILABLE"></a><a href="#CL_DEVICE_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;AVAILABLE</code></a></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.
+<td class="tableblock halign-left valign-top"><p class="tableblock">Is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> if the device is available and <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> 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"><a id="CL_DEVICE_COMPILER_AVAILABLE"></a><a href="#CL_DEVICE_COMPILER_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;COMPILER_&#8203;AVAILABLE</code></a></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
+<td class="tableblock halign-left valign-top"><p class="tableblock">Is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> 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.
-        This can be CL_FALSE for the embedded platform profile only.</p></td>
+<p class="tableblock">        Is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> if the compiler is available.
+        This can be <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> 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"><a id="CL_DEVICE_LINKER_AVAILABLE"></a><a href="#CL_DEVICE_LINKER_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;LINKER_&#8203;AVAILABLE</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> if the implementation does not have a linker available.
+        Is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> if the linker is available.</p>
+<p class="tableblock">        This can be <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> for the embedded platform profile only.</p>
+<p class="tableblock">        This must be <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> if <a href="#CL_DEVICE_COMPILER_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;COMPILER_&#8203;AVAILABLE</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a id="CL_DEVICE_EXECUTION_CAPABILITIES"></a><a href="#CL_DEVICE_EXECUTION_CAPABILITIES"><code>CL_&#8203;DEVICE_&#8203;EXECUTION_&#8203;CAPABILITIES</code></a></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
+<p class="tableblock">        <a id="CL_EXEC_KERNEL"></a><a href="#CL_EXEC_KERNEL"><code>CL_&#8203;EXEC_&#8203;KERNEL</code></a> - The OpenCL device can execute OpenCL kernels.</p>
+<p class="tableblock">        <a id="CL_EXEC_NATIVE_KERNEL"></a><a href="#CL_EXEC_NATIVE_KERNEL"><code>CL_&#8203;EXEC_&#8203;NATIVE_&#8203;KERNEL</code></a> - The OpenCL device can execute native
         kernels.</p>
-<p class="tableblock">        The mandated minimum capability is: CL_EXEC_KERNEL.</p></td>
+<p class="tableblock">        The mandated minimum capability is: <a href="#CL_EXEC_KERNEL"><code>CL_&#8203;EXEC_&#8203;KERNEL</code></a>.</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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_QUEUE_ON_HOST_PROPERTIES"></a><a href="#CL_DEVICE_QUEUE_ON_HOST_PROPERTIES"><code>CL_&#8203;DEVICE_&#8203;QUEUE_&#8203;ON_&#8203;HOST_&#8203;PROPERTIES</code></a><sup>8</sup></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:</p>
-<p class="tableblock">        CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE<br>
-        CL_QUEUE_PROFILING_ENABLE</p>
+<p class="tableblock">        <a href="#CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE"><code>CL_&#8203;QUEUE_&#8203;OUT_&#8203;OF_&#8203;ORDER_&#8203;EXEC_&#8203;MODE_&#8203;ENABLE</code></a><br>
+        <a href="#CL_QUEUE_PROFILING_ENABLE"><code>CL_&#8203;QUEUE_&#8203;PROFILING_&#8203;ENABLE</code></a></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>
+<p class="tableblock">        The mandated minimum capability is: <a href="#CL_QUEUE_PROFILING_ENABLE"><code>CL_&#8203;QUEUE_&#8203;PROFILING_&#8203;ENABLE</code></a>.</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"><a id="CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES"></a><a href="#CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES"><code>CL_&#8203;DEVICE_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE_&#8203;PROPERTIES</code></a></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:</p>
-<p class="tableblock">        CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE<br>
-        CL_QUEUE_PROFILING_ENABLE</p>
+<p class="tableblock">        <a href="#CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE"><code>CL_&#8203;QUEUE_&#8203;OUT_&#8203;OF_&#8203;ORDER_&#8203;EXEC_&#8203;MODE_&#8203;ENABLE</code></a><br>
+        <a href="#CL_QUEUE_PROFILING_ENABLE"><code>CL_&#8203;QUEUE_&#8203;PROFILING_&#8203;ENABLE</code></a></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>
+        <a href="#CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE"><code>CL_&#8203;QUEUE_&#8203;OUT_&#8203;OF_&#8203;ORDER_&#8203;EXEC_&#8203;MODE_&#8203;ENABLE</code></a> | <a href="#CL_QUEUE_PROFILING_ENABLE"><code>CL_&#8203;QUEUE_&#8203;PROFILING_&#8203;ENABLE</code></a>.</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"><a id="CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE"></a><a href="#CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE"><code>CL_&#8203;DEVICE_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE_&#8203;PREFERRED_&#8203;SIZE</code></a></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.
@@ -5911,21 +5792,21 @@
 <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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE"></a><a href="#CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE"><code>CL_&#8203;DEVICE_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE_&#8203;MAX_&#8203;SIZE</code></a></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 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"><a id="CL_DEVICE_MAX_ON_DEVICE_QUEUES"></a><a href="#CL_DEVICE_MAX_ON_DEVICE_QUEUES"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;ON_&#8203;DEVICE_&#8203;QUEUES</code></a></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>
 </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"><a id="CL_DEVICE_MAX_ON_DEVICE_EVENTS"></a><a href="#CL_DEVICE_MAX_ON_DEVICE_EVENTS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;ON_&#8203;DEVICE_&#8203;EVENTS</code></a></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 <code>enqueue_</code> built-in functions
@@ -5934,7 +5815,7 @@
 <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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_BUILT_IN_KERNELS"></a><a href="#CL_DEVICE_BUILT_IN_KERNELS"><code>CL_&#8203;DEVICE_&#8203;BUILT_&#8203;IN_&#8203;KERNELS</code></a></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.
@@ -5942,28 +5823,28 @@
         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"><a id="CL_DEVICE_PLATFORM"></a><a href="#CL_DEVICE_PLATFORM"><code>CL_&#8203;DEVICE_&#8203;PLATFORM</code></a></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"><a id="CL_DEVICE_NAME"></a><a href="#CL_DEVICE_NAME"><code>CL_&#8203;DEVICE_&#8203;NAME</code></a></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"><a id="CL_DEVICE_VENDOR"></a><a href="#CL_DEVICE_VENDOR"><code>CL_&#8203;DEVICE_&#8203;VENDOR</code></a></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"><a id="CL_DRIVER_VERSION"></a><a href="#CL_DRIVER_VERSION"><code>CL_&#8203;DRIVER_&#8203;VERSION</code></a></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<sup>9</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_PROFILE"></a><a href="#CL_DEVICE_PROFILE"><code>CL_&#8203;DEVICE_&#8203;PROFILE</code></a><sup>9</sup></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.
@@ -5975,35 +5856,36 @@
         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"><a id="CL_DEVICE_VERSION"></a><a href="#CL_DEVICE_VERSION"><code>CL_&#8203;DEVICE_&#8203;VERSION</code></a></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:</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>
+<p class="tableblock">        The major_version.minor_version value returned will be one of 1.0,
+        1.1, 1.2, 2.0, 2.1 or 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"><a id="CL_DEVICE_OPENCL_C_VERSION"></a><a href="#CL_DEVICE_OPENCL_C_VERSION"><code>CL_&#8203;DEVICE_&#8203;OPENCL_&#8203;C_&#8203;VERSION</code></a></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 device that is not of type <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.
         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>
+        <a href="#CL_DEVICE_VERSION"><code>CL_&#8203;DEVICE_&#8203;VERSION</code></a> is OpenCL 2.0, OpenCL 2.1, or OpenCL 2.2.</p>
 <p class="tableblock">        The major_version.minor_version value returned must be 1.2 if
-        CL_DEVICE_VERSION is OpenCL 1.2.</p>
+        <a href="#CL_DEVICE_VERSION"><code>CL_&#8203;DEVICE_&#8203;VERSION</code></a> 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>
+        <a href="#CL_DEVICE_VERSION"><code>CL_&#8203;DEVICE_&#8203;VERSION</code></a> 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>
+        <a href="#CL_DEVICE_VERSION"><code>CL_&#8203;DEVICE_&#8203;VERSION</code></a> 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"><a id="CL_DEVICE_EXTENSIONS"></a><a href="#CL_DEVICE_EXTENSIONS"><code>CL_&#8203;DEVICE_&#8203;EXTENSIONS</code></a></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.
@@ -6032,84 +5914,84 @@
         <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
+<p class="tableblock">        Please refer to the OpenCL 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"><a id="CL_DEVICE_PRINTF_BUFFER_SIZE"></a><a href="#CL_DEVICE_PRINTF_BUFFER_SIZE"><code>CL_&#8203;DEVICE_&#8203;PRINTF_&#8203;BUFFER_&#8203;SIZE</code></a></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"><a id="CL_DEVICE_PREFERRED_INTEROP_USER_SYNC"></a><a href="#CL_DEVICE_PREFERRED_INTEROP_USER_SYNC"><code>CL_&#8203;DEVICE_&#8203;PREFERRED_&#8203;INTEROP_&#8203;USER_&#8203;SYNC</code></a></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
+<td class="tableblock halign-left valign-top"><p class="tableblock">Is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> 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 /
+        OpenCL and other APIs such as DirectX, <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> 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"><a id="CL_DEVICE_PARENT_DEVICE"></a><a href="#CL_DEVICE_PARENT_DEVICE"><code>CL_&#8203;DEVICE_&#8203;PARENT_&#8203;DEVICE</code></a></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 <code>NULL</code> 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"><a id="CL_DEVICE_PARTITION_MAX_SUB_DEVICES"></a><a href="#CL_DEVICE_PARTITION_MAX_SUB_DEVICES"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;MAX_&#8203;SUB_&#8203;DEVICES</code></a></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>
+<p class="tableblock">        The value returned cannot exceed <a href="#CL_DEVICE_MAX_COMPUTE_UNITS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;COMPUTE_&#8203;UNITS</code></a>.</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"><a id="CL_DEVICE_PARTITION_PROPERTIES"></a><a href="#CL_DEVICE_PARTITION_PROPERTIES"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;PROPERTIES</code></a></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>
-        CL_DEVICE_PARTITION_BY_COUNTS<br>
-        CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN</p>
+<p class="tableblock">        <a href="#CL_DEVICE_PARTITION_EQUALLY"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;EQUALLY</code></a><br>
+        <a href="#CL_DEVICE_PARTITION_BY_COUNTS"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;BY_&#8203;COUNTS</code></a><br>
+        <a href="#CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;BY_&#8203;AFFINITY_&#8203;DOMAIN</code></a></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>
 <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"><a id="CL_DEVICE_PARTITION_AFFINITY_DOMAIN"></a><a href="#CL_DEVICE_PARTITION_AFFINITY_DOMAIN"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;AFFINITY_&#8203;DOMAIN</code></a></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.
+        device using <a href="#CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;BY_&#8203;AFFINITY_&#8203;DOMAIN</code></a>.
         This is a bit-field that describes one or more 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<br>
-        CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE</p>
+<p class="tableblock">        <a id="CL_DEVICE_AFFINITY_DOMAIN_NUMA"></a><a href="#CL_DEVICE_AFFINITY_DOMAIN_NUMA"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;NUMA</code></a><br>
+        <a id="CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE"></a><a href="#CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;L4_&#8203;CACHE</code></a><br>
+        <a id="CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE"></a><a href="#CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;L3_&#8203;CACHE</code></a><br>
+        <a id="CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE"></a><a href="#CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;L2_&#8203;CACHE</code></a><br>
+        <a id="CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE"></a><a href="#CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;L1_&#8203;CACHE</code></a><br>
+        <a id="CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE"></a><a href="#CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;NEXT_&#8203;PARTITIONABLE</code></a></p>
 <p class="tableblock">        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
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_PARTITION_TYPE"></a><a href="#CL_DEVICE_PARTITION_TYPE"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;TYPE</code></a></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 <a href="#clCreateSubDevices"><strong>clCreateSubDevices</strong></a> 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_PARTITIONABLE, the affinity domain
+        In the case where the properties argument to <a href="#clCreateSubDevices"><strong>clCreateSubDevices</strong></a> is
+        <a href="#CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;BY_&#8203;AFFINITY_&#8203;DOMAIN</code></a>,
+        <a href="#CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;NEXT_&#8203;PARTITIONABLE</code></a>, 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>
-        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">        <a href="#CL_DEVICE_AFFINITY_DOMAIN_NUMA"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;NUMA</code></a><br>
+        <a href="#CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;L4_&#8203;CACHE</code></a><br>
+        <a href="#CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;L3_&#8203;CACHE</code></a><br>
+        <a href="#CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;L2_&#8203;CACHE</code></a><br>
+        <a href="#CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;L1_&#8203;CACHE</code></a></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
@@ -6117,41 +5999,41 @@
         <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"><a id="CL_DEVICE_REFERENCE_COUNT"></a><a href="#CL_DEVICE_REFERENCE_COUNT"><code>CL_&#8203;DEVICE_&#8203;REFERENCE_&#8203;COUNT</code></a></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"><a id="CL_DEVICE_SVM_CAPABILITIES"></a><a href="#CL_DEVICE_SVM_CAPABILITIES"><code>CL_&#8203;DEVICE_&#8203;SVM_&#8203;CAPABILITIES</code></a></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:</p>
-<p class="tableblock">        CL_DEVICE_SVM_COARSE_GRAIN_BUFFER - Support for coarse-grain buffer
-        sharing using <strong>clSVMAlloc</strong>.
+<p class="tableblock">        <a id="CL_DEVICE_SVM_COARSE_GRAIN_BUFFER"></a><a href="#CL_DEVICE_SVM_COARSE_GRAIN_BUFFER"><code>CL_&#8203;DEVICE_&#8203;SVM_&#8203;COARSE_&#8203;GRAIN_&#8203;BUFFER</code></a> - Support for coarse-grain buffer
+        sharing using <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a>.
         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
-        sharing using <strong>clSVMAlloc</strong>.
+        host must use calls to <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> and
+        <a href="#clEnqueueUnmapMemObject"><strong>clEnqueueUnmapMemObject</strong></a>.</p>
+<p class="tableblock">        <a id="CL_DEVICE_SVM_FINE_GRAIN_BUFFER"></a><a href="#CL_DEVICE_SVM_FINE_GRAIN_BUFFER"><code>CL_&#8203;DEVICE_&#8203;SVM_&#8203;FINE_&#8203;GRAIN_&#8203;BUFFER</code></a> - Support for fine-grain buffer
+        sharing using <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a>.
         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 <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> and <a href="#clEnqueueUnmapMemObject"><strong>clEnqueueUnmapMemObject</strong></a>.</p>
+<p class="tableblock">        <a id="CL_DEVICE_SVM_FINE_GRAIN_SYSTEM"></a><a href="#CL_DEVICE_SVM_FINE_GRAIN_SYSTEM"><code>CL_&#8203;DEVICE_&#8203;SVM_&#8203;FINE_&#8203;GRAIN_&#8203;SYSTEM</code></a> - 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
+<p class="tableblock">        <a id="CL_DEVICE_SVM_ATOMICS"></a><a href="#CL_DEVICE_SVM_ATOMICS"><code>CL_&#8203;DEVICE_&#8203;SVM_&#8203;ATOMICS</code></a> - 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
-        CL_DEVICE_SVM_COARSE_GRAIN_BUFFER.</p></td>
+        <a href="#CL_DEVICE_SVM_COARSE_GRAIN_BUFFER"><code>CL_&#8203;DEVICE_&#8203;SVM_&#8203;COARSE_&#8203;GRAIN_&#8203;BUFFER</code></a>.</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"><a id="CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT"></a><a href="#CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT"><code>CL_&#8203;DEVICE_&#8203;PREFERRED_&#8203;PLATFORM_&#8203;ATOMIC_&#8203;ALIGNMENT</code></a></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.
@@ -6159,7 +6041,7 @@
         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"><a id="CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT"></a><a href="#CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT"><code>CL_&#8203;DEVICE_&#8203;PREFERRED_&#8203;GLOBAL_&#8203;ATOMIC_&#8203;ALIGNMENT</code></a></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.
@@ -6167,7 +6049,7 @@
         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"><a id="CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT"></a><a href="#CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT"><code>CL_&#8203;DEVICE_&#8203;PREFERRED_&#8203;LOCAL_&#8203;ATOMIC_&#8203;ALIGNMENT</code></a></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.
@@ -6175,21 +6057,21 @@
         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"><a id="CL_DEVICE_MAX_NUM_SUB_GROUPS"></a><a href="#CL_DEVICE_MAX_NUM_SUB_GROUPS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;NUM_&#8203;SUB_&#8203;GROUPS</code></a></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>
+        (Refer also to <a href="#clGetKernelSubGroupInfo"><strong>clGetKernelSubGroupInfo</strong></a>.)</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"><a id="CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS"></a><a href="#CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS"><code>CL_&#8203;DEVICE_&#8203;SUB_&#8203;GROUP_&#8203;INDEPENDENT_&#8203;FORWARD_&#8203;PROGRESS</code></a></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.
+<td class="tableblock halign-left valign-top"><p class="tableblock">Is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> if this device supports independent forward progress of
+        sub-groups, <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> otherwise.
         If <strong>cl_khr_subgroups</strong> is supported by the device this must return
-        CL_TRUE.</p></td>
+        <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</p></td>
 </tr>
 </tbody>
 </table>
@@ -6201,15 +6083,15 @@
 image qualifier may result in additional read_only images resources being
 created internally by an implementation.
 The internally created read_only image resources will count against the max
-supported read image arguments given by CL_DEVICE_MAX_READ_IMAGE_ARGS.
+supported read image arguments given by <a href="#CL_DEVICE_MAX_READ_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;READ_&#8203;IMAGE_&#8203;ARGS</code></a>.
 Enqueuing a kernel that requires more images than the implementation can
-support will result in a CL_OUT_OF_RESOURCES error being returned.</p>
+support will result in a <a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> error being returned.</p>
 </dd>
 <dt class="hdlist1">5</dt>
 <dd>
-<p>NOTE: <strong>CL_DEVICE_MAX_WRITE_IMAGE_ARGS</strong> is only there for backward
+<p>NOTE: <a href="#CL_DEVICE_MAX_WRITE_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WRITE_&#8203;IMAGE_&#8203;ARGS</code></a> is only there for backward
 compatibility.
-<strong>CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS</strong> should be used instead.</p>
+<a href="#CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;READ_&#8203;WRITE_&#8203;IMAGE_&#8203;ARGS</code></a> should be used instead.</p>
 </dd>
 <dt class="hdlist1">6</dt>
 <dd>
@@ -6227,8 +6109,8 @@
 </dd>
 <dt class="hdlist1">8</dt>
 <dd>
-<p>CL_DEVICE_QUEUE_PROPERTIES is deprecated and replaced by
-CL_DEVICE_QUEUE_ON_HOST_PROPERTIES.</p>
+<p><a href="#CL_DEVICE_QUEUE_PROPERTIES"><code>CL_&#8203;DEVICE_&#8203;QUEUE_&#8203;PROPERTIES</code></a> is deprecated and replaced by
+<a href="#CL_DEVICE_QUEUE_ON_HOST_PROPERTIES"><code>CL_&#8203;DEVICE_&#8203;QUEUE_&#8203;ON_&#8203;HOST_&#8203;PROPERTIES</code></a>.</p>
 </dd>
 <dt class="hdlist1">9</dt>
 <dd>
@@ -6238,49 +6120,24 @@
 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.
+<a href="#CL_DEVICE_COMPILER_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;COMPILER_&#8203;AVAILABLE</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.
 If the platform profile returned is EMBEDDED_PROFILE, then devices that
 are only EMBEDDED_PROFILE are supported.</p>
 </dd>
 </dl>
 </div>
 <div class="paragraph">
-<p>The device queries described in the <a href="#device-queries-table">Device Queries</a>
-table 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="ulist">
-<ul>
-<li>
-<p>CL_DEVICE_GLOBAL_MEM_CACHE_SIZE</p>
-</li>
-<li>
-<p>CL_DEVICE_BUILT_IN_KERNELS</p>
-</li>
-<li>
-<p>CL_DEVICE_PARENT_DEVICE</p>
-</li>
-<li>
-<p>CL_DEVICE_PARTITION_TYPE</p>
-</li>
-<li>
-<p>CL_DEVICE_REFERENCE_COUNT</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p><strong>clGetDeviceInfo</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clGetDeviceInfo"><strong>clGetDeviceInfo</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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 valid.</p>
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 the <a href="#device-queries-table">Device Queries</a> table
 and <em>param_value</em> is not a <code>NULL</code> value or if <em>param_name</em> is a value
@@ -6288,163 +6145,179 @@
 supported by the device.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetDeviceAndHostTimer(cl_device_id device,
-                               cl_ulong* device_timestamp,
-                               cl_ulong* host_timestamp)</code></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>
+<p>To query device and host timestamps, call the function:</p>
 </div>
-<div class="paragraph">
-<p><em>device</em> is a device returned by <strong>clGetDeviceIDs</strong>.</p>
+<div id="clGetDeviceAndHostTimer" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetDeviceAndHostTimer(
+    cl_device_id device,
+    cl_ulong* device_timestamp,
+    cl_ulong* host_timestamp);</code></pre>
 </div>
-<div class="paragraph">
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>device</em> is a device returned by <a href="#clGetDeviceIDs"><strong>clGetDeviceIDs</strong></a>.</p>
+</li>
+<li>
 <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 <strong>clGetDeviceInfo</strong> and the CL_DEVICE_PROFILING_TIMER_RESOLUTION
+returned by <a href="#clGetDeviceInfo"><strong>clGetDeviceInfo</strong></a> and the <a href="#CL_DEVICE_PROFILING_TIMER_RESOLUTION"><code>CL_&#8203;DEVICE_&#8203;PROFILING_&#8203;TIMER_&#8203;RESOLUTION</code></a>
 query.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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><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 <em>device_timestamp</em> is <code>NULL</code>.</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>
+The resolution of the timer may be queried via <a href="#clGetPlatformInfo"><strong>clGetPlatformInfo</strong></a> and the
+flag <a href="#CL_PLATFORM_HOST_TIMER_RESOLUTION"><code>CL_&#8203;PLATFORM_&#8203;HOST_&#8203;TIMER_&#8203;RESOLUTION</code></a>.</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 clGetHostTimer(cl_device_id device,
-                      cl_ulong* host_timestamp)</code></pre>
-</div>
-</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.
+<p><a href="#clGetDeviceAndHostTimer"><strong>clGetDeviceAndHostTimer</strong></a> 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>clGetDeviceAndHostTimer</strong> each have an implementation defined timebase.
+<a href="#clGetHostTimer"><strong>clGetHostTimer</strong></a> 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
+The timestamp returned from <a href="#clGetEventProfilingInfo"><strong>clGetEventProfilingInfo</strong></a> 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><em>device</em> is a device returned by <strong>clGetDeviceIDs</strong>.</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><strong>clGetHostTimer</strong> will return CL_SUCCESS with a time value in
+<p><a href="#clGetDeviceAndHostTimer"><strong>clGetDeviceAndHostTimer</strong></a> will return <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> if <em>device</em> is not a valid OpenCL device.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>host_timestamp</em> is <code>NULL</code>.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>host_timestamp</em> or <em>device_timestamp</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
 </div>
 </div>
+</div>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>To query the host clock, call the function:</p>
+</div>
+<div id="clGetHostTimer" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetHostTimer(
+    cl_device_id device,
+    cl_ulong* host_timestamp);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>device</em> is a device returned by <a href="#clGetDeviceIDs"><strong>clGetDeviceIDs</strong></a>.</p>
+</li>
+<li>
+<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 <a href="#clGetPlatformInfo"><strong>clGetPlatformInfo</strong></a> and the
+flag <a href="#CL_PLATFORM_HOST_TIMER_RESOLUTION"><code>CL_&#8203;PLATFORM_&#8203;HOST_&#8203;TIMER_&#8203;RESOLUTION</code></a>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><a href="#clGetHostTimer"><strong>clGetHostTimer</strong></a> returns the current value of the host clock as seen by
+<em>device</em>.
+This value is in the same timebase as the <em>host_timestamp</em> returned from
+<a href="#clGetDeviceAndHostTimer"><strong>clGetDeviceAndHostTimer</strong></a>.
+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
+<a href="#clGetDeviceAndHostTimer"><strong>clGetDeviceAndHostTimer</strong></a> 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 <a href="#clGetEventProfilingInfo"><strong>clGetEventProfilingInfo</strong></a> 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><a href="#clGetHostTimer"><strong>clGetHostTimer</strong></a> will return <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> if <em>device</em> is not a valid OpenCL device.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>host_timestamp</em> is <code>NULL</code>.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clCreateSubDevices(cl_device_id in_device,
-                          <span class="directive">const</span> cl_device_partition_property *properties,
-                          cl_uint num_devices,
-                          cl_device_id *out_devices,
-                          cl_uint *num_devices_ret)</code></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>
+<p>To create sub-devices partitioning an OpenCL device, call the function:</p>
 </div>
-<div class="paragraph">
+<div id="clCreateSubDevices" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clCreateSubDevices(
+    cl_device_id in_device,
+    <span class="directive">const</span> cl_device_partition_property* properties,
+    cl_uint num_devices,
+    cl_device_id* out_devices,
+    cl_uint* num_devices_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <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
+</li>
+<li>
+<p><em>properties</em> specifies how <em>in_device</em> is to be partitioned, described by a
 partition name and its corresponding value.
 Each partition name is immediately followed by the corresponding desired
 value.
@@ -6453,9 +6326,38 @@
 <a href="#subdevice-partition-table">Subdevice Partition</a> table.
 Only one of the listed partitioning schemes can be specified in
 <em>properties</em>.</p>
+</li>
+<li>
+<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>
+</li>
+<li>
+<p><em>out_devices</em> is the buffer where the OpenCL sub-devices will be returned.
+If <em>out_devices</em> is <code>NULL</code>, this argument is ignored.
+If <em>out_devices</em> is not <code>NULL</code>, <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>
+</li>
+<li>
+<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 <code>NULL</code>, it is ignored.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><a href="#clCreateSubDevices"><strong>clCreateSubDevices</strong></a> creates an array of sub-devices that each reference a
+non-intersecting set of compute units within <em>in_device</em>, according to the
+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 <a href="#clCreateSubDevices"><strong>clCreateSubDevices</strong></a> 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>
 <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>
+<caption class="title">Table 6. List of supported partition schemes by <a href="#clCreateSubDevices">clCreateSubDevices</a></caption>
 <colgroup>
 <col style="width: 30%;">
 <col style="width: 20%;">
@@ -6470,80 +6372,61 @@
 </thead>
 <tbody>
 <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"><a id="CL_DEVICE_PARTITION_EQUALLY"></a><a href="#CL_DEVICE_PARTITION_EQUALLY"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;EQUALLY</code></a></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
+        <a href="#CL_DEVICE_MAX_COMPUTE_UNITS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;COMPUTE_&#8203;UNITS</code></a>, 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"><a id="CL_DEVICE_PARTITION_BY_COUNTS"></a><a href="#CL_DEVICE_PARTITION_BY_COUNTS"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;BY_&#8203;COUNTS</code></a></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.
+<td class="tableblock halign-left valign-top"><p class="tableblock">This property is followed by a list of compute unit counts
+        terminated with 0 or <a id="CL_DEVICE_PARTITION_BY_COUNTS_LIST_END"></a><a href="#CL_DEVICE_PARTITION_BY_COUNTS_LIST_END"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;BY_&#8203;COUNTS_&#8203;LIST_&#8203;END</code></a>.
         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>
+        with <em>m</em> compute units in it.</p>
 <p class="tableblock">        The number of non-zero count entries in the list may not exceed
-        CL_DEVICE_PARTITION_MAX_SUB_DEVICES.</p>
+        <a href="#CL_DEVICE_PARTITION_MAX_SUB_DEVICES"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;MAX_&#8203;SUB_&#8203;DEVICES</code></a>.</p>
 <p class="tableblock">        The total number of compute units specified may not exceed
-        CL_DEVICE_PARTITION_MAX_COMPUTE_UNITS.</p></td>
+        <a href="#CL_DEVICE_MAX_COMPUTE_UNITS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;COMPUTE_&#8203;UNITS</code></a>.</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"><a id="CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN"></a><a href="#CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;BY_&#8203;AFFINITY_&#8203;DOMAIN</code></a></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:</p>
-<p class="tableblock">        CL_DEVICE_AFFINITY_DOMAIN_NUMA - Split the device into sub-devices
+<p class="tableblock">        <a href="#CL_DEVICE_AFFINITY_DOMAIN_NUMA"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;NUMA</code></a> - 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
+<p class="tableblock">        <a href="#CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;L4_&#8203;CACHE</code></a> - 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
+<p class="tableblock">        <a href="#CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;L3_&#8203;CACHE</code></a> - 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
+<p class="tableblock">        <a href="#CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;L2_&#8203;CACHE</code></a> - 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
+<p class="tableblock">        <a href="#CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;L1_&#8203;CACHE</code></a> - 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
+<p class="tableblock">        <a href="#CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE"><code>CL_&#8203;DEVICE_&#8203;AFFINITY_&#8203;DOMAIN_&#8203;NEXT_&#8203;PARTITIONABLE</code></a> - 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
-        <strong>clGetDeviceInfo</strong>(CL_DEVICE_PARTITION_TYPE) on the sub-devices.</p></td>
+        <a href="#clGetDeviceInfo"><strong>clGetDeviceInfo</strong></a>(<a href="#CL_DEVICE_PARTITION_TYPE"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;TYPE</code></a>) 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</em> is <code>NULL</code>, this argument is ignored.
-If <em>out_devices</em> is not <code>NULL</code>, <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 <code>NULL</code>, it is ignored.</p>
-</div>
-<div class="paragraph">
-<p><strong>clCreateSubDevices</strong> returns CL_SUCCESS if the partition is created
+<p><a href="#clCreateSubDevices"><strong>clCreateSubDevices</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the partition is created
 successfully.
 Otherwise, it returns a <code>NULL</code> value with the following error values
 returned in <em>errcode_ret</em>:</p>
@@ -6551,44 +6434,44 @@
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_DEVICE if <em>in_device</em> is not valid.</p>
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> and <em>num_devices</em> is
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>out_devices</em> is not <code>NULL</code> 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
+<p><a href="#CL_DEVICE_PARTITION_FAILED"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;FAILED</code></a> 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
+<p><a href="#CL_INVALID_DEVICE_PARTITION_COUNT"><code>CL_&#8203;INVALID_&#8203;DEVICE_&#8203;PARTITION_&#8203;COUNT</code></a> if the partition name specified in
+<em>properties</em> is <a href="#CL_DEVICE_PARTITION_BY_COUNTS"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;BY_&#8203;COUNTS</code></a> and the number of
+sub-devices requested exceeds <a href="#CL_DEVICE_PARTITION_MAX_SUB_DEVICES"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;MAX_&#8203;SUB_&#8203;DEVICES</code></a> or the
 total number of compute units requested exceeds
-CL_DEVICE_PARTITION_MAX_COMPUTE_UNITS for <em>in_device</em>, or the number of
+<a href="#CL_DEVICE_MAX_COMPUTE_UNITS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;COMPUTE_&#8203;UNITS</code></a> 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>
+<a href="#CL_DEVICE_MAX_COMPUTE_UNITS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;COMPUTE_&#8203;UNITS</code></a> for <em>in_device</em>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<em>properties</em> argument to <a href="#clCreateSubDevices"><strong>clCreateSubDevices</strong></a> are given below:</p>
 </div>
 <div class="paragraph">
 <p>To partition a device containing 16 compute units into two sub-devices, each
@@ -6621,68 +6504,96 @@
   <span class="integer">0</span> }</code></pre>
 </div>
 </div>
-<div class="paragraph">
-<p>The function</p>
 </div>
-<div class="listingblock">
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clRetainDevice(cl_device_id device)</code></pre>
+<div class="paragraph">
+<p>To retain a device, call the function:</p>
 </div>
+<div id="clRetainDevice" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clRetainDevice(
+    cl_device_id device);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>device</em> is the OpenCL device to retain.</p>
+</li>
+</ul>
 </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>.
+<p><a href="#clRetainDevice"><strong>clRetainDevice</strong></a> increments the <em>device</em> reference count if <em>device</em> is a
+valid sub-device created by a call to <a href="#clCreateSubDevices"><strong>clCreateSubDevices</strong></a>.
 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
+<a href="#clGetDeviceIDs"><strong>clGetDeviceIDs</strong></a>, the <em>device</em> reference count remains unchanged.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clRetainDevice"><strong>clRetainDevice</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> if <em>device</em> is not a valid sub-device created by a
+call to <a href="#clCreateSubDevices"><strong>clCreateSubDevices</strong></a>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clReleaseDevice(cl_device_id device)</code></pre>
+<div class="paragraph">
+<p>To release a device, call the function:</p>
 </div>
+<div id="clReleaseDevice" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clReleaseDevice(
+    cl_device_id device);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>device</em> is the OpenCL device to retain.</p>
+</li>
+</ul>
 </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>.
+<p><a href="#clReleaseDevice"><strong>clReleaseDevice</strong></a> decrements the <em>device</em> reference count if device is a
+valid sub-device created by a call to <a href="#clCreateSubDevices"><strong>clCreateSubDevices</strong></a>.
 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
+<a href="#clGetDeviceIDs"><strong>clGetDeviceIDs</strong></a>, the <em>device</em> reference count remains unchanged.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clReleaseDevice"><strong>clReleaseDevice</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> if <em>device</em> is not a valid sub-device created by a
+call to <a href="#clCreateSubDevices"><strong>clCreateSubDevices</strong></a>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
@@ -6692,36 +6603,32 @@
 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>
+the object or by calling <a href="#clRetainDevice"><strong>clRetainDevice</strong></a> causes undefined behavior.</p>
+</div>
+</div>
 </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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_context clCreateContext(<span class="directive">const</span> cl_context_properties *properties,
-                           cl_uint num_devices,
-                           <span class="directive">const</span> cl_device_id *devices,
-                           <span class="directive">void</span>(CL_CALLBACK *pfn_notify)
-                               (<span class="directive">const</span> <span class="predefined-type">char</span> *errinfo,
-                               <span class="directive">const</span> <span class="directive">void</span> *private_info,
-                               size_t cb,
-                               <span class="directive">void</span> *user_data),
-                           <span class="directive">void</span> *user_data,
-                           cl_int *errcode_ret)</code></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>
+<p>To create an OpenCL context, call the function:</p>
 </div>
-<div class="paragraph">
+<div id="clCreateContext" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_context clCreateContext(
+    <span class="directive">const</span> cl_context_properties* properties,
+    cl_uint num_devices,
+    <span class="directive">const</span> cl_device_id* devices,
+    <span class="directive">void</span> (CL_CALLBACK* pfn_notify)(<span class="directive">const</span> <span class="predefined-type">char</span>*, <span class="directive">const</span> <span class="directive">void</span>*, size_t, <span class="directive">void</span>*),
+    <span class="directive">void</span>* user_data,
+    cl_int* errcode_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>properties</em> specifies a list of context property names and their
 corresponding values.
 Each property name is immediately followed by the corresponding desired
@@ -6731,48 +6638,14 @@
 <a href="#context-properties-table">Context Properties</a> table.
 <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 stretch">
-<caption class="title">Table 7. <em>List of supported properties by</em> <strong>clCreateContext</strong></caption>
-<colgroup>
-<col style="width: 34%;">
-<col style="width: 33%;">
-<col style="width: 33%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_context_properties enum</strong></th>
-<th class="tableblock halign-left valign-top">Property value</th>
-<th class="tableblock halign-left valign-top">Description</th>
-</tr>
-</thead>
-<tbody>
-<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.</p>
-<p class="tableblock">        If CL_CONTEXT_INTEROP_USER_SYNC is not specified, a default of
-        CL_FALSE is assumed.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph">
+</li>
+<li>
 <p><em>num_devices</em> is the number of devices specified in the <em>devices</em> argument.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>devices</em> is a pointer to a list of unique devices<sup>10</sup> returned by
-<strong>clGetDeviceIDs</strong> or sub-devices created by <strong>clCreateSubDevices</strong> for a
+<a href="#clGetDeviceIDs"><strong>clGetDeviceIDs</strong></a> or sub-devices created by <a href="#clCreateSubDevices"><strong>clCreateSubDevices</strong></a> for a
 platform.</p>
-</div>
 <div class="dlist">
 <dl>
 <dt class="hdlist1">10</dt>
@@ -6781,7 +6654,8 @@
 </dd>
 </dl>
 </div>
-<div class="paragraph">
+</li>
+<li>
 <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
@@ -6791,7 +6665,21 @@
 implementation.
 It is the applications responsibility to ensure that the callback function
 is thread-safe.
-The parameters to this callback function are:</p>
+If <em>pfn_notify</em> is <code>NULL</code>, no callback function is registered.</p>
+</li>
+<li>
+<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 <code>NULL</code>.</p>
+</li>
+<li>
+<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>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The parameters to the callback function <em>pfn_notify</em> are:</p>
 </div>
 <div class="ulist">
 <ul>
@@ -6809,8 +6697,43 @@
 </ul>
 </div>
 <div class="paragraph">
-<p>If <em>pfn_notify</em> is <code>NULL</code>, no callback function is registered.</p>
+<p>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>
+<table id="context-properties-table" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 7. List of supported context creation properties by <a href="#clCreateContext">clCreateContext</a></caption>
+<colgroup>
+<col style="width: 34%;">
+<col style="width: 33%;">
+<col style="width: 33%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_context_properties enum</strong></th>
+<th class="tableblock halign-left valign-top">Property value</th>
+<th class="tableblock halign-left valign-top">Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_CONTEXT_PLATFORM"></a><a href="#CL_CONTEXT_PLATFORM"><code>CL_&#8203;CONTEXT_&#8203;PLATFORM</code></a></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"><a id="CL_CONTEXT_INTEROP_USER_SYNC"></a><a href="#CL_CONTEXT_INTEROP_USER_SYNC"><code>CL_&#8203;CONTEXT_&#8203;INTEROP_&#8203;USER_&#8203;SYNC</code></a></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 Extension
+        Specification that describe sharing with other APIs for restrictions
+        on using this flag.</p>
+<p class="tableblock">        If <a href="#CL_CONTEXT_INTEROP_USER_SYNC"><code>CL_&#8203;CONTEXT_&#8203;INTEROP_&#8203;USER_&#8203;SYNC</code></a> is not specified, a default of
+        <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> is assumed.</p></td>
+</tr>
+</tbody>
+</table>
 <div class="admonitionblock note">
 <table>
 <tr>
@@ -6827,85 +6750,72 @@
 </table>
 </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 <code>NULL</code>.</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>clCreateContext</strong> returns a valid non-zero context and <em>errcode_ret</em> is set
-to CL_SUCCESS if the context is created successfully.
+<p><a href="#clCreateContext"><strong>clCreateContext</strong></a> returns a valid non-zero context and <em>errcode_ret</em> is set
+to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the context is created successfully.
 Otherwise, it returns a <code>NULL</code> value with the following error values
 returned in <em>errcode_ret</em>:</p>
 </div>
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_PLATFORM if <em>properties</em> is <code>NULL</code> and no platform could be
+<p><a href="#CL_INVALID_PLATFORM"><code>CL_&#8203;INVALID_&#8203;PLATFORM</code></a> if <em>properties</em> is <code>NULL</code> and no platform could be
 selected or if platform value specified in <em>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
+<p><a href="#CL_INVALID_PROPERTY"><code>CL_&#8203;INVALID_&#8203;PROPERTY</code></a> 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>devices</em> is <code>NULL</code>.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>devices</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>num_devices</em> is equal to zero.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>num_devices</em> is equal to zero.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>pfn_notify</em> is <code>NULL</code> but <em>user_data</em> is not
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>pfn_notify</em> is <code>NULL</code> but <em>user_data</em> is not
 <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_DEVICE if <em>devices</em> contains an invalid device.</p>
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> if <em>devices</em> contains an invalid device.</p>
 </li>
 <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>
+<p><a href="#CL_DEVICE_NOT_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;NOT_&#8203;AVAILABLE</code></a> if a device in <em>devices</em> is currently not
+available even though the device was returned by <a href="#clGetDeviceIDs"><strong>clGetDeviceIDs</strong></a>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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<sup>11</sup></p>
 </div>
-<div class="listingblock">
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_context clCreateContextFromType(<span class="directive">const</span> cl_context_properties *properties,
-                                   cl_device_type device_type,
-                                   <span class="directive">void</span>(CL_CALLBACK *pfn_notify)(
-                                       (<span class="directive">const</span> <span class="predefined-type">char</span> *errinfo,
-                                        <span class="directive">const</span> <span class="directive">void</span> *private_info,
-                                        size_t cb,
-                                        <span class="directive">void</span> *user_data),
-                                   <span class="directive">void</span> *user_data,
-                                   cl_int *errcode_ret)</code></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>
+<p>To create an OpenCL context from a specific device type<sup>11</sup>, call the
+function:</p>
 </div>
-<div class="paragraph">
+<div id="clCreateContextFromType" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_context clCreateContextFromType(
+    <span class="directive">const</span> cl_context_properties* properties,
+    cl_device_type device_type,
+    <span class="directive">void</span> (CL_CALLBACK* pfn_notify)(<span class="directive">const</span> <span class="predefined-type">char</span>*, <span class="directive">const</span> <span class="directive">void</span>*, size_t, <span class="directive">void</span>*),
+    <span class="directive">void</span>* user_data,
+    cl_int* errcode_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>properties</em> specifies a list of context property names and their
 corresponding values.
 Each property name is immediately followed by the corresponding desired
@@ -6914,102 +6824,104 @@
 <a href="#context-properties-table">Context Properties</a> table.
 <em>properties</em> can also be <code>NULL</code> in which case the platform that is selected
 is implementation-defined.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>device_type</em> is a bit-field that identifies the type of device and is
 described in the <a href="#device-categories-table">Device Categories</a> table.</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">
+</li>
+<li>
+<p><em>pfn_notify</em> and <em>user_data</em> are described in <a href="#clCreateContext"><strong>clCreateContext</strong></a>.</p>
+</li>
+<li>
 <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>
+</li>
+</ul>
 </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.
+<p>Only devices that are returned by <a href="#clGetDeviceIDs"><strong>clGetDeviceIDs</strong></a> 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="dlist">
+<dl>
+<dt class="hdlist1">11</dt>
+<dd>
+<p><a href="#clCreateContextFromType"><strong>clCreateContextFromType</strong></a> may return all or a subset of the actual
+physical devices present in the platform and that match device_type.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><a href="#clCreateContextFromType"><strong>clCreateContextFromType</strong></a> returns a valid non-zero context and <em>errcode_ret</em>
+is set to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the context is created successfully.
 Otherwise, it returns a <code>NULL</code> value with the following error values
 returned in <em>errcode_ret</em>:</p>
 </div>
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_PLATFORM if <em>properties</em> is <code>NULL</code> and no platform could be
+<p><a href="#CL_INVALID_PLATFORM"><code>CL_&#8203;INVALID_&#8203;PLATFORM</code></a> if <em>properties</em> is <code>NULL</code> and no platform could be
 selected or if platform value specified in <em>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
+<p><a href="#CL_INVALID_PROPERTY"><code>CL_&#8203;INVALID_&#8203;PROPERTY</code></a> 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 <code>NULL</code> but <em>user_data</em> is not
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>pfn_notify</em> is <code>NULL</code> but <em>user_data</em> is not
 <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_DEVICE_TYPE if <em>device_type</em> is not a valid value.</p>
+<p><a href="#CL_INVALID_DEVICE_TYPE"><code>CL_&#8203;INVALID_&#8203;DEVICE_&#8203;TYPE</code></a> 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
+<p><a href="#CL_DEVICE_NOT_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;NOT_&#8203;AVAILABLE</code></a> 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
+<p><a href="#CL_DEVICE_NOT_FOUND"><code>CL_&#8203;DEVICE_&#8203;NOT_&#8203;FOUND</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
-<div class="dlist">
-<dl>
-<dt class="hdlist1">11</dt>
-<dd>
-<p><strong>clCreateContextfromType</strong> may return all or a subset of the actual
-physical devices present in the platform and that match device_type.</p>
-</dd>
-</dl>
-</div>
 </li>
 </ul>
 </div>
-<div class="paragraph">
-<p>The function</p>
 </div>
-<div class="listingblock">
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clRetainContext(cl_context context)</code></pre>
-</div>
-</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>
+<p>To retain a context, call the function:</p>
+</div>
+<div id="clRetainContext" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clRetainContext(
+    cl_context context);</code></pre>
+</div>
 </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>
+<p><em>context</em> specifies the OpenCL context to retain.</p>
 </li>
 </ul>
 </div>
 <div class="paragraph">
-<p><strong>clCreateContext</strong> and <strong>clCreateContextFromType</strong> perform an implicit retain.
+<p><a href="#clRetainContext"><strong>clRetainContext</strong></a> increments the <em>context</em> reference count.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clCreateContext"><strong>clCreateContext</strong></a> and <a href="#clCreateContextFromType"><strong>clCreateContextFromType</strong></a> 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
@@ -7018,86 +6930,124 @@
 the problem of a context being used by a library no longer being valid.</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_int clReleaseContext(cl_context context)</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>decrements the <em>context</em> reference count.
-<strong>clReleaseContext</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clRetainContext"><strong>clRetainContext</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>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 <strong>clRetainContext</strong> causes undefined behavior.</p>
 </div>
-<div class="paragraph">
-<p>The function</p>
 </div>
-<div class="listingblock">
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetContextInfo(cl_context context,
-                        cl_context_info param_name,
-                        size_t param_value_size,
-                        <span class="directive">void</span> *param_value,
-                        size_t *param_value_size_ret)</code></pre>
+<div class="paragraph">
+<p>To release a context, call the function:</p>
 </div>
+<div id="clReleaseContext" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clReleaseContext(
+    cl_context context);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>context</em> specifies the OpenCL context to release.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>can be used to query information about a context.</p>
+<p><a href="#clReleaseContext"><strong>clReleaseContext</strong></a> decrements the <em>context</em> reference count.
+After the 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 <a href="#clRetainContext"><strong>clRetainContext</strong></a> causes undefined behavior.</p>
 </div>
 <div class="paragraph">
+<p><a href="#clReleaseContext"><strong>clReleaseContext</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the function is executed
+successfully.
+Otherwise, it returns one of the following errors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> if <em>context</em> is not a valid OpenCL context.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>To query information about a context, call the function:</p>
+</div>
+<div id="clGetContextInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetContextInfo(
+    cl_context context,
+    cl_context_info param_name,
+    size_t param_value_size,
+    <span class="directive">void</span>* param_value,
+    size_t* param_value_size_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>context</em> specifies the OpenCL context being queried.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>param_name</em> is an enumeration constant that specifies the information to
 query.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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 the <a href="#context-info-table">Context Attributes</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
 <p>The list of supported <em>param_name</em> values and the information returned in
-<em>param_value</em> by <strong>clGetContextInfo</strong> is described in the
+<em>param_value</em> by <a href="#clGetContextInfo"><strong>clGetContextInfo</strong></a> 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 stretch">
-<caption class="title">Table 8. List of supported param_names by <strong>clGetContextInfo</strong></caption>
+<caption class="title">Table 8. List of supported param_names by <a href="#clGetContextInfo">clGetContextInfo</a></caption>
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -7112,31 +7062,31 @@
 </thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_CONTEXT_REFERENCE_COUNT</strong><sup>12</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_CONTEXT_REFERENCE_COUNT"></a><a href="#CL_CONTEXT_REFERENCE_COUNT"><code>CL_&#8203;CONTEXT_&#8203;REFERENCE_&#8203;COUNT</code></a><sup>12</sup></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"><a id="CL_CONTEXT_NUM_DEVICES"></a><a href="#CL_CONTEXT_NUM_DEVICES"><code>CL_&#8203;CONTEXT_&#8203;NUM_&#8203;DEVICES</code></a></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"><a id="CL_CONTEXT_DEVICES"></a><a href="#CL_CONTEXT_DEVICES"><code>CL_&#8203;CONTEXT_&#8203;DEVICES</code></a></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"><a id="CL_CONTEXT_PROPERTIES"></a><a href="#CL_CONTEXT_PROPERTIES"><code>CL_&#8203;CONTEXT_&#8203;PROPERTIES</code></a></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> used to create <em>context</em> is not <code>NULL</code>, the
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return the properties argument specified in <a href="#clCreateContext"><strong>clCreateContext</strong></a> or
+        <a href="#clCreateContextFromType"><strong>clCreateContextFromType</strong></a>.</p>
+<p class="tableblock">        If the <em>properties</em> argument specified in <a href="#clCreateContext"><strong>clCreateContext</strong></a> or
+        <a href="#clCreateContextFromType"><strong>clCreateContextFromType</strong></a> 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
-        <strong>clCreateContextFromType</strong> used to create <em>context</em> is <code>NULL</code>, the
+<p class="tableblock">        If the <em>properties</em> argument specified in <a href="#clCreateContext"><strong>clCreateContext</strong></a> or
+        <a href="#clCreateContextFromType"><strong>clCreateContextFromType</strong></a> 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
         a context property value of 0 (where 0 is used to terminate the
@@ -7156,27 +7106,27 @@
 </dl>
 </div>
 <div class="paragraph">
-<p><strong>clGetContextInfo</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clGetContextInfo"><strong>clGetContextInfo</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 the <a href="#context-info-table">Context Attributes</a>
 table and <em>param_value</em> is not a <code>NULL</code> value.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
@@ -7184,6 +7134,8 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect1">
 <h2 id="opencl-runtime">5. The OpenCL Runtime</h2>
 <div class="sectionbody">
@@ -7209,32 +7161,34 @@
 application to perform appropriate synchronization.
 This is described in <a href="#shared-opencl-objects">Shared OpenCL Objects</a></p>
 </div>
-<div class="paragraph">
-<p>The function</p>
-</div>
-<div class="listingblock">
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_command_queue clCreateCommandQueueWithProperties(
+<div class="paragraph">
+<p>To create a host or device command-queue on a specific device, call the
+function:</p>
+</div>
+<div id="clCreateCommandQueueWithProperties" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_command_queue clCreateCommandQueueWithProperties(
     cl_context context,
     cl_device_id device,
-    <span class="directive">const</span> cl_queue_properties *properties,
-    cl_int *errcode_ret)</code></pre>
+    <span class="directive">const</span> cl_queue_properties* properties,
+    cl_int* errcode_ret);</code></pre>
 </div>
 </div>
-<div class="paragraph">
-<p>creates a host or device command-queue on a specific device.</p>
-</div>
-<div class="paragraph">
+<div class="ulist">
+<ul>
+<li>
 <p><em>context</em> must be a valid OpenCL context.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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
+<em>context</em> is created using <a href="#clCreateContext"><strong>clCreateContext</strong></a> 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">
+<a href="#clCreateContextFromType"><strong>clCreateContextFromType</strong></a>.</p>
+</li>
+<li>
 <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
@@ -7245,9 +7199,11 @@
 default value will be used.
 <em>properties</em> can be <code>NULL</code> in which case the default values for supported
 command-queue properties will be used.</p>
+</li>
+</ul>
 </div>
 <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>
+<caption class="title">Table 9. List of supported queue creation properties by <a href="#clCreateCommandQueueWithProperties">clCreateCommandQueueWithProperties</a></caption>
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -7262,39 +7218,39 @@
 </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"><a id="CL_QUEUE_PROPERTIES"></a><a href="#CL_QUEUE_PROPERTIES"><code>CL_&#8203;QUEUE_&#8203;PROPERTIES</code></a></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
+<p class="tableblock">        <a id="CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE"></a><a href="#CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE"><code>CL_&#8203;QUEUE_&#8203;OUT_&#8203;OF_&#8203;ORDER_&#8203;EXEC_&#8203;MODE_&#8203;ENABLE</code></a> - 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
+<p class="tableblock">        <a id="CL_QUEUE_PROFILING_ENABLE"></a><a href="#CL_QUEUE_PROFILING_ENABLE"><code>CL_&#8203;QUEUE_&#8203;PROFILING_&#8203;ENABLE</code></a> - 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.
-        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
+<p class="tableblock">        <a id="CL_QUEUE_ON_DEVICE"></a><a href="#CL_QUEUE_ON_DEVICE"><code>CL_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE</code></a> - Indicates that this is a device queue.
+        If <a href="#CL_QUEUE_ON_DEVICE"><code>CL_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE</code></a> is set,
+        <a href="#CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE"><code>CL_&#8203;QUEUE_&#8203;OUT_&#8203;OF_&#8203;ORDER_&#8203;EXEC_&#8203;MODE_&#8203;ENABLE</code></a><sup>1</sup> must also be set.</p>
+<p class="tableblock">        <a id="CL_QUEUE_ON_DEVICE_DEFAULT"></a><a href="#CL_QUEUE_ON_DEVICE_DEFAULT"><code>CL_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE_&#8203;DEFAULT</code></a><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 <a href="#CL_QUEUE_ON_DEVICE"><code>CL_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE</code></a>.</p>
+<p class="tableblock">        If <a href="#CL_QUEUE_PROPERTIES"><code>CL_&#8203;QUEUE_&#8203;PROPERTIES</code></a> 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"><a id="CL_QUEUE_SIZE"></a><a href="#CL_QUEUE_SIZE"><code>CL_&#8203;QUEUE_&#8203;SIZE</code></a></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
-        CL_QUEUE_PROPERTIES.
-        This must be a value ≤ CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE.</p>
+<p class="tableblock">        This can only be specified if <a href="#CL_QUEUE_ON_DEVICE"><code>CL_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE</code></a> is set in
+        <a href="#CL_QUEUE_PROPERTIES"><code>CL_&#8203;QUEUE_&#8203;PROPERTIES</code></a>.
+        This must be a value ≤ <a href="#CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE"><code>CL_&#8203;DEVICE_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE_&#8203;MAX_&#8203;SIZE</code></a>.</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>
+        <a href="#CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE"><code>CL_&#8203;DEVICE_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE_&#8203;PREFERRED_&#8203;SIZE</code></a>.</p>
+<p class="tableblock">        If <a href="#CL_QUEUE_SIZE"><code>CL_&#8203;QUEUE_&#8203;SIZE</code></a> is not specified, the device queue is created with
+        <a href="#CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE"><code>CL_&#8203;DEVICE_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE_&#8203;PREFERRED_&#8203;SIZE</code></a> as the size of the queue.</p></td>
 </tr>
 </tbody>
 </table>
@@ -7310,20 +7266,24 @@
 containing calls to get_default_queue are enqueued.
 There can only be one default device queue for each device within a
 context.
-<strong>clCreateCommandQueueWithProperties</strong> with CL_QUEUE_PROPERTIES set to
-CL_QUEUE_ON_DEVICE or CL_QUEUE_ON_DEVICE_DEFAULT will return the default
+<a href="#clCreateCommandQueueWithProperties"><strong>clCreateCommandQueueWithProperties</strong></a> with <a href="#CL_QUEUE_PROPERTIES"><code>CL_&#8203;QUEUE_&#8203;PROPERTIES</code></a> set to
+<a href="#CL_QUEUE_ON_DEVICE"><code>CL_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE</code></a> or <a href="#CL_QUEUE_ON_DEVICE_DEFAULT"><code>CL_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE_&#8203;DEFAULT</code></a> will return the default
 device queue that has already been created and increment its retain
 count by 1.</p>
+<div class="ulist">
+<ul>
+<li>
+<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>
+</li>
+</ul>
+</div>
 </dd>
 </dl>
 </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>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
+<p><a href="#clCreateCommandQueueWithProperties"><strong>clCreateCommandQueueWithProperties</strong></a> returns a valid non-zero command-queue
+and <em>errcode_ret</em> is set to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the command-queue 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>
@@ -7331,107 +7291,116 @@
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> 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>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
+<p><a href="#CL_INVALID_QUEUE_PROPERTIES"><code>CL_&#8203;INVALID_&#8203;QUEUE_&#8203;PROPERTIES</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clSetDefaultDeviceCommandQueue(cl_context context,
-                                      cl_device_id device,
-                                      cl_command_queue command_queue)</code></pre>
+<div class="paragraph">
+<p>To replace the default command queue on a device, call the function</p>
 </div>
+<div id="clSetDefaultDeviceCommandQueue" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clSetDefaultDeviceCommandQueue(
+    cl_context context,
+    cl_device_id device,
+    cl_command_queue command_queue);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>context</em> is the OpenCL context used to create <em>command_queue</em>.</p>
+</li>
+<li>
+<p><em>device</em> is a valid OpenCL device associated with <em>context</em>.</p>
+</li>
+<li>
+<p><em>command_queue</em> specifies a command queue object which replaces the
+default device command queue</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>replaces the default command queue on the <em>device</em>.</p>
+<p><a href="#clSetDefaultDeviceCommandQueue"><strong>clSetDefaultDeviceCommandQueue</strong></a> may be used to replace a default device
+command queue created with <a href="#clCreateCommandQueueWithProperties"><strong>clCreateCommandQueueWithProperties</strong></a> and the
+<a href="#CL_QUEUE_ON_DEVICE_DEFAULT"><code>CL_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE_&#8203;DEFAULT</code></a> flag.</p>
 </div>
 <div class="paragraph">
-<p><strong>clSetDefaultDeviceCommandQueue</strong> returns CL_SUCCESS if the function is
+<p><a href="#clSetDefaultDeviceCommandQueue"><strong>clSetDefaultDeviceCommandQueue</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clRetainCommandQueue(cl_command_queue command_queue)</code></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>
+<p>To retain a command queue, call the function</p>
+</div>
+<div id="clRetainCommandQueue" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clRetainCommandQueue(
+    cl_command_queue command_queue);</code></pre>
+</div>
 </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>
+<p><em>command_queue</em> specifies the command-queue to be retained.</p>
 </li>
 </ul>
 </div>
 <div class="paragraph">
-<p><strong>clCreateCommandQueueWithProperties</strong> performs an implicit retain.
+<p>The <em>command_queue</em> reference count is incremented.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clCreateCommandQueueWithProperties"><strong>clCreateCommandQueueWithProperties</strong></a> 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
@@ -7441,91 +7410,132 @@
 being valid.</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_int clReleaseCommandQueue(cl_command_queue command_queue)</code></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
+<p><a href="#clRetainCommandQueue"><strong>clRetainCommandQueue</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
 </div>
+</div>
+</div>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>To release a command queue, call the function</p>
+</div>
+<div id="clReleaseCommandQueue" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clReleaseCommandQueue(
+    cl_command_queue command_queue);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>command_queue</em> specifies the command-queue to be released.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The <em>command_queue</em> reference count is decremented.</p>
+</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
+<p><a href="#clReleaseCommandQueue"><strong>clReleaseCommandQueue</strong></a> 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>
+the object or by calling <a href="#clRetainCommandQueue"><strong>clRetainCommandQueue</strong></a> causes undefined behavior.</p>
 </div>
 <div class="paragraph">
-<p>The function</p>
+<p><a href="#clReleaseCommandQueue"><strong>clReleaseCommandQueue</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the function is executed
+successfully.
+Otherwise, it returns one of the following errors:</p>
 </div>
-<div class="listingblock">
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> if <em>command_queue</em> is not a valid
+command-queue.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetCommandQueueInfo(cl_command_queue command_queue,
-                             cl_command_queue_info param_name,
-                             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>can be used to query information about a command-queue.</p>
+<p>To query information about a command-queue, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clGetCommandQueueInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetCommandQueueInfo(
+    cl_command_queue command_queue,
+    cl_command_queue_info param_name,
+    size_t param_value_size,
+    <span class="directive">void</span>* param_value,
+    size_t* param_value_size_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>command_queue</em> specifies the command-queue being queried.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>param_name</em> specifies the information to query.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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="#command-queue-param-table">Command Queue Parameter</a> table.
 If <em>param_value</em> is <code>NULL</code>, it is ignored.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
 <p>The list of supported <em>param_name</em> values and the information returned in
-<em>param_value</em> by <strong>clGetCommandQueueInfo</strong> is described in the
+<em>param_value</em> by <a href="#clGetCommandQueueInfo"><strong>clGetCommandQueueInfo</strong></a> 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 stretch">
-<caption class="title">Table 10. List of supported param_names by <strong>clGetCommandQueueInfo</strong></caption>
+<caption class="title">Table 10. List of supported param_names by <a href="#clGetCommandQueueInfo">clGetCommandQueueInfo</a></caption>
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -7540,36 +7550,36 @@
 </thead>
 <tbody>
 <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"><a id="CL_QUEUE_CONTEXT"></a><a href="#CL_QUEUE_CONTEXT"><code>CL_&#8203;QUEUE_&#8203;CONTEXT</code></a></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"><a id="CL_QUEUE_DEVICE"></a><a href="#CL_QUEUE_DEVICE"><code>CL_&#8203;QUEUE_&#8203;DEVICE</code></a></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"><strong>CL_QUEUE_REFERENCE_COUNT</strong><sup>3</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_QUEUE_REFERENCE_COUNT"></a><a href="#CL_QUEUE_REFERENCE_COUNT"><code>CL_&#8203;QUEUE_&#8203;REFERENCE_&#8203;COUNT</code></a><sup>3</sup></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"><a id="CL_QUEUE_PROPERTIES"></a><a href="#CL_QUEUE_PROPERTIES"><code>CL_&#8203;QUEUE_&#8203;PROPERTIES</code></a></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>
+        <a href="#CL_QUEUE_PROPERTIES"><code>CL_&#8203;QUEUE_&#8203;PROPERTIES</code></a> passed in <em>properties</em> argument in
+        <a href="#clCreateCommandQueueWithProperties"><strong>clCreateCommandQueueWithProperties</strong></a>.</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"><a id="CL_QUEUE_SIZE"></a><a href="#CL_QUEUE_SIZE"><code>CL_&#8203;QUEUE_&#8203;SIZE</code></a></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"><a id="CL_QUEUE_DEVICE_DEFAULT"></a><a href="#CL_QUEUE_DEVICE_DEFAULT"><code>CL_&#8203;QUEUE_&#8203;DEVICE_&#8203;DEFAULT</code></a></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>
@@ -7586,28 +7596,28 @@
 </dl>
 </div>
 <div class="paragraph">
-<p><strong>clGetCommandQueueInfo</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clGetCommandQueueInfo"><strong>clGetCommandQueueInfo</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 the <a href="#command-queue-param-table">Command Queue
 Parameter</a> table, and <em>param_value</em> is not a <code>NULL</code> value.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
@@ -7635,6 +7645,8 @@
 </table>
 </div>
 </div>
+</div>
+</div>
 <div class="sect2">
 <h3 id="_buffer_objects">5.2. Buffer Objects</h3>
 <div class="paragraph">
@@ -7644,32 +7656,48 @@
 </div>
 <div class="sect3">
 <h4 id="_creating_buffer_objects">5.2.1. Creating Buffer Objects</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>A <strong>buffer object</strong> is created using the following function</p>
 </div>
-<div class="listingblock">
+<div id="clCreateBuffer" class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateBuffer(cl_context context,
-                      cl_mem_flags flags,
-                      size_t size,
-                      <span class="directive">void</span> *host_ptr,
-                      cl_int *errcode_ret)</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c++">cl_mem clCreateBuffer(
+    cl_context context,
+    cl_mem_flags flags,
+    size_t size,
+    <span class="directive">void</span>* host_ptr,
+    cl_int* errcode_ret);</code></pre>
 </div>
 </div>
-<div class="paragraph">
+<div class="ulist">
+<ul>
+<li>
 <p><em>context</em> is a valid OpenCL context used to create the buffer object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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.
 The <a href="#memory-flags-table">Memory Flags</a> table 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>
+If the value specified for <em>flags</em> is 0, the default is used which is
+<a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a>.</p>
+</li>
+<li>
+<p><em>size</em> is the size in bytes of the buffer memory object to be allocated.</p>
+</li>
+<li>
+<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 ≥ <em>size</em>
+bytes.</p>
+</li>
+</ul>
 </div>
 <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>
+<caption class="title">Table 11. List of supported memory flag values</caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -7682,36 +7710,36 @@
 </thead>
 <tbody>
 <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"><a id="CL_MEM_READ_WRITE"></a><a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a></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"><a id="CL_MEM_WRITE_ONLY"></a><a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a></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
+<p class="tableblock">    Reading from a buffer or image object created with <a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a>
     inside a kernel is undefined.</p>
-<p class="tableblock">    CL_MEM_READ_WRITE and CL_MEM_WRITE_ONLY are mutually exclusive.</p></td>
+<p class="tableblock">    <a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a> and <a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a> 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"><a id="CL_MEM_READ_ONLY"></a><a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a></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
+<p class="tableblock">    Writing to a buffer or image object created with <a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a> 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
+<p class="tableblock">    <a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a> or <a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a> and <a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a> 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"><a id="CL_MEM_USE_HOST_PTR"></a><a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a></p></td>
 <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>
+    <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> 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>
@@ -7720,27 +7748,27 @@
     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"><a id="CL_MEM_ALLOC_HOST_PTR"></a><a href="#CL_MEM_ALLOC_HOST_PTR"><code>CL_&#8203;MEM_&#8203;ALLOC_&#8203;HOST_&#8203;PTR</code></a></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>
+<p class="tableblock">    <a href="#CL_MEM_ALLOC_HOST_PTR"><code>CL_&#8203;MEM_&#8203;ALLOC_&#8203;HOST_&#8203;PTR</code></a> and <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> 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"><a id="CL_MEM_COPY_HOST_PTR"></a><a href="#CL_MEM_COPY_HOST_PTR"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;HOST_&#8203;PTR</code></a></p></td>
 <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 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 <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
+    available for reuse by the application when the <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> or
+    <a href="#clCreateImage"><strong>clCreateImage</strong></a> operation returns.</p>
+<p class="tableblock">    <a href="#CL_MEM_COPY_HOST_PTR"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;HOST_&#8203;PTR</code></a> and <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> are mutually exclusive.</p>
+<p class="tableblock">    <a href="#CL_MEM_COPY_HOST_PTR"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;HOST_&#8203;PTR</code></a> can be used with <a href="#CL_MEM_ALLOC_HOST_PTR"><code>CL_&#8203;MEM_&#8203;ALLOC_&#8203;HOST_&#8203;PTR</code></a> to
     initialize the contents of the cl_mem object allocated using
     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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_MEM_HOST_WRITE_ONLY"></a><a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a></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
@@ -7748,34 +7776,34 @@
     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"><a id="CL_MEM_HOST_READ_ONLY"></a><a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a></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>
+<p class="tableblock">    <a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a> and <a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a> 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"><a id="CL_MEM_HOST_NO_ACCESS"></a><a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a></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
-    CL_MEM_HOST_NO_ACCESS are mutually exclusive.</p></td>
+<p class="tableblock">    <a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a> or <a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a> and
+    <a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a> are mutually exclusive.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_MEM_KERNEL_READ_AND_WRITE"></a><a href="#CL_MEM_KERNEL_READ_AND_WRITE"><code>CL_&#8203;MEM_&#8203;KERNEL_&#8203;READ_&#8203;AND_&#8203;WRITE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">This flag is only used by <a href="#clGetSupportedImageFormats"><strong>clGetSupportedImageFormats</strong></a> to query image
+    formats that may be both read from and written to by the same kernel
+    instance.
+    To create a memory object that may be read from and written to use
+    <a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a>.</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 ≥ <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
+OpenCL buffers created with <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> 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>
@@ -7784,17 +7812,17 @@
 If <em>errcode_ret</em> is <code>NULL</code>, no error code is returned.</p>
 </div>
 <div class="paragraph">
-<p>If <strong>clCreateBuffer</strong> is called with CL_MEM_USE_HOST_PTR set in its <em>flags</em>
+<p>If <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> is called with <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> set in its <em>flags</em>
 argument, the contents of the memory pointed to by <em>host_ptr</em> at the time
-of the <strong>clCreateBuffer</strong> call define the initial contents of the
+of the <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> call define the initial contents of the
 buffer object.</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.
+<p>If <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> is called with a pointer returned by <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> as its
+<em>host_ptr</em> argument, and <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> is set in its <em>flags</em> argument,
+<a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> will succeed and return a valid non-zero buffer object as
+long as the <em>size</em> argument to <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> is no larger than the <em>size</em>
+argument passed in the original <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> 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
@@ -7802,45 +7830,45 @@
 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.
+<p><a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> returns a valid non-zero buffer object and <em>errcode_ret</em> is
+set to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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 as defined
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if values specified in <em>flags</em> are not valid as defined
 in the <a href="#memory-flags-table">Memory Flags</a> table.</p>
 </li>
 <li>
-<p>CL_INVALID_BUFFER_SIZE if <em>size</em> is 0<sup>4</sup>.</p>
+<p><a href="#CL_INVALID_BUFFER_SIZE"><code>CL_&#8203;INVALID_&#8203;BUFFER_&#8203;SIZE</code></a> if <em>size</em> is 0<sup>4</sup>.</p>
 </li>
 <li>
-<p>CL_INVALID_HOST_PTR if <em>host_ptr</em> is <code>NULL</code> 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 <code>NULL</code>
-but CL_MEM_COPY_HOST_PTR or CL_MEM_USE_HOST_PTR are not set in <em>flags</em>.</p>
+<p><a href="#CL_INVALID_HOST_PTR"><code>CL_&#8203;INVALID_&#8203;HOST_&#8203;PTR</code></a> if <em>host_ptr</em> is <code>NULL</code> and <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> or
+<a href="#CL_MEM_COPY_HOST_PTR"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;HOST_&#8203;PTR</code></a> are set in <em>flags</em> or if <em>host_ptr</em> is not <code>NULL</code>
+but <a href="#CL_MEM_COPY_HOST_PTR"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;HOST_&#8203;PTR</code></a> or <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> are not set in <em>flags</em>.</p>
 </li>
 <li>
-<p>CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 <div class="dlist">
 <dl>
 <dt class="hdlist1">4</dt>
 <dd>
-<p>Implementations may return CL_INVALID_BUFFER_SIZE if size is greater
-than CL_DEVICE_MAX_MEM_ALLOC_SIZE value specified in the
+<p>Implementations may return <a href="#CL_INVALID_BUFFER_SIZE"><code>CL_&#8203;INVALID_&#8203;BUFFER_&#8203;SIZE</code></a> if size is greater
+than <a href="#CL_DEVICE_MAX_MEM_ALLOC_SIZE"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;MEM_&#8203;ALLOC_&#8203;SIZE</code></a> value specified in the
 <a href="#device-queries-table">Device Queries</a> table for all devices in
 context.</p>
 </dd>
@@ -7849,52 +7877,58 @@
 </li>
 </ul>
 </div>
-<div class="paragraph">
-<p>The function</p>
 </div>
-<div class="listingblock">
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateSubBuffer(cl_mem buffer,
-                         cl_mem_flags flags,
-                         cl_buffer_create_type buffer_create_type,
-                         <span class="directive">const</span> <span class="directive">void</span> *buffer_create_info,
-                         cl_int *errcode_ret)</code></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>
+<p>To create a new buffer object (referred to as a sub-buffer object) from an
+existing buffer object, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clCreateSubBuffer" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_mem clCreateSubBuffer(
+    cl_mem buffer,
+    cl_mem_flags flags,
+    cl_buffer_create_type buffer_create_type,
+    <span class="directive">const</span> <span class="directive">void</span>* buffer_create_info,
+    cl_int* errcode_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>buffer</em> must be a valid buffer object and cannot be a sub-buffer object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 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
+If the <a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a>, <a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a>, or <a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a> values are
 not specified in <em>flags</em>, they are inherited from the corresponding memory
 access qualifiers associated with <em>buffer</em>.
-The CL_MEM_USE_HOST_PTR, CL_MEM_ALLOC_HOST_PTR and CL_MEM_COPY_HOST_PTR
+The <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a>, <a href="#CL_MEM_ALLOC_HOST_PTR"><code>CL_&#8203;MEM_&#8203;ALLOC_&#8203;HOST_&#8203;PTR</code></a>, and <a href="#CL_MEM_COPY_HOST_PTR"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;HOST_&#8203;PTR</code></a>
 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
+If <a href="#CL_MEM_COPY_HOST_PTR"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;HOST_&#8203;PTR</code></a> 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
+If the <a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a>, <a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a>, or
+<a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a> 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">
+</li>
+<li>
 <p><em>buffer_create_type</em> and <em>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 the
 <a href="#subbuffer-create-info-table">SubBuffer Attributes</a> table.</p>
+</li>
+</ul>
 </div>
 <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>
+<caption class="title">Table 12. List of supported buffer creation types by <a href="#clCreateSubBuffer">clCreateSubBuffer</a></caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -7907,101 +7941,78 @@
 </thead>
 <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 class="content"><div class="paragraph">
-<p>Create a buffer object that represents a
-    specific region in buffer.</p>
-</div>
-<div class="openblock">
-<div class="content">
-<div class="paragraph">
-<p>buffer_create_info is a pointer to the following structure:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code data-lang="c"><span class="keyword">typedef</span> <span class="keyword">struct</span> _cl_buffer_region {
-    size_t origin;
-    size_t size;
-} cl_buffer_region;</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>(<em>origin</em>, <em>size</em>) defines the offset and size in bytes in buffer.</p>
-</div>
-<div class="paragraph">
-<p>If buffer is created with CL_MEM_USE_HOST_PTR, the host_ptr associated with
-the buffer object returned is <em>host_ptr + origin</em>.</p>
-</div>
-<div class="paragraph">
-<p>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.</p>
-</div>
-<div class="paragraph">
-<p>CL_INVALID_VALUE is returned in errcode_ret if the region specified by
-(origin, size) is out of bounds in buffer.</p>
-</div>
-<div class="paragraph">
-<p>CL_INVALID_BUFFER_SIZE if size is 0.</p>
-</div>
-<div class="paragraph">
-<p>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>
-</div>
-</div>
-</div></div></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_BUFFER_CREATE_TYPE_REGION"></a><a href="#CL_BUFFER_CREATE_TYPE_REGION"><code>CL_&#8203;BUFFER_&#8203;CREATE_&#8203;TYPE_&#8203;REGION</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Create a buffer object that represents a specific region in <em>buffer</em>.</p>
+<p class="tableblock">    <em>buffer_create_info</em> is a pointer to a <strong><a href="#cl_buffer_region">cl_buffer_region</a></strong> structure
+    specifying a region of the buffer.</p>
+<p class="tableblock">    If <em>buffer</em> is created with <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a>, the <em>host_ptr</em>
+    associated with the buffer object returned is <em>host_ptr + origin</em>.</p>
+<p class="tableblock">    The buffer object returned references the data store allocated for
+    buffer and points to the region specified by <em>buffer_create_info</em> in
+    this data store.</p></td>
 </tr>
 </tbody>
 </table>
 <div class="paragraph">
-<p><strong>clCreateSubBuffer</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clCreateSubBuffer"><strong>clCreateSubBuffer</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>buffer</em> was created with <a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a> and
+<em>flags</em> specifies <a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a> or <a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a>, or if <em>buffer</em>
+was created with <a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a> and <em>flags</em> specifies
+<a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a> or <a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a>, or if <em>flags</em> specifies
+<a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> or <a href="#CL_MEM_ALLOC_HOST_PTR"><code>CL_&#8203;MEM_&#8203;ALLOC_&#8203;HOST_&#8203;PTR</code></a> or <a href="#CL_MEM_COPY_HOST_PTR"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;HOST_&#8203;PTR</code></a>.</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>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>buffer</em> was created with <a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a> and
+<em>flags</em> specify <a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a>, or if <em>buffer</em> was created with
+<a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a> and <em>flags</em> specify <a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a>, or if
+<em>buffer</em> was created with <a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a> and <em>flags</em> specify
+<a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a> or <a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a>.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if value specified in <em>buffer_create_type</em> is not
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if the value specified in <em>buffer_create_type</em> is not
 valid.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if value(s) specified in <em>buffer_create_info</em> (for a
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
 <code>NULL</code>.</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
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
+<li>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if the region specified by the <strong><a href="#cl_buffer_region">cl_buffer_region</a></strong>
+structure passed in <em>buffer_create_info</em> is out of bounds in <em>buffer</em>.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_BUFFER_SIZE"><code>CL_&#8203;INVALID_&#8203;BUFFER_&#8203;SIZE</code></a> if the <em>size</em> field of the <strong><a href="#cl_buffer_region">cl_buffer_region</a></strong>
+structure passed in <em>buffer_create_info</em> is 0.</p>
+</li>
+<li>
+<p><a href="#CL_MISALIGNED_SUB_BUFFER_OFFSET"><code>CL_&#8203;MISALIGNED_&#8203;SUB_&#8203;BUFFER_&#8203;OFFSET</code></a> if there are no devices in <em>context</em>
+associated with <em>buffer</em> for which the <em>origin</em> field of the
+<strong><a href="#cl_buffer_region">cl_buffer_region</a></strong> structure passed in <em>buffer_create_info</em> is
+aligned to the <a href="#CL_DEVICE_MEM_BASE_ADDR_ALIGN"><code>CL_&#8203;DEVICE_&#8203;MEM_&#8203;BASE_&#8203;ADDR_&#8203;ALIGN</code></a> value.</p>
+</li>
 </ul>
 </div>
 <div class="admonitionblock note">
@@ -8024,94 +8035,102 @@
 </table>
 </div>
 </div>
+</div>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>The <strong>cl_buffer_region</strong> structure specifies a region of a buffer object:</p>
+</div>
+<div id="cl_buffer_region" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++"><span class="keyword">typedef</span> <span class="keyword">struct</span> cl_buffer_region {
+    size_t    origin;
+    size_t    size;
+} cl_buffer_region;</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>origin</em> is the offset in bytes of the region.</p>
+</li>
+<li>
+<p><em>size</em> is the size in bytes of the region.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Constraints on the values of <em>origin</em> and <em>size</em> are specified for the
+<a href="#clCreateSubBuffer"><strong>clCreateSubBuffer</strong></a> function to which this structure is passed.</p>
+</div>
+</div>
+</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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueReadBuffer(cl_command_queue command_queue,
-                           cl_mem buffer,
-                           cl_bool blocking_read,
-                           size_t offset,
-                           size_t size,
-                           <span class="directive">void</span> *ptr,
-                           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="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueWriteBuffer(cl_command_queue command_queue,
-                            cl_mem buffer,
-                            cl_bool blocking_write,
-                            size_t offset,
-                            size_t size,
-                            <span class="directive">const</span> <span class="directive">void</span> *ptr,
-                            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>To read from a buffer object to host memory, call one of the functions</p>
+</div>
+<div id="clEnqueueReadBuffer" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueReadBuffer(
+    cl_command_queue command_queue,
+    cl_mem buffer,
+    cl_bool blocking_read,
+    size_t offset,
+    size_t size,
+    <span class="directive">void</span>* ptr,
+    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 id="clEnqueueWriteBuffer" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueWriteBuffer(
+    cl_command_queue command_queue,
+    cl_mem buffer,
+    cl_bool blocking_write,
+    size_t offset,
+    size_t size,
+    <span class="directive">const</span> <span class="directive">void</span>* ptr,
+    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="ulist">
+<ul>
+<li>
 <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">
+</li>
+<li>
 <p><em>buffer</em> refers to a valid buffer object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 <em>ptr</em>
-points to can be used by the application.</p>
-</div>
-<div class="paragraph">
-<p>If <em>blocking_write</em> is CL_TRUE, the write command is blocking and does not
-return until the command is complete, including transfer of the data.
-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">
+operations are <em>blocking</em> or <em>non-blocking</em> (see below).</p>
+</li>
+<li>
 <p><em>offset</em> is the offset in bytes in the buffer object to read from or write
 to.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>size</em> is the size in bytes of data being read or written.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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
@@ -8125,8 +8144,8 @@
 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">
+</li>
+<li>
 <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.
@@ -8136,132 +8155,17 @@
 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>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 <code>NULL</code> value.</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_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">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueReadBufferRect(cl_command_queue command_queue,
-                               cl_mem buffer,
-                               cl_bool blocking_read,
-                               <span class="directive">const</span> size_t *buffer_origin,
-                               <span class="directive">const</span> size_t *host_origin,
-                               <span class="directive">const</span> size_t *region,
-                               size_t buffer_row_pitch,
-                               size_t buffer_slice_pitch,
-                               size_t host_row_pitch,
-                               size_t host_slice_pitch,
-                               <span class="directive">void</span> *ptr,
-                               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="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueWriteBufferRect(cl_command_queue command_queue,
-                                cl_mem buffer,
-                                cl_bool blocking_write,
-                                <span class="directive">const</span> size_t *buffer_origin,
-                                <span class="directive">const</span> size_t *host_origin,
-                                <span class="directive">const</span> size_t *region,
-                                size_t buffer_row_pitch,
-                                size_t buffer_slice_pitch,
-                                size_t host_row_pitch,
-                                size_t host_slice_pitch,
-                                <span class="directive">const</span> <span class="directive">void</span> *ptr,
-                                cl_uint num_events_in_wait_list,
-                                <span class="directive">const</span> cl_event *event_wait_list,
-                                cl_event *event)</code></pre>
-</div>
+<p>If <em>blocking_read</em> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> i.e. the read command is blocking,
+<a href="#clEnqueueReadBuffer"><strong>clEnqueueReadBuffer</strong></a> 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><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.
+<p>If <em>blocking_read</em> is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> i.e. the read command is non-blocking,
+<a href="#clEnqueueReadBuffer"><strong>clEnqueueReadBuffer</strong></a> 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
@@ -8270,13 +8174,13 @@
 points to can be used by the application.</p>
 </div>
 <div class="paragraph">
-<p>If <em>blocking_write</em> is CL_TRUE, the write command is blocking and does not
+<p>If <em>blocking_write</em> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>, the write command is blocking and does not
 return until the command is complete, including transfer of the data.
 The memory pointed to by <em>ptr</em> can be reused by the application after the
-<strong>clEnqueueWriteBufferRect</strong> call returns.</p>
+<a href="#clEnqueueWriteBuffer"><strong>clEnqueueWriteBuffer</strong></a> 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
+<p>If <em>blocking_write</em> is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>, 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
@@ -8287,6 +8191,131 @@
 then be reused by the application.</p>
 </div>
 <div class="paragraph">
+<p><a href="#clEnqueueReadBuffer"><strong>clEnqueueReadBuffer</strong></a> and <a href="#clEnqueueWriteBuffer"><strong>clEnqueueWriteBuffer</strong></a> return <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the
+function is executed successfully.
+Otherwise, it returns one of the following errors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> if <em>command_queue</em> is not a valid host
+command-queue.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> if <em>buffer</em> is not a valid buffer object.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> value.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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><a href="#CL_MISALIGNED_SUB_BUFFER_OFFSET"><code>CL_&#8203;MISALIGNED_&#8203;SUB_&#8203;BUFFER_&#8203;OFFSET</code></a> 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 <a href="#CL_DEVICE_MEM_BASE_ADDR_ALIGN"><code>CL_&#8203;DEVICE_&#8203;MEM_&#8203;BASE_&#8203;ADDR_&#8203;ALIGN</code></a> value for device associated with
+<em>queue</em>.</p>
+</li>
+<li>
+<p><a href="#CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"><code>CL_&#8203;EXEC_&#8203;STATUS_&#8203;ERROR_&#8203;FOR_&#8203;EVENTS_&#8203;IN_&#8203;WAIT_&#8203;LIST</code></a> 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><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> if there is a failure to allocate
+memory for data store associated with <em>buffer</em>.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if <a href="#clEnqueueReadBuffer"><strong>clEnqueueReadBuffer</strong></a> is called on <em>buffer</em>
+which has been created with <a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a> or
+<a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a>.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if <a href="#clEnqueueWriteBuffer"><strong>clEnqueueWriteBuffer</strong></a> is called on <em>buffer</em>
+which has been created with <a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a> or
+<a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a>.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="openblock">
+<div class="content">
+<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 id="clEnqueueReadBufferRect" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueReadBufferRect(
+    cl_command_queue command_queue,
+    cl_mem buffer,
+    cl_bool blocking_read,
+    <span class="directive">const</span> size_t* buffer_offset,
+    <span class="directive">const</span> size_t* host_offset,
+    <span class="directive">const</span> size_t* region,
+    size_t buffer_row_pitch,
+    size_t buffer_slice_pitch,
+    size_t host_row_pitch,
+    size_t host_slice_pitch,
+    <span class="directive">void</span>* ptr,
+    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 id="clEnqueueWriteBufferRect" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueWriteBufferRect(
+    cl_command_queue command_queue,
+    cl_mem buffer,
+    cl_bool blocking_write,
+    <span class="directive">const</span> size_t* buffer_offset,
+    <span class="directive">const</span> size_t* host_offset,
+    <span class="directive">const</span> size_t* region,
+    size_t buffer_row_pitch,
+    size_t buffer_slice_pitch,
+    size_t host_row_pitch,
+    size_t host_slice_pitch,
+    <span class="directive">const</span> <span class="directive">void</span>* ptr,
+    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="ulist">
+<ul>
+<li>
+<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>
+</li>
+<li>
+<p><em>buffer</em> refers to a valid buffer object.</p>
+</li>
+<li>
+<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> (see below).</p>
+</li>
+<li>
 <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
@@ -8294,8 +8323,8 @@
 The offset in bytes is computed as <em>buffer_origin</em>[2] ×
 <em>buffer_slice_pitch</em> + <em>buffer_origin</em>[1] × <em>buffer_row_pitch</em> + 
 <em>buffer_origin</em>[0].</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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
@@ -8303,40 +8332,40 @@
 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">
+</li>
+<li>
 <p><em>region</em> defines the (<em>width</em> in bytes, <em>height</em> in rows, <em>depth</em> in slices)
 of the 2D or 3D rectangle being read or written.
 For a 2D rectangle copy, the <em>depth</em> value given by <em>region</em>[2] should be 1.
 The values in region cannot be 0.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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
@@ -8350,8 +8379,8 @@
 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">
+</li>
+<li>
 <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.
@@ -8361,92 +8390,126 @@
 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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clEnqueueReadBufferRect</strong> and <strong>clEnqueueWriteBufferRect</strong> return CL_SUCCESS
+<p>If <em>blocking_read</em> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> i.e. the read command is blocking,
+<a href="#clEnqueueReadBufferRect"><strong>clEnqueueReadBufferRect</strong></a> 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 <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> i.e. the read command is non-blocking,
+<a href="#clEnqueueReadBufferRect"><strong>clEnqueueReadBufferRect</strong></a> 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 <em>ptr</em>
+points to can be used by the application.</p>
+</div>
+<div class="paragraph">
+<p>If <em>blocking_write</em> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>, the write command is blocking and does not
+return until the command is complete, including transfer of the data.
+The memory pointed to by <em>ptr</em> can be reused by the application after the
+<a href="#clEnqueueWriteBufferRect"><strong>clEnqueueWriteBufferRect</strong></a> call returns.</p>
+</div>
+<div class="paragraph">
+<p>If <em>blocking_write</em> is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>, 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><a href="#clEnqueueReadBufferRect"><strong>clEnqueueReadBufferRect</strong></a> and <a href="#clEnqueueWriteBufferRect"><strong>clEnqueueWriteBufferRect</strong></a> return <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a>
 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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>
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if the region being read or written specified by
 (<em>buffer_origin</em>, <em>region</em>, <em>buffer_row_pitch</em>, <em>buffer_slice_pitch</em>) is
 out of bounds.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>ptr</em> is a <code>NULL</code> value.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>ptr</em> is a <code>NULL</code> value.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if any <em>region</em> array element is 0.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_MISALIGNED_SUB_BUFFER_OFFSET if <em>buffer</em> is a sub-buffer object and
+<p><a href="#CL_MISALIGNED_SUB_BUFFER_OFFSET"><code>CL_&#8203;MISALIGNED_&#8203;SUB_&#8203;BUFFER_&#8203;OFFSET</code></a> 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
+to <a href="#CL_DEVICE_MEM_BASE_ADDR_ALIGN"><code>CL_&#8203;DEVICE_&#8203;MEM_&#8203;BASE_&#8203;ADDR_&#8203;ALIGN</code></a> 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
+<p><a href="#CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"><code>CL_&#8203;EXEC_&#8203;STATUS_&#8203;ERROR_&#8203;FOR_&#8203;EVENTS_&#8203;IN_&#8203;WAIT_&#8203;LIST</code></a> 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
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if <a href="#clEnqueueReadBufferRect"><strong>clEnqueueReadBufferRect</strong></a> is called on <em>buffer</em>
+which has been created with <a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a> or
+<a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a>.</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>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if <a href="#clEnqueueWriteBufferRect"><strong>clEnqueueWriteBufferRect</strong></a> is called on <em>buffer</em>
+which has been created with <a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a> or
+<a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
@@ -8459,10 +8522,10 @@
 </td>
 <td class="content">
 <div class="paragraph">
-<p>Calling <strong>clEnqueueReadBuffer</strong> to read a region of the buffer object with the
+<p>Calling <a href="#clEnqueueReadBuffer"><strong>clEnqueueReadBuffer</strong></a> 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
+created with <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a>, must meet the following requirements in
 order to avoid undefined behavior:</p>
 </div>
 <div class="ulist">
@@ -8484,18 +8547,18 @@
 </ul>
 </div>
 <div class="paragraph">
-<p>Calling <strong>clEnqueueReadBufferRect</strong> to read a region of the buffer object with
+<p>Calling <a href="#clEnqueueReadBufferRect"><strong>clEnqueueReadBufferRect</strong></a> 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>
+<a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a>, must meet the same requirements given above for
+<a href="#clEnqueueReadBuffer"><strong>clEnqueueReadBuffer</strong></a>.</p>
 </div>
 <div class="paragraph">
-<p>Calling <strong>clEnqueueWriteBuffer</strong> to update the latest bits in a region of the
+<p>Calling <a href="#clEnqueueWriteBuffer"><strong>clEnqueueWriteBuffer</strong></a> 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> + <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
+object being written is created with <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a>, must meet the
 following requirements in order to avoid undefined behavior:</p>
 </div>
 <div class="ulist">
@@ -8516,11 +8579,11 @@
 </ul>
 </div>
 <div class="paragraph">
-<p>Calling <strong>clEnqueueWriteBufferRect</strong> to update the latest bits in a region of
+<p>Calling <a href="#clEnqueueWriteBufferRect"><strong>clEnqueueWriteBufferRect</strong></a> 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
+is created with <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a>, must meet the following requirements in
 order to avoid undefined behavior:</p>
 </div>
 <div class="ulist">
@@ -8544,44 +8607,48 @@
 </tr>
 </table>
 </div>
-<div class="paragraph">
-<p>The function</p>
 </div>
-<div class="listingblock">
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">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,
-                           <span class="directive">const</span> cl_event *event_wait_list,
-                           cl_event *event)</code></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>
+<p>To enqueue a command to copy a buffer object identified by <em>src_buffer</em> to
+another buffer object identified by <em>dst_buffer</em>, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueCopyBuffer" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">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,
+    <span class="directive">const</span> cl_event* event_wait_list,
+    cl_event* event);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <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">
+</li>
+<li>
 <p><em>src_offset</em> refers to the offset where to begin copying data from
 <em>src_buffer</em>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>dst_offset</em> refers to the offset where to begin copying data into
 <em>dst_buffer</em>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>size</em> refers to the size in bytes to copy.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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
@@ -8595,65 +8662,67 @@
 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">
+</li>
+<li>
 <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 <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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead.
+<a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a> can be used instead.
 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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clEnqueueCopyBuffer</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clEnqueueCopyBuffer"><strong>clEnqueueCopyBuffer</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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>,
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_MISALIGNED_SUB_BUFFER_OFFSET if <em>src_buffer</em> is a sub-buffer object
+<p><a href="#CL_MISALIGNED_SUB_BUFFER_OFFSET"><code>CL_&#8203;MISALIGNED_&#8203;SUB_&#8203;BUFFER_&#8203;OFFSET</code></a> 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
+aligned to <a href="#CL_DEVICE_MEM_BASE_ADDR_ALIGN"><code>CL_&#8203;DEVICE_&#8203;MEM_&#8203;BASE_&#8203;ADDR_&#8203;ALIGN</code></a> 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
+<p><a href="#CL_MISALIGNED_SUB_BUFFER_OFFSET"><code>CL_&#8203;MISALIGNED_&#8203;SUB_&#8203;BUFFER_&#8203;OFFSET</code></a> 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
+aligned to <a href="#CL_DEVICE_MEM_BASE_ADDR_ALIGN"><code>CL_&#8203;DEVICE_&#8203;MEM_&#8203;BASE_&#8203;ADDR_&#8203;ALIGN</code></a> 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
+<p><a href="#CL_MEM_COPY_OVERLAP"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;OVERLAP</code></a> 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.
@@ -8662,44 +8731,129 @@
 <em>dst_offset</em> + <em>size</em> 1.</p>
 </li>
 <li>
-<p>CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueCopyBufferRect(cl_command_queue command_queue,
-                               cl_mem src_buffer,
-                               cl_mem dst_buffer,
-                               <span class="directive">const</span> size_t *src_origin,
-                               <span class="directive">const</span> size_t *dst_origin,
-                               <span class="directive">const</span> 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,
-                               <span class="directive">const</span> cl_event *event_wait_list,
-                               cl_event *event)</code></pre>
+<div class="paragraph">
+<p>To enqueue a command to copy a 2D or 3D rectangular region from the buffer
+object identified by <em>src_buffer</em> to a 2D or 3D region in the buffer object
+identified by <em>dst_buffer</em>, call the function</p>
 </div>
+<div id="clEnqueueCopyBufferRect" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueCopyBufferRect(
+    cl_command_queue command_queue,
+    cl_mem src_buffer,
+    cl_mem dst_buffer,
+    <span class="directive">const</span> size_t* src_origin,
+    <span class="directive">const</span> size_t* dst_origin,
+    <span class="directive">const</span> 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,
+    <span class="directive">const</span> cl_event* event_wait_list,
+    cl_event* event);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<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>
+</li>
+<li>
+<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>
+</li>
+<li>
+<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>
+</li>
+<li>
+<p><em>region</em> defines the (<em>width</em> in bytes, <em>height</em> in rows, <em>depth</em> in slices)
+of the 2D or 3D rectangle being copied.
+For a 2D rectangle, the <em>depth</em> value given by <em>region</em>[2] should be 1.
+The values in region cannot be 0.</p>
+</li>
+<li>
+<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>
+</li>
+<li>
+<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>
+</li>
+<li>
+<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>
+</li>
+<li>
+<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>
+</li>
+<li>
+<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.
+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>
+</li>
+<li>
+<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 <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.
+<a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a> can be used instead.
+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>
+</li>
+</ul>
 </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</em> to a 2D or 3D region in the buffer object
-identified by <em>dst_buffer</em>.
-Copying begins at the source offset and destination offset which are
+<p>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
@@ -8726,212 +8880,135 @@
 </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</em> defines the (<em>width</em> in bytes, <em>height</em> in rows, <em>depth</em> in slices)
-of the 2D or 3D rectangle being copied.
-For a 2D rectangle, the <em>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 <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.
-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 <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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead.
-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>clEnqueueCopyBufferRect</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clEnqueueCopyBufferRect"><strong>clEnqueueCopyBufferRect</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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>,
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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,
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_MEM_COPY_OVERLAP if <em>src_buffer</em> and <em>dst_buffer</em> are the same buffer
+<p><a href="#CL_MEM_COPY_OVERLAP"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;OVERLAP</code></a> 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 <a href="#check-copy-overlap">CL_MEM_COPY_OVERLAP</a> for details on how
-to determine if source and destination regions overlap.</p>
+Refer to <a href="#check-copy-overlap">Checking for Memory Copy Overlap</a> 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
+<p><a href="#CL_MISALIGNED_SUB_BUFFER_OFFSET"><code>CL_&#8203;MISALIGNED_&#8203;SUB_&#8203;BUFFER_&#8203;OFFSET</code></a> 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
+aligned to <a href="#CL_DEVICE_MEM_BASE_ADDR_ALIGN"><code>CL_&#8203;DEVICE_&#8203;MEM_&#8203;BASE_&#8203;ADDR_&#8203;ALIGN</code></a> 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
+<p><a href="#CL_MISALIGNED_SUB_BUFFER_OFFSET"><code>CL_&#8203;MISALIGNED_&#8203;SUB_&#8203;BUFFER_&#8203;OFFSET</code></a> 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
+aligned to <a href="#CL_DEVICE_MEM_BASE_ADDR_ALIGN"><code>CL_&#8203;DEVICE_&#8203;MEM_&#8203;BASE_&#8203;ADDR_&#8203;ALIGN</code></a> value for device associated
 with <em>queue</em>.</p>
 </li>
 <li>
-<p>CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueFillBuffer(cl_command_queue command_queue,
-                           cl_mem buffer,
-                           <span class="directive">const</span> <span class="directive">void</span> *pattern,
-                           size_t pattern_size,
-                           size_t offset,
-                           size_t size,
-                           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>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>
+<p>To enqueue a command to fill a buffer object with a pattern of a given
+pattern size, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueFillBuffer" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueFillBuffer(
+    cl_command_queue command_queue,
+    cl_mem buffer,
+    <span class="directive">const</span> <span class="directive">void</span>* pattern,
+    size_t pattern_size,
+    size_t offset,
+    size_t size,
+    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="ulist">
+<ul>
+<li>
 <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">
+</li>
+<li>
 <p><em>buffer</em> is a valid buffer object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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.
@@ -8946,16 +9023,16 @@
 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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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
@@ -8969,135 +9046,152 @@
 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">
+</li>
+<li>
 <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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead.
+<a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a> can be used instead.
 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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clEnqueueFillBuffer</strong> returns CL_SUCCESS if the function is executed
+<p>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
+<a href="#clEnqueueFillBuffer"><strong>clEnqueueFillBuffer</strong></a>.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clEnqueueFillBuffer"><strong>clEnqueueFillBuffer</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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>
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> or if <em>pattern_size</em> is 0 or if
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>pattern</em> is <code>NULL</code> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_MISALIGNED_SUB_BUFFER_OFFSET if <em>buffer</em> is a sub-buffer object and
+<p><a href="#CL_MISALIGNED_SUB_BUFFER_OFFSET"><code>CL_&#8203;MISALIGNED_&#8203;SUB_&#8203;BUFFER_&#8203;OFFSET</code></a> 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>
+<a href="#CL_DEVICE_MEM_BASE_ADDR_ALIGN"><code>CL_&#8203;DEVICE_&#8203;MEM_&#8203;BASE_&#8203;ADDR_&#8203;ALIGN</code></a> value for device associated with <em>queue</em>.</p>
 </li>
 <li>
-<p>CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="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="openblock">
 <div class="content">
-<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,
-                        size_t offset,
-                        size_t size,
-                        cl_uint num_events_in_wait_list,
-                        <span class="directive">const</span> cl_event *event_wait_list,
-                        cl_event *event,
-                        cl_int *errcode_ret)</code></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>
+<p>To enqueue 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,
+call the function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueMapBuffer" class="listingblock">
+<div class="content">
+<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,
+    size_t offset,
+    size_t size,
+    cl_uint num_events_in_wait_list,
+    <span class="directive">const</span> cl_event* event_wait_list,
+    cl_event* event,
+    cl_int* errcode_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>command_queue</em> must be a valid host command-queue.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>blocking_map</em> indicates if the map operation is <em>blocking</em> or
 <em>non-blocking</em>.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>If <em>blocking_map</em> is CL_TRUE, <strong>clEnqueueMapBuffer</strong> does not return until the
+<p>If <em>blocking_map</em> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>, <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> 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>
+returned by <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a>.</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
+<p>If <em>blocking_map</em> is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> i.e. map operation is non-blocking, the
+pointer to the mapped region returned by <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> 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>
+of the mapped region using the pointer returned by <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a>.</p>
 </div>
-<div class="paragraph">
+<div class="ulist">
+<ul>
+<li>
 <p><em>map_flags</em> is a bit-field and is described in the
 <a href="#memory-map-flags-table">Memory Map Flags</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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
@@ -9111,8 +9205,8 @@
 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">
+</li>
+<li>
 <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.
@@ -9122,14 +9216,16 @@
 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">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </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>
+<p><a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> will return a pointer to the mapped region.
+The <em>errcode_ret</em> is set to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a>.</p>
 </div>
 <div class="paragraph">
 <p>A <code>NULL</code> pointer is returned otherwise with one of the following error
@@ -9138,66 +9234,66 @@
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_COMMAND_QUEUE if <em>command_queue</em> is not a valid host
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> if 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>
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <em>map_flags</em>
 are not valid.</p>
 </li>
 <li>
-<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_MISALIGNED_SUB_BUFFER_OFFSET if <em>buffer</em> is a sub-buffer object and
+<p><a href="#CL_MISALIGNED_SUB_BUFFER_OFFSET"><code>CL_&#8203;MISALIGNED_&#8203;SUB_&#8203;BUFFER_&#8203;OFFSET</code></a> 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
+to <a href="#CL_DEVICE_MEM_BASE_ADDR_ALIGN"><code>CL_&#8203;DEVICE_&#8203;MEM_&#8203;BASE_&#8203;ADDR_&#8203;ALIGN</code></a> 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
+<p><a href="#CL_MAP_FAILURE"><code>CL_&#8203;MAP_&#8203;FAILURE</code></a> 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>
+<a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> or <a href="#CL_MEM_ALLOC_HOST_PTR"><code>CL_&#8203;MEM_&#8203;ALLOC_&#8203;HOST_&#8203;PTR</code></a>.</p>
 </li>
 <li>
-<p>CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the map operation is
+<p><a href="#CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"><code>CL_&#8203;EXEC_&#8203;STATUS_&#8203;ERROR_&#8203;FOR_&#8203;EVENTS_&#8203;IN_&#8203;WAIT_&#8203;LIST</code></a> 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
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if <em>buffer</em> has been created with
+<a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a> or <a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a> and <a href="#CL_MAP_READ"><code>CL_&#8203;MAP_&#8203;READ</code></a> 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>
+<a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a> or <a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a> and <a href="#CL_MAP_WRITE"><code>CL_&#8203;MAP_&#8203;WRITE</code></a> or
+<a href="#CL_MAP_WRITE_INVALIDATE_REGION"><code>CL_&#8203;MAP_&#8203;WRITE_&#8203;INVALIDATE_&#8203;REGION</code></a> is set in <em>map_flags</em>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if mapping would lead to overlapping regions being
 mapped for writing.</p>
 </li>
 </ul>
@@ -9208,29 +9304,29 @@
 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>,
+<p>If the buffer object is created with <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> 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
+<p>The <em>host_ptr</em> specified in <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> to contain the latest bits
+in the region being mapped when the <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> command has
 completed.</p>
 </li>
 <li>
-<p>The pointer value returned by <strong>clEnqueueMapBuffer</strong> will be derived from
+<p>The pointer value returned by <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> 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>.
+<p>Mapped buffer objects are unmapped using <a href="#clEnqueueUnmapMemObject"><strong>clEnqueueUnmapMemObject</strong></a>.
 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 stretch">
-<caption class="title">Table 13. List of supported cl_map_flags values</caption>
+<caption class="title">Table 13. List of supported map flag values</caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -9243,39 +9339,41 @@
 </thead>
 <tbody>
 <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"><a id="CL_MAP_READ"></a><a href="#CL_MAP_READ"><code>CL_&#8203;MAP_&#8203;READ</code></a></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
+<p class="tableblock">    The pointer returned by <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> (<a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>) 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>
+    the <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> (<a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>) 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"><a id="CL_MAP_WRITE"></a><a href="#CL_MAP_WRITE"><code>CL_&#8203;MAP_&#8203;WRITE</code></a></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
+<p class="tableblock">    The pointer returned by <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> (<a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>) 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>
+    the <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> (<a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>) 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"><a id="CL_MAP_WRITE_INVALIDATE_REGION"></a><a href="#CL_MAP_WRITE_INVALIDATE_REGION"><code>CL_&#8203;MAP_&#8203;WRITE_&#8203;INVALIDATE_&#8203;REGION</code></a></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.
     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
+    pointer returned by <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> (<a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>) 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
+<p class="tableblock">    <a href="#CL_MAP_READ"><code>CL_&#8203;MAP_&#8203;READ</code></a> or <a href="#CL_MAP_WRITE"><code>CL_&#8203;MAP_&#8203;WRITE</code></a> and <a href="#CL_MAP_WRITE_INVALIDATE_REGION"><code>CL_&#8203;MAP_&#8203;WRITE_&#8203;INVALIDATE_&#8203;REGION</code></a> are
     mutually exclusive.</p></td>
 </tr>
 </tbody>
 </table>
 </div>
 </div>
+</div>
+</div>
 <div class="sect2">
 <h3 id="_image_objects">5.3. Image Objects</h3>
 <div class="paragraph">
@@ -9287,51 +9385,35 @@
 </div>
 <div class="sect3">
 <h4 id="_creating_image_objects">5.3.1. Creating Image Objects</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>A <strong>1D image</strong>, <strong>1D image buffer</strong>, <strong>1D image array</strong>, <strong>2D image</strong>, <strong>2D image
 array</strong> and <strong>3D image object</strong> can be created using the following function</p>
 </div>
-<div class="listingblock">
+<div id="clCreateImage" class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreateImage(cl_context context,
-                     cl_mem_flags flags,
-                     <span class="directive">const</span> cl_image_format *image_format,
-                     <span class="directive">const</span> cl_image_desc *image_desc,
-                     <span class="directive">void</span>  *host_ptr,
-                     cl_int *errcode_ret)</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c++">cl_mem clCreateImage(
+    cl_context context,
+    cl_mem_flags flags,
+    <span class="directive">const</span> cl_image_format* image_format,
+    <span class="directive">const</span> cl_image_desc* image_desc,
+    <span class="directive">void</span>* host_ptr,
+    cl_int* errcode_ret);</code></pre>
 </div>
 </div>
-<div class="paragraph">
+<div class="ulist">
+<ul>
+<li>
 <p><em>context</em> is a valid OpenCL context on which the image object is to be
 created.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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
 the <a href="#memory-flags-table">Memory Flags</a> table.</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 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
-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">
+</li>
+<li>
 <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 be created from a buffer by specifying a
@@ -9340,20 +9422,43 @@
 image object in the <em>image_desc</em>&#8594;_mem_object_.
 Refer to <a href="#image-format-descriptor">Image Format Descriptor</a> for a detailed
 description of the image format descriptor.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>image_desc</em> is a pointer to a structure that describes type and dimensions
 of the image to be allocated.
 Refer to <a href="#image-descriptor">Image Descriptor</a> for a detailed description
 of the image descriptor.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>.
+<a href="#clCreateImage"><strong>clCreateImage</strong></a>.
 Refer to table below for a description of how large the buffer that
 <em>host_ptr</em> points to must be.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For all image types except <a href="#CL_MEM_OBJECT_IMAGE1D_BUFFER"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE1D_&#8203;BUFFER</code></a>, if value specified
+for <em>flags</em> is 0, the default is used which is <a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a>.</p>
+</div>
+<div class="paragraph">
+<p>For <a href="#CL_MEM_OBJECT_IMAGE1D_BUFFER"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE1D_&#8203;BUFFER</code></a> image type, or an image created from
+another memory object (image or buffer), if the <a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a>,
+<a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a> or <a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a> values are not specified in <em>flags</em>,
+they are inherited from the corresponding memory access qualifiers associated
+with <em>mem_object</em>.
+The <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a>, <a href="#CL_MEM_ALLOC_HOST_PTR"><code>CL_&#8203;MEM_&#8203;ALLOC_&#8203;HOST_&#8203;PTR</code></a> and <a href="#CL_MEM_COPY_HOST_PTR"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;HOST_&#8203;PTR</code></a>
+values cannot be specified in <em>flags</em> but are inherited from the
+corresponding memory access qualifiers associated with <em>mem_object</em>.
+If <a href="#CL_MEM_COPY_HOST_PTR"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;HOST_&#8203;PTR</code></a> 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 <a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a>, <a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a> or
+<a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a> 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>
 <table class="tableblock frame-all grid-all stretch">
 <colgroup>
@@ -9368,27 +9473,27 @@
 </thead>
 <tbody>
 <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"><a id="CL_MEM_OBJECT_IMAGE1D"></a><a href="#CL_MEM_OBJECT_IMAGE1D"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE1D</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≥ 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"><a id="CL_MEM_OBJECT_IMAGE1D_BUFFER"></a><a href="#CL_MEM_OBJECT_IMAGE1D_BUFFER"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE1D_&#8203;BUFFER</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≥ 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"><a id="CL_MEM_OBJECT_IMAGE2D"></a><a href="#CL_MEM_OBJECT_IMAGE2D"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE2D</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≥ 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"><a id="CL_MEM_OBJECT_IMAGE3D"></a><a href="#CL_MEM_OBJECT_IMAGE3D"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE3D</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≥ 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"><a id="CL_MEM_OBJECT_IMAGE1D_ARRAY"></a><a href="#CL_MEM_OBJECT_IMAGE1D_ARRAY"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE1D_&#8203;ARRAY</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≥ 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"><a id="CL_MEM_OBJECT_IMAGE2D_ARRAY"></a><a href="#CL_MEM_OBJECT_IMAGE2D_ARRAY"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE2D_&#8203;ARRAY</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≥ image_slice_pitch × image_array_size</p></td>
 </tr>
 </tbody>
@@ -9424,8 +9529,8 @@
 If <em>errcode_ret</em> is <code>NULL</code>, 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
+<p><a href="#clCreateImage"><strong>clCreateImage</strong></a> returns a valid non-zero image object created and the
+<em>errcode_ret</em> is set to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
@@ -9433,142 +9538,184 @@
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if values specified in <em>flags</em> are not valid.</p>
 </li>
 <li>
-<p>CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if values specified in <em>image_format</em>
+<p><a href="#CL_INVALID_IMAGE_FORMAT_DESCRIPTOR"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;FORMAT_&#8203;DESCRIPTOR</code></a> if values specified in <em>image_format</em>
 are not valid or if <em>image_format</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_IMAGE_FORMAT_DESCRIPTOR if a 2D image is created from a
+<p><a href="#CL_INVALID_IMAGE_FORMAT_DESCRIPTOR"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;FORMAT_&#8203;DESCRIPTOR</code></a> 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
+<p><a href="#CL_INVALID_IMAGE_FORMAT_DESCRIPTOR"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;FORMAT_&#8203;DESCRIPTOR</code></a> 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</em> are not
+<p><a href="#CL_INVALID_IMAGE_DESCRIPTOR"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;DESCRIPTOR</code></a> if values specified in <em>image_desc</em> are not
 valid or if <em>image_desc</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_IMAGE_SIZE if image dimensions specified in <em>image_desc</em>
+<p><a href="#CL_INVALID_IMAGE_SIZE"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;SIZE</code></a> if image dimensions specified in <em>image_desc</em>
 exceed the maximum image dimensions described in the
 <a href="#device-queries-table">Device Queries</a> table for all devices
-in_context_.</p>
+in <em>context</em>.</p>
 </li>
 <li>
-<p>CL_INVALID_HOST_PTR if <em>host_ptr</em> is <code>NULL</code> 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 <code>NULL</code>
-but CL_MEM_COPY_HOST_PTR or CL_MEM_USE_HOST_PTR are not set in <em>flags</em>.</p>
+<p><a href="#CL_INVALID_HOST_PTR"><code>CL_&#8203;INVALID_&#8203;HOST_&#8203;PTR</code></a> if <em>host_ptr</em> is <code>NULL</code> and <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> or
+<a href="#CL_MEM_COPY_HOST_PTR"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;HOST_&#8203;PTR</code></a> are set in <em>flags</em> or if <em>host_ptr</em> is not <code>NULL</code>
+but <a href="#CL_MEM_COPY_HOST_PTR"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;HOST_&#8203;PTR</code></a> or <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> are not set in <em>flags</em>.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if an image is being created from another memory object
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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>
+<em>mem_object</em> was created with <a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a> and <em>flags</em> specifies
+<a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a> or <a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a>, 2) <em>mem_object</em> was created with
+<a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a> and <em>flags</em> specifies <a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a> or
+<a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a>, 3) <em>flags</em> specifies <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> or
+<a href="#CL_MEM_ALLOC_HOST_PTR"><code>CL_&#8203;MEM_&#8203;ALLOC_&#8203;HOST_&#8203;PTR</code></a> or <a href="#CL_MEM_COPY_HOST_PTR"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;HOST_&#8203;PTR</code></a>.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if an image is being created from another memory object
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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>
+<a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a> and <em>flags</em> specifies <a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a>, or
+if <em>mem_object</em> was created with <a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a> and <em>flags</em>
+specifies <a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a>, or if <em>mem_object</em> was created with
+<a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a> and_flags_ specifies <a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a> or
+<a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a>.</p>
 </li>
 <li>
-<p>CL_IMAGE_FORMAT_NOT_SUPPORTED if the <em>image_format</em> is not supported.</p>
+<p><a href="#CL_IMAGE_FORMAT_NOT_SUPPORTED"><code>CL_&#8203;IMAGE_&#8203;FORMAT_&#8203;NOT_&#8203;SUPPORTED</code></a> 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
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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 the
-<a href="#device-queries-table">Device Queries</a> table is CL_FALSE).</p>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if there are no devices in <em>context</em> that support
+images (i.e. <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> specified in the
+<a href="#device-queries-table">Device Queries</a> table is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>).</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
 </div>
+</div>
+</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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c"><span class="keyword">typedef</span> <span class="keyword">struct</span> cl_image_format {
-    cl_channel_order image_channel_order;
-    cl_channel_type image_channel_data_type;
+<div class="paragraph">
+<p>The <strong>cl_image_format</strong> image format descriptor structure describes an image
+format, and is defined as:</p>
+</div>
+<div id="cl_image_format" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++"><span class="keyword">typedef</span> <span class="keyword">struct</span> cl_image_format {
+    cl_channel_order    image_channel_order;
+    cl_channel_type     image_channel_data_type;
 } cl_image_format;</code></pre>
 </div>
 </div>
-<div class="paragraph">
+<div class="ulist">
+<ul>
+<li>
 <p><code>image_channel_order</code> 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 the <a href="#image-channel-order-table">Image Channel
 Order</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><code>image_channel_data_type</code> describes the size of the channel data type.
 The list of supported values is described in the
 <a href="#image-channel-data-types-table">Image Channel Data Types</a> table.
 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>
+</li>
+</ul>
 </div>
 <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%;">
+<col style="width: 50%;">
+<col style="width: 50%;">
 </colgroup>
 <thead>
 <tr>
-<th class="tableblock halign-left valign-top">Enum values that can be specified in channel_order</th>
+<th class="tableblock halign-left valign-top">Image Channel Order</th>
+<th class="tableblock halign-left valign-top">Description</th>
 </tr>
 </thead>
 <tbody>
 <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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_R"></a><a href="#CL_R"><code>CL_&#8203;R</code></a>, <a id="CL_A"></a><a href="#CL_A"><code>CL_&#8203;A</code></a>,</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Single channel image formats where the single channel represents a <code>RED</code> or <code>ALPHA</code> component.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_INTENSITY</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEPTH"></a><a href="#CL_DEPTH"><code>CL_&#8203;DEPTH</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A single channel image format where the single channel represents a <code>DEPTH</code> component.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_LUMINANCE</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_LUMINANCE"></a><a href="#CL_LUMINANCE"><code>CL_&#8203;LUMINANCE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A single channel image format where the single channel represents a <code>LUMINANCE</code> value.
+    The <code>LUMINANCE</code> value is replicated into the <code>RED</code>, <code>GREEN</code>, and <code>BLUE</code> components.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEPTH</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INTENSITY"></a><a href="#CL_INTENSITY"><code>CL_&#8203;INTENSITY</code></a>,</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A single channel image format where the single channel represents an <code>INTENSITY</code> value.
+    The <code>INTENSITY</code> value is replicated into the <code>RED</code>, <code>GREEN</code>, <code>BLUE</code>, and <code>ALPHA</code> components.</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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_RG"></a><a href="#CL_RG"><code>CL_&#8203;RG</code></a>, <a id="CL_RA"></a><a href="#CL_RA"><code>CL_&#8203;RA</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Two channel image formats.
+    The first channel always represents a <code>RED</code> component.
+    The second channel represents a <code>GREEN</code> component or an <code>ALPHA</code> component.</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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_Rx"></a><a href="#CL_Rx"><code>CL_&#8203;Rx</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A two channel image format, where the first channel represents a <code>RED</code> component and the second channel is ignored.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_RGBA</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_RGB"></a><a href="#CL_RGB"><code>CL_&#8203;RGB</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A three channel image format, where the three channels represent <code>RED</code>, <code>GREEN</code>, and <code>BLUE</code> components.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_sRGB</strong>, <strong>CL_sRGBx</strong>, <strong>CL_sRGBA</strong>, or <strong>CL_sBGRA</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_RGx"></a><a href="#CL_RGx"><code>CL_&#8203;RGx</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A three channel image format, where the first two channels represent <code>RED</code> and <code>GREEN</code> components and the third channel is ignored.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_ARGB</strong>, <strong>CL_BGRA</strong>, or <strong>CL_ABGR</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_RGBA"></a><a href="#CL_RGBA"><code>CL_&#8203;RGBA</code></a>, <a id="CL_ARGB"></a><a href="#CL_ARGB"><code>CL_&#8203;ARGB</code></a>, <a id="CL_BGRA"></a><a href="#CL_BGRA"><code>CL_&#8203;BGRA</code></a>, <a id="CL_ABGR"></a><a href="#CL_ABGR"><code>CL_&#8203;ABGR</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Four channel image formats, where the four channels represent <code>RED</code>, <code>GREEN</code>, <code>BLUE</code>, and <code>ALPHA</code> components.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_RGBx"></a><a href="#CL_RGBx"><code>CL_&#8203;RGBx</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A four channel image format, where the first three channels represent <code>RED</code>, <code>GREEN</code>, and <code>BLUE</code> components and the fourth channel is ignored.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_sRGB"></a><a href="#CL_sRGB"><code>CL_&#8203;sRGB</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A three channel image format, where the three channels represent <code>RED</code>, <code>GREEN</code>, and <code>BLUE</code> components in the sRGB color space.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_sRGBA"></a><a href="#CL_sRGBA"><code>CL_&#8203;sRGBA</code></a>, <a id="CL_sBGRA"></a><a href="#CL_sBGRA"><code>CL_&#8203;sBGRA</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Four channel image formats, where the first three channels represent <code>RED</code>, <code>GREEN</code>, and <code>BLUE</code> components in the sRGB color space.
+    The fourth channel represents an <code>ALPHA</code> component.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_sRGBx"></a><a href="#CL_sRGBx"><code>CL_&#8203;sRGBx</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">A four channel image format, where the three channels represent <code>RED</code>, <code>GREEN</code>, and <code>BLUE</code> components in the sRGB color space.
+    The fourth channel is ignored.</p></td>
 </tr>
 </tbody>
 </table>
@@ -9586,79 +9733,79 @@
 </thead>
 <tbody>
 <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"><a id="CL_SNORM_INT8"></a><a href="#CL_SNORM_INT8"><code>CL_&#8203;SNORM_&#8203;INT8</code></a></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"><a id="CL_SNORM_INT16"></a><a href="#CL_SNORM_INT16"><code>CL_&#8203;SNORM_&#8203;INT16</code></a></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"><a id="CL_UNORM_INT8"></a><a href="#CL_UNORM_INT8"><code>CL_&#8203;UNORM_&#8203;INT8</code></a></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"><a id="CL_UNORM_INT16"></a><a href="#CL_UNORM_INT16"><code>CL_&#8203;UNORM_&#8203;INT16</code></a></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"><a id="CL_UNORM_SHORT_565"></a><a href="#CL_UNORM_SHORT_565"><code>CL_&#8203;UNORM_&#8203;SHORT_&#8203;565</code></a></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>
+    The channel order must be <a href="#CL_RGB"><code>CL_&#8203;RGB</code></a> or <a href="#CL_RGBx"><code>CL_&#8203;RGBx</code></a>.</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"><a id="CL_UNORM_SHORT_555"></a><a href="#CL_UNORM_SHORT_555"><code>CL_&#8203;UNORM_&#8203;SHORT_&#8203;555</code></a></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>
+    The channel order must be <a href="#CL_RGB"><code>CL_&#8203;RGB</code></a> or <a href="#CL_RGBx"><code>CL_&#8203;RGBx</code></a>.</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"><a id="CL_UNORM_INT_101010"></a><a href="#CL_UNORM_INT_101010"><code>CL_&#8203;UNORM_&#8203;INT_&#8203;101010</code></a></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>
+    The channel order must be <a href="#CL_RGB"><code>CL_&#8203;RGB</code></a> or <a href="#CL_RGBx"><code>CL_&#8203;RGBx</code></a>.</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"><a id="CL_UNORM_INT_101010_2"></a><a href="#CL_UNORM_INT_101010_2"><code>CL_&#8203;UNORM_&#8203;INT_&#8203;101010_&#8203;2</code></a></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>
+    The channel order must be <a href="#CL_RGBA"><code>CL_&#8203;RGBA</code></a>.</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"><a id="CL_SIGNED_INT8"></a><a href="#CL_SIGNED_INT8"><code>CL_&#8203;SIGNED_&#8203;INT8</code></a></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"><a id="CL_SIGNED_INT16"></a><a href="#CL_SIGNED_INT16"><code>CL_&#8203;SIGNED_&#8203;INT16</code></a></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"><a id="CL_SIGNED_INT32"></a><a href="#CL_SIGNED_INT32"><code>CL_&#8203;SIGNED_&#8203;INT32</code></a></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"><a id="CL_UNSIGNED_INT8"></a><a href="#CL_UNSIGNED_INT8"><code>CL_&#8203;UNSIGNED_&#8203;INT8</code></a></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"><a id="CL_UNSIGNED_INT16"></a><a href="#CL_UNSIGNED_INT16"><code>CL_&#8203;UNSIGNED_&#8203;INT16</code></a></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"><a id="CL_UNSIGNED_INT32"></a><a href="#CL_UNSIGNED_INT32"><code>CL_&#8203;UNSIGNED_&#8203;INT32</code></a></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"><a id="CL_HALF_FLOAT"></a><a href="#CL_HALF_FLOAT"><code>CL_&#8203;HALF_&#8203;FLOAT</code></a></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"><a id="CL_FLOAT"></a><a href="#CL_FLOAT"><code>CL_&#8203;FLOAT</code></a></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,
-<code>image_channel_order</code> = CL_RGBA, and <code>image_channel_data_type</code> =
-CL_UNORM_INT8.
+<code>image_channel_order</code> = <a href="#CL_RGBA"><code>CL_&#8203;RGBA</code></a>, and <code>image_channel_data_type</code> =
+<a href="#CL_UNORM_INT8"><code>CL_&#8203;UNORM_&#8203;INT8</code></a>.
 The memory layout of this image format is described below:</p>
 </div>
 <table class="tableblock frame-all grid-all" style="width: 60%;">
@@ -9701,8 +9848,8 @@
 </tbody>
 </table>
 <div class="paragraph">
-<p>Similar, if <code>image_channel_order</code> = CL_RGBA and <code>image_channel_data_type</code> =
-CL_SIGNED_INT16, the memory layout of this image format is described below:</p>
+<p>Similar, if <code>image_channel_order</code> = <a href="#CL_RGBA"><code>CL_&#8203;RGBA</code></a> and <code>image_channel_data_type</code> =
+<a href="#CL_SIGNED_INT16"><code>CL_&#8203;SIGNED_&#8203;INT16</code></a>, the memory layout of this image format is described below:</p>
 </div>
 <table class="tableblock frame-all grid-all" style="width: 60%;">
 <colgroup>
@@ -9744,20 +9891,20 @@
 </tbody>
 </table>
 <div class="paragraph">
-<p><code>image_channel_data_type</code> 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
+<p><code>image_channel_data_type</code> values of <a href="#CL_UNORM_SHORT_565"><code>CL_&#8203;UNORM_&#8203;SHORT_&#8203;565</code></a>, <a href="#CL_UNORM_SHORT_555"><code>CL_&#8203;UNORM_&#8203;SHORT_&#8203;555</code></a>,
+<a href="#CL_UNORM_INT_101010"><code>CL_&#8203;UNORM_&#8203;INT_&#8203;101010</code></a>, and <a href="#CL_UNORM_INT_101010_2"><code>CL_&#8203;UNORM_&#8203;INT_&#8203;101010_&#8203;2</code></a> 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
+For <a href="#CL_UNORM_SHORT_565"><code>CL_&#8203;UNORM_&#8203;SHORT_&#8203;565</code></a>, 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
+For <a href="#CL_UNORM_SHORT_555"><code>CL_&#8203;UNORM_&#8203;SHORT_&#8203;555</code></a>, 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
+For <a href="#CL_UNORM_INT_101010"><code>CL_&#8203;UNORM_&#8203;INT_&#8203;101010</code></a>, 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
+For <a href="#CL_UNORM_INT_101010_2"><code>CL_&#8203;UNORM_&#8203;INT_&#8203;101010_&#8203;2</code></a>, 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">
@@ -9765,67 +9912,78 @@
 number of bits in <code>image_channel_data_type</code>.
 If the image format specified by <code>image_channel_order</code>, and
 <code>image_channel_data_type</code> cannot be supported by the OpenCL implementation,
-then the call to <strong>clCreateImage</strong> will return a <code>NULL</code> memory object.</p>
+then the call to <a href="#clCreateImage"><strong>clCreateImage</strong></a> will return a <code>NULL</code> memory object.</p>
+</div>
+</div>
 </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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c"><span class="keyword">typedef</span> <span class="keyword">struct</span> 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;
+<div class="paragraph">
+<p>The <strong>cl_image_desc</strong> image descriptor structure describes the type and
+dimensions of an image or image array, and is defined as:</p>
+</div>
+<div id="cl_image_desc" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++"><span class="keyword">typedef</span> <span class="keyword">struct</span> 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;
+    <span class="preprocessor">#ifdef</span> __GNUC__
+    __extension__   <span class="comment">/* Prevents warnings about anonymous union in -pedantic builds */</span>
+<span class="preprocessor">#endif</span>
+    <span class="keyword">union</span> {
+        cl_mem buffer;
+        cl_mem mem_object;
+    };
 } cl_image_desc;</code></pre>
 </div>
 </div>
-<div class="paragraph">
+<div class="ulist">
+<ul>
+<li>
 <p><code>image_type</code> 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">
+<a href="#CL_MEM_OBJECT_IMAGE1D"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE1D</code></a>, <a href="#CL_MEM_OBJECT_IMAGE1D_BUFFER"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE1D_&#8203;BUFFER</code></a>,
+<a href="#CL_MEM_OBJECT_IMAGE1D_ARRAY"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE1D_&#8203;ARRAY</code></a>, <a href="#CL_MEM_OBJECT_IMAGE2D"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE2D</code></a>,
+<a href="#CL_MEM_OBJECT_IMAGE2D_ARRAY"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE2D_&#8203;ARRAY</code></a>, or <a href="#CL_MEM_OBJECT_IMAGE3D"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE3D</code></a>.</p>
+</li>
+<li>
 <p><code>image_width</code> is the width of the image in pixels.
 For a 2D image and image array, the image width must be a value ≥ 1 and
-≤ CL_DEVICE_IMAGE2D_MAX_WIDTH.
+≤ <a href="#CL_DEVICE_IMAGE2D_MAX_WIDTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE2D_&#8203;MAX_&#8203;WIDTH</code></a>.
 For a 3D image, the image width must be a value ≥1 and ≤
-CL_DEVICE_IMAGE3D_MAX_WIDTH.
+<a href="#CL_DEVICE_IMAGE3D_MAX_WIDTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;WIDTH</code></a>.
 For a 1D image buffer, the image width must be a value ≥1 and ≤
-CL_DEVICE_IMAGE_MAX_BUFFER_SIZE.
+<a href="#CL_DEVICE_IMAGE_MAX_BUFFER_SIZE"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;MAX_&#8203;BUFFER_&#8203;SIZE</code></a>.
 For a 1D image and 1D image array, the image width must be a value ≥1
-and ≤ CL_DEVICE_IMAGE2D_MAX_WIDTH.</p>
-</div>
-<div class="paragraph">
-<p><code>image_height</code> is height of the image in pixels.
+and ≤ <a href="#CL_DEVICE_IMAGE2D_MAX_WIDTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE2D_&#8203;MAX_&#8203;WIDTH</code></a>.</p>
+</li>
+<li>
+<p><code>image_height</code> is the 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 ≥ 1 and
-≤ CL_DEVICE_IMAGE2D_MAX_HEIGHT.
+≤ <a href="#CL_DEVICE_IMAGE2D_MAX_HEIGHT"><code>CL_&#8203;DEVICE_&#8203;IMAGE2D_&#8203;MAX_&#8203;HEIGHT</code></a>.
 For a 3D image, the image height must be a value ≥ 1 and ≤
-CL_DEVICE_IMAGE3D_MAX_HEIGHT.</p>
-</div>
-<div class="paragraph">
+<a href="#CL_DEVICE_IMAGE3D_MAX_HEIGHT"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;HEIGHT</code></a>.</p>
+</li>
+<li>
 <p><code>image_depth</code> is the depth of the image in pixels.
 This is only used if the image is a 3D image and must be a value ≥ 1 and
-≤ CL_DEVICE_IMAGE3D_MAX_DEPTH.</p>
-</div>
-<div class="paragraph">
+≤ <a href="#CL_DEVICE_IMAGE3D_MAX_DEPTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;DEPTH</code></a>.</p>
+</li>
+<li>
 <p><code>image_array_size</code><sup>5</sup> 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 <code>image_array_size</code>, if specified, must be a value ≥ 1 and
-≤ CL_DEVICE_IMAGE_MAX_ARRAY_SIZE.</p>
-</div>
+≤ <a href="#CL_DEVICE_IMAGE_MAX_ARRAY_SIZE"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;MAX_&#8203;ARRAY_&#8203;SIZE</code></a>.</p>
 <div class="dlist">
 <dl>
 <dt class="hdlist1">5</dt>
@@ -9835,7 +9993,8 @@
 </dd>
 </dl>
 </div>
-<div class="paragraph">
+</li>
+<li>
 <p><code>image_row_pitch</code> is the scan-line pitch in bytes.
 This must be 0 if <em>host_ptr</em> is <code>NULL</code> and can be either 0 or ≥
 <code>image_width</code> × size of element in bytes if <em>host_ptr</em> is not <code>NULL</code>.
@@ -9845,10 +10004,10 @@
 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 <code>image_desc</code>&#8594;`mem_object` and that support images.</p>
-</div>
-<div class="paragraph">
+<a href="#CL_DEVICE_IMAGE_PITCH_ALIGNMENT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;PITCH_&#8203;ALIGNMENT</code></a> value for all devices in the context
+associated with the buffer specified by <code>mem_object</code> that support images.</p>
+</li>
+<li>
 <p><code>image_slice_pitch</code> 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 <code>NULL</code>.
@@ -9860,22 +10019,21 @@
 array or 3D image and <code>image_row_pitch</code> for a 1D image array.
 If <code>image_slice_pitch</code> is not 0, it must be a multiple of the
 <code>image_row_pitch</code>.</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 <code>image_type</code> is
-CL_MEM_OBJECT_IMAGE1D_BUFFER or CL_MEM_OBJECT_IMAGE2D<sup>6</sup>.
-mem_object can be an image object if <code>image_type</code> is
-CL_MEM_OBJECT_IMAGE2D<sup>7</sup>.
+</li>
+<li>
+<p><code>num_mip_levels</code> and <code>num_samples</code> must be 0.</p>
+</li>
+<li>
+<p><code>mem_object</code> may refer to a valid buffer or image memory object.
+<code>mem_object</code> can be a buffer memory object if <code>image_type</code> is
+<a href="#CL_MEM_OBJECT_IMAGE1D_BUFFER"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE1D_&#8203;BUFFER</code></a> or <a href="#CL_MEM_OBJECT_IMAGE2D"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE2D</code></a><sup>6</sup>.
+<code>mem_object</code> can be an image object if <code>image_type</code> is
+<a href="#CL_MEM_OBJECT_IMAGE2D"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE2D</code></a><sup>7</sup>.
 Otherwise it must be <code>NULL</code>.
 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="dlist">
 <dl>
 <dt class="hdlist1">6</dt>
@@ -9890,8 +10048,11 @@
 </dd>
 </dl>
 </div>
+</li>
+</ul>
+</div>
 <div class="paragraph">
-<p>For a 1D image buffer create from a buffer object, the <code>image_width</code> ×
+<p>For a 1D image buffer created from a buffer object, the <code>image_width</code> ×
 size of element in bytes must be ≤ 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>
@@ -9899,7 +10060,7 @@
 <div class="paragraph">
 <p>For a 2D image created from a buffer object, the <code>image_row_pitch</code> ×
 <code>image_height</code> must be ≤ size of the buffer object specified by
-mem_object.
+<code>mem_object</code>.
 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
@@ -9907,45 +10068,48 @@
 </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>
+in the image descriptor except for <code>mem_object</code> must match the image
+descriptor information associated with <code>mem_object</code>.</p>
 </div>
 <div class="paragraph">
 <p>Image elements are stored according to their image format as described in
 <a href="#image-format-descriptor">Image Format Descriptor</a>.</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
+<p>If the buffer object specified by <code>mem_object</code> was created with
+<a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a>, the <em>host_ptr</em> specified to <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> must be
+aligned to the maximum of the <a href="#CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;BASE_&#8203;ADDRESS_&#8203;ALIGNMENT</code></a> value
 for all devices in the context associated with the buffer specified by
-mem_object and that support images.</p>
+<code>mem_object</code> 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
+create a new image object that shares the image data store with <code>mem_object</code>
 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>
+<p>all the values specified in <code>image_desc</code> except for <code>mem_object</code> must match
+the image descriptor information associated with <code>mem_object</code>.</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.
+<p>The <code>image_desc</code> used for creation of <code>mem_object</code> may not be
+equivalent to image descriptor information associated with <code>mem_object</code>.
 To ensure the values in <em>`image_desc</em> will match one can query
-mem_object for associated information using <strong>clGetImageInfo</strong> function
+<code>mem_object</code> for associated information using <a href="#clGetImageInfo"><strong>clGetImageInfo</strong></a> function
 described in <a href="#image-object-queries">Image Object Queries</a>.</p>
 </li>
 <li>
 <p>the channel data type specified in <code>image_format</code> must match the channel
-data type associated with mem_object.
+data type associated with <code>mem_object</code>.
 The channel order values<sup>8</sup> supported are:</p>
-<div class="openblock">
-<div class="content">
+</li>
+</ul>
+</div>
+</div>
+</div>
 <table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 50%;">
@@ -9954,54 +10118,55 @@
 <thead>
 <tr>
 <th class="tableblock halign-left valign-top"><code>image_channel_order</code> specified in <code>image_format</code></th>
-<th class="tableblock halign-left valign-top">image channel order of mem_object</th>
+<th class="tableblock halign-left valign-top">image channel order of <code>mem_object</code></th>
 </tr>
 </thead>
 <tbody>
 <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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_sBGRA"><code>CL_&#8203;sBGRA</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_BGRA"><code>CL_&#8203;BGRA</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_BGRA"><code>CL_&#8203;BGRA</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_sBGRA"><code>CL_&#8203;sBGRA</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_sRGBA"><code>CL_&#8203;sRGBA</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_RGBA"><code>CL_&#8203;RGBA</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_RGBA"><code>CL_&#8203;RGBA</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_sRGBA"><code>CL_&#8203;sRGBA</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_sRGB"><code>CL_&#8203;sRGB</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_RGB"><code>CL_&#8203;RGB</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_RGB"><code>CL_&#8203;RGB</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_sRGB"><code>CL_&#8203;sRGB</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_sRGBx"><code>CL_&#8203;sRGBx</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_RGBx"><code>CL_&#8203;RGBx</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_RGBx"><code>CL_&#8203;RGBx</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_sRGBx"><code>CL_&#8203;sRGBx</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_DEPTH"><code>CL_&#8203;DEPTH</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_R"><code>CL_&#8203;R</code></a></p></td>
 </tr>
 </tbody>
 </table>
-</div>
-</div>
-</li>
+<div class="openblock">
+<div class="content">
+<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>
+channel order of <code>mem_object</code>.</p>
 <div class="dlist">
 <dl>
 <dt class="hdlist1">8</dt>
@@ -10043,120 +10208,114 @@
 </div>
 </div>
 </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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">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)</code></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>
+<p>To get the list of image formats supported by an OpenCL implementation for a
+specified context, image type, and allocation information, call the function</p>
+</div>
+<div id="clGetSupportedImageFormats" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">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);</code></pre>
+</div>
 </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
+</li>
+<li>
+<p><em>flags</em> is a bit-field that is used to specify usage
+information about the image formats being queried and is described in
 the <a href="#memory-flags-table">Memory Flags</a> table.
-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.
+<em>flags</em> may be <a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a> to query image formats that may be read
+from and written to by different kernel instances when correctly ordered by
+event dependencies, or <a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a> to query image formats that may
+be read from by a kernel, or <a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a> to query image formats that
+may be written to by a kernel, or <a href="#CL_MEM_KERNEL_READ_AND_WRITE"><code>CL_&#8203;MEM_&#8203;KERNEL_&#8203;READ_&#8203;AND_&#8203;WRITE</code></a> to query
+image formats that may be both read from and written to by the same kernel
+instance.
 Please see <a href="#image-format-mapping">Image Format Mapping</a> for clarification.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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.</p>
-</div>
-<div class="paragraph">
+<a href="#CL_MEM_OBJECT_IMAGE1D"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE1D</code></a>, <a href="#CL_MEM_OBJECT_IMAGE1D_BUFFER"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE1D_&#8203;BUFFER</code></a>, <a href="#CL_MEM_OBJECT_IMAGE2D"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE2D</code></a>,
+<a href="#CL_MEM_OBJECT_IMAGE3D"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE3D</code></a>, <a href="#CL_MEM_OBJECT_IMAGE1D_ARRAY"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE1D_&#8203;ARRAY</code></a>, or
+<a href="#CL_MEM_OBJECT_IMAGE2D_ARRAY"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;IMAGE2D_&#8203;ARRAY</code></a>.</p>
+</li>
+<li>
 <p><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">
+</li>
+<li>
 <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 <code>NULL</code>, it is ignored.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><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 <code>NULL</code>, it is ignored.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clGetSupportedImageFormats</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clGetSupportedImageFormats"><strong>clGetSupportedImageFormats</strong></a> returns a union of image formats supported by
+all devices in the context.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clGetSupportedImageFormats"><strong>clGetSupportedImageFormats</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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 the <a href="#device-queries-table">Device
-Queries</a> table 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
+<p>If <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> specified in the <a href="#device-queries-table">Device
+Queries</a> table is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>, the values assigned to
+<a href="#CL_DEVICE_MAX_READ_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;READ_&#8203;IMAGE_&#8203;ARGS</code></a>, <a href="#CL_DEVICE_MAX_WRITE_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WRITE_&#8203;IMAGE_&#8203;ARGS</code></a>
+<a href="#CL_DEVICE_IMAGE2D_MAX_WIDTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE2D_&#8203;MAX_&#8203;WIDTH</code></a>, <a href="#CL_DEVICE_IMAGE2D_MAX_HEIGHT"><code>CL_&#8203;DEVICE_&#8203;IMAGE2D_&#8203;MAX_&#8203;HEIGHT</code></a>
+<a href="#CL_DEVICE_IMAGE3D_MAX_WIDTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;WIDTH</code></a>, <a href="#CL_DEVICE_IMAGE3D_MAX_HEIGHT"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;HEIGHT</code></a>
+<a href="#CL_DEVICE_IMAGE3D_MAX_DEPTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;DEPTH</code></a>, and <a href="#CL_DEVICE_MAX_SAMPLERS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;SAMPLERS</code></a> by the implementation
 must be greater than or equal to the minimum values specified in the
 <a href="#device-queries-table">Device Queries</a> table.</p>
 </div>
+</div>
+</div>
 <div class="sect4">
-<h5 id="_minimum_list_of_supported_image_formats">Minimum List of Supported Image Formats</h5>
+<h5 id="minimum-list-of-supported-image-formats">Minimum List of Supported Image Formats</h5>
+<div class="openblock">
+<div class="content">
 <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
@@ -10166,7 +10325,7 @@
 Kernel Read Or Write</a> table.</p>
 </div>
 <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>
+<caption class="title">Table 16. Minimum list of required image formats: kernel read or write</caption>
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -10182,67 +10341,67 @@
 <tbody>
 <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<br>
-        CL_UNORM_INT16<br>
-        CL_SNORM_INT8<br>
-        CL_SNORM_INT16<br>
-        CL_SIGNED_INT8<br>
-        CL_SIGNED_INT16<br>
-        CL_SIGNED_INT32<br>
-        CL_UNSIGNED_INT8<br>
-        CL_UNSIGNED_INT16<br>
-        CL_UNSIGNED_INT32<br>
-        CL_HALF_FLOAT<br>
-        CL_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_R"><code>CL_&#8203;R</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_UNORM_INT8"><code>CL_&#8203;UNORM_&#8203;INT8</code></a><br>
+        <a href="#CL_UNORM_INT16"><code>CL_&#8203;UNORM_&#8203;INT16</code></a><br>
+        <a href="#CL_SNORM_INT8"><code>CL_&#8203;SNORM_&#8203;INT8</code></a><br>
+        <a href="#CL_SNORM_INT16"><code>CL_&#8203;SNORM_&#8203;INT16</code></a><br>
+        <a href="#CL_SIGNED_INT8"><code>CL_&#8203;SIGNED_&#8203;INT8</code></a><br>
+        <a href="#CL_SIGNED_INT16"><code>CL_&#8203;SIGNED_&#8203;INT16</code></a><br>
+        <a href="#CL_SIGNED_INT32"><code>CL_&#8203;SIGNED_&#8203;INT32</code></a><br>
+        <a href="#CL_UNSIGNED_INT8"><code>CL_&#8203;UNSIGNED_&#8203;INT8</code></a><br>
+        <a href="#CL_UNSIGNED_INT16"><code>CL_&#8203;UNSIGNED_&#8203;INT16</code></a><br>
+        <a href="#CL_UNSIGNED_INT32"><code>CL_&#8203;UNSIGNED_&#8203;INT32</code></a><br>
+        <a href="#CL_HALF_FLOAT"><code>CL_&#8203;HALF_&#8203;FLOAT</code></a><br>
+        <a href="#CL_FLOAT"><code>CL_&#8203;FLOAT</code></a></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<sup>9</sup></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_UNORM_INT16<br>
-        CL_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_DEPTH"><code>CL_&#8203;DEPTH</code></a><sup>9</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_UNORM_INT16"><code>CL_&#8203;UNORM_&#8203;INT16</code></a><br>
+        <a href="#CL_FLOAT"><code>CL_&#8203;FLOAT</code></a></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<br>
-        CL_UNORM_INT16<br>
-        CL_SNORM_INT8<br>
-        CL_SNORM_INT16<br>
-        CL_SIGNED_INT8<br>
-        CL_SIGNED_INT16<br>
-        CL_SIGNED_INT32<br>
-        CL_UNSIGNED_INT8<br>
-        CL_UNSIGNED_INT16<br>
-        CL_UNSIGNED_INT32<br>
-        CL_HALF_FLOAT<br>
-        CL_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_RG"><code>CL_&#8203;RG</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_UNORM_INT8"><code>CL_&#8203;UNORM_&#8203;INT8</code></a><br>
+        <a href="#CL_UNORM_INT16"><code>CL_&#8203;UNORM_&#8203;INT16</code></a><br>
+        <a href="#CL_SNORM_INT8"><code>CL_&#8203;SNORM_&#8203;INT8</code></a><br>
+        <a href="#CL_SNORM_INT16"><code>CL_&#8203;SNORM_&#8203;INT16</code></a><br>
+        <a href="#CL_SIGNED_INT8"><code>CL_&#8203;SIGNED_&#8203;INT8</code></a><br>
+        <a href="#CL_SIGNED_INT16"><code>CL_&#8203;SIGNED_&#8203;INT16</code></a><br>
+        <a href="#CL_SIGNED_INT32"><code>CL_&#8203;SIGNED_&#8203;INT32</code></a><br>
+        <a href="#CL_UNSIGNED_INT8"><code>CL_&#8203;UNSIGNED_&#8203;INT8</code></a><br>
+        <a href="#CL_UNSIGNED_INT16"><code>CL_&#8203;UNSIGNED_&#8203;INT16</code></a><br>
+        <a href="#CL_UNSIGNED_INT32"><code>CL_&#8203;UNSIGNED_&#8203;INT32</code></a><br>
+        <a href="#CL_HALF_FLOAT"><code>CL_&#8203;HALF_&#8203;FLOAT</code></a><br>
+        <a href="#CL_FLOAT"><code>CL_&#8203;FLOAT</code></a></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<br>
-        CL_UNORM_INT16<br>
-        CL_SNORM_INT8<br>
-        CL_SNORM_INT16<br>
-        CL_SIGNED_INT8<br>
-        CL_SIGNED_INT16<br>
-        CL_SIGNED_INT32<br>
-        CL_UNSIGNED_INT8<br>
-        CL_UNSIGNED_INT16<br>
-        CL_UNSIGNED_INT32<br>
-        CL_HALF_FLOAT<br>
-        CL_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_RGBA"><code>CL_&#8203;RGBA</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_UNORM_INT8"><code>CL_&#8203;UNORM_&#8203;INT8</code></a><br>
+        <a href="#CL_UNORM_INT16"><code>CL_&#8203;UNORM_&#8203;INT16</code></a><br>
+        <a href="#CL_SNORM_INT8"><code>CL_&#8203;SNORM_&#8203;INT8</code></a><br>
+        <a href="#CL_SNORM_INT16"><code>CL_&#8203;SNORM_&#8203;INT16</code></a><br>
+        <a href="#CL_SIGNED_INT8"><code>CL_&#8203;SIGNED_&#8203;INT8</code></a><br>
+        <a href="#CL_SIGNED_INT16"><code>CL_&#8203;SIGNED_&#8203;INT16</code></a><br>
+        <a href="#CL_SIGNED_INT32"><code>CL_&#8203;SIGNED_&#8203;INT32</code></a><br>
+        <a href="#CL_UNSIGNED_INT8"><code>CL_&#8203;UNSIGNED_&#8203;INT8</code></a><br>
+        <a href="#CL_UNSIGNED_INT16"><code>CL_&#8203;UNSIGNED_&#8203;INT16</code></a><br>
+        <a href="#CL_UNSIGNED_INT32"><code>CL_&#8203;UNSIGNED_&#8203;INT32</code></a><br>
+        <a href="#CL_HALF_FLOAT"><code>CL_&#8203;HALF_&#8203;FLOAT</code></a><br>
+        <a href="#CL_FLOAT"><code>CL_&#8203;FLOAT</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_BGRA"><code>CL_&#8203;BGRA</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_UNORM_INT8"><code>CL_&#8203;UNORM_&#8203;INT8</code></a></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<sup>10</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_sRGBA"><code>CL_&#8203;sRGBA</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_UNORM_INT8"><code>CL_&#8203;UNORM_&#8203;INT8</code></a><sup>10</sup></p></td>
 </tr>
 </tbody>
 </table>
@@ -10250,7 +10409,7 @@
 <dl>
 <dt class="hdlist1">9</dt>
 <dd>
-<p>CL_DEPTH channel order is supported only for 2D image and 2D image array
+<p><a href="#CL_DEPTH"><code>CL_&#8203;DEPTH</code></a> channel order is supported only for 2D image and 2D image array
 objects.</p>
 </dd>
 <dt class="hdlist1">10</dt>
@@ -10269,8 +10428,10 @@
 <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 stretch">
-<caption class="title">Table 17. Min. list of supported image formats kernel read and write</caption>
+<div id="min-supported-same-kernel-table" class="paragraph">
+<p>_Minimum list of required image formats: kernel read and write</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -10286,33 +10447,35 @@
 <tbody>
 <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<br>
-        CL_SIGNED_INT8<br>
-        CL_SIGNED_INT16<br>
-        CL_SIGNED_INT32<br>
-        CL_UNSIGNED_INT8<br>
-        CL_UNSIGNED_INT16<br>
-        CL_UNSIGNED_INT32<br>
-        CL_HALF_FLOAT<br>
-        CL_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_R"><code>CL_&#8203;R</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_UNORM_INT8"><code>CL_&#8203;UNORM_&#8203;INT8</code></a><br>
+        <a href="#CL_SIGNED_INT8"><code>CL_&#8203;SIGNED_&#8203;INT8</code></a><br>
+        <a href="#CL_SIGNED_INT16"><code>CL_&#8203;SIGNED_&#8203;INT16</code></a><br>
+        <a href="#CL_SIGNED_INT32"><code>CL_&#8203;SIGNED_&#8203;INT32</code></a><br>
+        <a href="#CL_UNSIGNED_INT8"><code>CL_&#8203;UNSIGNED_&#8203;INT8</code></a><br>
+        <a href="#CL_UNSIGNED_INT16"><code>CL_&#8203;UNSIGNED_&#8203;INT16</code></a><br>
+        <a href="#CL_UNSIGNED_INT32"><code>CL_&#8203;UNSIGNED_&#8203;INT32</code></a><br>
+        <a href="#CL_HALF_FLOAT"><code>CL_&#8203;HALF_&#8203;FLOAT</code></a><br>
+        <a href="#CL_FLOAT"><code>CL_&#8203;FLOAT</code></a></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<br>
-        CL_SIGNED_INT8<br>
-        CL_SIGNED_INT16<br>
-        CL_SIGNED_INT32<br>
-        CL_UNSIGNED_INT8<br>
-        CL_UNSIGNED_INT16<br>
-        CL_UNSIGNED_INT32<br>
-        CL_HALF_FLOAT<br>
-        CL_FLOAT</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_RGBA"><code>CL_&#8203;RGBA</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_UNORM_INT8"><code>CL_&#8203;UNORM_&#8203;INT8</code></a><br>
+        <a href="#CL_SIGNED_INT8"><code>CL_&#8203;SIGNED_&#8203;INT8</code></a><br>
+        <a href="#CL_SIGNED_INT16"><code>CL_&#8203;SIGNED_&#8203;INT16</code></a><br>
+        <a href="#CL_SIGNED_INT32"><code>CL_&#8203;SIGNED_&#8203;INT32</code></a><br>
+        <a href="#CL_UNSIGNED_INT8"><code>CL_&#8203;UNSIGNED_&#8203;INT8</code></a><br>
+        <a href="#CL_UNSIGNED_INT16"><code>CL_&#8203;UNSIGNED_&#8203;INT16</code></a><br>
+        <a href="#CL_UNSIGNED_INT32"><code>CL_&#8203;UNSIGNED_&#8203;INT32</code></a><br>
+        <a href="#CL_HALF_FLOAT"><code>CL_&#8203;HALF_&#8203;FLOAT</code></a><br>
+        <a href="#CL_FLOAT"><code>CL_&#8203;FLOAT</code></a></p></td>
 </tr>
 </tbody>
 </table>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="image-format-mapping">Image format mapping to OpenCL kernel language image access qualifiers</h5>
 <div class="paragraph">
@@ -10321,7 +10484,7 @@
 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 <strong>clGetSupportedImageFormats</strong> with the given flag
+formats returned by <a href="#clGetSupportedImageFormats"><strong>clGetSupportedImageFormats</strong></a> with the given flag
 arguments in the <a href="#image-format-mapping-table">Image Format Mapping</a> table
 are permitted.
 It is not valid to pass an image supporting writing as both a <code>read_only</code>
@@ -10329,7 +10492,7 @@
 parameter and any other image parameter.</p>
 </div>
 <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>
+<caption class="title">Table 17. Mapping from format flags passed to <a href="#clGetSupportedImageFormats">clGetSupportedImageFormats</a> to OpenCL kernel language image access qualifiers</caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -10343,19 +10506,19 @@
 <tbody>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><code>read_only</code></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_MEM_READ_ONLY,<br>
-    CL_MEM_READ_WRITE,<br>
-    CL_MEM_KERNEL_READ_AND_WRITE</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a>,<br>
+    <a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a>,<br>
+    <a href="#CL_MEM_KERNEL_READ_AND_WRITE"><code>CL_&#8203;MEM_&#8203;KERNEL_&#8203;READ_&#8203;AND_&#8203;WRITE</code></a></p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><code>write_only</code></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_MEM_WRITE_ONLY,<br>
-    CL_MEM_READ_WRITE,<br>
-    CL_MEM_KERNEL_READ_AND_WRITE</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a>,<br>
+    <a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a>,<br>
+    <a href="#CL_MEM_KERNEL_READ_AND_WRITE"><code>CL_&#8203;MEM_&#8203;KERNEL_&#8203;READ_&#8203;AND_&#8203;WRITE</code></a></p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><code>read_write</code></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_MEM_KERNEL_READ_AND_WRITE</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#CL_MEM_KERNEL_READ_AND_WRITE"><code>CL_&#8203;MEM_&#8203;KERNEL_&#8203;READ_&#8203;AND_&#8203;WRITE</code></a></p></td>
 </tr>
 </tbody>
 </table>
@@ -10363,86 +10526,60 @@
 </div>
 <div class="sect3">
 <h4 id="_reading_writing_and_copying_image_objects">5.3.3. Reading, Writing and Copying Image Objects</h4>
+<div class="openblock">
+<div class="content">
 <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 id="clEnqueueReadImage" class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueReadImage(cl_command_queue command_queue,
-                          cl_mem image,
-                          cl_bool blocking_read,
-                          <span class="directive">const</span> size_t *origin,
-                          <span class="directive">const</span> size_t *region,
-                          size_t row_pitch,
-                          size_t slice_pitch,
-                          <span class="directive">void</span> *ptr,
-                          cl_uint num_events_in_wait_list,
-                          <span class="directive">const</span> cl_event *event_wait_list,
-                          cl_event *event)</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueReadImage(
+    cl_command_queue command_queue,
+    cl_mem image,
+    cl_bool blocking_read,
+    <span class="directive">const</span> size_t* origin,
+    <span class="directive">const</span> size_t* region,
+    size_t row_pitch,
+    size_t slice_pitch,
+    <span class="directive">void</span>* ptr,
+    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="listingblock">
+<div id="clEnqueueWriteImage" class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueWriteImage(cl_command_queue command_queue,
-                           cl_mem image,
-                           cl_bool blocking_write,
-                           <span class="directive">const</span> size_t *origin,
-                           <span class="directive">const</span> size_t *region,
-                           size_t input_row_pitch,
-                           size_t input_slice_pitch,
-                           <span class="directive">const</span> <span class="directive">void</span> *ptr,
-                           cl_uint num_events_in_wait_list,
-                           <span class="directive">const</span> cl_event *event_wait_list,
-                           cl_event *event)</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueWriteImage(
+    cl_command_queue command_queue,
+    cl_mem image,
+    cl_bool blocking_write,
+    <span class="directive">const</span> size_t* origin,
+    <span class="directive">const</span> size_t* region,
+    size_t input_row_pitch,
+    size_t input_slice_pitch,
+    <span class="directive">const</span> <span class="directive">void</span>* ptr,
+    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">
+<div class="ulist">
+<ul>
+<li>
 <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">
+</li>
+<li>
 <p><em>image</em> refers to a valid image or image array object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 <em>ptr</em>
-points to can be used by the application.</p>
-</div>
-<div class="paragraph">
-<p>If <em>blocking_write</em> is CL_TRUE, the write command is blocking and does not
-return until the command is complete, including transfer of the data.
-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">
+</li>
+<li>
 <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.
@@ -10454,8 +10591,8 @@
 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">
+</li>
+<li>
 <p><em>region</em> defines the (<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
@@ -10465,19 +10602,19 @@
 <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.
+</li>
+<li>
+<p><em>row_pitch</em> in <a href="#clEnqueueReadImage"><strong>clEnqueueReadImage</strong></a> and <em>input_row_pitch</em> in
+<a href="#clEnqueueWriteImage"><strong>clEnqueueWriteImage</strong></a> 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
+</li>
+<li>
+<p><em>slice_pitch</em> in <a href="#clEnqueueReadImage"><strong>clEnqueueReadImage</strong></a> and <em>input_slice_pitch</em> in
+<a href="#clEnqueueWriteImage"><strong>clEnqueueWriteImage</strong></a> 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.
@@ -10485,14 +10622,14 @@
 <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">
+</li>
+<li>
 <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
 <a href="#alignment-app-data-types">Alignment of Application Data Types</a>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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
@@ -10506,8 +10643,8 @@
 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">
+</li>
+<li>
 <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.
@@ -10517,78 +10654,112 @@
 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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clEnqueueReadImage</strong> and <strong>clEnqueueWriteImage</strong> return CL_SUCCESS if the
+<p>If <em>blocking_read</em> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> i.e. the read command is blocking,
+<a href="#clEnqueueReadImage"><strong>clEnqueueReadImage</strong></a> 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 <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> i.e. the read command is non-blocking,
+<a href="#clEnqueueReadImage"><strong>clEnqueueReadImage</strong></a> 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 <em>ptr</em>
+points to can be used by the application.</p>
+</div>
+<div class="paragraph">
+<p>If <em>blocking_write</em> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>, the write command is blocking and does not
+return until the command is complete, including transfer of the data.
+The memory pointed to by <em>ptr</em> can be reused by the application after the
+<a href="#clEnqueueWriteImage"><strong>clEnqueueWriteImage</strong></a> call returns.</p>
+</div>
+<div class="paragraph">
+<p>If <em>blocking_write</em> is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>, 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><a href="#clEnqueueReadImage"><strong>clEnqueueReadImage</strong></a> and <a href="#clEnqueueWriteImage"><strong>clEnqueueWriteImage</strong></a> return <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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>
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> value.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if values in <em>origin</em> and <em>region</em> do not follow rules
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_INVALID_IMAGE_SIZE if image dimensions (image width, height,
+<p><a href="#CL_INVALID_IMAGE_SIZE"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;SIZE</code></a> 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
+<p><a href="#CL_IMAGE_FORMAT_NOT_SUPPORTED"><code>CL_&#8203;IMAGE_&#8203;FORMAT_&#8203;NOT_&#8203;SUPPORTED</code></a> 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
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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 the
-<a href="#device-queries-table">Device Queries</a> table is CL_FALSE).</p>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if the device associated with <em>command_queue</em> does
+not support images (i.e. <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> specified in the
+<a href="#device-queries-table">Device Queries</a> table is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>).</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>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if <a href="#clEnqueueReadImage"><strong>clEnqueueReadImage</strong></a> is called on <em>image</em> which
+has been created with <a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a> or <a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a>.</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>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if <a href="#clEnqueueWriteImage"><strong>clEnqueueWriteImage</strong></a> is called on <em>image</em> which
+has been created with <a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a> or <a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a>.</p>
 </li>
 <li>
-<p>CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read and write
+<p><a href="#CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"><code>CL_&#8203;EXEC_&#8203;STATUS_&#8203;ERROR_&#8203;FOR_&#8203;EVENTS_&#8203;IN_&#8203;WAIT_&#8203;LIST</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
@@ -10601,11 +10772,11 @@
 </td>
 <td class="content">
 <div class="paragraph">
-<p>Calling <strong>clEnqueueReadImage</strong> to read a region of the <em>image</em> with the <em>ptr</em>
+<p>Calling <a href="#clEnqueueReadImage"><strong>clEnqueueReadImage</strong></a> to read a region of the <em>image</em> with the <em>ptr</em>
 argument value set to <em>host_ptr</em> + (<em>origin</em>[2] × <em>image slice pitch</em>
 +  <em>origin</em>[1] × <em>image row pitch</em> + <em>origin</em>[0] × <em>bytes
 per pixel</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
+when the <em>image</em> being read is created with <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a>, must meet
 the following requirements in order to avoid undefined behavior:</p>
 </div>
 <div class="ulist">
@@ -10616,7 +10787,7 @@
 </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>
+<a href="#clEnqueueReadImage"><strong>clEnqueueReadImage</strong></a> must be set to the image row pitch and slice pitch.</p>
 </li>
 <li>
 <p>The image object is not mapped.</p>
@@ -10628,12 +10799,12 @@
 </ul>
 </div>
 <div class="paragraph">
-<p>Calling <strong>clEnqueueWriteImage</strong> to update the latest bits in a region of the
+<p>Calling <a href="#clEnqueueWriteImage"><strong>clEnqueueWriteImage</strong></a> 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> + (<em>origin</em>[2]
 × <em>image slice pitch</em> + <em>origin</em>[1] × <em>image row pitch</em> + 
 <em>origin</em>[0] × <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
+<a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a>, must meet the following requirements in order to avoid
 undefined behavior:</p>
 </div>
 <div class="ulist">
@@ -10644,7 +10815,7 @@
 </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
+<a href="#clEnqueueWriteImage"><strong>clEnqueueWriteImage</strong></a> must be set to the image row pitch and slice
 pitch.</p>
 </li>
 <li>
@@ -10660,38 +10831,44 @@
 </tr>
 </table>
 </div>
-<div class="paragraph">
-<p>The function</p>
 </div>
-<div class="listingblock">
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueCopyImage(cl_command_queue command_queue,
-                          cl_mem src_image,
-                          cl_mem dst_image,
-                          <span class="directive">const</span> size_t *src_origin,
-                          <span class="directive">const</span> size_t *dst_origin,
-                          <span class="directive">const</span> size_t *region,
-                          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>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
+<p>To enqueue a command to copy image objects, call the function</p>
+</div>
+<div id="clEnqueueCopyImage" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueCopyImage(
+    cl_command_queue command_queue,
+    cl_mem src_image,
+    cl_mem dst_image,
+    <span class="directive">const</span> size_t* src_origin,
+    <span class="directive">const</span> size_t* dst_origin,
+    <span class="directive">const</span> size_t* region,
+    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="ulist">
+<ul>
+<li>
+<p><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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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.
@@ -10703,8 +10880,8 @@
 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">
+</li>
+<li>
 <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.
@@ -10716,8 +10893,8 @@
 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">
+</li>
+<li>
 <p><em>region</em> defines the (<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
@@ -10728,8 +10905,8 @@
 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">
+</li>
+<li>
 <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
@@ -10743,139 +10920,142 @@
 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">
+</li>
+<li>
 <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 <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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead.
+<a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a> can be used instead.
 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>
+</li>
+</ul>
 </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
+memory objects for <a href="#clEnqueueCopyImage"><strong>clEnqueueCopyImage</strong></a> 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
+<p><a href="#clEnqueueCopyImage"><strong>clEnqueueCopyImage</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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>,
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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
+<p><a href="#CL_IMAGE_FORMAT_MISMATCH"><code>CL_&#8203;IMAGE_&#8203;FORMAT_&#8203;MISMATCH</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if the 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 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_INVALID_IMAGE_SIZE if image dimensions (image width, height,
+<p><a href="#CL_INVALID_IMAGE_SIZE"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;SIZE</code></a> 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
+<p><a href="#CL_IMAGE_FORMAT_NOT_SUPPORTED"><code>CL_&#8203;IMAGE_&#8203;FORMAT_&#8203;NOT_&#8203;SUPPORTED</code></a> 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
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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 the
-<a href="#device-queries-table">Device Queries</a> table is CL_FALSE).</p>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if the device associated with <em>command_queue</em> does
+not support images (i.e. <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> specified in the
+<a href="#device-queries-table">Device Queries</a> table is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>).</p>
 </li>
 <li>
-<p>CL_MEM_COPY_OVERLAP if <em>src_image</em> and <em>dst_image</em> are the same image
+<p><a href="#CL_MEM_COPY_OVERLAP"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;OVERLAP</code></a> 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>
+</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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueFillImage(cl_command_queue command_queue,
-                           cl_mem image,
-                           <span class="directive">const</span> <span class="directive">void</span> *fill_color,
-                           <span class="directive">const</span> size_t *origin,
-                           <span class="directive">const</span> size_t *region,
-                           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>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>
+<p>To enqueue a command to fill an image object with a specified color, call
+the function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueFillImage" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueFillImage(
+    cl_command_queue command_queue,
+    cl_mem image,
+    <span class="directive">const</span> <span class="directive">void</span>* fill_color,
+    <span class="directive">const</span> size_t* origin,
+    <span class="directive">const</span> size_t* region,
+    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="ulist">
+<ul>
+<li>
 <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">
+</li>
+<li>
 <p><em>image</em> is a valid image object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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.
+<a href="#CL_DEPTH"><code>CL_&#8203;DEPTH</code></a>.
 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
@@ -10884,8 +11064,8 @@
 unnormalized unsigned integer type.
 The fill color will be converted to the appropriate image channel format and
 order associated with <em>image</em>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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.
@@ -10897,8 +11077,8 @@
 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">
+</li>
+<li>
 <p><em>region</em> defines the (<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
@@ -10908,8 +11088,8 @@
 <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">
+</li>
+<li>
 <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
@@ -10923,113 +11103,126 @@
 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">
+</li>
+<li>
 <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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead.
+<a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a> can be used instead.
 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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clEnqueueFillImage</strong> returns CL_SUCCESS if the function is executed
+<p>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
+<a href="#clEnqueueFillImage"><strong>clEnqueueFillImage</strong></a>.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clEnqueueFillImage"><strong>clEnqueueFillImage</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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>
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> if <em>image</em> is not a valid image object.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>fill_color</em> is <code>NULL</code>.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>fill_color</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if the region being filled as specified by <em>origin</em> and
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> value.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if values in <em>origin</em> and <em>region</em> do not follow rules
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_INVALID_IMAGE_SIZE if image dimensions (image width, height,
+<p><a href="#CL_INVALID_IMAGE_SIZE"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;SIZE</code></a> 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
+<p><a href="#CL_IMAGE_FORMAT_NOT_SUPPORTED"><code>CL_&#8203;IMAGE_&#8203;FORMAT_&#8203;NOT_&#8203;SUPPORTED</code></a> 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
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueCopyImageToBuffer(cl_command_queue command_queue,
-                                  cl_mem src_image,
-                                  cl_mem dst_buffer,
-                                  <span class="directive">const</span> size_t *src_origin,
-                                  <span class="directive">const</span> size_t *region,
-                                  size_t dst_offset,
-                                  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>enqueues a command to copy an image object to a buffer object.</p>
+<p>To enqueue a command to copy an image object to a buffer object, call the
+function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueCopyImageToBuffer" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueCopyImageToBuffer(
+    cl_command_queue command_queue,
+    cl_mem src_image,
+    cl_mem dst_buffer,
+    <span class="directive">const</span> size_t* src_origin,
+    <span class="directive">const</span> size_t* region,
+    size_t dst_offset,
+    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="ulist">
+<ul>
+<li>
 <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">
+</li>
+<li>
 <p><em>src_image</em> is a valid image object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>dst_buffer</em> is a valid buffer object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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.
@@ -11041,8 +11234,8 @@
 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">
+</li>
+<li>
 <p><em>region</em> defines the (<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
@@ -11052,8 +11245,8 @@
 <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">
+</li>
+<li>
 <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
@@ -11065,8 +11258,8 @@
 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">
+</li>
+<li>
 <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
@@ -11080,128 +11273,135 @@
 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">
+</li>
+<li>
 <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 <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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead.
+<a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a> can be used instead.
 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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clEnqueueCopyImageToBuffer</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clEnqueueCopyImageToBuffer"><strong>clEnqueueCopyImageToBuffer</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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>,
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_MISALIGNED_SUB_BUFFER_OFFSET if <em>dst_buffer</em> is a sub-buffer object
+<p><a href="#CL_MISALIGNED_SUB_BUFFER_OFFSET"><code>CL_&#8203;MISALIGNED_&#8203;SUB_&#8203;BUFFER_&#8203;OFFSET</code></a> 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
+aligned to <a href="#CL_DEVICE_MEM_BASE_ADDR_ALIGN"><code>CL_&#8203;DEVICE_&#8203;MEM_&#8203;BASE_&#8203;ADDR_&#8203;ALIGN</code></a> value for device associated
 with <em>queue</em>.</p>
 </li>
 <li>
-<p>CL_INVALID_IMAGE_SIZE if image dimensions (image width, height,
+<p><a href="#CL_INVALID_IMAGE_SIZE"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;SIZE</code></a> 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
+<p><a href="#CL_IMAGE_FORMAT_NOT_SUPPORTED"><code>CL_&#8203;IMAGE_&#8203;FORMAT_&#8203;NOT_&#8203;SUPPORTED</code></a> 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
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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 the
-<a href="#device-queries-table">Device Queries</a> table is CL_FALSE).</p>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if the device associated with <em>command_queue</em> does
+not support images (i.e. <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> specified in the
+<a href="#device-queries-table">Device Queries</a> table is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>).</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueCopyBufferToImage(cl_command_queue command_queue,
-                                  cl_mem src_buffer,
-                                  cl_mem dst_image,
-                                  size_t src_offset,
-                                  <span class="directive">const</span> size_t *dst_origin,
-                                  <span class="directive">const</span> size_t *region,
-                                  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>enqueues a command to copy a buffer object to an image object.</p>
+<p>To enqueue a command to copy a buffer object to an image object, call the
+function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueCopyBufferToImage" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueCopyBufferToImage(
+    cl_command_queue command_queue,
+    cl_mem src_buffer,
+    cl_mem dst_image,
+    size_t src_offset,
+    <span class="directive">const</span> size_t* dst_origin,
+    <span class="directive">const</span> size_t* region,
+    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="ulist">
+<ul>
+<li>
 <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">
+</li>
+<li>
 <p><em>src_buffer</em> is a valid buffer object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>dst_image</em> is a valid image object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>src_offset</em> refers to the offset where to begin copying data from
 <em>src_buffer</em>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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.
@@ -11213,8 +11413,8 @@
 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">
+</li>
+<li>
 <p><em>region</em> defines the (<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
@@ -11224,6 +11424,35 @@
 <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>
+</li>
+<li>
+<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.
+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>
+</li>
+<li>
+<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 <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.
+<a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a> can be used instead.
+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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
 <p>The size in bytes of the region to be copied from <em>src_buffer</em> referred to
@@ -11238,164 +11467,127 @@
 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 <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.
-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 <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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead.
-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>clEnqueueCopyBufferToImage</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clEnqueueCopyBufferToImage"><strong>clEnqueueCopyBufferToImage</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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>,
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_MISALIGNED_SUB_BUFFER_OFFSET if <em>src_buffer</em> is a sub-buffer object
+<p><a href="#CL_MISALIGNED_SUB_BUFFER_OFFSET"><code>CL_&#8203;MISALIGNED_&#8203;SUB_&#8203;BUFFER_&#8203;OFFSET</code></a> 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
+aligned to <a href="#CL_DEVICE_MEM_BASE_ADDR_ALIGN"><code>CL_&#8203;DEVICE_&#8203;MEM_&#8203;BASE_&#8203;ADDR_&#8203;ALIGN</code></a> value for device associated
 with <em>queue</em>.</p>
 </li>
 <li>
-<p>CL_INVALID_IMAGE_SIZE if image dimensions (image width, height,
+<p><a href="#CL_INVALID_IMAGE_SIZE"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;SIZE</code></a> 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
+<p><a href="#CL_IMAGE_FORMAT_NOT_SUPPORTED"><code>CL_&#8203;IMAGE_&#8203;FORMAT_&#8203;NOT_&#8203;SUPPORTED</code></a> 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
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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 the
-<a href="#device-queries-table">Device Queries</a> table is CL_FALSE).</p>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if the device associated with <em>command_queue</em> does
+not support images (i.e. <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> specified in the
+<a href="#device-queries-table">Device Queries</a> table is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>).</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="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="openblock">
 <div class="content">
-<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,
-                       <span class="directive">const</span> size_t *origin,
-                       <span class="directive">const</span> size_t *region,
-                       size_t *image_row_pitch,
-                       size_t *image_slice_pitch,
-                       cl_uint num_events_in_wait_list,
-                       <span class="directive">const</span> cl_event *event_wait_list,
-                       cl_event *event,
-                       cl_int *errcode_ret)</code></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>
+<p>To enqueue 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,
+call the function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueMapImage" class="listingblock">
+<div class="content">
+<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,
+    <span class="directive">const</span> size_t* origin,
+    <span class="directive">const</span> size_t* region,
+    size_t* image_row_pitch,
+    size_t* image_slice_pitch,
+    cl_uint num_events_in_wait_list,
+    <span class="directive">const</span> cl_event* event_wait_list,
+    cl_event* event,
+    cl_int* errcode_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>command_queue</em> must be a valid host command-queue.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <p><em>map_flags</em> is a bit-field and is described in the
 <a href="#memory-map-flags-table">Memory Map Flags</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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.
@@ -11407,8 +11599,8 @@
 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">
+</li>
+<li>
 <p><em>region</em> defines the (<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
@@ -11418,24 +11610,24 @@
 <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">
+</li>
+<li>
 <p><em>image_row_pitch</em> returns the scan-line pitch in bytes for the mapped
 region.
 This must be a non-<code>NULL</code> value.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 <code>NULL</code>.
 For a 3D image, 1D and 2D image array, <em>image_slice_pitch</em> must be a
 non-<code>NULL</code> value.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 <code>NULL</code>, then <strong>clEnqueueMapImage</strong> does not wait on
+complete before <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a> can be executed.
+If <em>event_wait_list</em> is <code>NULL</code>, then <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a> 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
@@ -11446,8 +11638,8 @@
 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">
+</li>
+<li>
 <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.
@@ -11457,14 +11649,31 @@
 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">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </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>
+<p>If <em>blocking_map</em> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>, <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a> 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 <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>.</p>
+</div>
+<div class="paragraph">
+<p>If <em>blocking_map</em> is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> i.e. map operation is non-blocking, the
+pointer to the mapped region returned by <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a> 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 <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a> will return a pointer to the mapped region.
+The <em>errcode_ret</em> is set to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a>.</p>
 </div>
 <div class="paragraph">
 <p>A <code>NULL</code> pointer is returned otherwise with one of the following error
@@ -11473,86 +11682,86 @@
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_COMMAND_QUEUE if <em>command_queue</em> is not a valid host
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> if context associated with <em>command_queue</em> and
 <em>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>
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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>,
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if region being mapped given by (<em>origin</em>,
 <em>origin+region</em>) is out of bounds or if values specified in <em>map_flags</em>
 are not valid.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if values in <em>origin</em> and <em>region</em> do not follow rules
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code>.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>image_row_pitch</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>image</em> is a 3D image, 1D or 2D image array object
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>image</em> is a 3D image, 1D or 2D image array object
 and <em>image_slice_pitch</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_INVALID_IMAGE_SIZE if image dimensions (image width, height,
+<p><a href="#CL_INVALID_IMAGE_SIZE"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;SIZE</code></a> 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
+<p><a href="#CL_IMAGE_FORMAT_NOT_SUPPORTED"><code>CL_&#8203;IMAGE_&#8203;FORMAT_&#8203;NOT_&#8203;SUPPORTED</code></a> 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
+<p><a href="#CL_MAP_FAILURE"><code>CL_&#8203;MAP_&#8203;FAILURE</code></a> 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>
+<a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> or <a href="#CL_MEM_ALLOC_HOST_PTR"><code>CL_&#8203;MEM_&#8203;ALLOC_&#8203;HOST_&#8203;PTR</code></a>.</p>
 </li>
 <li>
-<p>CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the map operation is
+<p><a href="#CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"><code>CL_&#8203;EXEC_&#8203;STATUS_&#8203;ERROR_&#8203;FOR_&#8203;EVENTS_&#8203;IN_&#8203;WAIT_&#8203;LIST</code></a> 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
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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 the
-<a href="#device-queries-table">Device Queries</a> table is CL_FALSE).</p>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if the device associated with <em>command_queue</em> does
+not support images (i.e. <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> specified in the
+<a href="#device-queries-table">Device Queries</a> table is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>).</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>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if <em>image</em> has been created with
+<a href="#CL_MEM_HOST_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;WRITE_&#8203;ONLY</code></a> or <a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a> and <a href="#CL_MAP_READ"><code>CL_&#8203;MAP_&#8203;READ</code></a> is set
+in <em>map_flags</em> or if <em>image</em> has been created with <a href="#CL_MEM_HOST_READ_ONLY"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;READ_&#8203;ONLY</code></a>
+or <a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a> and <a href="#CL_MAP_WRITE"><code>CL_&#8203;MAP_&#8203;WRITE</code></a> or
+<a href="#CL_MAP_WRITE_INVALIDATE_REGION"><code>CL_&#8203;MAP_&#8203;WRITE_&#8203;INVALIDATE_&#8203;REGION</code></a> is set in <em>map_flags</em>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if mapping would lead to overlapping regions being
 mapped for writing.</p>
 </li>
 </ul>
@@ -11566,101 +11775,84 @@
 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>,
+<p>If the image object is created with <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> 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>
+<p>The <em>host_ptr</em> specified in <a href="#clCreateImage"><strong>clCreateImage</strong></a> is guaranteed to contain the
+latest bits in the region being mapped when the <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>
 command has completed.</p>
 </li>
 <li>
-<p>The pointer value returned by <strong>clEnqueueMapImage</strong> will be derived from
+<p>The pointer value returned by <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a> 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>.
+<p>Mapped image objects are unmapped using <a href="#clEnqueueUnmapMemObject"><strong>clEnqueueUnmapMemObject</strong></a>.
 This is described in <a href="#unmapping-mapped-memory">Unmapping Mapped Memory
 Objects</a>.</p>
 </div>
 </div>
+</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 <a href="#memory-object-queries">Memory
+<a href="#clGetMemObjectInfo"><strong>clGetMemObjectInfo</strong></a> function described in <a href="#memory-object-queries">Memory
 Object Queries</a>.</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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetImageInfo(cl_mem image,
-                      cl_image_info param_name,
-                      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><em>image</em> specifies the image object being queried.</p>
+<p>To get information specific to an image object created with <a href="#clCreateImage"><strong>clCreateImage</strong></a>,
+call the function</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 the
-<a href="#image-info-table">Image Object Queries</a> table.</p>
+<div id="clGetImageInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetImageInfo(
+    cl_mem image,
+    cl_image_info param_name,
+    size_t param_value_size,
+    <span class="directive">void</span>* param_value,
+    size_t* param_value_size_ret);</code></pre>
 </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="#image-info-table">Image Object 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>
-<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
-the <a href="#image-info-table">Image Object Queries</a> table and <em>param_value</em> is
-not <code>NULL</code>.</p>
+<p><em>image</em> specifies the image object being queried.</p>
 </li>
 <li>
-<p>CL_INVALID_MEM_OBJECT if <em>image</em> is a not a valid image object.</p>
+<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 <a href="#clGetImageInfo"><strong>clGetImageInfo</strong></a> is described in the
+<a href="#image-info-table">Image Object Queries</a> table.</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>
+<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>
 </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><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="#image-info-table">Image Object Queries</a> table.</p>
+</li>
+<li>
+<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>
 </li>
 </ul>
 </div>
 <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>
+<caption class="title">Table 18. List of supported param_names by <a href="#clGetImageInfo">clGetImageInfo</a></caption>
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -11675,13 +11867,13 @@
 </thead>
 <tbody>
 <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"><a id="CL_IMAGE_FORMAT"></a><a href="#CL_IMAGE_FORMAT"><code>CL_&#8203;IMAGE_&#8203;FORMAT</code></a></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>
+        with <a href="#clCreateImage"><strong>clCreateImage</strong></a>.</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"><a id="CL_IMAGE_ELEMENT_SIZE"></a><a href="#CL_IMAGE_ELEMENT_SIZE"><code>CL_&#8203;IMAGE_&#8203;ELEMENT_&#8203;SIZE</code></a></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.
@@ -11689,13 +11881,13 @@
         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"><a id="CL_IMAGE_ROW_PITCH"></a><a href="#CL_IMAGE_ROW_PITCH"><code>CL_&#8203;IMAGE_&#8203;ROW_&#8203;PITCH</code></a></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"><a id="CL_IMAGE_SLICE_PITCH"></a><a href="#CL_IMAGE_SLICE_PITCH"><code>CL_&#8203;IMAGE_&#8203;SLICE_&#8203;PITCH</code></a></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
@@ -11703,42 +11895,70 @@
         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"><a id="CL_IMAGE_WIDTH"></a><a href="#CL_IMAGE_WIDTH"><code>CL_&#8203;IMAGE_&#8203;WIDTH</code></a></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"><a id="CL_IMAGE_HEIGHT"></a><a href="#CL_IMAGE_HEIGHT"><code>CL_&#8203;IMAGE_&#8203;HEIGHT</code></a></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"><a id="CL_IMAGE_DEPTH"></a><a href="#CL_IMAGE_DEPTH"><code>CL_&#8203;IMAGE_&#8203;DEPTH</code></a></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"><a id="CL_IMAGE_ARRAY_SIZE"></a><a href="#CL_IMAGE_ARRAY_SIZE"><code>CL_&#8203;IMAGE_&#8203;ARRAY_&#8203;SIZE</code></a></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_LEVELS</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_IMAGE_NUM_MIP_LEVELS"></a><a href="#CL_IMAGE_NUM_MIP_LEVELS"><code>CL_&#8203;IMAGE_&#8203;NUM_&#8203;MIP_&#8203;LEVELS</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return <code>num_mip_levels</code> 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"><a id="CL_IMAGE_NUM_SAMPLES"></a><a href="#CL_IMAGE_NUM_SAMPLES"><code>CL_&#8203;IMAGE_&#8203;NUM_&#8203;SAMPLES</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return <code>num_samples</code> associated with <em>image</em>.</p></td>
 </tr>
 </tbody>
 </table>
+<div class="paragraph">
+<p><a href="#clGetImageInfo"><strong>clGetImageInfo</strong></a> returns  <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the function is executed
+successfully.
+Otherwise, it returns one of the following errors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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="#image-info-table">Image Object Queries</a> table and <em>param_value</em> is
+not <code>NULL</code>.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> if <em>image</em> is a not a valid image object.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="sect2">
@@ -11768,86 +11988,93 @@
 </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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_mem clCreatePipe(cl_context context,
-                    cl_mem_flags flags,
-                    cl_uint pipe_packet_size,
-                    cl_uint pipe_max_packets,
-                    <span class="directive">const</span> cl_pipe_properties *properties,
-                    cl_int *errcode_ret)</code></pre>
-</div>
-</div>
 <div class="paragraph">
+<p>To create a <strong>pipe object</strong>, call the function</p>
+</div>
+<div id="clCreatePipe" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_mem clCreatePipe(
+    cl_context context,
+    cl_mem_flags flags,
+    cl_uint pipe_packet_size,
+    cl_uint pipe_max_packets,
+    <span class="directive">const</span> cl_pipe_properties* properties,
+    cl_int* errcode_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>context</em> is a valid OpenCL context used to create the pipe object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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.
 The <a href="#memory-flags">Memory Flags</a> table describes the possible values for
 <em>flags</em>.
-Only CL_MEM_READ_WRITE and CL_MEM_HOST_NO_ACCESS can be specified when
+Only <a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a> and <a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a> 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">
+<a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a> | <a href="#CL_MEM_HOST_NO_ACCESS"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;NO_&#8203;ACCESS</code></a>.</p>
+</li>
+<li>
 <p><em>pipe_packet_size</em> is the size in bytes of a pipe packet.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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 <code>NULL</code>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </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.
+<p><a href="#clCreatePipe"><strong>clCreatePipe</strong></a> returns a valid non-zero pipe object and <em>errcode_ret</em> is set
+to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the pipe 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>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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 as defined
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if values specified in <em>flags</em> are not as defined
 above.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>properties</em> is not <code>NULL</code>.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>properties</em> is not <code>NULL</code>.</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
+<p><a href="#CL_INVALID_PIPE_SIZE"><code>CL_&#8203;INVALID_&#8203;PIPE_&#8203;SIZE</code></a> if <em>pipe_packet_size</em> is 0 or the
+<em>pipe_packet_size</em> exceeds <a href="#CL_DEVICE_PIPE_MAX_PACKET_SIZE"><code>CL_&#8203;DEVICE_&#8203;PIPE_&#8203;MAX_&#8203;PACKET_&#8203;SIZE</code></a> value
 specified in the <a href="#device-queries-table">Device Queries</a> table for all
 devices in <em>context</em> or if <em>pipe_max_packets</em> is 0.</p>
 </li>
 <li>
-<p>CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
@@ -11859,78 +12086,87 @@
 same or different devices) is enforced at a synchronization point.</p>
 </div>
 </div>
+</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 <a href="#memory-object-queries">Memory
+<a href="#clGetMemObjectInfo"><strong>clGetMemObjectInfo</strong></a> function described in <a href="#memory-object-queries">Memory
 Object Queries</a>.</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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetPipeInfo(cl_mem pipe,
-                     cl_pipe_info param_name,
-                     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>To get information specific to a pipe object created with <a href="#clCreatePipe"><strong>clCreatePipe</strong></a>,
+call the function</p>
+</div>
+<div id="clGetPipeInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetPipeInfo(
+    cl_mem pipe,
+    cl_pipe_info param_name,
+    size_t param_value_size,
+    <span class="directive">void</span>* param_value,
+    size_t* param_value_size_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>pipe</em> specifies the pipe object being queried.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 the <a href="#pipe-info-table">Pipe
+<em>param_value</em> by <a href="#clGetPipeInfo"><strong>clGetPipeInfo</strong></a> is described in the <a href="#pipe-info-table">Pipe
 Object Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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="#pipe-info-table">Pipe Object Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clGetPipeInfo</strong> returns CL_SUCCESS if the function is executed successfully.
+<p><a href="#clGetPipeInfo"><strong>clGetPipeInfo</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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="#pipe-info-table">Pipe Object Queries</a> table and <em>param_value</em> is
 not <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_MEM_OBJECT if <em>pipe</em> is a not a valid pipe object.</p>
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
 </div>
 <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>
+<caption class="title">Table 19. List of supported param_names by <a href="#clGetPipeInfo">clGetPipeInfo</a></caption>
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -11945,84 +12181,112 @@
 </thead>
 <tbody>
 <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"><a id="CL_PIPE_PACKET_SIZE"></a><a href="#CL_PIPE_PACKET_SIZE"><code>CL_&#8203;PIPE_&#8203;PACKET_&#8203;SIZE</code></a></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>
+        <a href="#clCreatePipe"><strong>clCreatePipe</strong></a>.</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"><a id="CL_PIPE_MAX_PACKETS"></a><a href="#CL_PIPE_MAX_PACKETS"><code>CL_&#8203;PIPE_&#8203;MAX_&#8203;PACKETS</code></a></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>
+        <a href="#clCreatePipe"><strong>clCreatePipe</strong></a>.</p></td>
 </tr>
 </tbody>
 </table>
 </div>
 </div>
+</div>
+</div>
 <div class="sect2">
 <h3 id="_querying_unmapping_migrating_retaining_and_releasing_memory_objects">5.5. Querying, Unmapping, Migrating, Retaining and Releasing 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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clRetainMemObject(cl_mem memobj)</code></pre>
+<div class="paragraph">
+<p>To retain a memory object, call the function</p>
 </div>
+<div id="clRetainMemObject" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clRetainMemObject(
+    cl_mem memobj);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>memobj</em> specifies the memory object to be retained.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>increments the <em>memobj</em> reference count.
-<strong>clRetainMemObject</strong> returns CL_SUCCESS if the function is executed
+<p>The <em>memobj</em> reference count is incremented.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clRetainMemObject"><strong>clRetainMemObject</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<p><a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a>, <a href="#clCreateSubBuffer"><strong>clCreateSubBuffer</strong></a>, <a href="#clCreateImage"><strong>clCreateImage</strong></a> and <a href="#clCreatePipe"><strong>clCreatePipe</strong></a>
 perform an implicit retain.</p>
 </div>
-<div class="paragraph">
-<p>The function</p>
 </div>
-<div class="listingblock">
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clReleaseMemObject(cl_mem memobj)</code></pre>
+<div class="paragraph">
+<p>To release a memory object, call the function</p>
 </div>
+<div id="clReleaseMemObject" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clReleaseMemObject(
+    cl_mem memobj);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>memobj</em> specifies the memory object to be released.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>decrements the <em>memobj</em> reference count.
-<strong>clReleaseMemObject</strong> returns CL_SUCCESS if the function is executed
+<p>The <em>memobj</em> reference count is decremented.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clReleaseMemObject"><strong>clReleaseMemObject</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
@@ -12034,36 +12298,29 @@
 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>
+the object or by calling <a href="#clRetainMemObject"><strong>clRetainMemObject</strong></a> causes undefined behavior.</p>
 </div>
-<div class="paragraph">
-<p>The function</p>
 </div>
-<div class="listingblock">
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clSetMemObjectDestructorCallback
-       (cl_mem memobj,
-        <span class="directive">void</span> (CL_CALLBACK *pfn_notify)(cl_mem memobj,<span class="directive">void</span> *user_data),
-        <span class="directive">void</span> *user_data)</code></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>
+<p>To register a user callback function with a memory object, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clSetMemObjectDestructorCallback" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clSetMemObjectDestructorCallback(
+    cl_mem memobj,
+    <span class="directive">void</span> (CL_CALLBACK* pfn_notify)(cl_mem memobj, <span class="directive">void</span>* user_data),
+    <span class="directive">void</span>* user_data);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>memobj</em> is a valid memory object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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
@@ -12071,7 +12328,6 @@
 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>
@@ -12085,30 +12341,45 @@
 </li>
 </ul>
 </div>
-<div class="paragraph">
+</li>
+<li>
 <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 <code>NULL</code>.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clSetMemObjectDestructorCallback</strong> returns CL_SUCCESS if the function is
+<p>Each call to <a href="#clSetMemObjectDestructorCallback"><strong>clSetMemObjectDestructorCallback</strong></a> 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><a href="#clSetMemObjectDestructorCallback"><strong>clSetMemObjectDestructorCallback</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> if <em>memobj</em> is not a valid memory object.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>pfn_notify</em> is <code>NULL</code>.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>pfn_notify</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
@@ -12123,7 +12394,7 @@
 <div class="paragraph">
 <p>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.
+is created with <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a>) 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>.</p>
 </div>
@@ -12135,24 +12406,24 @@
 <div class="ulist">
 <ul>
 <li>
-<p><strong>clFinish</strong>,</p>
+<p><a href="#clFinish"><strong>clFinish</strong></a>,</p>
 </li>
 <li>
-<p><strong>clWaitForEvents</strong>,</p>
+<p><a href="#clWaitForEvents"><strong>clWaitForEvents</strong></a>,</p>
 </li>
 <li>
-<p>blocking calls to <strong>clEnqueueReadBuffer</strong>, <strong>clEnqueueReadBufferRect</strong>,
-<strong>clEnqueueWriteBuffer</strong>, <strong>clEnqueueWriteBufferRect</strong>,</p>
+<p>blocking calls to <a href="#clEnqueueReadBuffer"><strong>clEnqueueReadBuffer</strong></a>, <a href="#clEnqueueReadBufferRect"><strong>clEnqueueReadBufferRect</strong></a>,
+<a href="#clEnqueueWriteBuffer"><strong>clEnqueueWriteBuffer</strong></a>, <a href="#clEnqueueWriteBufferRect"><strong>clEnqueueWriteBufferRect</strong></a>,</p>
 </li>
 <li>
-<p>blocking calls to <strong>clEnqueueReadImage</strong> and <strong>clEnqueueWriteImage</strong>,</p>
+<p>blocking calls to <a href="#clEnqueueReadImage"><strong>clEnqueueReadImage</strong></a> and <a href="#clEnqueueWriteImage"><strong>clEnqueueWriteImage</strong></a>,</p>
 </li>
 <li>
-<p>blocking calls to <strong>clEnqueueMapBuffer</strong>, <strong>clEnqueueMapImage</strong>,</p>
+<p>blocking calls to <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a>, <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>,</p>
 </li>
 <li>
-<p>blocking calls to <strong>clBuildProgram</strong>, <strong>clCompileProgram</strong> or
-<strong>clLinkProgram</strong></p>
+<p>blocking calls to <a href="#clBuildProgram"><strong>clBuildProgram</strong></a>, <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> or
+<a href="#clLinkProgram"><strong>clLinkProgram</strong></a></p>
 </li>
 </ul>
 </div>
@@ -12166,8 +12437,8 @@
 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
+enqueue commands on a command queue should either call <a href="#clFlush"><strong>clFlush</strong></a> on the
+queue before returning or arrange for <a href="#clFlush"><strong>clFlush</strong></a> to be called later on
 another thread.</p>
 </div>
 <div class="paragraph">
@@ -12180,42 +12451,45 @@
 </table>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="unmapping-mapped-memory">5.5.2. Unmapping Mapped Memory Objects</h4>
-<div class="paragraph">
-<p>The function</p>
-</div>
-<div class="listingblock">
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueUnmapMemObject(cl_command_queue command_queue,
-                               cl_mem memobj,
-                               <span class="directive">void</span> *mapped_ptr,
-                               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>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 <strong>clEnqueueMapImage</strong> are considered to be complete.</p>
+<p>To enqueue a command to unmap a previously mapped region of a memory object,
+call the function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueUnmapMemObject" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueUnmapMemObject(
+    cl_command_queue command_queue,
+    cl_mem memobj,
+    <span class="directive">void</span>* mapped_ptr,
+    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="ulist">
+<ul>
+<li>
 <p><em>command_queue</em> must be a valid host command-queue.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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">
+<a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a>, or <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a> for <em>memobj</em>.</p>
+</li>
+<li>
 <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 <code>NULL</code>, then <strong>clEnqueueUnmapMemObject</strong> does not wait
+complete before <a href="#clEnqueueUnmapMemObject"><strong>clEnqueueUnmapMemObject</strong></a> can be executed.
+If <em>event_wait_list</em> is <code>NULL</code>, then <a href="#clEnqueueUnmapMemObject"><strong>clEnqueueUnmapMemObject</strong></a> 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
@@ -12226,71 +12500,79 @@
 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">
+</li>
+<li>
 <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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead.
+<a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a> can be used instead.
 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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clEnqueueUnmapMemObject</strong> returns CL_SUCCESS if the function is executed
+<p>Reads or writes from the host using the pointer returned by
+<a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> or <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a> are considered to be complete.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> and <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a> increment the mapped count of
+the memory object.
+The initial mapped count value of the memory object is zero.
+Multiple calls to <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a>, or <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a> on the same
+memory object will increment this mapped count by appropriate number of
+calls.
+<a href="#clEnqueueUnmapMemObject"><strong>clEnqueueUnmapMemObject</strong></a> decrements the mapped count of the memory object.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a>, and <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a> act as synchronization points
+for a region of the buffer object being mapped.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clEnqueueUnmapMemObject"><strong>clEnqueueUnmapMemObject</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>mapped_ptr</em> is not a valid pointer returned by
+<a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> or <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a> for <em>memobj</em>.</p>
 </li>
 <li>
-<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> if <em>event_wait_list</em> is <code>NULL</code> and
 <em>num_events_in_wait_list</em> &gt; 0, or if <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_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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.
-<strong>clEnqueueUnmapMemObject</strong> 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">
@@ -12302,25 +12584,25 @@
 <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>)
+mapped for writing (i.e. <a href="#CL_MAP_WRITE"><code>CL_&#8203;MAP_&#8203;WRITE</code></a> or <a href="#CL_MAP_WRITE_INVALIDATE_REGION"><code>CL_&#8203;MAP_&#8203;WRITE_&#8203;INVALIDATE_&#8203;REGION</code></a> is
+set in <em>map_flags</em> argument to <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a>, or <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>)
 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).
+= <a href="#CL_MAP_READ"><code>CL_&#8203;MAP_&#8203;READ</code></a>).
 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>)
+be read by kernels and other OpenCL commands (such as <a href="#clEnqueueCopyBuffer"><strong>clEnqueueCopyBuffer</strong></a>)
 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>
+<a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> error returned by <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a>, or
+<a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>.</p>
 </div>
 <div class="paragraph">
 <p>If a memory object is currently mapped for writing, the application must
@@ -12348,10 +12630,11 @@
 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>
+<p>The mapped pointer returned by <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> or <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>
+can be used as the <em>ptr</em> argument value to <a href="#clEnqueueReadBuffer"><strong>clEnqueueReadBuffer</strong></a>,
+<a href="#clEnqueueWriteBuffer"><strong>clEnqueueWriteBuffer</strong></a>, <a href="#clEnqueueReadBufferRect"><strong>clEnqueueReadBufferRect</strong></a>,
+<a href="#clEnqueueWriteBufferRect"><strong>clEnqueueWriteBufferRect</strong></a>, <a href="#clEnqueueReadImage"><strong>clEnqueueReadImage</strong></a>, or
+<a href="#clEnqueueWriteImage"><strong>clEnqueueWriteImage</strong></a> provided the rules described above are adhered to.</p>
 </div>
 </div>
 <div class="sect3">
@@ -12373,98 +12656,45 @@
 </li>
 </ul>
 </div>
-<div class="paragraph">
-<p>The function</p>
-</div>
-<div class="listingblock">
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueMigrateMemObjects(cl_command_queue command_queue,
-                                  cl_uint num_mem_objects,
-                                  <span class="directive">const</span> cl_mem *mem_objects,
-                                  cl_mem_migration_flags flags,
-                                  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>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>
+<p>To enqueue a command to indicate which device a set of memory objects should
+be associated with, call the function</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 id="clEnqueueMigrateMemObjects" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueMigrateMemObjects(
+    cl_command_queue command_queue,
+    cl_uint num_mem_objects,
+    <span class="directive">const</span> cl_mem* mem_objects,
+    cl_mem_migration_flags flags,
+    cl_uint num_events_in_wait_list,
+    <span class="directive">const</span> cl_event* event_wait_list,
+    cl_event* event);</code></pre>
 </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">
+<div class="ulist">
+<ul>
+<li>
 <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">
+<a href="#CL_MIGRATE_MEM_OBJECT_HOST"><code>CL_&#8203;MIGRATE_&#8203;MEM_&#8203;OBJECT_&#8203;HOST</code></a> has been specified.</p>
+</li>
+<li>
 <p><em>num_mem_objects</em> is the number of memory objects specified in
 <em>mem_objects</em>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>mem_objects</em> is a pointer to a list of memory objects.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>flags</em> is a bit-field that is used to specify migration options.
 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 stretch">
-<caption class="title">Table 21. Supported values for cl_mem_migration_flags</caption>
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top"><strong>cl_mem_migration flags</strong></th>
-<th class="tableblock halign-left valign-top">Description</th>
-</tr>
-</thead>
-<tbody>
-<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_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 <em>command_queue</em> without incurring the overhead of
-    migrating their contents.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph">
+</li>
+<li>
 <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
@@ -12478,8 +12708,8 @@
 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">
+</li>
+<li>
 <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.
@@ -12489,125 +12719,167 @@
 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>
+</li>
+</ul>
+</div>
+<table id="migration-flags-table" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 20. Supported values for cl_mem_migration_flags</caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><strong>cl_mem_migration flags</strong></th>
+<th class="tableblock halign-left valign-top">Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_MIGRATE_MEM_OBJECT_HOST"></a><a href="#CL_MIGRATE_MEM_OBJECT_HOST"><code>CL_&#8203;MIGRATE_&#8203;MEM_&#8203;OBJECT_&#8203;HOST</code></a></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"><a id="CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED"></a><a href="#CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED"><code>CL_&#8203;MIGRATE_&#8203;MEM_&#8203;OBJECT_&#8203;CONTENT_&#8203;UNDEFINED</code></a></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 <em>command_queue</em> without incurring the overhead of
+    migrating their contents.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Typically, memory objects are implicitly migrated to a device for which
+enqueued commands, using the memory object, are targeted.
+<a href="#clEnqueueMigrateMemObjects"><strong>clEnqueueMigrateMemObjects</strong></a> 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 <a href="#clEnqueueMigrateMemObjects"><strong>clEnqueueMigrateMemObjects</strong></a>, 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> return CL_SUCCESS if the function is executed
+<p><a href="#clEnqueueMigrateMemObjects"><strong>clEnqueueMigrateMemObjects</strong></a> 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
+<a href="#clEnqueueMigrateMemObjects"><strong>clEnqueueMigrateMemObjects</strong></a> could result in undefined results.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clEnqueueMigrateMemObjects"><strong>clEnqueueMigrateMemObjects</strong></a> return <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>num_mem_objects</em> is zero or if <em>mem_objects</em> is
 <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>flags</em> is not 0 or is not any of the values
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="sect3">
 <h4 id="memory-object-queries">5.5.5. Memory Object Queries</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>To get information that is common to all memory objects (buffer and image
-objects), use the following function</p>
+objects), call the function</p>
 </div>
-<div class="listingblock">
+<div id="clGetMemObjectInfo" class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetMemObjectInfo(cl_mem memobj,
-                          cl_mem_info param_name,
-                          size_t param_value_size,
-                          <span class="directive">void</span> *param_value,
-                          size_t *param_value_size_ret)</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetMemObjectInfo(
+    cl_mem memobj,
+    cl_mem_info param_name,
+    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><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 the
-<a href="#mem-info-table">Memory Object Info</a> table.</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="#mem-info-table">Memory Object Info</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>
-<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
-the <a href="#mem-info-table">Memory Object Info</a> table and <em>param_value</em> is not
-<code>NULL</code>.</p>
+<p><em>memobj</em> specifies the memory object being queried.</p>
 </li>
 <li>
-<p>CL_INVALID_MEM_OBJECT if <em>memobj</em> is a not a valid memory object.</p>
+<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 <a href="#clGetMemObjectInfo"><strong>clGetMemObjectInfo</strong></a> is described in the
+<a href="#mem-info-table">Memory Object Info</a> table.</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>
+<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>
 </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><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="#mem-info-table">Memory Object Info</a> table.</p>
+</li>
+<li>
+<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>
 </li>
 </ul>
 </div>
 <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>
+<caption class="title">Table 21. List of supported param_names by <a href="#clGetMemObjectInfo">clGetMemObjectInfo</a></caption>
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -12622,90 +12894,90 @@
 </thead>
 <tbody>
 <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"><a id="CL_MEM_TYPE"></a><a href="#CL_MEM_TYPE"><code>CL_&#8203;MEM_&#8203;TYPE</code></a></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">        <a id="CL_MEM_OBJECT_BUFFER"></a><a href="#CL_MEM_OBJECT_BUFFER"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;BUFFER</code></a> if <em>memobj</em> is created with <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> or
+        <a href="#clCreateSubBuffer"><strong>clCreateSubBuffer</strong></a>.</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>
+        <a href="#clCreateImage"><strong>clCreateImage</strong></a>.</p>
+<p class="tableblock">        <a id="CL_MEM_OBJECT_PIPE"></a><a href="#CL_MEM_OBJECT_PIPE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;PIPE</code></a> if <em>memobj</em> is created with <a href="#clCreatePipe"><strong>clCreatePipe</strong></a>.</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"><a id="CL_MEM_FLAGS"></a><a href="#CL_MEM_FLAGS"><code>CL_&#8203;MEM_&#8203;FLAGS</code></a></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 <em>memobj</em> is created
-        with <strong>clCreateBuffer</strong>,<br>
-        <strong>clCreateSubBuffer</strong>,<br>
-        <strong>clCreateImage</strong> or<br>
-        <strong>clCreatePipe</strong>.</p>
+        with <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a>,<br>
+        <a href="#clCreateSubBuffer"><strong>clCreateSubBuffer</strong></a>,<br>
+        <a href="#clCreateImage"><strong>clCreateImage</strong></a> or<br>
+        <a href="#clCreatePipe"><strong>clCreatePipe</strong></a>.</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>
-<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"><a id="CL_MEM_SIZE"></a><a href="#CL_MEM_SIZE"><code>CL_&#8203;MEM_&#8203;SIZE</code></a></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"><a id="CL_MEM_HOST_PTR"></a><a href="#CL_MEM_HOST_PTR"><code>CL_&#8203;MEM_&#8203;HOST_&#8203;PTR</code></a></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 <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
+<td class="tableblock halign-left valign-top"><p class="tableblock">If <em>memobj</em> is created with <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> or <a href="#clCreateImage"><strong>clCreateImage</strong></a> and
+        <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> 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
+<p class="tableblock">        If <em>memobj</em> is created with <a href="#clCreateSubBuffer"><strong>clCreateSubBuffer</strong></a>, 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
+        host_ptr is the argument value specified to <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> and
+        <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> is specified in mem_flags for memory object from
         which <em>memobj</em> is created.
         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_MAP_COUNT</strong><sup>11</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_MEM_MAP_COUNT"></a><a href="#CL_MEM_MAP_COUNT"><code>CL_&#8203;MEM_&#8203;MAP_&#8203;COUNT</code></a><sup>11</sup></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"><strong>CL_MEM_REFERENCE_COUNT</strong><sup>12</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_MEM_REFERENCE_COUNT"></a><a href="#CL_MEM_REFERENCE_COUNT"><code>CL_&#8203;MEM_&#8203;REFERENCE_&#8203;COUNT</code></a><sup>12</sup></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"><a id="CL_MEM_CONTEXT"></a><a href="#CL_MEM_CONTEXT"><code>CL_&#8203;MEM_&#8203;CONTEXT</code></a></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
+        If <em>memobj</em> is created using <a href="#clCreateSubBuffer"><strong>clCreateSubBuffer</strong></a>, the context
         associated with the memory object specified as the <em>buffer</em> argument
-        to <strong>clCreateSubBuffer</strong> is returned.</p></td>
+        to <a href="#clCreateSubBuffer"><strong>clCreateSubBuffer</strong></a> 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"><a id="CL_MEM_ASSOCIATED_MEMOBJECT"></a><a href="#CL_MEM_ASSOCIATED_MEMOBJECT"><code>CL_&#8203;MEM_&#8203;ASSOCIATED_&#8203;MEMOBJECT</code></a></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 <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>
+        <a href="#clCreateSubBuffer"><strong>clCreateSubBuffer</strong></a> if <em>memobj</em> is a subbuffer object created using
+        <a href="#clCreateSubBuffer"><strong>clCreateSubBuffer</strong></a>.</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"><a id="CL_MEM_OFFSET"></a><a href="#CL_MEM_OFFSET"><code>CL_&#8203;MEM_&#8203;OFFSET</code></a></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>
+        <a href="#clCreateSubBuffer"><strong>clCreateSubBuffer</strong></a>.</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>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_MEM_USES_SVM_POINTER"></a><a href="#CL_MEM_USES_SVM_POINTER"><code>CL_&#8203;MEM_&#8203;USES_&#8203;SVM_&#8203;POINTER</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> if <em>memobj</em> is a buffer object that was created with
+        <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> or is a sub-buffer object of a buffer object
+        that was created with <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> and the <em>host_ptr</em>
         specified when the buffer object was created is a SVM pointer;
-        otherwise returns CL_FALSE.</p></td>
+        otherwise returns <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>.</p></td>
 </tr>
 </tbody>
 </table>
@@ -12725,12 +12997,40 @@
 </dd>
 </dl>
 </div>
+<div class="paragraph">
+<p><a href="#clGetMemObjectInfo"><strong>clGetMemObjectInfo</strong></a> returns  <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the function is executed
+successfully.
+Otherwise, it returns one of the following errors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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="#mem-info-table">Memory Object Info</a> table and <em>param_value</em> is not
+<code>NULL</code>.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> if <em>memobj</em> is a not a valid memory object.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="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.
+<p>OpenCL 2.0 added 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.
@@ -12748,7 +13048,7 @@
 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
+OpenCL 2.2 requires that the host and all OpenCL 2.0 or newer devices support
 coarse-grained sharing at a minimum.</p>
 </div>
 <div class="ulist">
@@ -12758,11 +13058,11 @@
 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>.
+<a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a>.
 Memory consistency is guaranteed at synchronization points and the host
-can use calls to <strong>clEnqueueSVMMap</strong> and <strong>clEnqueueSVMUnmap</strong> or create a
+can use calls to <a href="#clEnqueueSVMMap"><strong>clEnqueueSVMMap</strong></a> and <a href="#clEnqueueSVMUnmap"><strong>clEnqueueSVMUnmap</strong></a> 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
+API functions <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> and <a href="#clEnqueueUnmapMemObject"><strong>clEnqueueUnmapMemObject</strong></a> 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
@@ -12793,9 +13093,9 @@
 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
+There is no need for explicit calls to <a href="#clEnqueueSVMMap"><strong>clEnqueueSVMMap</strong></a> and
+<a href="#clEnqueueSVMUnmap"><strong>clEnqueueSVMUnmap</strong></a> or <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> and
+<a href="#clEnqueueUnmapMemObject"><strong>clEnqueueUnmapMemObject</strong></a> on a cl_mem buffer object created using the
 SVM pointer.</p>
 </li>
 <li>
@@ -12804,8 +13104,8 @@
 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
+need for explicit calls to to <a href="#clEnqueueSVMMap"><strong>clEnqueueSVMMap</strong></a> and <a href="#clEnqueueSVMUnmap"><strong>clEnqueueSVMUnmap</strong></a>
+or <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> and <a href="#clEnqueueUnmapMemObject"><strong>clEnqueueUnmapMemObject</strong></a> on a cl_mem
 buffer object created using the SVM pointer.</p>
 </li>
 </ul>
@@ -12821,7 +13121,7 @@
 <p>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>
+in the context must support <a href="#CL_DEVICE_SVM_FINE_GRAIN_BUFFER"><code>CL_&#8203;DEVICE_&#8203;SVM_&#8203;FINE_&#8203;GRAIN_&#8203;BUFFER</code></a>.</p>
 </li>
 <li>
 <p>Fine-grain system sharing enables fine-grain sharing of the hosts
@@ -12852,33 +13152,51 @@
 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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c"><span class="directive">void</span>* clSVMAlloc(cl_context context,
-                 cl_svm_mem_flags flags,
-                 size_t size,
-                 cl_uint alignment)</code></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>
+<p>To allocate 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, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clSVMAlloc" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++"><span class="directive">void</span>* clSVMAlloc(
+    cl_context context,
+    cl_svm_mem_flags flags,
+    size_t size,
+    cl_uint alignment);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>context</em> is a valid OpenCL context used to create the SVM buffer.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>flags</em> is a bit-field that is used to specify allocation and usage
 information.
 The <a href="#svm-flags-table">SVM Memory Flags</a> table describes the possible values
 for <em>flags</em>.</p>
+</li>
+<li>
+<p><em>size</em> is the size in bytes of the SVM buffer to be allocated.</p>
+</li>
+<li>
+<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>
+</li>
+</ul>
 </div>
 <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>
+<caption class="title">Table 22. List of supported SVM memory flag values</caption>
 <colgroup>
 <col style="width: 50%;">
 <col style="width: 50%;">
@@ -12891,36 +13209,36 @@
 </thead>
 <tbody>
 <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"><a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a></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"><a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a></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
+<p class="tableblock">    Reading from a SVM buffer created with <a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a> inside a kernel
     is undefined.</p>
-<p class="tableblock">    CL_MEM_READ_WRITE and CL_MEM_WRITE_ONLY are mutually exclusive.</p></td>
+<p class="tableblock">    <a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a> and <a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a> 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"><a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a></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
+<p class="tableblock">    Writing to a SVM buffer created with <a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a> 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
+<p class="tableblock">    <a href="#CL_MEM_READ_WRITE"><code>CL_&#8203;MEM_&#8203;READ_&#8203;WRITE</code></a> or <a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a> and <a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a> are mutually
     exclusive.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_MEM_SVM_FINE_GRAIN_BUFFER</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_MEM_SVM_FINE_GRAIN_BUFFER"></a><a href="#CL_MEM_SVM_FINE_GRAIN_BUFFER"><code>CL_&#8203;MEM_&#8203;SVM_&#8203;FINE_&#8203;GRAIN_&#8203;BUFFER</code></a></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
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_MEM_SVM_ATOMICS"></a><a href="#CL_MEM_SVM_ATOMICS"><code>CL_&#8203;MEM_&#8203;SVM_&#8203;ATOMICS</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">This flag is valid only if <a href="#CL_MEM_SVM_FINE_GRAIN_BUFFER"><code>CL_&#8203;MEM_&#8203;SVM_&#8203;FINE_&#8203;GRAIN_&#8203;BUFFER</code></a> 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>
@@ -12928,31 +13246,40 @@
 </tbody>
 </table>
 <div class="paragraph">
-<p>If CL_MEM_SVM_FINE_GRAIN_BUFFER is not specified, the buffer can be created
+<p>If <a href="#CL_MEM_SVM_FINE_GRAIN_BUFFER"><code>CL_&#8203;MEM_&#8203;SVM_&#8203;FINE_&#8203;GRAIN_&#8203;BUFFER</code></a> 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
+Similarly, if <a href="#CL_MEM_SVM_ATOMICS"><code>CL_&#8203;MEM_&#8203;SVM_&#8203;ATOMICS</code></a> 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>
+<p>Calling <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> does not itself provide consistency for the shared
+memory region.
+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">
-<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>
+<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 <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> has devices with mixed endianness and
+the OpenCL implementation is unable to implement SVM because of that mixed
+endianness, <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> will fail and return <code>NULL</code>.</p>
 </div>
 <div class="paragraph">
-<p><strong>clSVMAlloc</strong> returns a valid non-<code>NULL</code> shared virtual memory address if the
+<p>Although SVM is generally not supported for image objects, <a href="#clCreateImage"><strong>clCreateImage</strong></a>
+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><a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> returns a valid non-<code>NULL</code> shared virtual memory address if the
 SVM buffer is successfully allocated.
 Otherwise, like <strong>malloc</strong>, it returns a <code>NULL</code> pointer value.
-<strong>clSVMAlloc</strong> will fail if</p>
+<a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> will fail if</p>
 </div>
 <div class="ulist">
 <ul>
@@ -12960,15 +13287,15 @@
 <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>
+<p><em>flags</em> does not contain <a href="#CL_MEM_SVM_FINE_GRAIN_BUFFER"><code>CL_&#8203;MEM_&#8203;SVM_&#8203;FINE_&#8203;GRAIN_&#8203;BUFFER</code></a> but does contain
+<a href="#CL_MEM_SVM_ATOMICS"><code>CL_&#8203;MEM_&#8203;SVM_&#8203;ATOMICS</code></a>.</p>
 </li>
 <li>
 <p>Values specified in <em>flags</em> do not follow rules described for supported
 values in the <a href="#svm-flags-table">SVM Memory Flags</a> table.</p>
 </li>
 <li>
-<p>CL_MEM_SVM_FINE_GRAIN_BUFFER or CL_MEM_SVM_ATOMICS is specified in
+<p><a href="#CL_MEM_SVM_FINE_GRAIN_BUFFER"><code>CL_&#8203;MEM_&#8203;SVM_&#8203;FINE_&#8203;GRAIN_&#8203;BUFFER</code></a> or <a href="#CL_MEM_SVM_ATOMICS"><code>CL_&#8203;MEM_&#8203;SVM_&#8203;ATOMICS</code></a> is specified in
 <em>flags</em> and these are not supported by at least one device in <em>context</em>.</p>
 </li>
 <li>
@@ -12976,7 +13303,7 @@
 defined in the <a href="#svm-flags-table">SVM Memory Flags</a> table.</p>
 </li>
 <li>
-<p><em>size</em> is 0 or &gt; CL_DEVICE_MAX_MEM_ALLOC_SIZE value for any device in
+<p><em>size</em> is 0 or &gt; <a href="#CL_DEVICE_MAX_MEM_ALLOC_SIZE"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;MEM_&#8203;ALLOC_&#8203;SIZE</code></a> value for any device in
 <em>context</em>.</p>
 </li>
 <li>
@@ -12988,129 +13315,113 @@
 </li>
 </ul>
 </div>
-<div class="paragraph">
-<p>Calling <strong>clSVMAlloc</strong> does not itself provide consistency for the shared
-memory region.
-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">
-<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 <code>NULL</code>.</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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c"><span class="directive">void</span> clSVMFree(cl_context context,
-               <span class="directive">void</span> *svm_pointer)</code></pre>
-</div>
-</div>
 <div class="paragraph">
-<p>frees a shared virtual memory buffer allocated using <strong>clSVMAlloc</strong>.</p>
+<p>To free a shared virtual memory buffer allocated using <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a>, call
+the function</p>
 </div>
-<div class="paragraph">
+<div id="clSVMFree" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++"><span class="directive">void</span> clSVMFree(
+    cl_context context,
+    <span class="directive">void</span>* svm_pointer);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <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>.
+</li>
+<li>
+<p><em>svm_pointer</em> must be the value returned by a call to <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a>.
 If a <code>NULL</code> pointer is passed in <em>svm_pointer</em>, no action occurs.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>Note that <strong>clSVMFree</strong> does not wait for previously enqueued commands that
+<p>Note that <a href="#clSVMFree"><strong>clSVMFree</strong></a> 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
+This can be done by enqueuing a blocking operation such as <a href="#clFinish"><strong>clFinish</strong></a>,
+<a href="#clWaitForEvents"><strong>clWaitForEvents</strong></a>, <a href="#clEnqueueReadBuffer"><strong>clEnqueueReadBuffer</strong></a> or by registering a callback with
 the events associated with enqueued commands and when the last enqueued
 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.
-In addition, if a buffer object is created using <strong>clCreateBuffer</strong> with
+In addition, if a buffer object is created using <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> 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
+<p>The <a href="#clEnqueueSVMFree"><strong>clEnqueueSVMFree</strong></a> API can also be used to enqueue a callback to free
+the shared virtual memory buffer allocated using <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> or a shared
 system memory pointer.</p>
 </div>
-<div class="paragraph">
-<p>The function</p>
 </div>
-<div class="listingblock">
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueSVMFree(cl_command_queue command_queue,
-                        cl_uint num_svm_pointers,
-                        <span class="directive">void</span> *svm_pointers[],
-                        <span class="directive">void</span> (CL_CALLBACK *pfn_free_func)
-                            (cl_command_queue queue,
-                            cl_uint num_svm_pointers,
-                            <span class="directive">void</span> *svm_pointers[],
-                            <span class="directive">void</span> *user_data),
-                        <span class="directive">void</span> *user_data,
-                        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>enqueues a command to free the shared virtual memory allocated using
-<strong>clSVMAlloc</strong> or a shared system memory pointer.</p>
+<p>To enqueue a command to free the shared virtual memory allocated using
+<a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> or a shared system memory pointer, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueSVMFree" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueSVMFree(
+    cl_command_queue command_queue,
+    cl_uint num_svm_pointers,
+    <span class="directive">void</span>* svm_pointers[],
+    <span class="directive">void</span> (CL_CALLBACK* pfn_free_func)(cl_command_queue queue, cl_uint num_svm_pointers, <span class="directive">void</span>* svm_pointers[], <span class="directive">void</span>* user_data),
+    <span class="directive">void</span>* user_data,
+    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="ulist">
+<ul>
+<li>
 <p><em>command_queue</em> is a valid host command-queue.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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
+Each pointer in <em>svm_pointers</em> that was allocated using <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> 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">
+</li>
+<li>
 <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
+which <a href="#clEnqueueSVMFree"><strong>clEnqueueSVMFree</strong></a> 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 <code>NULL</code>, all pointers specified in <em>svm_pointers</em> must
-be allocated using <strong>clSVMAlloc</strong> and the OpenCL implementation will free
+be allocated using <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> 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>.
+<a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a>.
 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">
+</li>
+<li>
 <p><em>user_data</em> will be passed as the <em>user_data</em> argument when <em>pfn_free_func</em>
 is called.
 <em>user_data</em> can be <code>NULL</code>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 <code>NULL</code>, then <strong>clEnqueueSVMFree</strong> does not wait on any
+complete before <a href="#clEnqueueSVMFree"><strong>clEnqueueSVMFree</strong></a> can be executed.
+If <em>event_wait_list</em> is <code>NULL</code>, then <a href="#clEnqueueSVMFree"><strong>clEnqueueSVMFree</strong></a> 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
@@ -13121,8 +13432,8 @@
 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">
+</li>
+<li>
 <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.
@@ -13132,96 +13443,90 @@
 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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clEnqueueSVMFree</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clEnqueueSVMFree"><strong>clEnqueueSVMFree</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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</em> is
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>num_svm_pointers</em> is 0 and <em>svm_pointers</em> is
 non-<code>NULL</code>, <em>or</em> if <em>svm_pointers</em> is <code>NULL</code> and <em>num_svm_pointers</em> is
 not 0.</p>
 </li>
 <li>
-<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueSVMMemcpy(cl_command_queue command_queue,
-                          cl_bool blocking_copy,
-                          <span class="directive">void</span> *dst_ptr,
-                          <span class="directive">const</span> <span class="directive">void</span> *src_ptr,
-                          size_t size,
-                          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>To enqueue a command to do a memcpy operation, call the function</p>
+</div>
+<div id="clEnqueueSVMMemcpy" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueSVMMemcpy(
+    cl_command_queue command_queue,
+    cl_bool blocking_copy,
+    <span class="directive">void</span>* dst_ptr,
+    <span class="directive">const</span> <span class="directive">void</span>* src_ptr,
+    size_t size,
+    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="ulist">
+<ul>
+<li>
 <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 <strong>clSVMAlloc</strong> then the
+If either <em>dst_ptr</em> or <em>src_ptr</em> is allocated using <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> then the
 OpenCL context allocated against must match that of <em>command_queue</em>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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
+</li>
+<li>
+<p>If <em>blocking_copy</em> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> i.e. the copy command is blocking,
+<a href="#clEnqueueSVMMemcpy"><strong>clEnqueueSVMMemcpy</strong></a> 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> points 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
-<em>dst_ptr</em> points to can be used by the application.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>size</em> is the size in bytes of data being copied.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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
@@ -13235,8 +13540,8 @@
 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">
+</li>
+<li>
 <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.
@@ -13246,84 +13551,105 @@
 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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clEnqueueSVMMemcpy</strong> returns CL_SUCCESS if the function is executed
+<p>If <em>blocking_copy</em> is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> i.e. the copy command is non-blocking,
+<a href="#clEnqueueSVMMemcpy"><strong>clEnqueueSVMMemcpy</strong></a> queues a non-blocking copy command and returns.
+The contents of the buffer that <em>dst_ptr</em> points 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
+<em>dst_ptr</em> points to can be used by the application.</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 <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> 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><a href="#clEnqueueSVMMemcpy"><strong>clEnqueueSVMMemcpy</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the copy operation is
+<p><a href="#CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"><code>CL_&#8203;EXEC_&#8203;STATUS_&#8203;ERROR_&#8203;FOR_&#8203;EVENTS_&#8203;IN_&#8203;WAIT_&#8203;LIST</code></a> 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 <code>NULL</code>.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>dst_ptr</em> or <em>src_ptr</em> are <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_MEM_COPY_OVERLAP if the values specified for <em>dst_ptr</em>, <em>src_ptr</em> and
+<p><a href="#CL_MEM_COPY_OVERLAP"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;OVERLAP</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueSVMMemFill(cl_command_queue command_queue,
-                           <span class="directive">void</span> *svm_ptr,
-                           <span class="directive">const</span> <span class="directive">void</span> *pattern,
-                           size_t pattern_size,
-                           size_t size,
-                           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>enqueues a command to fill a region in memory with a pattern of a given
-pattern size.</p>
+<p>To enqueue a command to fill a region in memory with a pattern of a given
+pattern size, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueSVMMemFill" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueSVMMemFill(
+    cl_command_queue command_queue,
+    <span class="directive">void</span>* svm_ptr,
+    <span class="directive">const</span> <span class="directive">void</span>* pattern,
+    size_t pattern_size,
+    size_t size,
+    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="ulist">
+<ul>
+<li>
 <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">
+</li>
+<li>
 <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
+If <em>svm_ptr</em> is allocated using <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> 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">
+</li>
+<li>
 <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.
@@ -13338,12 +13664,12 @@
 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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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
@@ -13357,98 +13683,142 @@
 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">
+</li>
+<li>
 <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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead.
+<a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a> can be used instead.
 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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clEnqueueSVMMemFill</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clEnqueueSVMMemFill"><strong>clEnqueueSVMMemFill</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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 <code>NULL</code>.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>svm_ptr</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>svm_ptr</em> is not aligned to <em>pattern_size</em> bytes.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> or if <em>pattern_size</em> is 0 or if
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>pattern</em> is <code>NULL</code> 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>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueSVMMap(cl_command_queue command_queue,
-                       cl_bool blocking_map,
-                       cl_map_flags map_flags,
-                       <span class="directive">void</span> *svm_ptr,
-                       size_t size,
-                       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>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>
+<p>To enqueue a command that will allow the host to update a region of a SVM
+buffer, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueSVMMap" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueSVMMap(
+    cl_command_queue command_queue,
+    cl_bool blocking_map,
+    cl_map_flags flags,
+    <span class="directive">void</span>* svm_ptr,
+    size_t size,
+    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="ulist">
+<ul>
+<li>
 <p><em>command_queue</em> must be a valid host command-queue.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>blocking_map</em> indicates if the map operation is <em>blocking</em> or
 <em>non-blocking</em>.</p>
+</li>
+<li>
+<p><em>map_flags</em> is a bit-field and is described in the
+<a href="#memory-map-flags-table">Memory Map Flags</a> table.</p>
+</li>
+<li>
+<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 <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> then it must be allocated from
+the same context from which <em>command_queue</em> was created.
+Otherwise the behavior is undefined.</p>
+</li>
+<li>
+<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.
+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>
+</li>
+<li>
+<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.
+<a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a> can be used instead.
+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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>If <em>blocking_map</em> is CL_TRUE, <strong>clEnqueueSVMMap</strong> does not return until the
+<p>If <em>blocking_map</em> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>, <a href="#clEnqueueSVMMap"><strong>clEnqueueSVMMap</strong></a> 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
+<p>If <em>blocking_map</em> is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> 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
@@ -13457,117 +13827,87 @@
 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 the
-<a href="#memory-map-flags-table">Memory Map Flags</a> table.</p>
+<p>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>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 <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.
-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 <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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead.
-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>clEnqueueSVMMap</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clEnqueueSVMMap"><strong>clEnqueueSVMMap</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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 <code>NULL</code>.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>svm_ptr</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>size</em> is 0 or if values specified in <em>map_flags</em>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>size</em> is 0 or if values specified in <em>map_flags</em>
 are not valid.</p>
 </li>
 <li>
-<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the map operation is
+<p><a href="#CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"><code>CL_&#8203;EXEC_&#8203;STATUS_&#8203;ERROR_&#8203;FOR_&#8203;EVENTS_&#8203;IN_&#8203;WAIT_&#8203;LIST</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueSVMUnmap(cl_command_queue command_queue,
-                         <span class="directive">void</span> *svm_ptr,
-                         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>enqueues a command to indicate that the host has completed updating the
+<p>To enqueue 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>
+<a href="#clEnqueueSVMMap"><strong>clEnqueueSVMMap</strong></a>, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueSVMUnmap" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueSVMUnmap(
+    cl_command_queue command_queue,
+    <span class="directive">void</span>* svm_ptr,
+    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="ulist">
+<ul>
+<li>
 <p><em>command_queue</em> must be a valid host command-queue.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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
+<a href="#clEnqueueSVMMap"><strong>clEnqueueSVMMap</strong></a>.
+If <em>svm_ptr</em> is allocated using <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> 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">
+</li>
+<li>
 <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 <code>NULL</code>, then <strong>clEnqueueUnmap</strong> does not wait on any
+complete before <a href="#clEnqueueSVMUnmap"><strong>clEnqueueSVMUnmap</strong></a> can be executed.
+If <em>event_wait_list</em> is <code>NULL</code>, then <a href="#clEnqueueSVMUnmap"><strong>clEnqueueSVMUnmap</strong></a> 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
@@ -13578,57 +13918,59 @@
 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">
+</li>
+<li>
 <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.
-<strong>clEnqueueBarrierWithWaitList</strong> can be used instead.
+<a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a> can be used instead.
 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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clEnqueueSVMUnmap</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clEnqueueSVMMap"><strong>clEnqueueSVMMap</strong></a> and <a href="#clEnqueueSVMUnmap"><strong>clEnqueueSVMUnmap</strong></a> act as synchronization points for
+the region of the SVM buffer specified in these calls.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clEnqueueSVMUnmap"><strong>clEnqueueSVMUnmap</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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 <code>NULL</code>.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>svm_ptr</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> if <em>event_wait_list</em> is <code>NULL</code> and
 <em>num_events_in_wait_list</em> &gt; 0, or if <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_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="admonitionblock note">
 <table>
 <tr>
@@ -13657,56 +13999,51 @@
 </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>
+buffers allocated using <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> or fine-grained system allocations).</p>
 </div>
 </td>
 </tr>
 </table>
 </div>
-<div class="paragraph">
-<p>The function</p>
 </div>
-<div class="listingblock">
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueSVMMigrateMem(cl_command_queue command_queue,
-                              cl_uint num_svm_pointers,
-                              <span class="directive">const</span> <span class="directive">void</span> **svm_pointers,
-                              <span class="directive">const</span> size_t *sizes,
-                              cl_mem_migration_flags flags,
-                              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>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>
+<p>To enqueue a command to indicate which device a set of ranges of SVM
+allocations should be associated with, call the function</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 id="clEnqueueSVMMigrateMem" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueSVMMigrateMem(
+    cl_command_queue command_queue,
+    cl_uint num_svm_pointers,
+    <span class="directive">const</span> <span class="directive">void</span>** svm_pointers,
+    <span class="directive">const</span> size_t* sizes,
+    cl_mem_migration_flags flags,
+    cl_uint num_events_in_wait_list,
+    <span class="directive">const</span> cl_event* event_wait_list,
+    cl_event* event);</code></pre>
 </div>
-<div class="paragraph">
+</div>
+<div class="ulist">
+<ul>
+<li>
 <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">
+</li>
+<li>
 <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 <em>sizes</em> is not
 <code>NULL</code>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+to <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a>.</p>
+</li>
+<li>
 <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.
@@ -13714,13 +14051,13 @@
 <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">
+</li>
+<li>
 <p><em>flags</em> is a bit-field that is used to specify migration options.
 The <a href="#migration-flags-table">Memory Migration Flags</a> describes the possible
 values for <em>flags</em>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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
@@ -13734,8 +14071,8 @@
 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">
+</li>
+<li>
 <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.
@@ -13744,48 +14081,63 @@
 that waits for this command to complete.
 If the <em>event_wait_list</em> and <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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clEnqueueSVMMigrateMem</strong> returns CL_SUCCESS if the function is executed
+<p>Once the event returned by <a href="#clEnqueueSVMMigrateMem"><strong>clEnqueueSVMMigrateMem</strong></a> has become <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>,
+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 <a href="#clEnqueueSVMMigrateMem"><strong>clEnqueueSVMMigrateMem</strong></a>
+could result in undefined results.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clEnqueueSVMMigrateMem"><strong>clEnqueueSVMMigrateMem</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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>num_svm_pointers</em> is zero or <em>svm_pointers</em> is
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>num_svm_pointers</em> is zero or <em>svm_pointers</em> is
 <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>sizes</em>[i] is non-zero range [<em>svm_pointers</em>[i],
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>sizes</em>[i] is non-zero 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>
+<a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> allocation.</p>
 </li>
 <li>
-<p>CL_INVALID_EVENT_WAIT_LIST if <em>event_wait_list</em> is <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> if <em>event_wait_list</em> is <code>NULL</code> and
 <em>num_events_in_wait_list</em> &gt; 0, or if <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_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="sect3">
 <h4 id="_memory_consistency_for_svm_allocations">5.6.2. Memory consistency for SVM allocations</h4>
 <div class="paragraph">
@@ -13801,20 +14153,20 @@
 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
+The host can create a cl_mem buffer object using <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> with
+<a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> 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
+<a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> and <a href="#clEnqueueUnmapMemObject"><strong>clEnqueueUnmapMemObject</strong></a> and the existing
 <a href="#accessing-mapped-regions">access rules for memory objects</a> 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
+<a href="#CL_DEVICE_SVM_ATOMICS"><code>CL_&#8203;DEVICE_&#8203;SVM_&#8203;ATOMICS</code></a> is set in <a href="#CL_DEVICE_SVM_CAPABILITIES"><code>CL_&#8203;DEVICE_&#8203;SVM_&#8203;CAPABILITIES</code></a>), 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
@@ -13837,23 +14189,25 @@
 </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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_sampler clCreateSamplerWithProperties(cl_context context,
-                                         <span class="directive">const</span> cl_sampler_properties *sampler_properties,
-                                         cl_int *errcode_ret)</code></pre>
-</div>
-</div>
 <div class="paragraph">
-<p>creates a sampler object.</p>
+<p>To create a sampler object, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clCreateSamplerWithProperties" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_sampler clCreateSamplerWithProperties(
+    cl_context context,
+    <span class="directive">const</span> cl_sampler_properties* sampler_properties,
+    cl_int* errcode_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>context</em> must be a valid OpenCL context.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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
@@ -13865,13 +14219,15 @@
 <em>sampler_properties</em>, its default value will be used.
 <em>sampler_properties</em> can be <code>NULL</code> in which case the default values for
 supported sampler properties will be used.</p>
+</li>
+</ul>
 </div>
 <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>
+<caption class="title">Table 23. List of supported sampler creation properties by <a href="#clCreateSamplerWithProperties">clCreateSamplerWithProperties</a></caption>
 <colgroup>
-<col style="width: 34%;">
-<col style="width: 33%;">
-<col style="width: 33%;">
+<col style="width: 33.3333%;">
+<col style="width: 16.6666%;">
+<col style="width: 50.0001%;">
 </colgroup>
 <thead>
 <tr>
@@ -13882,45 +14238,58 @@
 </thead>
 <tbody>
 <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"><a id="CL_SAMPLER_NORMALIZED_COORDS"></a><a href="#CL_SAMPLER_NORMALIZED_COORDS"><code>CL_&#8203;SAMPLER_&#8203;NORMALIZED_&#8203;COORDS</code></a></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 in sampler_properties) is CL_TRUE.</p></td>
+        specified in sampler_properties) is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a id="CL_SAMPLER_ADDRESSING_MODE"></a><a href="#CL_SAMPLER_ADDRESSING_MODE"><code>CL_&#8203;SAMPLER_&#8203;ADDRESSING_&#8203;MODE</code></a></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>
-        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>
+        reading from an image.
+        Valid values are:</p>
+<p class="tableblock">        <a id="CL_ADDRESS_NONE"></a><a href="#CL_ADDRESS_NONE"><code>CL_&#8203;ADDRESS_&#8203;NONE</code></a> - Behavior is undefined for out-of-range
+        image coordinates.</p>
+<p class="tableblock">        <a id="CL_ADDRESS_CLAMP_TO_EDGE"></a><a href="#CL_ADDRESS_CLAMP_TO_EDGE"><code>CL_&#8203;ADDRESS_&#8203;CLAMP_&#8203;TO_&#8203;EDGE</code></a> - Out-of-range image coordinates
+        are clamped to the edge of the image.</p>
+<p class="tableblock">        <a id="CL_ADDRESS_CLAMP"></a><a href="#CL_ADDRESS_CLAMP"><code>CL_&#8203;ADDRESS_&#8203;CLAMP</code></a> - Out-of-range image coordinates are
+        assigned a border color value.</p>
+<p class="tableblock">        <a id="CL_ADDRESS_REPEAT"></a><a href="#CL_ADDRESS_REPEAT"><code>CL_&#8203;ADDRESS_&#8203;REPEAT</code></a> - Out-of-range image coordinates read
+        from the image as-if the image data were replicated in all dimensions.</p>
+<p class="tableblock">        <a id="CL_ADDRESS_MIRRORED_REPEAT"></a><a href="#CL_ADDRESS_MIRRORED_REPEAT"><code>CL_&#8203;ADDRESS_&#8203;MIRRORED_&#8203;REPEAT</code></a> - Out-of-range image coordinates
+        read from the image as-if the image data were replicated in all
+        dimensions, mirroring the image contents at the edge of each
+        replication.</p>
+<p class="tableblock">        The default is <a href="#CL_ADDRESS_CLAMP"><code>CL_&#8203;ADDRESS_&#8203;CLAMP</code></a>.</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"><a id="CL_SAMPLER_FILTER_MODE"></a><a href="#CL_SAMPLER_FILTER_MODE"><code>CL_&#8203;SAMPLER_&#8203;FILTER_&#8203;MODE</code></a></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
+<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies the type of filter that is 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>
+<p class="tableblock">        <a id="CL_FILTER_NEAREST"></a><a href="#CL_FILTER_NEAREST"><code>CL_&#8203;FILTER_&#8203;NEAREST</code></a> - Returns the image element nearest
+        to the image coordinate.</p>
+<p class="tableblock">        <a id="CL_FILTER_LINEAR"></a><a href="#CL_FILTER_LINEAR"><code>CL_&#8203;FILTER_&#8203;LINEAR</code></a> - Returns a weighted average of the
+        four image elements nearest to the image coordinate.</p>
+<p class="tableblock">        The default value is <a href="#CL_FILTER_NEAREST"><code>CL_&#8203;FILTER_&#8203;NEAREST</code></a>.</p></td>
 </tr>
 </tbody>
 </table>
-<div class="paragraph">
+<div class="ulist">
+<ul>
+<li>
 <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>
+</li>
+</ul>
 </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
+<p><a href="#clCreateSamplerWithProperties"><strong>clCreateSamplerWithProperties</strong></a> returns a valid non-zero sampler object and
+<em>errcode_ret</em> is set to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the sampler 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>
@@ -13928,140 +14297,174 @@
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> if <em>context</em> is not a valid context.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if the property name in <em>sampler_properties</em> is not a
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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 the
-<a href="#device-queries-table">Device Queries</a> table is CL_FALSE).</p>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if images are not supported by any device
+associated with <em>context</em> (i.e. <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> specified in the
+<a href="#device-queries-table">Device Queries</a> table is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>).</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clRetainSampler(cl_sampler sampler)</code></pre>
+<div class="paragraph">
+<p>To retain a sampler object, call the function</p>
 </div>
+<div id="clRetainSampler" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clRetainSampler(
+    cl_sampler sampler);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>sampler</em> specifies the sampler to be released.</p>
+</li>
+</ul>
 </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
+<p>The <em>sampler</em> reference count is incremented.
+<a href="#clCreateSamplerWithProperties"><strong>clCreateSamplerWithProperties</strong></a> performs an implicit retain.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clRetainSampler"><strong>clRetainSampler</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_SAMPLER"><code>CL_&#8203;INVALID_&#8203;SAMPLER</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clReleaseSampler(cl_sampler sampler)</code></pre>
+<div class="paragraph">
+<p>To release a sampler object, call the function</p>
 </div>
+<div id="clReleaseSampler" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clReleaseSampler(
+    cl_sampler sampler);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>sampler</em> specifies the sampler to be released.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>decrements the <em>sampler</em> reference count.
+<p>The <em>sampler</em> reference count is decremented.
 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
+finished.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clReleaseSampler"><strong>clReleaseSampler</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_SAMPLER"><code>CL_&#8203;INVALID_&#8203;SAMPLER</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+the object or by calling <a href="#clRetainSampler"><strong>clRetainSampler</strong></a> causes undefined behavior.</p>
+</div>
+</div>
 </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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetSamplerInfo(cl_sampler sampler,
-                        cl_sampler_info param_name,
-                        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 sampler object.</p>
+<p>To return information about a sampler object, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clGetSamplerInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetSamplerInfo(
+    cl_sampler sampler,
+    cl_sampler_info param_name,
+    size_t param_value_size,
+    <span class="directive">void</span>* param_value,
+    size_t* param_value_size_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>sampler</em> specifies the sampler being queried.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 the
+<em>param_value</em> by <a href="#clGetSamplerInfo"><strong>clGetSamplerInfo</strong></a> is described in the
 <a href="#sampler-info-table">Sampler Object Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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="#sampler-info-table">Sampler Object Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </div>
 <table id="sampler-info-table" class="tableblock frame-all grid-all stretch">
-<caption class="title">Table 25. <strong>clGetSamplerInfo</strong> parameter queries</caption>
+<caption class="title">Table 24. List of supported param_names by <a href="#clGetSamplerInfo">clGetSamplerInfo</a></caption>
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -14076,27 +14479,27 @@
 </thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_SAMPLER_REFERENCE_COUNT</strong><sup>13</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_SAMPLER_REFERENCE_COUNT"></a><a href="#CL_SAMPLER_REFERENCE_COUNT"><code>CL_&#8203;SAMPLER_&#8203;REFERENCE_&#8203;COUNT</code></a><sup>13</sup></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"><a id="CL_SAMPLER_CONTEXT"></a><a href="#CL_SAMPLER_CONTEXT"><code>CL_&#8203;SAMPLER_&#8203;CONTEXT</code></a></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"><a id="CL_SAMPLER_NORMALIZED_COORDS"></a><a href="#CL_SAMPLER_NORMALIZED_COORDS"><code>CL_&#8203;SAMPLER_&#8203;NORMALIZED_&#8203;COORDS</code></a></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"><a id="CL_SAMPLER_ADDRESSING_MODE"></a><a href="#CL_SAMPLER_ADDRESSING_MODE"><code>CL_&#8203;SAMPLER_&#8203;ADDRESSING_&#8203;MODE</code></a></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"><a id="CL_SAMPLER_FILTER_MODE"></a><a href="#CL_SAMPLER_FILTER_MODE"><code>CL_&#8203;SAMPLER_&#8203;FILTER_&#8203;MODE</code></a></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>
@@ -14113,40 +14516,42 @@
 </dl>
 </div>
 <div class="paragraph">
-<p><strong>clGetSamplerInfo</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clGetSamplerInfo"><strong>clGetSamplerInfo</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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="#sampler-info-table">Sampler Object Queries</a> table and
 <em>param_value</em> is not <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_SAMPLER if <em>sampler</em> is a not a valid sampler object.</p>
+<p><a href="#CL_INVALID_SAMPLER"><code>CL_&#8203;INVALID_&#8203;SAMPLER</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="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 <code>__kernel</code> qualifier in the program source.
+functions declared with the <code><em>kernel</code> qualifier in the program source.
 OpenCL programs may also contain auxiliary functions and constant data that
-can be used by <code>__kernel</code> functions.
+can be used by <code></em>kernel</code> 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>
@@ -14173,22 +14578,53 @@
 </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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_program clCreateProgramWithSource(cl_context context,
-                                     cl_uint count,
-                                     <span class="directive">const</span> <span class="predefined-type">char</span> **strings,
-                                     <span class="directive">const</span> size_t *lengths,
-                                     cl_int *errcode_ret)</code></pre>
+<div class="paragraph">
+<p>To creates a program object for a context and load source code into that
+object, call the function</p>
 </div>
+<div id="clCreateProgramWithSource" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_program clCreateProgramWithSource(
+    cl_context context,
+    cl_uint count,
+    <span class="directive">const</span> <span class="predefined-type">char</span>** strings,
+    <span class="directive">const</span> size_t* lengths,
+    cl_int* errcode_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>context</em> must be a valid OpenCL context.</p>
+</li>
+<li>
+<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>
+</li>
+<li>
+<p><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 <code>NULL</code>, 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>
+</li>
+<li>
+<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>
+</li>
+</ul>
 </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
+<p>The source code specified by <em>strings</em> will be loaded into the program
+object.</p>
+</div>
+<div class="paragraph">
+<p>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
@@ -14197,29 +14633,8 @@
 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 <code>NULL</code>, 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 <code>NULL</code>, 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
+<p><a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a> returns a valid non-zero program object and
+<em>errcode_ret</em> is set to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the program 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>
@@ -14227,52 +14642,63 @@
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> if <em>context</em> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>count</em> is zero or if <em>strings</em> or any entry in
 <em>strings</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_program clCreateProgramWithIL(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 program object for a context, and loads the IL pointed to by <em>il</em>
-and with length in bytes <em>length</em> into the program object.  The devices
-associated with the program object are the devices associated with <em>context</em>.</p>
+<p>To creates a program object for a context and load code in an intermediate
+language into that object, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clCreateProgramWithIL" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_program clCreateProgramWithIL(
+    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="ulist">
+<ul>
+<li>
 <p><em>context</em> must be a valid OpenCL context.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>il</em> is a pointer to a <em>length</em>-byte block of memory containing SPIR-V or an
 implementation-defined intermediate language.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </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
+<p>The IL pointed to by <em>il</em> and with length in bytes <em>length</em> will be loaded
+into the program object.
+The devices associated with the program object are the devices associated
+with <em>context</em>.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clCreateProgramWithIL"><strong>clCreateProgramWithIL</strong></a> returns a valid non-zero program object and
+<em>errcode_ret</em> is set to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the program 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>
@@ -14280,54 +14706,72 @@
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> if <em>context</em> is not a valid context.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>il</em> is <code>NULL</code> or if <em>length</em> is zero.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>il</em> is <code>NULL</code> or if <em>length</em> is zero.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if the <em>length</em>-byte memory pointed to by <em>il</em> does not
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_program clCreateProgramWithBinary(cl_context context,
-                                     cl_uint num_devices,
-                                     <span class="directive">const</span> cl_device_id *device_list,
-                                     <span class="directive">const</span> size_t *lengths,
-                                     <span class="directive">const</span> <span class="predefined-type">unsigned</span> <span class="predefined-type">char</span> **binaries,
-                                     cl_int *binary_status,
-                                     cl_int *errcode_ret)</code></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>
+<p>To create a program object for a context and load binary bits into that
+object, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clCreateProgramWithBinary" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_program clCreateProgramWithBinary(
+    cl_context context,
+    cl_uint num_devices,
+    <span class="directive">const</span> cl_device_id* device_list,
+    <span class="directive">const</span> size_t* lengths,
+    <span class="directive">const</span> <span class="predefined-type">unsigned</span> <span class="predefined-type">char</span>** binaries,
+    cl_int* binary_status,
+    cl_int* errcode_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>context</em> must be a valid OpenCL context.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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-<code>NULL</code> value.
 The binaries are loaded for devices specified in this list.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>num_devices</em> is the number of devices listed in <em>device_list</em>.</p>
+</li>
+<li>
+<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>
+</li>
+<li>
+<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 <code>NULL</code> pointer.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
 <p>The devices associated with the program object will be the list of devices
@@ -14336,20 +14780,9 @@
 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 <code>NULL</code> 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>
+<p>The program binaries specified by <em>binaries</em> will be loaded into the program
+object.
+They contain bits that describe one of the following:</p>
 </div>
 <div class="ulist">
 <ul>
@@ -14377,58 +14810,20 @@
 <p>Implementation-specific intermediate representation (IR) which will be
 converted to the device-specific code.</p>
 </li>
-</ul>
-</div>
-<div class="paragraph">
+<li>
 <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
+It is an array of <em>num_devices</em> entries and returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> in
 <em>binary_status</em>[i] if binary was successfully loaded for device specified by
-<em>device_list</em>[i]; otherwise returns CL_INVALID_VALUE if <em>lengths</em>[i] is zero
-or if <em>binaries</em>[i] is a <code>NULL</code> value or CL_INVALID_BINARY in
+<em>device_list</em>[i]; otherwise returns <a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>lengths</em>[i] is zero
+or if <em>binaries</em>[i] is a <code>NULL</code> value or <a href="#CL_INVALID_BINARY"><code>CL_&#8203;INVALID_&#8203;BINARY</code></a> in
 <em>binary_status</em>[i] if program binary is not a valid binary for the specified
 device.
 If <em>binary_status</em> is <code>NULL</code>, it is ignored.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>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 <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 <em>device_list</em> is <code>NULL</code> 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 <code>NULL</code> or if any entry
-in <em>lengths</em>[i] is zero or <em>binaries</em>[i] is <code>NULL</code>.</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>
@@ -14443,31 +14838,78 @@
 help significantly reduce the application initialization time.</p>
 </div>
 <div class="paragraph">
-<p>The function</p>
+<p><a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a> returns a valid non-zero program object and
+<em>errcode_ret</em> is set to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the program 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="listingblock">
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> if <em>context</em> is not a valid context.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>device_list</em> is <code>NULL</code> or <em>num_devices</em> is zero.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> 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><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>lengths</em> or <em>binaries</em> are <code>NULL</code> or if any entry
+in <em>lengths</em>[i] is zero or <em>binaries</em>[i] is <code>NULL</code>.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_BINARY"><code>CL_&#8203;INVALID_&#8203;BINARY</code></a> 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><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_program clCreateProgramWithBuiltInKernels(cl_context context,
-                                             cl_uint num_devices,
-                                             <span class="directive">const</span> cl_device_id *device_list,
-                                             <span class="directive">const</span> <span class="predefined-type">char</span> *kernel_names,
-                                             cl_int *errcode_ret)</code></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>
+<p>To create a program object for a context and loads the information related
+to the built-in kernels into that object, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clCreateProgramWithBuiltInKernels" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_program clCreateProgramWithBuiltInKernels(
+    cl_context context,
+    cl_uint num_devices,
+    <span class="directive">const</span> cl_device_id* device_list,
+    <span class="directive">const</span> <span class="predefined-type">char</span>* kernel_names,
+    cl_int* errcode_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>context</em> must be a valid OpenCL context.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>num_devices</em> is the number of devices listed in <em>device_list</em>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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-<code>NULL</code> value.
 The built-in kernels are loaded for devices specified in this list.</p>
+</li>
+<li>
+<p><em>kernel_names</em> is a semi-colon separated list of built-in kernel names.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
 <p>The devices associated with the program object will be the list of devices
@@ -14476,11 +14918,8 @@
 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
+<p><a href="#clCreateProgramWithBuiltInKernels"><strong>clCreateProgramWithBuiltInKernels</strong></a> returns a valid non-zero program object
+and <em>errcode_ret</em> is set to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the program 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>
@@ -14488,113 +14927,176 @@
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> if <em>context</em> is not a valid context.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>device_list</em> is <code>NULL</code> or <em>num_devices</em> is zero.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>device_list</em> is <code>NULL</code> or <em>num_devices</em> is zero.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>kernel_names</em> is <code>NULL</code> or <em>kernel_names</em> contains
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>kernel_names</em> is <code>NULL</code> 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
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clRetainProgram(cl_program program)</code></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>
+<p>To retain a program object, call the function</p>
+</div>
+<div id="clRetainProgram" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clRetainProgram(
+    cl_program program);</code></pre>
+</div>
 </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>
+<p><em>program</em> is the program object to be retained.</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 clReleaseProgram(cl_program program)</code></pre>
-</div>
+<p>The <em>program</em> reference count is incremented.
+All APIs that create a program do an implicit retain.</p>
 </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
+<p><a href="#clRetainProgram"><strong>clRetainProgram</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_PROGRAM"><code>CL_&#8203;INVALID_&#8203;PROGRAM</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>To release a program object, call the function</p>
+</div>
+<div id="clReleaseProgram" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clReleaseProgram(
+    cl_program program);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>program</em> is the program object to be released.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The <em>program</em> reference count is decremented.
+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.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clReleaseProgram"><strong>clReleaseProgram</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the function is executed
+successfully.
+Otherwise, it returns one of the following errors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#CL_INVALID_PROGRAM"><code>CL_&#8203;INVALID_&#8203;PROGRAM</code></a> if <em>program</em> is not a valid program object.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+the object or by calling <a href="#clRetainProgram"><strong>clRetainProgram</strong></a> causes undefined behavior.</p>
 </div>
-<div class="paragraph">
-<p>The function</p>
 </div>
-<div class="listingblock">
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clSetProgramReleaseCallback(cl_program program,
-                                   <span class="directive">void</span> (CL_CALLBACK *pfn_notify)
-                                       (cl_program prog,
-                                       <span class="directive">void</span> *user_data),
-                                   <span class="directive">void</span> *user_data)</code></pre>
+<div class="paragraph">
+<p>To register a user callback function with a program object, call the
+function</p>
 </div>
+<div id="clSetProgramReleaseCallback" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clSetProgramReleaseCallback(
+    cl_program program,
+    <span class="directive">void</span> (CL_CALLBACK* pfn_notify)(cl_program program, <span class="directive">void</span>* user_data),
+    <span class="directive">void</span>* user_data);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>program</em> is a valid program object</p>
+</li>
+<li>
+<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 class="ulist">
+<ul>
+<li>
+<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>
+</li>
+<li>
+<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 <code>NULL</code>.</p>
+</li>
+</ul>
+</div>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>registers a user callback function with a program object.
-Each call to <strong>clSetProgramReleaseCallback</strong> registers the specified user
+<p>Each call to <a href="#clSetProgramReleaseCallback"><strong>clSetProgramReleaseCallback</strong></a> 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.
@@ -14605,102 +15107,84 @@
 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 <code>NULL</code>.</p>
-</div>
-<div class="paragraph">
-<p><strong>clSetProgramReleaseCallback</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clSetProgramReleaseCallback"><strong>clSetProgramReleaseCallback</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_PROGRAM"><code>CL_&#8203;INVALID_&#8203;PROGRAM</code></a> if <em>program</em> is not a valid program object.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>pfn_notify</em> is <code>NULL</code>.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>pfn_notify</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clSetProgramSpecializationConstant(cl_program program,
-                                          cl_uint spec_id,
-                                          size_t spec_size,
-                                          <span class="directive">const</span> <span class="directive">void</span> *spec_value)</code></pre>
-</div>
-</div>
 <div class="paragraph">
-<p>sets the value of a specialization constant.</p>
+<p>To set the value of a specialization constant, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clSetProgramSpecializationConstant" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clSetProgramSpecializationConstant(
+    cl_program program,
+    cl_uint spec_id,
+    size_t spec_size,
+    <span class="directive">const</span> <span class="directive">void</span>* spec_value);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <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 specialization constant whose value will be
+</li>
+<li>
+<p><em>spec_id</em> identifies the specialization constant whose value will be
 set.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 module.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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.
+the application after <a href="#clSetProgramSpecializationConstant"><strong>clSetProgramSpecializationConstant</strong></a> returns.
 This specialization value will be used by subsequent calls to
-<strong>clBuildProgram</strong> until another call to <strong>clSetProgramSpecializationConstant</strong>
+<a href="#clBuildProgram"><strong>clBuildProgram</strong></a> until another call to <a href="#clSetProgramSpecializationConstant"><strong>clSetProgramSpecializationConstant</strong></a>
 changes it.
 If a specialization constant is a boolean constant, <em>spec_value</em> should be a
-pointer to a cl_uchar value.
+pointer to a <code>cl_uchar</code> value.
 A value of zero will set the specialization constant to false; any other
 value will set it to true.</p>
+</li>
+</ul>
 </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>
+The values are used by a subsequent <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> call for the <em>program</em>.</p>
 </div>
 <div class="paragraph">
 <p>Application is not required to provide values for every specialization
@@ -14708,7 +15192,7 @@
 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
+<p><a href="#clSetProgramSpecializationConstant"><strong>clSetProgramSpecializationConstant</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the function is
 executed successfully.</p>
 </div>
 <div class="paragraph">
@@ -14717,181 +15201,194 @@
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_PROGRAM if <em>program</em> is not a valid program object created
+<p><a href="#CL_INVALID_PROGRAM"><code>CL_&#8203;INVALID_&#8203;PROGRAM</code></a> if <em>program</em> is not a valid program object created
 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
+<p><a href="#CL_INVALID_SPEC_ID"><code>CL_&#8203;INVALID_&#8203;SPEC_&#8203;ID</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>spec_size</em> does not match the size of the
 specialization constant in the module, or if <em>spec_value</em> is
 <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clBuildProgram(cl_program program,
-                      cl_uint num_devices,
-                      <span class="directive">const</span> cl_device_id *device_list,
-                      <span class="directive">const</span> <span class="predefined-type">char</span> *options,
-                      <span class="directive">void</span> (CL_CALLBACK *pfn_notify)
-                          (cl_program program,
-                          <span class="directive">void</span> *user_data),
-                      <span class="directive">void</span> *user_data)</code></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>
+<p>To build (compile &amp; link) a program executable, call the function</p>
 </div>
-<div class="paragraph">
-<p>The executable binary can be queried using <strong>clGetProgramInfo</strong>(<em>program</em>,
-CL_PROGRAM_BINARIES, &#8230;&#8203;) and can be specified to
-<strong>clCreateProgramWithBinary</strong> to create a new program object.</p>
+<div id="clBuildProgram" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clBuildProgram(
+    cl_program program,
+    cl_uint num_devices,
+    <span class="directive">const</span> cl_device_id* device_list,
+    <span class="directive">const</span> <span class="predefined-type">char</span>* options,
+    <span class="directive">void</span> (CL_CALLBACK* pfn_notify)(cl_program program, <span class="directive">void</span>* user_data),
+    <span class="directive">void</span>* user_data);</code></pre>
 </div>
-<div class="paragraph">
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>program</em> is the program object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 <code>NULL</code> 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-<code>NULL</code> 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">
+</li>
+<li>
 <p><em>num_devices</em> is the number of devices listed in <em>device_list</em>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 in <a href="#compiler-options">Compiler
 Options</a>.
-If the program was created using <strong>clCreateProgramWithBinary</strong> and <em>options</em>
+If the program was created using <a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a> and <em>options</em>
 is a <code>NULL</code> pointer, the program will be built as if <em>options</em> were the same
 as when the program binary was originally built.
-If the program was created using <strong>clCreateProgramWithBinary</strong> and <em>options</em>
+If the program was created using <a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a> 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">
+</li>
+<li>
 <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 <code>NULL</code>, <strong>clBuildProgram</strong> does not need to wait for
+If <em>pfn_notify</em> is not <code>NULL</code>, <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> 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 <code>NULL</code>, <strong>clBuildProgram</strong> does not return until the build
+If <em>pfn_notify</em> is <code>NULL</code>, <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> 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">
+<div class="ulist">
+<ul>
+<li>
 <p><em>user_data</em> will be passed as an argument when <em>pfn_notify</em> is called.
 <em>user_data</em> can be <code>NULL</code>.</p>
+</li>
+</ul>
+</div>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clBuildProgram</strong> returns CL_SUCCESS if the function is executed
+<p>The program executable is built 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.
+<a href="#clBuildProgram"><strong>clBuildProgram</strong></a> must be called for <em>program</em> created using
+<a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a>, <a href="#clCreateProgramWithIL"><strong>clCreateProgramWithIL</strong></a> or
+<a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a> to build the program executable for one or more
+devices associated with <em>program</em>.
+If <em>program</em> is created with <a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a>, 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 <a href="#clGetProgramInfo"><strong>clGetProgramInfo</strong></a>(<em>program</em>,
+<a href="#CL_PROGRAM_BINARIES"><code>CL_&#8203;PROGRAM_&#8203;BINARIES</code></a>, &#8230;&#8203;) and can be specified to
+<a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a> to create a new program object.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clBuildProgram"><strong>clBuildProgram</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_PROGRAM"><code>CL_&#8203;INVALID_&#8203;PROGRAM</code></a> if <em>program</em> is not a valid program object.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>device_list</em> is <code>NULL</code> and <em>num_devices</em> is greater
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>device_list</em> is <code>NULL</code> and <em>num_devices</em> is greater
 than zero, or if <em>device_list</em> is not <code>NULL</code> and <em>num_devices</em> is zero.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>pfn_notify</em> is <code>NULL</code> but <em>user_data</em> is not
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>pfn_notify</em> is <code>NULL</code> but <em>user_data</em> is not
 <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_DEVICE if OpenCL devices listed in <em>device_list</em> are not in
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> 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
+<p><a href="#CL_INVALID_BINARY"><code>CL_&#8203;INVALID_&#8203;BINARY</code></a> if <em>program</em> is created with
+<a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a> 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
+<p><a href="#CL_INVALID_BUILD_OPTIONS"><code>CL_&#8203;INVALID_&#8203;BUILD_&#8203;OPTIONS</code></a> 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 the
-<a href="#device-queries-table">Device Queries</a> table is set to CL_FALSE.</p>
+<p><a href="#CL_COMPILER_NOT_AVAILABLE"><code>CL_&#8203;COMPILER_&#8203;NOT_&#8203;AVAILABLE</code></a> if <em>program</em> is created with
+<a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a> and a compiler is not available i.e.
+<a href="#CL_DEVICE_COMPILER_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;COMPILER_&#8203;AVAILABLE</code></a> specified in the
+<a href="#device-queries-table">Device Queries</a> table is set to <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>.</p>
 </li>
 <li>
-<p>CL_BUILD_PROGRAM_FAILURE if there is a failure to build the program
+<p><a href="#CL_BUILD_PROGRAM_FAILURE"><code>CL_&#8203;BUILD_&#8203;PROGRAM_&#8203;FAILURE</code></a> if there is a failure to build the program
 executable.
-This error will be returned if <strong>clBuildProgram</strong> does not return until
+This error will be returned if <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> 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>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if the build of a program executable for any of the
+devices listed in <em>device_list</em> by a previous call to <a href="#clBuildProgram"><strong>clBuildProgram</strong></a>
 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>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> 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</strong>, <strong>clCreateProgramWithIL</strong> or
-<strong>clCreateProgramWithBinary</strong>.</p>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if <em>program</em> was not created with
+<a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a>, <a href="#clCreateProgramWithIL"><strong>clCreateProgramWithIL</strong></a> or
+<a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="sect3">
 <h4 id="_separate_compilation_and_linking_of_programs">5.8.5. Separate Compilation and Linking of Programs</h4>
 <div class="paragraph">
@@ -14920,63 +15417,57 @@
 </li>
 </ul>
 </div>
-<div class="paragraph">
-<p>The function</p>
-</div>
-<div class="listingblock">
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clCompileProgram(cl_program program,
-                        cl_uint num_devices,
-                        <span class="directive">const</span> cl_device_id *device_list,
-                        <span class="directive">const</span> <span class="predefined-type">char</span> *options,
-                        cl_uint num_input_headers,
-                        <span class="directive">const</span> cl_program *input_headers,
-                        <span class="directive">const</span> <span class="predefined-type">char</span> **header_include_names,
-                        <span class="directive">void</span> (CL_CALLBACK *pfn_notify)
-                            (cl_program program,
-                            <span class="directive">void</span> *user_data),
-                        <span class="directive">void</span> *user_data)</code></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, &#8230;&#8203;) and can be passed to <strong>clCreateProgramWithBinary</strong>
-to create a new program object.</p>
+<p>To compile a program&#8217;s source for all the devices or a specific device(s) in
+the OpenCL context associated with the program, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clCompileProgram" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clCompileProgram(
+    cl_program program,
+    cl_uint num_devices,
+    <span class="directive">const</span> cl_device_id* device_list,
+    <span class="directive">const</span> <span class="predefined-type">char</span>* options,
+    cl_uint num_input_headers,
+    <span class="directive">const</span> cl_program* input_headers,
+    <span class="directive">const</span> <span class="predefined-type">char</span>** header_include_names,
+    <span class="directive">void</span> (CL_CALLBACK* pfn_notify)(cl_program program, <span class="directive">void</span>* user_data),
+    <span class="directive">void</span>* user_data);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>program</em> is the program object that is the compilation target.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 <code>NULL</code> value, the compile is performed for all devices
 associated with <em>program</em>.
 If <em>device_list</em> is a non-<code>NULL</code> value, the compile is performed for devices
 specified in this list.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>num_devices</em> is the number of devices listed in <em>device_list</em>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 in <a href="#compiler-options">Compiler Options</a>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <p><em>input_headers</em> is an array of program embedded headers created with
-<strong>clCreateProgramWithSource</strong>.</p>
-</div>
-<div class="paragraph">
+<a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a>.</p>
+</li>
+<li>
 <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
@@ -14988,9 +15479,46 @@
 <a href="#preprocessor-options">Preprocessor options</a>).
 If multiple entries in <em>header_include_names</em> refer to the same header name,
 the first one encountered will be used.</p>
+</li>
+<li>
+<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 <code>NULL</code>, <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> 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 <code>NULL</code>, <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> 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 class="ulist">
+<ul>
+<li>
+<p><em>user_data</em> will be passed as an argument when <em>pfn_notify</em> is called.
+<em>user_data</em> can be <code>NULL</code>.</p>
+</li>
+</ul>
+</div>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>If <em>program</em> was created using <strong>clCreateProgramWithIL</strong>, then
+<p>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 <a href="#clGetProgramInfo"><strong>clGetProgramInfo</strong></a>(<em>program</em>,
+<a href="#CL_PROGRAM_BINARIES"><code>CL_&#8203;PROGRAM_&#8203;BINARIES</code></a>, &#8230;&#8203;) and can be passed to <a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a>
+to create a new program object.</p>
+</div>
+<div class="paragraph">
+<p>If <em>program</em> was created using <a href="#clCreateProgramWithIL"><strong>clCreateProgramWithIL</strong></a>, then
 <em>num_input_headers</em>, <em>input_headers</em>, and <em>header_include_names</em> are
 ignored.</p>
 </div>
@@ -15037,163 +15565,131 @@
 </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 <code>NULL</code>, <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 <code>NULL</code>, <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 <code>NULL</code>.</p>
-</div>
-<div class="paragraph">
-<p><strong>clCompileProgram</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clCompileProgram"><strong>clCompileProgram</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_PROGRAM"><code>CL_&#8203;INVALID_&#8203;PROGRAM</code></a> if <em>program</em> is not a valid program object.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>device_list</em> is <code>NULL</code> and <em>num_devices</em> is greater
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>device_list</em> is <code>NULL</code> and <em>num_devices</em> is greater
 than zero, or if <em>device_list</em> is not <code>NULL</code> and <em>num_devices</em> is zero.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>num_input_headers</em> is zero and
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>num_input_headers</em> is zero and
 <em>header_include_names</em> or <em>input_headers</em> are not <code>NULL</code> or if
 <em>num_input_headers</em> is not zero and <em>header_include_names</em> or
 <em>input_headers</em> are <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>pfn_notify</em> is <code>NULL</code> but <em>user_data</em> is not
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>pfn_notify</em> is <code>NULL</code> but <em>user_data</em> is not
 <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_DEVICE if OpenCL devices listed in <em>device_list</em> are not in
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> 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
+<p><a href="#CL_INVALID_COMPILER_OPTIONS"><code>CL_&#8203;INVALID_&#8203;COMPILER_&#8203;OPTIONS</code></a> 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
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> 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>
+<a href="#clCompileProgram"><strong>clCompileProgram</strong></a> or <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> 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 the
-<a href="#device-queries-table">Device Queries</a> table is set to CL_FALSE.</p>
+<p><a href="#CL_COMPILER_NOT_AVAILABLE"><code>CL_&#8203;COMPILER_&#8203;NOT_&#8203;AVAILABLE</code></a> if a compiler is not available i.e.
+<a href="#CL_DEVICE_COMPILER_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;COMPILER_&#8203;AVAILABLE</code></a> specified in the
+<a href="#device-queries-table">Device Queries</a> table is set to <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>.</p>
 </li>
 <li>
-<p>CL_COMPILE_PROGRAM_FAILURE if there is a failure to compile the program
+<p><a href="#CL_COMPILE_PROGRAM_FAILURE"><code>CL_&#8203;COMPILE_&#8203;PROGRAM_&#8203;FAILURE</code></a> if there is a failure to compile the program
 source.
-This error will be returned if <strong>clCompileProgram</strong> does not return until
+This error will be returned if <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> 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>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> 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>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if <em>program</em> has no source or IL available, i.e. it
+has not been created with <a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a> or
+<a href="#clCreateProgramWithIL"><strong>clCreateProgramWithIL</strong></a>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_program clLinkProgram(cl_context context,
-                         cl_uint num_devices,
-                         <span class="directive">const</span> cl_device_id *device_list,
-                         <span class="directive">const</span> <span class="predefined-type">char</span> *options,
-                         cl_uint num_input_programs,
-                         <span class="directive">const</span> cl_program *input_programs,
-                         <span class="directive">void</span> (CL_CALLBACK *pfn_notify)
-                             (cl_program program,
-                             <span class="directive">void</span> *user_data),
-                         <span class="directive">void</span> *user_data,
-                         cl_int *errcode_ret)</code></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, &#8230;&#8203;) and can be specified
-to <strong>clCreateProgramWithBinary</strong> to create a new program object.</p>
+<p>To link a set of compiled program objects and libraries for all the devices
+or a specific device(s) in the OpenCL context and create a library or
+executable, call the function</p>
 </div>
-<div class="paragraph">
-<p>The devices associated with the returned program object will be the list of
-devices specified by <em>device_list</em> or if <em>device_list</em> is <code>NULL</code> it will be
-the list of devices associated with <em>context</em>.</p>
+<div id="clLinkProgram" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_program clLinkProgram(
+    cl_context context,
+    cl_uint num_devices,
+    <span class="directive">const</span> cl_device_id* device_list,
+    <span class="directive">const</span> <span class="predefined-type">char</span>* options,
+    cl_uint num_input_programs,
+    <span class="directive">const</span> cl_program* input_programs,
+    <span class="directive">void</span> (CL_CALLBACK* pfn_notify)(cl_program program, <span class="directive">void</span>* user_data),
+    <span class="directive">void</span>* user_data,
+    cl_int* errcode_ret);</code></pre>
 </div>
-<div class="paragraph">
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>context</em> must be a valid OpenCL context.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 <code>NULL</code> 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-<code>NULL</code> value, the link is performed for devices
 specified in this list for which a compiled object is available.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>num_devices</em> is the number of devices listed in <em>device_list</em>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 in <a href="#linker-options">Linker
 Options</a>.
-If the program was created using <strong>clCreateProgramWithBinary</strong> and <em>options</em>
+If the program was created using <a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a> and <em>options</em>
 is a <code>NULL</code> pointer, the program will be linked as if <em>options</em> were the
 same as when the program binary was originally built.
-If the program was created using <strong>clCreateProgramWithBinary</strong> and <em>options</em>
+If the program was created using <a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a> 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">
+</li>
+<li>
 <p><em>num_input_programs</em> specifies the number of programs in array referenced by
 <em>input_programs</em>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 <code>NULL</code> the list of
 devices associated with context, the following cases occur:</p>
-</div>
 <div class="ulist">
 <ul>
 <li>
@@ -15209,22 +15705,33 @@
 executable generated for this device.</p>
 </li>
 <li>
-<p>All other cases will return a CL_INVALID_OPERATION error.</p>
+<p>All other cases will return a <a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> error.</p>
 </li>
 </ul>
 </div>
-<div class="paragraph">
+</li>
+<li>
 <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 class="ulist">
+<ul>
+<li>
+<p><em>user_data</em> will be passed as an argument when <em>pfn_notify</em> is called.
+<em>user_data</em> can be <code>NULL</code>.</p>
+</li>
+</ul>
+</div>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>If <em>pfn_notify</em> is not <code>NULL</code>, <strong>clLinkProgram</strong> does not need to wait for the
-linker to complete and can return immediately once the linking operation can
+<p>If <em>pfn_notify</em> is not <code>NULL</code>, <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> 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>.
+which returns the program object returned by <a href="#clLinkProgram"><strong>clLinkProgram</strong></a>.
 The application can query the link status and log for this program object.
 This callback function may be called asynchronously by the OpenCL
 implementation.
@@ -15232,34 +15739,42 @@
 is thread-safe.</p>
 </div>
 <div class="paragraph">
-<p>If <em>pfn_notify</em> is <code>NULL</code>, <strong>clLinkProgram</strong> does not return until the linker
+<p>If <em>pfn_notify</em> is <code>NULL</code>, <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> 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 <code>NULL</code>.</p>
+<p><a href="#clLinkProgram"><strong>clLinkProgram</strong></a> creates a new program object which contains the library or
+executable.
+The library or executable binary can be queried using
+<a href="#clGetProgramInfo"><strong>clGetProgramInfo</strong></a>(<em>program</em>, <a href="#CL_PROGRAM_BINARIES"><code>CL_&#8203;PROGRAM_&#8203;BINARIES</code></a>, &#8230;&#8203;) and can be specified
+to <a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a> 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 <em>device_list</em> or if <em>device_list</em> is <code>NULL</code> it will be
+the list of devices associated with <em>context</em>.</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
+If the linking operation can begin, <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> returns a valid non-zero
 program object.</p>
 </div>
 <div class="paragraph">
-<p>If <em>pfn_notify</em> is <code>NULL</code>, the <em>errcode_ret</em> will be set to CL_SUCCESS if
-the link operation was successful and CL_LINK_PROGRAM_FAILURE if there is a
+<p>If <em>pfn_notify</em> is <code>NULL</code>, the <em>errcode_ret</em> will be set to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if
+the link operation was successful and <a href="#CL_LINK_PROGRAM_FAILURE"><code>CL_&#8203;LINK_&#8203;PROGRAM_&#8203;FAILURE</code></a> 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 <code>NULL</code>, <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
+<p>If <em>pfn_notify</em> is not <code>NULL</code>, <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> does not have to wait until
+the linker to complete and can return <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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_PROGRAM_FAILURE if the linking operation was successful or not.</p>
+The <em>pfn_notify</em> callback function will return a <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> or
+<a href="#CL_LINK_PROGRAM_FAILURE"><code>CL_&#8203;LINK_&#8203;PROGRAM_&#8203;FAILURE</code></a> if the linking operation was successful or not.</p>
 </div>
 <div class="paragraph">
-<p>Otherwise <strong>clLinkProgram</strong> returns a <code>NULL</code> program object with an
+<p>Otherwise <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> returns a <code>NULL</code> 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.
@@ -15268,64 +15783,66 @@
 <div class="ulist">
 <ul>
 <li>
-<p>CL_INVALID_CONTEXT if <em>context</em> is not a valid context.</p>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> if <em>context</em> is not a valid context.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>device_list</em> is <code>NULL</code> and <em>num_devices</em> is greater
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>device_list</em> is <code>NULL</code> and <em>num_devices</em> is greater
 than zero, or if <em>device_list</em> is not <code>NULL</code> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>num_input_programs</em> is zero and <em>input_programs</em> is
 <code>NULL</code> or if <em>num_input_programs</em> is zero and <em>input_programs</em> is not
 <code>NULL</code> or if <em>num_input_programs</em> is not zero and <em>input_programs</em> is
 <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_PROGRAM if programs specified in <em>input_programs</em> are not
+<p><a href="#CL_INVALID_PROGRAM"><code>CL_&#8203;INVALID_&#8203;PROGRAM</code></a> 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 <code>NULL</code> but <em>user_data</em> is not
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>pfn_notify</em> is <code>NULL</code> but <em>user_data</em> is not
 <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_DEVICE if OpenCL devices listed in <em>device_list</em> are not in
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> 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>
+<p><a href="#CL_INVALID_LINKER_OPTIONS"><code>CL_&#8203;INVALID_&#8203;LINKER_&#8203;OPTIONS</code></a> 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
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> 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>
+<a href="#clCompileProgram"><strong>clCompileProgram</strong></a> or <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> for <em>program</em> has not completed.</p>
 </li>
 <li>
-<p>CL_INVALID_OPERATION if the rules for devices containing compiled
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> 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 the
-<a href="#device-queries-table">Device Queries</a> table is set to CL_FALSE.</p>
+<p><a href="#CL_LINKER_NOT_AVAILABLE"><code>CL_&#8203;LINKER_&#8203;NOT_&#8203;AVAILABLE</code></a> if a linker is not available i.e.
+<a href="#CL_DEVICE_LINKER_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;LINKER_&#8203;AVAILABLE</code></a> specified in the
+<a href="#device-queries-table">Device Queries</a> table is set to <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>.</p>
 </li>
 <li>
-<p>CL_LINK_PROGRAM_FAILURE if there is a failure to link the compiled
+<p><a href="#CL_LINK_PROGRAM_FAILURE"><code>CL_&#8203;LINK_&#8203;PROGRAM_&#8203;FAILURE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="sect3">
 <h4 id="compiler-options">5.8.6. Compiler Options</h4>
 <div class="paragraph">
@@ -15361,7 +15878,7 @@
 </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>.
+argument to <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> or <a href="#clCompileProgram"><strong>clCompileProgram</strong></a>.
 Note that a space is required between the -D option and the symbol it
 defines, otherwise behavior is implementation defined.</p>
 </div>
@@ -15380,7 +15897,7 @@
 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 <strong>clCompileProgram</strong> followed by <strong>clLinkProgram</strong>.</p>
+of <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> followed by <a href="#clLinkProgram"><strong>clLinkProgram</strong></a>.</p>
 </div>
 </div>
 <div class="sect4">
@@ -15412,14 +15929,14 @@
 <div class="content">
 <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>
+support single precision denormalized numbers i.e. <a href="#CL_FP_DENORM"><code>CL_&#8203;FP_&#8203;DENORM</code></a> bit is not
+set in <a href="#CL_DEVICE_SINGLE_FP_CONFIG"><code>CL_&#8203;DEVICE_&#8203;SINGLE_&#8203;FP_&#8203;CONFIG</code></a>.</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>
+double precision denormalized numbers i.e. <a href="#CL_FP_DENORM"><code>CL_&#8203;FP_&#8203;DENORM</code></a> bit is not set in
+<a href="#CL_DEVICE_DOUBLE_FP_CONFIG"><code>CL_&#8203;DEVICE_&#8203;DOUBLE_&#8203;FP_&#8203;CONFIG</code></a>.</p>
 </div>
 <div class="paragraph">
 <p>This flag only applies for scalar and vector single precision floating-point
@@ -15433,7 +15950,7 @@
 <dt class="hdlist1"><code>-cl-fp32-correctly-rounded-divide-sqrt</code> </dt>
 <dd>
 <p>The <code>-cl-fp32-correctly-rounded-divide-sqrt</code> build option to
-<strong>clBuildProgram</strong> or <strong>clCompileProgram</strong> allows an application to specify
+<a href="#clBuildProgram"><strong>clBuildProgram</strong></a> or <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> allows an application to specify
 that single precision floating-point divide (x/y and 1/x) and sqrt used
 in the program source are correctly rounded.
 If this build option is not specified, the minimum numerical accuracy of
@@ -15443,12 +15960,12 @@
 <div class="content">
 <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
+<a href="#CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT"><code>CL_&#8203;FP_&#8203;CORRECTLY_&#8203;ROUNDED_&#8203;DIVIDE_&#8203;SQRT</code></a> is set in <a href="#CL_DEVICE_SINGLE_FP_CONFIG"><code>CL_&#8203;DEVICE_&#8203;SINGLE_&#8203;FP_&#8203;CONFIG</code></a> (as
 defined in the <a href="#device-queries-table">Device Queries</a> table) for devices
 that the program is being build.
-<strong>clBuildProgram</strong> or <strong>clCompileProgram</strong> will fail to compile the program for
+<a href="#clBuildProgram"><strong>clBuildProgram</strong></a> or <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> will fail to compile the program for
 a device if the <code>-cl-fp32-correctly-rounded-divide-sqrt</code> option is specified
-and CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT is not set for the device.</p>
+and <a href="#CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT"><code>CL_&#8203;FP_&#8203;CORRECTLY_&#8203;ROUNDED_&#8203;DIVIDE_&#8203;SQRT</code></a> is not set for the device.</p>
 </div>
 </div>
 </div>
@@ -15531,7 +16048,7 @@
 <dt class="hdlist1"><code>-cl-uniform-work-group-size</code> </dt>
 <dd>
 <p>This requires that the global work-size be a multiple of the work-group
-size specified to <strong>clEnqueueNDRangeKernel</strong>.
+size specified to <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a>.
 Allow optimizations that are made possible by this restriction.</p>
 </dd>
 <dt class="hdlist1"><code>-cl-no-subgroup-ifp</code> </dt>
@@ -15606,19 +16123,19 @@
 </dl>
 </div>
 <div class="paragraph">
-<p>Calls to <strong>clBuildProgram</strong> or <strong>clCompileProgram</strong> with the <code>-cl-std=CL1.1</code>
+<p>Calls to <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> or <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> with the <code>-cl-std=CL1.1</code>
 option <strong>will fail</strong> to compile the program for any devices with
-CL_DEVICE_OPENCL_C_VERSION = OpenCL C 1.0.</p>
+<a href="#CL_DEVICE_OPENCL_C_VERSION"><code>CL_&#8203;DEVICE_&#8203;OPENCL_&#8203;C_&#8203;VERSION</code></a> = OpenCL C 1.0.</p>
 </div>
 <div class="paragraph">
-<p>Calls to <strong>clBuildProgram</strong> or <strong>clCompileProgram</strong> with the <code>-cl-std=CL1.2</code>
+<p>Calls to <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> or <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> with the <code>-cl-std=CL1.2</code>
 option <strong>will fail</strong> to compile the program for any devices with
-CL_DEVICE_OPENCL_C_VERSION = OpenCL C 1.0.</p>
+<a href="#CL_DEVICE_OPENCL_C_VERSION"><code>CL_&#8203;DEVICE_&#8203;OPENCL_&#8203;C_&#8203;VERSION</code></a> = OpenCL C 1.0.</p>
 </div>
 <div class="paragraph">
-<p>Calls to <strong>clBuildProgram</strong> or <strong>clCompileProgram</strong> with the <code>-cl-std=CL2.0</code>
+<p>Calls to <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> or <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> with the <code>-cl-std=CL2.0</code>
 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>
+<a href="#CL_DEVICE_OPENCL_C_VERSION"><code>CL_&#8203;DEVICE_&#8203;OPENCL_&#8203;C_&#8203;VERSION</code></a> = 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
@@ -15638,7 +16155,7 @@
 of a kernel(s) in the program executable.
 The argument information stored includes the argument name, its type,
 the address space and access qualifiers used.
-Refer to description of <strong>clGetKernelArgInfo</strong> on how to query this
+Refer to description of <a href="#clGetKernelArgInfo"><strong>clGetKernelArgInfo</strong></a> on how to query this
 information.</p>
 </dd>
 </dl>
@@ -15682,7 +16199,7 @@
 <dt class="hdlist1"><code>-create-library</code> </dt>
 <dd>
 <p>Create a library of compiled binaries specified in <em>input_programs</em>
-argument to <strong>clLinkProgram</strong>.</p>
+argument to <a href="#clLinkProgram"><strong>clLinkProgram</strong></a>.</p>
 </dd>
 <dt class="hdlist1"><code>-enable-link-options</code> </dt>
 <dd>
@@ -15714,9 +16231,9 @@
 <p>The options are described in <a href="#math-intrinsics-options">Math Intrinsics
 Options</a> and <a href="#optimization-options">Optimization Options</a>.
 The linker may apply these options to all compiled program objects
-specified to <strong>clLinkProgram</strong>.
+specified to <a href="#clLinkProgram"><strong>clLinkProgram</strong></a>.
 The linker may apply these options only to libraries which were created
-with the enable-link-option.</p>
+with the option <code>-enable-link-options</code>.</p>
 </dd>
 </dl>
 </div>
@@ -15724,81 +16241,97 @@
 </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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clUnloadPlatformCompiler(cl_platform_id platform)</code></pre>
+<div class="paragraph">
+<p>To unload an OpenCL compiler for a platform, call the function</p>
 </div>
+<div id="clUnloadPlatformCompiler" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clUnloadPlatformCompiler(
+    cl_platform_id platform);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>platform</em> is the platform to unload.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>allows the implementation to release the resources allocated by the OpenCL
-compiler for <em>platform</em>.
+<p>This function 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
+Calls to <a href="#clBuildProgram"><strong>clBuildProgram</strong></a>, <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> or <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> after
+<a href="#clUnloadPlatformCompiler"><strong>clUnloadPlatformCompiler</strong></a> 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
+<p><a href="#clUnloadPlatformCompiler"><strong>clUnloadPlatformCompiler</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_PLATFORM"><code>CL_&#8203;INVALID_&#8203;PLATFORM</code></a> if <em>platform</em> is not a valid platform.</p>
 </li>
 </ul>
 </div>
 </div>
+</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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetProgramInfo(cl_program program,
-                        cl_program_info param_name,
-                        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 program object.</p>
+<p>To return information about a program object, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clGetProgramInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetProgramInfo(
+    cl_program program,
+    cl_program_info param_name,
+    size_t param_value_size,
+    <span class="directive">void</span>* param_value,
+    size_t* param_value_size_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>program</em> specifies the program object being queried.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 the
+<em>param_value</em> by <a href="#clGetProgramInfo"><strong>clGetProgramInfo</strong></a> is described in the
 <a href="#program-info-table">Program Object Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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="#program-info-table">Program Object Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </div>
 <table id="program-info-table" class="tableblock frame-all grid-all stretch">
-<caption class="title">Table 26. <strong>clGetProgramInfo</strong> parameter queries</caption>
+<caption class="title">Table 25. List of supported param_names by <a href="#clGetProgramInfo">clGetProgramInfo</a></caption>
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -15813,39 +16346,39 @@
 </thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_PROGRAM_REFERENCE_COUNT</strong><sup>14</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_PROGRAM_REFERENCE_COUNT"></a><a href="#CL_PROGRAM_REFERENCE_COUNT"><code>CL_&#8203;PROGRAM_&#8203;REFERENCE_&#8203;COUNT</code></a><sup>14</sup></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"><a id="CL_PROGRAM_CONTEXT"></a><a href="#CL_PROGRAM_CONTEXT"><code>CL_&#8203;PROGRAM_&#8203;CONTEXT</code></a></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"><strong>CL_PROGRAM_NUM_DEVICES</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_PROGRAM_NUM_DEVICES"></a><a href="#CL_PROGRAM_NUM_DEVICES"><code>CL_&#8203;PROGRAM_&#8203;NUM_&#8203;DEVICES</code></a></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"><a id="CL_PROGRAM_DEVICES"></a><a href="#CL_PROGRAM_DEVICES"><code>CL_&#8203;PROGRAM_&#8203;DEVICES</code></a></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 program object is created using
-        <strong>clCreateProgramWithBinary</strong>.</p></td>
+        <a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a>.</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"><a id="CL_PROGRAM_SOURCE"></a><a href="#CL_PROGRAM_SOURCE"><code>CL_&#8203;PROGRAM_&#8203;SOURCE</code></a></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>.
+        <a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a>.
         The source string returned is a concatenation of all source strings
-        specified to <strong>clCreateProgramWithSource</strong> with a null terminator.
+        specified to <a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a> 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>,
-        <strong>clCreateProgramWithIL</strong> or <strong>clCreateProgramWithBuiltinKernels</strong>, a
+<p class="tableblock">        If <em>program</em> is created using <a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a>,
+        <a href="#clCreateProgramWithIL"><strong>clCreateProgramWithIL</strong></a> or <a href="#clCreateProgramWithBuiltInKernels"><strong>clCreateProgramWithBuiltInKernels</strong></a>, 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>
@@ -15854,17 +16387,17 @@
         <em>param_value_size_ret</em>.</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"><a id="CL_PROGRAM_IL"></a><a href="#CL_PROGRAM_IL"><code>CL_&#8203;PROGRAM_&#8203;IL</code></a></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>clCreateProgramWithBinary</strong> or <strong>clCreateProgramWithBuiltinKernels</strong>
+        <a href="#clCreateProgramWithIL"><strong>clCreateProgramWithIL</strong></a>.</p>
+<p class="tableblock">        If <em>program</em> is created with <a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a>,
+        <a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a> or <a href="#clCreateProgramWithBuiltInKernels"><strong>clCreateProgramWithBuiltInKernels</strong></a>
         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"><strong>CL_PROGRAM_BINARY_SIZES</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_PROGRAM_BINARY_SIZES"></a><a href="#CL_PROGRAM_BINARY_SIZES"><code>CL_&#8203;PROGRAM_&#8203;BINARY_&#8203;SIZES</code></a></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
@@ -15873,22 +16406,22 @@
         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>,
+<p class="tableblock">        If <em>program</em> is created using <a href="#clCreateProgramWithBuiltInKernels"><strong>clCreateProgramWithBuiltInKernels</strong></a>,
         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"><a id="CL_PROGRAM_BINARIES"></a><a href="#CL_PROGRAM_BINARIES"><code>CL_&#8203;PROGRAM_&#8203;BINARIES</code></a></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">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
-        <strong>clCreateProgramWithBinary</strong> or it can be the executable binary
-        generated by <strong>clBuildProgram</strong> or <strong>clLinkProgram</strong>.
-        If <em>program</em> is created with <strong>clCreateProgramWithSource</strong> or
-        <strong>clCreateProgramWithIL</strong>, the binary returned is the binary generated
-        by <strong>clBuildProgram</strong>, <strong>clCompileProgram</strong> or <strong>clLinkProgram</strong>.
+        <a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a> or it can be the executable binary
+        generated by <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> or <a href="#clLinkProgram"><strong>clLinkProgram</strong></a>.
+        If <em>program</em> is created with <a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a> or
+        <a href="#clCreateProgramWithIL"><strong>clCreateProgramWithIL</strong></a>, the binary returned is the binary generated
+        by <a href="#clBuildProgram"><strong>clBuildProgram</strong></a>, <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> or <a href="#clLinkProgram"><strong>clLinkProgram</strong></a>.
         The bits returned can be an implementation-specific intermediate
         representation (a.k.a. IR) or device specific executable bits or
         both.
@@ -15897,44 +16430,44 @@
 <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
+        pointers refer to can be queried using the <a href="#CL_PROGRAM_BINARY_SIZES"><code>CL_&#8203;PROGRAM_&#8203;BINARY_&#8203;SIZES</code></a>
         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,
-        use the CL_PROGRAM_DEVICES query to get the list of devices.
+        use the <a href="#CL_PROGRAM_DEVICES"><code>CL_&#8203;PROGRAM_&#8203;DEVICES</code></a> 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>
+        returned by <a href="#CL_PROGRAM_BINARIES"><code>CL_&#8203;PROGRAM_&#8203;BINARIES</code></a> and array of devices returned by
+        <a href="#CL_PROGRAM_DEVICES"><code>CL_&#8203;PROGRAM_&#8203;DEVICES</code></a>.</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"><a id="CL_PROGRAM_NUM_KERNELS"></a><a href="#CL_PROGRAM_NUM_KERNELS"><code>CL_&#8203;PROGRAM_&#8203;NUM_&#8203;KERNELS</code></a></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>.
+        created with <a href="#clCreateKernel"><strong>clCreateKernel</strong></a>.
         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"><a id="CL_PROGRAM_KERNEL_NAMES"></a><a href="#CL_PROGRAM_KERNEL_NAMES"><code>CL_&#8203;PROGRAM_&#8203;KERNEL_&#8203;NAMES</code></a></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>.
+        that can be created with <a href="#clCreateKernel"><strong>clCreateKernel</strong></a>.
         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_SCOPE_GLOBAL_CTORS_PRESENT</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT"></a><a href="#CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT"><code>CL_&#8203;PROGRAM_&#8203;SCOPE_&#8203;GLOBAL_&#8203;CTORS_&#8203;PRESENT</code></a></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"><a id="CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT"></a><a href="#CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT"><code>CL_&#8203;PROGRAM_&#8203;SCOPE_&#8203;GLOBAL_&#8203;DTORS_&#8203;PRESENT</code></a></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
@@ -15953,84 +16486,91 @@
 </dl>
 </div>
 <div class="paragraph">
-<p><strong>clGetProgramInfo</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clGetProgramInfo"><strong>clGetProgramInfo</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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="#program-info-table">Program Object Queries</a> table and
 <em>param_value</em> is not <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_PROGRAM if <em>program</em> is a not a valid program object.</p>
+<p><a href="#CL_INVALID_PROGRAM"><code>CL_&#8203;INVALID_&#8203;PROGRAM</code></a> 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
+<p><a href="#CL_INVALID_PROGRAM_EXECUTABLE"><code>CL_&#8203;INVALID_&#8203;PROGRAM_&#8203;EXECUTABLE</code></a> if <em>param_name</em> is <a href="#CL_PROGRAM_NUM_KERNELS"><code>CL_&#8203;PROGRAM_&#8203;NUM_&#8203;KERNELS</code></a>
+or <a href="#CL_PROGRAM_KERNEL_NAMES"><code>CL_&#8203;PROGRAM_&#8203;KERNEL_&#8203;NAMES</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetProgramBuildInfo(cl_program program,
-                             cl_device_id device,
-                             cl_program_build_info param_name,
-                             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 build information for each device in the program object.</p>
+<p>To return build information for each device in the program object, call the
+function:</p>
 </div>
-<div class="paragraph">
+<div id="clGetProgramBuildInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetProgramBuildInfo(
+    cl_program program,
+    cl_device_id device,
+    cl_program_build_info param_name,
+    size_t param_value_size,
+    <span class="directive">void</span>* param_value,
+    size_t* param_value_size_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>program</em> specifies the program object being queried.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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 the
+<em>param_value</em> by <a href="#clGetProgramBuildInfo"><strong>clGetProgramBuildInfo</strong></a> is described in the
 <a href="#program-build-info-table">Program Build Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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="#program-build-info-table">Program Build Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </div>
 <table id="program-build-info-table" class="tableblock frame-all grid-all stretch">
-<caption class="title">Table 27. <strong>clGetProgramBuildInfo</strong> parameter queries.</caption>
+<caption class="title">Table 26. List of supported param_names by <a href="#clGetProgramBuildInfo">clGetProgramBuildInfo</a></caption>
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -16045,69 +16585,69 @@
 </thead>
 <tbody>
 <tr>
-<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"><a id="CL_PROGRAM_BUILD_STATUS"></a><a href="#CL_PROGRAM_BUILD_STATUS"><code>CL_&#8203;PROGRAM_&#8203;BUILD_&#8203;STATUS</code></a></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>
+        last on the specified <em>program</em> object for <em>device</em>.</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>,
-        <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>,
-        <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
-        <strong>clBuildProgram</strong>, <strong>clCompileProgram</strong> or <strong>clLinkProgram</strong> whichever
-        was performed last on the specified program object for device has
+<p class="tableblock">        <a id="CL_BUILD_NONE"></a><a href="#CL_BUILD_NONE"><code>CL_&#8203;BUILD_&#8203;NONE</code></a> - The build status returned if no <a href="#clBuildProgram"><strong>clBuildProgram</strong></a>,
+        <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> or <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> has been performed on the
+        specified <em>program</em> object for <em>device</em>).</p>
+<p class="tableblock">        <a id="CL_BUILD_ERROR"></a><a href="#CL_BUILD_ERROR"><code>CL_&#8203;BUILD_&#8203;ERROR</code></a> - The build status returned if <a href="#clBuildProgram"><strong>clBuildProgram</strong></a>,
+        <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> or <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> - whichever was performed last
+        on the specified <em>program</em> object for <em>device</em> - generated an error.</p>
+<p class="tableblock">        <a id="CL_BUILD_SUCCESS"></a><a href="#CL_BUILD_SUCCESS"><code>CL_&#8203;BUILD_&#8203;SUCCESS</code></a> - The build status returned if <a href="#clBuildProgram"><strong>clBuildProgram</strong></a>,
+        <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> or <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> - whichever was performed last
+        on the specified <em>program</em> object for <em>device</em> - was successful.</p>
+<p class="tableblock">        <a id="CL_BUILD_IN_PROGRESS"></a><a href="#CL_BUILD_IN_PROGRESS"><code>CL_&#8203;BUILD_&#8203;IN_&#8203;PROGRESS</code></a> - The build status returned if
+        <a href="#clBuildProgram"><strong>clBuildProgram</strong></a>, <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> or <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> - whichever
+        was performed last on the specified <em>program</em> object for <em>device</em> - has
         not finished.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_PROGRAM_BUILD_OPTIONS</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_PROGRAM_BUILD_OPTIONS"></a><a href="#CL_PROGRAM_BUILD_OPTIONS"><code>CL_&#8203;PROGRAM_&#8203;BUILD_&#8203;OPTIONS</code></a></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 <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
-        string is returned.</p></td>
+        argument in <a href="#clBuildProgram"><strong>clBuildProgram</strong></a>, <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> or <a href="#clLinkProgram"><strong>clLinkProgram</strong></a>,
+        whichever was performed last on the specified <em>program</em> object for
+        <em>device</em>.</p>
+<p class="tableblock">        If build status of the specified <em>program</em> for <em>device</em> is
+        <a href="#CL_BUILD_NONE"><code>CL_&#8203;BUILD_&#8203;NONE</code></a>, an empty string is returned.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">CL_PROGRAM_BUILD_LOG</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_PROGRAM_BUILD_LOG"></a><a href="#CL_PROGRAM_BUILD_LOG"><code>CL_&#8203;PROGRAM_&#8203;BUILD_&#8203;LOG</code></a></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 log for <strong>clBuildProgram</strong>,
-        <strong>clCompileProgram</strong> or <strong>clLinkProgram</strong>, whichever was performed last
+<td class="tableblock halign-left valign-top"><p class="tableblock">Return the build, compile or link log for <a href="#clBuildProgram"><strong>clBuildProgram</strong></a>,
+        <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> or <a href="#clLinkProgram"><strong>clLinkProgram</strong></a>, 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>
+<p class="tableblock">        If build status of the specified <em>program</em> for <em>device</em> is
+        <a href="#CL_BUILD_NONE"><code>CL_&#8203;BUILD_&#8203;NONE</code></a>, 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"><a id="CL_PROGRAM_BINARY_TYPE"></a><a href="#CL_PROGRAM_BINARY_TYPE"><code>CL_&#8203;PROGRAM_&#8203;BINARY_&#8203;TYPE</code></a></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
-        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
-        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
-        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
-        <strong>clBuildProgram</strong> or an executable binary is loaded using
-        <strong>clCreateProgramWithBinary</strong>.</p></td>
+<p class="tableblock">        <a id="CL_PROGRAM_BINARY_TYPE_NONE"></a><a href="#CL_PROGRAM_BINARY_TYPE_NONE"><code>CL_&#8203;PROGRAM_&#8203;BINARY_&#8203;TYPE_&#8203;NONE</code></a> - There is no binary associated
+        with the specified <em>program</em> object for <em>device</em>.</p>
+<p class="tableblock">        <a id="CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT"></a><a href="#CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT"><code>CL_&#8203;PROGRAM_&#8203;BINARY_&#8203;TYPE_&#8203;COMPILED_&#8203;OBJECT</code></a> - A compiled binary is
+        associated with <em>device</em>.
+        This is the case when the specified <em>program</em> object was created using
+        <a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a> and compiled using <a href="#clCompileProgram"><strong>clCompileProgram</strong></a>, or
+        when a compiled binary was loaded using <a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a>.</p>
+<p class="tableblock">        <a id="CL_PROGRAM_BINARY_TYPE_LIBRARY"></a><a href="#CL_PROGRAM_BINARY_TYPE_LIBRARY"><code>CL_&#8203;PROGRAM_&#8203;BINARY_&#8203;TYPE_&#8203;LIBRARY</code></a> - A library binary is
+        associated with <em>device</em>.
+        This is the case when the specified <em>program</em> object was linked by
+        <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> using the <code>-create-library</code> link option, or when a
+        compiled library binary was loaded using <a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a>.</p>
+<p class="tableblock">        <a id="CL_PROGRAM_BINARY_TYPE_EXECUTABLE"></a><a href="#CL_PROGRAM_BINARY_TYPE_EXECUTABLE"><code>CL_&#8203;PROGRAM_&#8203;BINARY_&#8203;TYPE_&#8203;EXECUTABLE</code></a> - An executable binary is
+        associated with <em>device</em>.
+        This is the case when the specified <em>program</em> object was linked by
+        <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> without the <code>-create-library</code> link option, or when an
+        executable binary was built using <a href="#clBuildProgram"><strong>clBuildProgram</strong></a>.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE"></a><a href="#CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE"><code>CL_&#8203;PROGRAM_&#8203;BUILD_&#8203;GLOBAL_&#8203;VARIABLE_&#8203;TOTAL_&#8203;SIZE</code></a></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>
@@ -16115,31 +16655,31 @@
 </tbody>
 </table>
 <div class="paragraph">
-<p><strong>clGetProgramBuildInfo</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clGetProgramBuildInfo"><strong>clGetProgramBuildInfo</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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="#program-build-info-table">Program Build Queries</a> table and
 <em>param_value</em> is not <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_PROGRAM if <em>program</em> is a not a valid program object.</p>
+<p><a href="#CL_INVALID_PROGRAM"><code>CL_&#8203;INVALID_&#8203;PROGRAM</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
@@ -16158,8 +16698,8 @@
 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
+<p>A program binary for a device specified with <a href="#clCreateProgramWithBinary"><strong>clCreateProgramWithBinary</strong></a> or
+queried using <a href="#clGetProgramInfo"><strong>clGetProgramInfo</strong></a> 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>
@@ -16169,6 +16709,8 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect2">
 <h3 id="_kernel_objects">5.9. Kernel Objects</h3>
 <div class="paragraph">
@@ -16181,136 +16723,124 @@
 </div>
 <div class="sect3">
 <h4 id="_creating_kernel_objects">5.9.1. Creating Kernel Objects</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>To create a kernel object, use the function</p>
 </div>
-<div class="listingblock">
+<div id="clCreateKernel" class="listingblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_kernel clCreateKernel(cl_program program,
-                         <span class="directive">const</span> <span class="predefined-type">char</span> *kernel_name,
-                         cl_int *errcode_ret)</code></pre>
+<pre class="CodeRay highlight"><code data-lang="c++">cl_kernel clCreateKernel(
+    cl_program program,
+    <span class="directive">const</span> <span class="predefined-type">char</span>* kernel_name,
+    cl_int* errcode_ret);</code></pre>
 </div>
 </div>
-<div class="paragraph">
+<div class="ulist">
+<ul>
+<li>
 <p><em>program</em> is a program object with a successfully built executable.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>kernel_name</em> is a function name in the program declared with the
 <code>__kernel</code> qualifier.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </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.
+<p><a href="#clCreateKernel"><strong>clCreateKernel</strong></a> returns a valid non-zero kernel object and <em>errcode_ret</em> is
+set to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the kernel 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_PROGRAM if <em>program</em> is not a valid program object.</p>
+<p><a href="#CL_INVALID_PROGRAM"><code>CL_&#8203;INVALID_&#8203;PROGRAM</code></a> if <em>program</em> is not a valid program object.</p>
 </li>
 <li>
-<p>CL_INVALID_PROGRAM_EXECUTABLE if there is no successfully built
+<p><a href="#CL_INVALID_PROGRAM_EXECUTABLE"><code>CL_&#8203;INVALID_&#8203;PROGRAM_&#8203;EXECUTABLE</code></a> 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>
+<p><a href="#CL_INVALID_KERNEL_NAME"><code>CL_&#8203;INVALID_&#8203;KERNEL_&#8203;NAME</code></a> 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 <code>__kernel</code>
+<p><a href="#CL_INVALID_KERNEL_DEFINITION"><code>CL_&#8203;INVALID_&#8203;KERNEL_&#8203;DEFINITION</code></a> if the function definition for <code>__kernel</code>
 function given by <em>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 <code>NULL</code>.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>kernel_name</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clCreateKernelsInProgram(cl_program program,
-                                cl_uint num_kernels,
-                                cl_kernel *kernels,
-                                cl_uint *num_kernels_ret)</code></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 <code>__kernel</code> functions in <em>program</em>
-that do not have the same function definition across all devices for which a
-program executable has been successfully built.</p>
+<p>To create kernel objects for all kernel functions in a program,
+call the function</p>
 </div>
-<div class="paragraph">
+<div id="clCreateKernelsInProgram" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clCreateKernelsInProgram(
+    cl_program program,
+    cl_uint num_kernels,
+    cl_kernel* kernels,
+    cl_uint* num_kernels_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>program</em> is a program object with a successfully built executable.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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 <code>NULL</code>, it is ignored.
 If <em>kernels</em> is not <code>NULL</code>, <em>num_kernels</em> must be greater than or equal to
 the number of kernels in <em>program</em>.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>num_kernels_ret</em> is the number of kernels in <em>program</em>.
 If <em>num_kernels_ret</em> is <code>NULL</code>, 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 <code>NULL</code> 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 are not created for any <code>__kernel</code> functions in <em>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>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
+This means that calls to <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> and <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> return
+<a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> 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>.
@@ -16321,72 +16851,130 @@
 program object.</p>
 </div>
 <div class="paragraph">
-<p>The function</p>
+<p><a href="#clCreateKernelsInProgram"><strong>clCreateKernelsInProgram</strong></a> will return  <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the kernel objects were
+successfully allocated.
+Otherwise, it returns one of the following errors:</p>
 </div>
-<div class="listingblock">
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#CL_INVALID_PROGRAM"><code>CL_&#8203;INVALID_&#8203;PROGRAM</code></a> if <em>program</em> is not a valid program object.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_PROGRAM_EXECUTABLE"><code>CL_&#8203;INVALID_&#8203;PROGRAM_&#8203;EXECUTABLE</code></a> if there is no successfully built
+executable for any device in <em>program</em>.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>kernels</em> is not <code>NULL</code> and <em>num_kernels</em> is less
+than the number of kernels in <em>program</em>.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clRetainKernel(cl_kernel kernel)</code></pre>
+<div class="paragraph">
+<p>To retain a kernel object, call the function</p>
 </div>
+<div id="clRetainKernel" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clRetainKernel(
+    cl_kernel kernel);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>kernel</em> is the kernel object to be retained.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>increments the <em>kernel</em> reference count.
-<strong>clRetainKernel</strong> returns CL_SUCCESS if the function is executed
+<p>The <em>kernel</em> reference count is incremented.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clRetainKernel"><strong>clRetainKernel</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_KERNEL"><code>CL_&#8203;INVALID_&#8203;KERNEL</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<p><a href="#clCreateKernel"><strong>clCreateKernel</strong></a> or <a href="#clCreateKernelsInProgram"><strong>clCreateKernelsInProgram</strong></a> do an implicit retain.</p>
 </div>
-<div class="paragraph">
-<p>The function</p>
 </div>
-<div class="listingblock">
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clReleaseKernel(cl_kernel kernel)</code></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>
+<p>To release a kernel object, call the function</p>
+</div>
+<div id="clReleaseKernel" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clReleaseKernel(
+    cl_kernel kernel);</code></pre>
+</div>
 </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>
+<p><em>kernel</em> is the kernel object to be released.</p>
 </li>
 </ul>
 </div>
 <div class="paragraph">
+<p>The <em>kernel</em> reference count is decremented.</p>
+</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>
+the object or by calling <a href="#clRetainKernel"><strong>clRetainKernel</strong></a> causes undefined behavior.</p>
+</div>
+<div class="paragraph">
+<p><a href="#clReleaseKernel"><strong>clReleaseKernel</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the function is executed
+successfully.
+Otherwise, it returns one of the following errors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#CL_INVALID_KERNEL"><code>CL_&#8203;INVALID_&#8203;KERNEL</code></a> if <em>kernel</em> is not a valid kernel object.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="sect3">
@@ -16394,28 +16982,56 @@
 <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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clSetKernelArg(cl_kernel kernel,
-                       cl_uint arg_index,
-                       size_t arg_size,
-                       <span class="directive">const</span> <span class="directive">void</span> *arg_value)</code></pre>
-</div>
-</div>
 <div class="paragraph">
-<p>is used to set the argument value for a specific argument of a kernel.</p>
+<p>To set the argument value for a specific argument of a kernel, call the
+function</p>
 </div>
-<div class="paragraph">
+<div id="clSetKernelArg" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clSetKernelArg(
+    cl_kernel kernel,
+    cl_uint arg_index,
+    size_t arg_size,
+    <span class="directive">const</span> <span class="directive">void</span>* arg_value);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>kernel</em> is a valid kernel object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+declared by a kernel (see below).</p>
+</li>
+<li>
+<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>
+</li>
+<li>
+<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 <em>arg_value</em> is copied and the <em>arg_value</em>
+pointer can therefore be reused by the application after <a href="#clSetKernelArg"><strong>clSetKernelArg</strong></a>
+returns.
+The argument value specified is the value used by all API calls that enqueue
+<em>kernel</em> (<a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a>) until the argument value is changed by a
+call to <a href="#clSetKernelArg"><strong>clSetKernelArg</strong></a> for <em>kernel</em>.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
 <p>For example, consider the following kernel:</p>
@@ -16437,29 +17053,6 @@
 <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 <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
-<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.
@@ -16482,9 +17075,9 @@
 space, the memory object specified as argument value must be a buffer object
 (or <code>NULL</code>).
 If the argument is declared with the <code>constant</code> qualifier, the size in bytes
-of the memory object cannot exceed CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE and
+of the memory object cannot exceed <a href="#CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;CONSTANT_&#8203;BUFFER_&#8203;SIZE</code></a> and
 the number of arguments declared as pointers to <code>constant</code> memory cannot
-exceed CL_DEVICE_MAX_CONSTANT_ARGS.</p>
+exceed <a href="#CL_DEVICE_MAX_CONSTANT_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;CONSTANT_&#8203;ARGS</code></a>.</p>
 </div>
 <div class="paragraph">
 <p>The memory object specified as argument value must be a pipe object if the
@@ -16494,7 +17087,7 @@
 <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
+image channel order = <a href="#CL_DEPTH"><code>CL_&#8203;DEPTH</code></a> 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>.
@@ -16507,7 +17100,7 @@
 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
+object with image channel order = <a href="#CL_DEPTH"><code>CL_&#8203;DEPTH</code></a> if argument is declared to be of
 type <em>image2d_array_depth_t</em>.</p>
 </div>
 <div class="paragraph">
@@ -16523,7 +17116,7 @@
 <td class="content">
 <div class="paragraph">
 <p>A kernel object does not update the reference count for objects such as
-memory or sampler objects specified as argument values by <strong>clSetKernelArg</strong>.
+memory or sampler objects specified as argument values by <a href="#clSetKernelArg"><strong>clSetKernelArg</strong></a>.
 Users may not rely on a kernel object to retain objects specified as
 argument values to the kernel.</p>
 </div>
@@ -16534,49 +17127,49 @@
 If the kernel holds ownership rights on kernel args, that would make it
 impossible for the user to tell with certainty when he may safely
 release user allocated resources associated with OpenCL objects such as
-the cl_mem backing store used with CL_MEM_USE_HOST_PTR.</p>
+the cl_mem backing store used with <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a>.</p>
 </div>
 </td>
 </tr>
 </table>
 </div>
 <div class="paragraph">
-<p><strong>clSetKernelArg</strong> returns CL_SUCCESS if the function was executed
+<p><a href="#clSetKernelArg"><strong>clSetKernelArg</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_KERNEL"><code>CL_&#8203;INVALID_&#8203;KERNEL</code></a> 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>
+<p><a href="#CL_INVALID_ARG_INDEX"><code>CL_&#8203;INVALID_&#8203;ARG_&#8203;INDEX</code></a> 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>
+<p><a href="#CL_INVALID_ARG_VALUE"><code>CL_&#8203;INVALID_&#8203;ARG_&#8203;VALUE</code></a> 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
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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>
+<p><a href="#CL_INVALID_SAMPLER"><code>CL_&#8203;INVALID_&#8203;SAMPLER</code></a> 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>
+<p><a href="#CL_INVALID_DEVICE_QUEUE"><code>CL_&#8203;INVALID_&#8203;DEVICE_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_ARG_SIZE"><code>CL_&#8203;INVALID_&#8203;ARG_&#8203;SIZE</code></a> 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> != <code>sizeof(cl_mem)</code> 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> != <code>sizeof(cl_sampler)</code>.</p>
 </li>
 <li>
-<p>CL_MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory
+<p><a href="#CL_MAX_SIZE_RESTRICTION_EXCEEDED"><code>CL_&#8203;MAX_&#8203;SIZE_&#8203;RESTRICTION_&#8203;EXCEEDED</code></a> 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
@@ -16586,119 +17179,131 @@
 in SPIR-V 1.2 Specification.</p>
 </li>
 <li>
-<p>CL_INVALID_ARG_VALUE if the argument is an image declared with the
+<p><a href="#CL_INVALID_ARG_VALUE"><code>CL_&#8203;INVALID_&#8203;ARG_&#8203;VALUE</code></a> if the argument is an image declared with the
 <code>read_only</code> qualifier and <em>arg_value</em> refers to an image object created
-with <em>cl_mem_flags</em> of CL_MEM_WRITE_ONLY or if the image argument is
+with <em>cl_mem_flags</em> of <a href="#CL_MEM_WRITE_ONLY"><code>CL_&#8203;MEM_&#8203;WRITE_&#8203;ONLY</code></a> or if the image argument is
 declared with the <code>write_only</code> qualifier and <em>arg_value</em> refers to an
-image object created with <em>cl_mem_flags</em> of CL_MEM_READ_ONLY.</p>
+image object created with <em>cl_mem_flags</em> of <a href="#CL_MEM_READ_ONLY"><code>CL_&#8203;MEM_&#8203;READ_&#8203;ONLY</code></a>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clSetKernelArgSVMPointer(cl_kernel kernel,
-                                 cl_uint arg_index,
-                                 <span class="directive">const</span> <span class="directive">void</span> *arg_value)</code></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>
+<p>To set a SVM pointer as the argument value for a specific argument of a
+kernel, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clSetKernelArgSVMPointer" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clSetKernelArgSVMPointer(
+    cl_kernel kernel,
+    cl_uint arg_index,
+    <span class="directive">const</span> <span class="directive">void</span>* arg_value);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>kernel</em> is a valid kernel object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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>.
+<em>kernel</em> (<a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a>) until the argument value is changed by a
+call to <a href="#clSetKernelArgSVMPointer"><strong>clSetKernelArgSVMPointer</strong></a> for <em>kernel</em>.
 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 *p</code>, the SVM
+For example, if the argument is declared to be <code>global float4 <strong>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 <strong>clSVMAlloc</strong> or can be a pointer offset into the SVM region.</p>
+returned by *<a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a></strong> or can be a pointer offset into the SVM region.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clSetKernelArgSVMPointer</strong> returns CL_SUCCESS if the function was executed
+<p><a href="#clSetKernelArgSVMPointer"><strong>clSetKernelArgSVMPointer</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_KERNEL"><code>CL_&#8203;INVALID_&#8203;KERNEL</code></a> 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>
+<p><a href="#CL_INVALID_ARG_INDEX"><code>CL_&#8203;INVALID_&#8203;ARG_&#8203;INDEX</code></a> 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>
+<p><a href="#CL_INVALID_ARG_VALUE"><code>CL_&#8203;INVALID_&#8203;ARG_&#8203;VALUE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clSetKernelExecInfo(cl_kernel kernel,
-                            cl_kernel_exec_info param_name,
-                            size_t param_value_size,
-                            <span class="directive">const</span> <span class="directive">void</span> *param_value)</code></pre>
-</div>
-</div>
 <div class="paragraph">
-<p>can be used to pass additional information other than argument values to a
-kernel.</p>
+<p>To pass additional information other than argument values to a kernel, call
+the function</p>
 </div>
-<div class="paragraph">
+<div id="clSetKernelExecInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clSetKernelExecInfo(
+    cl_kernel kernel,
+    cl_kernel_exec_info param_name,
+    size_t param_value_size,
+    <span class="directive">const</span> <span class="directive">void</span>* param_value);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>kernel</em> specifies the kernel object being queried.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 the <a href="#kernel-exec-info-table">Kernel
 Execution Properties</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <p><em>param_value</em> is a pointer to memory where the appropriate values determined
 by <em>param_name</em> are specified.</p>
+</li>
+</ul>
 </div>
 <table id="kernel-exec-info-table" class="tableblock frame-all grid-all stretch">
-<caption class="title">Table 28. <strong>clSetKernelExecInfo_</strong> parameter values</caption>
+<caption class="title">Table 27. List of supported param_names by <a href="#clSetKernelExecInfo">clSetKernelExecInfo</a></caption>
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -16713,18 +17318,18 @@
 </thead>
 <tbody>
 <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"><a id="CL_KERNEL_EXEC_INFO_SVM_PTRS"></a><a href="#CL_KERNEL_EXEC_INFO_SVM_PTRS"><code>CL_&#8203;KERNEL_&#8203;EXEC_&#8203;INFO_&#8203;SVM_&#8203;PTRS</code></a></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.</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
+        those buffers via <a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a> 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"><a id="CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM"></a><a href="#CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM"><code>CL_&#8203;KERNEL_&#8203;EXEC_&#8203;INFO_&#8203;SVM_&#8203;FINE_&#8203;GRAIN_&#8203;SYSTEM</code></a></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.
@@ -16734,35 +17339,37 @@
 </tbody>
 </table>
 <div class="paragraph">
-<p><strong>clSetKernelExecInfo</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_KERNEL"><code>CL_&#8203;INVALID_&#8203;KERNEL</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>param_name</em> is not valid, if <em>param_value</em> is
 <code>NULL</code> 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
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if <em>param_name</em> =
+<a href="#CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM"><code>CL_&#8203;KERNEL_&#8203;EXEC_&#8203;INFO_&#8203;SVM_&#8203;FINE_&#8203;GRAIN_&#8203;SYSTEM</code></a> and <em>param_value</em> = <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>
 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
 </div>
+</div>
+</div>
 <div class="admonitionblock note">
 <table>
 <tr>
@@ -16773,11 +17380,11 @@
 <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.
+<a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a> with <a href="#CL_KERNEL_EXEC_INFO_SVM_PTRS"><code>CL_&#8203;KERNEL_&#8203;EXEC_&#8203;INFO_&#8203;SVM_&#8203;PTRS</code></a>.
 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>.
+made available to the kernel using <a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a>.
 For example, we might pass extra SVM pointers as follows:</p>
 </div>
 <div class="listingblock">
@@ -16794,45 +17401,45 @@
 pointers.</p>
 </div>
 <div class="paragraph">
-<p>When calling <strong>clSetKernelExecInfo</strong> with CL_KERNEL_EXEC_INFO_SVM_PTRS to
+<p>When calling <a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a> with <a href="#CL_KERNEL_EXEC_INFO_SVM_PTRS"><code>CL_&#8203;KERNEL_&#8203;EXEC_&#8203;INFO_&#8203;SVM_&#8203;PTRS</code></a> 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
+each of these pointers can be the SVM pointer returned by <a href="#clSVMAlloc"><strong>clSVMAlloc</strong></a> 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
+<p><a href="#CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM"><code>CL_&#8203;KERNEL_&#8203;EXEC_&#8203;INFO_&#8203;SVM_&#8203;FINE_&#8203;GRAIN_&#8203;SYSTEM</code></a> 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
+<p><a href="#CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM"><code>CL_&#8203;KERNEL_&#8203;EXEC_&#8203;INFO_&#8203;SVM_&#8203;FINE_&#8203;GRAIN_&#8203;SYSTEM</code></a> = <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> 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
+<p><a href="#CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM"><code>CL_&#8203;KERNEL_&#8203;EXEC_&#8203;INFO_&#8203;SVM_&#8203;FINE_&#8203;GRAIN_&#8203;SYSTEM</code></a> = <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> 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.
+system SVM pointers, <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> will return a
+<a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> 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>
+fine-grain system SVM allocations, <a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a> will return a
+<a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> 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
+<p>If <a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a> has not been called with a value for
+<a href="#CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM"><code>CL_&#8203;KERNEL_&#8203;EXEC_&#8203;INFO_&#8203;SVM_&#8203;FINE_&#8203;GRAIN_&#8203;SYSTEM</code></a>, 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>
+If so, the default value used is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> (system pointers might be passed);
+otherwise, the default is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>.</p>
 </div>
 <div class="paragraph">
-<p>A call to <strong>clSetKernelExecInfo</strong> for a given value of <em>param_name</em>
+<p>A call to <a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a> 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>
@@ -16843,62 +17450,48 @@
 </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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_kernel clCloneKernel(cl_kernel source_kernel,
-                        cl_int *errcode_ret)</code></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>
+<p>To clone a kernel object, call the function</p>
 </div>
-<div class="paragraph">
-<p><em>source_kernel</em> is a valid cl_kernel object that will be copied.
-<em>source_kernel</em> will not be modified in any way by this function.</p>
+<div id="clCloneKernel" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_kernel clCloneKernel(
+    cl_kernel source_kernel,
+    cl_int* errcode_ret);</code></pre>
 </div>
-<div class="paragraph">
-<p><em>errcode_ret</em> will be assigned 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>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 <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_KERNEL if <em>kernel</em> is not a valid kernel object.</p>
+<p><em>source_kernel</em> is a valid cl_kernel object that will be copied.
+<em>source_kernel</em> will not be modified in any way by this function.</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><em>errcode_ret</em> will be assigned an appropriate error code.
+If <em>errcode_ret</em> is <code>NULL</code>, no error code is returned.</p>
 </li>
 </ul>
 </div>
 <div class="paragraph">
+<p>Cloning is used to make a shallow copy of the kernel object, its arguments
+and any information passed to the kernel object using <a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a>.
+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>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>.
+had been returned by <a href="#clCreateKernel"><strong>clCreateKernel</strong></a>.
 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
+<p>The resulting kernel will be in the same state as if <a href="#clCreateKernel"><strong>clCreateKernel</strong></a> 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
+to create <em>source_kernel</em>, the latest call to <a href="#clSetKernelArg"><strong>clSetKernelArg</strong></a> or
+<a href="#clSetKernelArgSVMPointer"><strong>clSetKernelArgSVMPointer</strong></a> for each argument index applied to kernel and the
+last call to <a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a> for each value of the param name
 parameter are applied to the new kernel object.</p>
 </div>
 <div class="paragraph">
@@ -16914,51 +17507,78 @@
 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 class="paragraph">
+<p><a href="#clCloneKernel"><strong>clCloneKernel</strong></a> returns a valid non-zero kernel object and <em>errcode_ret</em> is
+set to  <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the kernel is successfully copied.
+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><a href="#CL_INVALID_KERNEL"><code>CL_&#8203;INVALID_&#8203;KERNEL</code></a> if <em>kernel</em> is not a valid kernel object.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetKernelInfo(cl_kernel kernel,
-                        cl_kernel_info param_name,
-                        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>
+<p>To return information about a kernel object, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clGetKernelInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetKernelInfo(
+    cl_kernel kernel,
+    cl_kernel_info param_name,
+    size_t param_value_size,
+    <span class="directive">void</span>* param_value,
+    size_t* param_value_size_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>kernel</em> specifies the kernel object being queried.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 the
+<em>param_value</em> by <a href="#clGetKernelInfo"><strong>clGetKernelInfo</strong></a> is described in the
 <a href="#kernel-info-table">Kernel Object Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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-info-table">Kernel Object Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </div>
 <table id="kernel-info-table" class="tableblock frame-all grid-all stretch">
-<caption class="title">Table 29. <strong>clGetKernelInfo</strong> parameter queries</caption>
+<caption class="title">Table 28. List of supported param_names by <a href="#clGetKernelInfo">clGetKernelInfo</a></caption>
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -16973,32 +17593,32 @@
 </thead>
 <tbody>
 <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"><a id="CL_KERNEL_FUNCTION_NAME"></a><a href="#CL_KERNEL_FUNCTION_NAME"><code>CL_&#8203;KERNEL_&#8203;FUNCTION_&#8203;NAME</code></a></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"><a id="CL_KERNEL_NUM_ARGS"></a><a href="#CL_KERNEL_NUM_ARGS"><code>CL_&#8203;KERNEL_&#8203;NUM_&#8203;ARGS</code></a></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"><strong>CL_KERNEL_REFERENCE_COUNT</strong><sup>16</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_KERNEL_REFERENCE_COUNT"></a><a href="#CL_KERNEL_REFERENCE_COUNT"><code>CL_&#8203;KERNEL_&#8203;REFERENCE_&#8203;COUNT</code></a><sup>16</sup></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"><a id="CL_KERNEL_CONTEXT"></a><a href="#CL_KERNEL_CONTEXT"><code>CL_&#8203;KERNEL_&#8203;CONTEXT</code></a></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"><a id="CL_KERNEL_PROGRAM"></a><a href="#CL_KERNEL_PROGRAM"><code>CL_&#8203;KERNEL_&#8203;PROGRAM</code></a></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"><a id="CL_KERNEL_ATTRIBUTES"></a><a href="#CL_KERNEL_ATTRIBUTES"><code>CL_&#8203;KERNEL_&#8203;ATTRIBUTES</code></a></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 <code>__attribute__</code>
         OpenCL C qualifier (or using an OpenCL C++ qualifier syntax [[]] )
@@ -17012,7 +17632,7 @@
         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
-        <strong>clCreateProgramWithSource</strong> API call the string returned from this
+        <a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a> API call the string returned from this
         query will be empty.</p></td>
 </tr>
 </tbody>
@@ -17028,83 +17648,89 @@
 </dl>
 </div>
 <div class="paragraph">
-<p><strong>clGetKernelInfo</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clGetKernelInfo"><strong>clGetKernelInfo</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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-info-table">Kernel Object Queries</a> table and <em>param_value</em>
 is not <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_KERNEL if <em>kernel</em> is a not a valid kernel object.</p>
+<p><a href="#CL_INVALID_KERNEL"><code>CL_&#8203;INVALID_&#8203;KERNEL</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetKernelWorkGroupInfo(cl_kernel kernel,
-                                cl_device_id device,
-                                cl_kernel_work_group_info param_name,
-                                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 that may be specific to a
-device.</p>
+<p>To return information about the kernel object that may be specific to a
+device, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clGetKernelWorkGroupInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetKernelWorkGroupInfo(
+    cl_kernel kernel,
+    cl_device_id device,
+    cl_kernel_work_group_info param_name,
+    size_t param_value_size,
+    <span class="directive">void</span>* param_value,
+    size_t* param_value_size_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>kernel</em> specifies the kernel object being queried.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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 the
+<em>param_value</em> by <a href="#clGetKernelWorkGroupInfo"><strong>clGetKernelWorkGroupInfo</strong></a> is described in the
 <a href="#kernel-workgroup-info-table">Kernel Object Device Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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-workgroup-info-table">Kernel Object Device Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </div>
 <table id="kernel-workgroup-info-table" class="tableblock frame-all grid-all stretch">
-<caption class="title">Table 30. <strong>clGetKernelWorkGroupInfo</strong> parameter queries</caption>
+<caption class="title">Table 29. List of supported param_names by <a href="#clGetKernelWorkGroupInfo">clGetKernelWorkGroupInfo</a></caption>
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -17119,19 +17745,19 @@
 </thead>
 <tbody>
 <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"><a id="CL_KERNEL_GLOBAL_WORK_SIZE"></a><a href="#CL_KERNEL_GLOBAL_WORK_SIZE"><code>CL_&#8203;KERNEL_&#8203;GLOBAL_&#8203;WORK_&#8203;SIZE</code></a></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.
-        <em>global_work_size</em> argument to <strong>clEnqueueNDRangeKernel</strong>) on a custom
+        <em>global_work_size</em> argument to <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a>) 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
-        kernel, <strong>clGetKernelWorkGroupInfo</strong> returns the error
-        CL_INVALID_VALUE.</p></td>
+        kernel, <a href="#clGetKernelWorkGroupInfo"><strong>clGetKernelWorkGroupInfo</strong></a> returns the error
+        <a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a>.</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"><a id="CL_KERNEL_WORK_GROUP_SIZE"></a><a href="#CL_KERNEL_WORK_GROUP_SIZE"><code>CL_&#8203;KERNEL_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a></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
@@ -17139,44 +17765,44 @@
         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
+<p class="tableblock">        As a result and unlike <a href="#CL_DEVICE_MAX_WORK_GROUP_SIZE"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a> 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>
+<p class="tableblock">        <a href="#CL_KERNEL_WORK_GROUP_SIZE"><code>CL_&#8203;KERNEL_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a> will be less than or equal to
+        <a href="#CL_DEVICE_MAX_WORK_GROUP_SIZE"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a> 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"><a id="CL_KERNEL_COMPILE_WORK_GROUP_SIZE"></a><a href="#CL_KERNEL_COMPILE_WORK_GROUP_SIZE"><code>CL_&#8203;KERNEL_&#8203;COMPILE_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a></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,
         (0, 0, 0) is returned.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_KERNEL_LOCAL_MEM_SIZE</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_KERNEL_LOCAL_MEM_SIZE"></a><a href="#CL_KERNEL_LOCAL_MEM_SIZE"><code>CL_&#8203;KERNEL_&#8203;LOCAL_&#8203;MEM_&#8203;SIZE</code></a></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
         <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>
+        address qualifier and whose size is specified with <a href="#clSetKernelArg"><strong>clSetKernelArg</strong></a>.</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>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE"></a><a href="#CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE"><code>CL_&#8203;KERNEL_&#8203;PREFERRED_&#8203;WORK_&#8203;GROUP_&#8203;SIZE_&#8203;MULTIPLE</code></a></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
+        to <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> 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_MEM_SIZE</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_KERNEL_PRIVATE_MEM_SIZE"></a><a href="#CL_KERNEL_PRIVATE_MEM_SIZE"><code>CL_&#8203;KERNEL_&#8203;PRIVATE_&#8203;MEM_&#8203;SIZE</code></a></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.
@@ -17188,103 +17814,109 @@
 </tbody>
 </table>
 <div class="paragraph">
-<p><strong>clGetKernelWorkGroupInfo</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clGetKernelWorkGroupInfo"><strong>clGetKernelWorkGroupInfo</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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-workgroup-info-table">Kernel Object Device 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_GLOBAL_WORK_SIZE and
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>param_name</em> is <a href="#CL_KERNEL_GLOBAL_WORK_SIZE"><code>CL_&#8203;KERNEL_&#8203;GLOBAL_&#8203;WORK_&#8203;SIZE</code></a> 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>
+<p><a href="#CL_INVALID_KERNEL"><code>CL_&#8203;INVALID_&#8203;KERNEL</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetKernelSubGroupInfo(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>
+<p>To return information about a kernel object, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clGetKernelSubGroupInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetKernelSubGroupInfo(
+    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="ulist">
+<ul>
+<li>
 <p><em>kernel</em> specifies the kernel object being queried.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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 the
+<em>param_value</em> by <a href="#clGetKernelSubGroupInfo"><strong>clGetKernelSubGroupInfo</strong></a> is described in the
 <a href="#kernel-subgroup-info-table">Kernel Object Subgroup Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </div>
 <table id="kernel-subgroup-info-table" class="tableblock frame-all grid-all stretch">
-<caption class="title">Table 31. <strong>clGetKernelSubGroupInfo</strong> parameter queries</caption>
+<caption class="title">Table 30. List of supported param_names by <a href="#clGetKernelSubGroupInfo">clGetKernelSubGroupInfo</a></caption>
 <colgroup>
 <col style="width: 25%;">
 <col style="width: 25%;">
@@ -17301,7 +17933,7 @@
 </thead>
 <tbody>
 <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"><a id="CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE"></a><a href="#CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE"><code>CL_&#8203;KERNEL_&#8203;MAX_&#8203;SUB_&#8203;GROUP_&#8203;SIZE_&#8203;FOR_&#8203;NDRANGE</code></a></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.
@@ -17315,7 +17947,7 @@
             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</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE"></a><a href="#CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE"><code>CL_&#8203;KERNEL_&#8203;SUB_&#8203;GROUP_&#8203;COUNT_&#8203;FOR_&#8203;NDRANGE</code></a></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
@@ -17330,7 +17962,7 @@
             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_LOCAL_SIZE_FOR_SUB_GROUP_COUNT</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT"></a><a href="#CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT"><code>CL_&#8203;KERNEL_&#8203;LOCAL_&#8203;SIZE_&#8203;FOR_&#8203;SUB_&#8203;GROUP_&#8203;COUNT</code></a></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
@@ -17349,7 +17981,7 @@
             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"><a id="CL_KERNEL_MAX_NUM_SUB_GROUPS"></a><a href="#CL_KERNEL_MAX_NUM_SUB_GROUPS"><code>CL_&#8203;KERNEL_&#8203;MAX_&#8203;NUM_&#8203;SUB_&#8203;GROUPS</code></a></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
@@ -17363,7 +17995,7 @@
             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"><a id="CL_KERNEL_COMPILE_NUM_SUB_GROUPS"></a><a href="#CL_KERNEL_COMPILE_NUM_SUB_GROUPS"><code>CL_&#8203;KERNEL_&#8203;COMPILE_&#8203;NUM_&#8203;SUB_&#8203;GROUPS</code></a></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
@@ -17372,100 +18004,106 @@
 </tbody>
 </table>
 <div class="paragraph">
-<p><strong>clGetKernelSubGroupInfo</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clGetKernelSubGroupInfo"><strong>clGetKernelSubGroupInfo</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>param_name</em> is
+<a href="#CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE"><code>CL_&#8203;KERNEL_&#8203;MAX_&#8203;SUB_&#8203;GROUP_&#8203;SIZE_&#8203;FOR_&#8203;NDRANGE</code></a> 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>
+<p><a href="#CL_INVALID_KERNEL"><code>CL_&#8203;INVALID_&#8203;KERNEL</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetKernelArgInfo(cl_kernel kernel,
-                          cl_uint arg_indx,
-                          cl_kernel_arg_info param_name,
-                          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 arguments of a kernel.</p>
+<p>To return information about the arguments of a kernel, call the function</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 <code>-cl-kernel-arg-info option</code> specified
-in options argument to <strong>clBuildProgram</strong> or <strong>clCompileProgram</strong>.</p>
+<div id="clGetKernelArgInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetKernelArgInfo(
+    cl_kernel kernel,
+    cl_uint arg_indx,
+    cl_kernel_arg_info param_name,
+    size_t param_value_size,
+    <span class="directive">void</span>* param_value,
+    size_t* param_value_size_ret);</code></pre>
 </div>
-<div class="paragraph">
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>kernel</em> specifies the kernel object being queried.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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</em> by <strong>clGetKernelArgInfo</strong> is described in the
+<em>param_value</em> by <a href="#clGetKernelArgInfo"><strong>clGetKernelArgInfo</strong></a> is described in the
 <a href="#kernel-argument-info-table">Kernel Argument Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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
 <a href="#kernel-argument-info-table">Kernel Argument Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Kernel argument information is only available if the program object
+associated with <em>kernel</em> is created with <a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a> and the
+program executable was built with the <code>-cl-kernel-arg-info option</code> specified
+in options argument to <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> or <a href="#clCompileProgram"><strong>clCompileProgram</strong></a>.</p>
 </div>
 <table id="kernel-argument-info-table" class="tableblock frame-all grid-all stretch">
-<caption class="title">Table 32. <strong>clGetKernelArgInfo</strong> parameter queries</caption>
+<caption class="title">Table 31. List of supported param_names by <a href="#clGetKernelArgInfo">clGetKernelArgInfo</a></caption>
 <colgroup>
-<col style="width: 34%;">
-<col style="width: 33%;">
-<col style="width: 33%;">
+<col style="width: 33.3333%;">
+<col style="width: 16.6666%;">
+<col style="width: 50.0001%;">
 </colgroup>
 <thead>
 <tr>
@@ -17476,35 +18114,35 @@
 </thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_KERNEL_ARG_ADDRESS_QUALIFIER</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_KERNEL_ARG_ADDRESS_QUALIFIER"></a><a href="#CL_KERNEL_ARG_ADDRESS_QUALIFIER"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;ADDRESS_&#8203;QUALIFIER</code></a></p></td>
 <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>
-        CL_KERNEL_ARG_ADDRESS_LOCAL<br>
-        CL_KERNEL_ARG_ADDRESS_CONSTANT<br>
-        CL_KERNEL_ARG_ADDRESS_PRIVATE</p>
+<p class="tableblock">        <a id="CL_KERNEL_ARG_ADDRESS_GLOBAL"></a><a href="#CL_KERNEL_ARG_ADDRESS_GLOBAL"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;ADDRESS_&#8203;GLOBAL</code></a><br>
+        <a id="CL_KERNEL_ARG_ADDRESS_LOCAL"></a><a href="#CL_KERNEL_ARG_ADDRESS_LOCAL"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;ADDRESS_&#8203;LOCAL</code></a><br>
+        <a id="CL_KERNEL_ARG_ADDRESS_CONSTANT"></a><a href="#CL_KERNEL_ARG_ADDRESS_CONSTANT"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;ADDRESS_&#8203;CONSTANT</code></a><br>
+        <a id="CL_KERNEL_ARG_ADDRESS_PRIVATE"></a><a href="#CL_KERNEL_ARG_ADDRESS_PRIVATE"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;ADDRESS_&#8203;PRIVATE</code></a></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>
+        which is <a href="#CL_KERNEL_ARG_ADDRESS_PRIVATE"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;ADDRESS_&#8203;PRIVATE</code></a> is returned.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_KERNEL_ARG_ACCESS_QUALIFIER</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_KERNEL_ARG_ACCESS_QUALIFIER"></a><a href="#CL_KERNEL_ARG_ACCESS_QUALIFIER"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;ACCESS_&#8203;QUALIFIER</code></a></p></td>
 <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>
-        CL_KERNEL_ARG_ACCESS_WRITE_ONLY<br>
-        CL_KERNEL_ARG_ACCESS_READ_WRITE<br>
-        CL_KERNEL_ARG_ACCESS_NONE</p>
+<p class="tableblock">        <a id="CL_KERNEL_ARG_ACCESS_READ_ONLY"></a><a href="#CL_KERNEL_ARG_ACCESS_READ_ONLY"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;ACCESS_&#8203;READ_&#8203;ONLY</code></a><br>
+        <a id="CL_KERNEL_ARG_ACCESS_WRITE_ONLY"></a><a href="#CL_KERNEL_ARG_ACCESS_WRITE_ONLY"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;ACCESS_&#8203;WRITE_&#8203;ONLY</code></a><br>
+        <a id="CL_KERNEL_ARG_ACCESS_READ_WRITE"></a><a href="#CL_KERNEL_ARG_ACCESS_READ_WRITE"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;ACCESS_&#8203;READ_&#8203;WRITE</code></a><br>
+        <a id="CL_KERNEL_ARG_ACCESS_NONE"></a><a href="#CL_KERNEL_ARG_ACCESS_NONE"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;ACCESS_&#8203;NONE</code></a></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.
+        qualifier, <a href="#CL_KERNEL_ARG_ACCESS_NONE"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;ACCESS_&#8203;NONE</code></a> 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_NAME</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_KERNEL_ARG_TYPE_NAME"></a><a href="#CL_KERNEL_ARG_TYPE_NAME"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;NAME</code></a></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>.
@@ -17517,19 +18155,21 @@
         qualifiers.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_KERNEL_ARG_TYPE_QUALIFIER</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_KERNEL_ARG_TYPE_QUALIFIER"></a><a href="#CL_KERNEL_ARG_TYPE_QUALIFIER"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;QUALIFIER</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">cl_kernel_arg_type_qualifier</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the type qualifier specified for the argument given by
-        <em>arg_indx</em>.
-        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
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns a bitfield describing one or more type qualifiers specified
+        for the argument given by <em>arg_indx</em>.
+        The returned values can be:</p>
+<p class="tableblock">        <a id="CL_KERNEL_ARG_TYPE_CONST"></a><a href="#CL_KERNEL_ARG_TYPE_CONST"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;CONST</code></a><sup>17</sup><br>
+        <a id="CL_KERNEL_ARG_TYPE_RESTRICT"></a><a href="#CL_KERNEL_ARG_TYPE_RESTRICT"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;RESTRICT</code></a><br>
+        <a id="CL_KERNEL_ARG_TYPE_VOLATILE"></a><a href="#CL_KERNEL_ARG_TYPE_VOLATILE"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;VOLATILE</code></a><sup>18</sup><br>
+        <a id="CL_KERNEL_ARG_TYPE_PIPE"></a><a href="#CL_KERNEL_ARG_TYPE_PIPE"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;PIPE</code></a>, or<br>
+        <a id="CL_KERNEL_ARG_TYPE_NONE"></a><a href="#CL_KERNEL_ARG_TYPE_NONE"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;NONE</code></a></p>
+<p class="tableblock">        <a href="#CL_KERNEL_ARG_TYPE_NONE"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;NONE</code></a> 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"><a id="CL_KERNEL_ARG_NAME"></a><a href="#CL_KERNEL_ARG_NAME"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;NAME</code></a></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>
@@ -17539,115 +18179,119 @@
 <dl>
 <dt class="hdlist1">17</dt>
 <dd>
-<p>CL_KERNEL_ARG_TYPE_CONST is returned for
-CL_KERNEL_ARG_TYPE_QUALIFIER if the argument is declared with the
+<p><a href="#CL_KERNEL_ARG_TYPE_CONST"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;CONST</code></a> is returned for
+<a href="#CL_KERNEL_ARG_TYPE_QUALIFIER"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;QUALIFIER</code></a> if the argument is declared with the
 <code>constant</code> address space qualifier.</p>
 </dd>
 <dt class="hdlist1">18</dt>
 <dd>
-<p>CL_KERNEL_ARG_TYPE_VOLATILE is returned for
-CL_KERNEL_ARG_TYPE_QUALIFIER if the argument is a pointer and the
+<p><a href="#CL_KERNEL_ARG_TYPE_VOLATILE"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;VOLATILE</code></a> is returned for
+<a href="#CL_KERNEL_ARG_TYPE_QUALIFIER"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;QUALIFIER</code></a> if the argument is a pointer and the
 referenced type is declared with the volatile qualifier.
 For example, a kernel argument declared as <code>global int volatile *x</code>
-returns CL_KERNEL_ARG_TYPE_VOLATILE but a kernel argument declared
+returns <a href="#CL_KERNEL_ARG_TYPE_VOLATILE"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;VOLATILE</code></a> but a kernel argument declared
 as <code>global int * volatile x</code> does not.
-Similarly, CL_KERNEL_ARG_TYPE_CONST is returned if the argument is a
+Similarly, <a href="#CL_KERNEL_ARG_TYPE_CONST"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;CONST</code></a> 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 <code>global int const *x</code>
-returns CL_KERNEL_ARG_TYPE_CONST but a kernel argument declared as
+returns <a href="#CL_KERNEL_ARG_TYPE_CONST"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;CONST</code></a> but a kernel argument declared as
 <code>global int * const x</code> does not.
-CL_KERNEL_ARG_TYPE_RESTRICT will be returned if the pointer type is
+<a href="#CL_KERNEL_ARG_TYPE_RESTRICT"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;RESTRICT</code></a> will be returned if the pointer type is
 marked <code>restrict</code>.
 For example, <code>global int * restrict x</code> returns
-CL_KERNEL_ARG_TYPE_RESTRICT.</p>
+<a href="#CL_KERNEL_ARG_TYPE_RESTRICT"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;TYPE_&#8203;RESTRICT</code></a>.</p>
 </dd>
 </dl>
 </div>
 <div class="paragraph">
-<p><strong>clGetKernelArgInfo</strong> returns CL SUCCESS if the function is executed
+<p><a href="#clGetKernelArgInfo"><strong>clGetKernelArgInfo</strong></a> 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>
+<p><a href="#CL_INVALID_ARG_INDEX"><code>CL_&#8203;INVALID_&#8203;ARG_&#8203;INDEX</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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
 the <a href="#kernel-argument-info-table">Kernel Argument Queries</a> table and
 <em>param_value</em> is not <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_KERNEL_ARG_INFO_NOT_AVAILABLE if the argument information is not
+<p><a href="#CL_KERNEL_ARG_INFO_NOT_AVAILABLE"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;INFO_&#8203;NOT_&#8203;AVAILABLE</code></a> 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>
+<p><a href="#CL_INVALID_KERNEL"><code>CL_&#8203;INVALID_&#8203;KERNEL</code></a> if <em>kernel</em> is a not a valid kernel object.</p>
 </li>
 </ul>
 </div>
 </div>
 </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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueNDRangeKernel(cl_command_queue command_queue,
-                              cl_kernel kernel,
-                              cl_uint work_dim,
-                              <span class="directive">const</span> size_t *global_work_offset,
-                              <span class="directive">const</span> size_t *global_work_size,
-                              <span class="directive">const</span> size_t *local_work_size,
-                              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>enqueues a command to execute a kernel on a device.</p>
+<p>To enqueue a command to execute a kernel on a device, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueNDRangeKernel" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueNDRangeKernel(
+    cl_command_queue command_queue,
+    cl_kernel kernel,
+    cl_uint work_dim,
+    <span class="directive">const</span> size_t* global_work_offset,
+    <span class="directive">const</span> size_t* global_work_size,
+    <span class="directive">const</span> size_t* local_work_size,
+    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="ulist">
+<ul>
+<li>
 <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">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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.
+<a href="#CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WORK_&#8203;ITEM_&#8203;DIMENSIONS</code></a>.
 If <em>global_work_size</em> is <code>NULL</code>, 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
 <em>event_wait_list</em> may run at any time.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 <code>NULL</code>, the global IDs start at offset (0, 0, 0).</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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;&#8203; × <em>global_work_size</em>[<em>work_dim</em> - 1].</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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
@@ -17655,23 +18299,52 @@
 The total number of work-items in a work-group is computed as
 <em>local_work_size</em>[0] × &#8230;&#8203; × <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 the
+to the <a href="#CL_KERNEL_WORK_GROUP_SIZE"><code>CL_&#8203;KERNEL_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a> value specified in the
 <a href="#kernel-workgroup-info-table">Kernel Object Device Queries</a> table, and the
 number of work-items specified in <em>local_work_size</em>[0], &#8230;&#8203;,
 <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;&#8203;,
-CL_DEVICE_MAX_WORK_ITEM_SIZES[<em>work_dim</em> - 1].
+corresponding values specified by <a href="#CL_DEVICE_MAX_WORK_ITEM_SIZES"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WORK_&#8203;ITEM_&#8203;SIZES</code></a>[0], &#8230;&#8203;,
+<a href="#CL_DEVICE_MAX_WORK_ITEM_SIZES"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WORK_&#8203;ITEM_&#8203;SIZES</code></a>[<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>
+</li>
+<li>
+<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.
+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>
+</li>
+<li>
+<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 <code>NULL</code>, 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 <code>NULL</code>, the
+<em>event</em> argument should not refer to an element of the <em>event_wait_list</em>
+array.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
 <p>Enabling non-uniform work-groups requires the <em>kernel</em>'s program to be
 compiled without the <code>-cl-uniform-work-group-size</code> flag.
-If the program was created with <strong>clCreateProgramWithSource</strong>, non-uniform
+If the program was created with <a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a>, non-uniform
 work-groups are enabled only if the program was compiled with the
 <code>-cl-std=CL2.0</code> flag and without the <code>-cl-uniform-work-group-size</code> flag.
-If the program was created using <strong>clLinkProgram</strong> and any of the linked
+If the program was created using <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> 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
@@ -17728,202 +18401,199 @@
 The starting local ID is always (0, 0, &#8230;&#8203;, 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 <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.
-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 <code>NULL</code>, 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 <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>clEnqueueNDRangeKernel</strong> returns CL_SUCCESS if the kernel-instance was
+<p><a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_PROGRAM_EXECUTABLE"><code>CL_&#8203;INVALID_&#8203;PROGRAM_&#8203;EXECUTABLE</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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>
+<p><a href="#CL_INVALID_KERNEL"><code>CL_&#8203;INVALID_&#8203;KERNEL</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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
+<p><a href="#CL_INVALID_KERNEL_ARGS"><code>CL_&#8203;INVALID_&#8203;KERNEL_&#8203;ARGS</code></a> 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
+<p><a href="#CL_INVALID_WORK_DIMENSION"><code>CL_&#8203;INVALID_&#8203;WORK_&#8203;DIMENSION</code></a> 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
+<p><a href="#CL_INVALID_GLOBAL_WORK_SIZE"><code>CL_&#8203;INVALID_&#8203;GLOBAL_&#8203;WORK_&#8203;SIZE</code></a> if any of the values specified in
 <em>global_work_size</em>[0], &#8230;&#8203; <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>
+<p><a href="#CL_INVALID_GLOBAL_OFFSET"><code>CL_&#8203;INVALID_&#8203;GLOBAL_&#8203;OFFSET</code></a> 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
+<p><a href="#CL_INVALID_WORK_GROUP_SIZE"><code>CL_&#8203;INVALID_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a> 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
+<p><a href="#CL_INVALID_WORK_GROUP_SIZE"><code>CL_&#8203;INVALID_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a> 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
+<p><a href="#CL_INVALID_WORK_GROUP_SIZE"><code>CL_&#8203;INVALID_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a> 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] × &#8230;&#8203; <em>local_work_size</em>[<em>work_dim</em> - 1] is
-greater than the value specified by CL_KERNEL_WORK_GROUP_SIZE in the
+greater than the value specified by <a href="#CL_KERNEL_WORK_GROUP_SIZE"><code>CL_&#8203;KERNEL_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a> in the
 <a href="#kernel-workgroup-info-table">Kernel Object Device Queries</a> table.</p>
 </li>
 <li>
-<p>CL_INVALID_WORK_GROUP_SIZE if the program was compiled with
+<p><a href="#CL_INVALID_WORK_GROUP_SIZE"><code>CL_&#8203;INVALID_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a> 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
+<p><a href="#CL_INVALID_WORK_ITEM_SIZE"><code>CL_&#8203;INVALID_&#8203;WORK_&#8203;ITEM_&#8203;SIZE</code></a> if the number of work-items specified in any
 of <em>local_work_size</em>[0], &#8230;&#8203; <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], &#8230;&#8203;,
-CL_DEVICE_MAX_WORK_ITEM_SIZES[<em>work_dim</em> - 1].</p>
+<a href="#CL_DEVICE_MAX_WORK_ITEM_SIZES"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WORK_&#8203;ITEM_&#8203;SIZES</code></a>[0], &#8230;&#8203;,
+<a href="#CL_DEVICE_MAX_WORK_ITEM_SIZES"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WORK_&#8203;ITEM_&#8203;SIZES</code></a>[<em>work_dim</em> - 1].</p>
 </li>
 <li>
-<p>CL_MISALIGNED_SUB_BUFFER_OFFSET if a sub-buffer object is specified as
+<p><a href="#CL_MISALIGNED_SUB_BUFFER_OFFSET"><code>CL_&#8203;MISALIGNED_&#8203;SUB_&#8203;BUFFER_&#8203;OFFSET</code></a> 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>
+<a href="#CL_DEVICE_MEM_BASE_ADDR_ALIGN"><code>CL_&#8203;DEVICE_&#8203;MEM_&#8203;BASE_&#8203;ADDR_&#8203;ALIGN</code></a> 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
+<p><a href="#CL_INVALID_IMAGE_SIZE"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;SIZE</code></a> 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
+<p><a href="#CL_IMAGE_FORMAT_NOT_SUPPORTED"><code>CL_&#8203;IMAGE_&#8203;FORMAT_&#8203;NOT_&#8203;SUPPORTED</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<em>kernel</em> exceed the <a href="#CL_DEVICE_MAX_READ_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;READ_&#8203;IMAGE_&#8203;ARGS</code></a> 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
+exceed the <a href="#CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;READ_&#8203;WRITE_&#8203;IMAGE_&#8203;ARGS</code></a> value for device or the
+number of samplers used in <em>kernel</em> exceed <a href="#CL_DEVICE_MAX_SAMPLERS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;SAMPLERS</code></a> for
 device.</p>
 </li>
 <li>
-<p>CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_INVALID_OPERATION if SVM pointers are passed as arguments to a kernel
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueNativeKernel(cl_command_queue command_queue,
-                             <span class="directive">void</span> (CL_CALLBACK *user_func)(<span class="directive">void</span> *),
-                             <span class="directive">void</span> *args,
-                             size_t cb_args,
-                             cl_uint num_mem_objects,
-                             <span class="directive">const</span> cl_mem *mem_list,
-                             <span class="directive">const</span> <span class="directive">void</span> **args_mem_loc,
-                             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>enqueues a command to execute a native C/C++ function not compiled using the
-OpenCL compiler.</p>
+<p>To enqueue a command to execute a native C/C++ function not compiled using
+the OpenCL compiler, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueNativeKernel" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueNativeKernel(
+    cl_command_queue command_queue,
+    <span class="directive">void</span> (CL_CALLBACK* user_func)(<span class="directive">void</span>*),
+    <span class="directive">void</span>* args,
+    size_t cb_args,
+    cl_uint num_mem_objects,
+    <span class="directive">const</span> cl_mem* mem_list,
+    <span class="directive">const</span> <span class="directive">void</span>** args_mem_loc,
+    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="ulist">
+<ul>
+<li>
 <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 the
+device that has <a href="#CL_EXEC_NATIVE_KERNEL"><code>CL_&#8203;EXEC_&#8203;NATIVE_&#8203;KERNEL</code></a> capability set in
+<a href="#CL_DEVICE_EXECUTION_CAPABILITIES"><code>CL_&#8203;DEVICE_&#8203;EXECUTION_&#8203;CAPABILITIES</code></a> as specified in the
 <a href="#device-queries-table">Device Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <p><em>user_func</em> is a pointer to a host-callable user function.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <p><em>cb_args</em> is the size in bytes of the args list that <em>args</em> points to.</p>
+</li>
+<li>
+<p><em>num_mem_objects</em> is the number of buffer objects that are passed in <em>args</em>.</p>
+</li>
+<li>
+<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 <a href="#clCreateBuffer"><strong>clCreateBuffer</strong></a> or <code>NULL</code>.</p>
+</li>
+<li>
+<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>
+</li>
+<li>
+<p><em>event_wait_list</em>, <em>num_events_in_wait_list</em> and <em>event</em> are as described in
+<a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a>.</p>
+</li>
+</ul>
 </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
@@ -17931,97 +18601,79 @@
 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>
+When <a href="#clEnqueueNativeKernel"><strong>clEnqueueNativeKernel</strong></a> 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 <code>NULL</code>.</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</em>, <em>num_events_in_wait_list</em> and <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
+<p><a href="#clEnqueueNativeKernel"><strong>clEnqueueNativeKernel</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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 <code>NULL</code>.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>user_func</em> is <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>args</em> is a <code>NULL</code> value and <em>cb_args</em> &gt; 0, or if
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>args</em> is a <code>NULL</code> value and <em>cb_args</em> &gt; 0, or if
 <em>args</em> is a <code>NULL</code> value and <em>num_mem_objects</em> &gt; 0.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>args</em> is not <code>NULL</code> and <em>cb_args</em> is 0.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>args</em> is not <code>NULL</code> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>num_mem_objects</em> &gt; 0 and <em>mem_list</em> or
 <em>args_mem_loc</em> are <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>num_mem_objects</em> = 0 and <em>mem_list</em> or
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>num_mem_objects</em> = 0 and <em>mem_list</em> or
 <em>args_mem_loc</em> are not <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_OPERATION if the device associated with <em>command_queue</em>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> 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
+<p><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_INVALID_OPERATION if SVM pointers are passed as arguments to a kernel
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
@@ -18035,17 +18687,17 @@
 <td class="content">
 <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.
+cannot exceed <a href="#CL_DEVICE_MAX_READ_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;READ_&#8203;IMAGE_&#8203;ARGS</code></a>.
 Each image array argument to a kernel declared with the <code>read_only</code>
 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.
+cannot exceed <a href="#CL_DEVICE_MAX_WRITE_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WRITE_&#8203;IMAGE_&#8203;ARGS</code></a>.
 Each image array argument to a kernel declared with the <code>write_only</code>
 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.
+cannot exceed <a href="#CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;READ_&#8203;WRITE_&#8203;IMAGE_&#8203;ARGS</code></a>.
 Each image array argument to a kernel declared with the <code>read_write</code>
 qualifier counts as one image.</p>
 </div>
@@ -18054,18 +18706,24 @@
 </table>
 </div>
 </div>
+</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</strong>, <strong>clEnqueueNativeKernel</strong>), read, write, map and
-copy commands on memory objects (<strong>clEnqueue{Read|Write|Map}Buffer</strong>,
-<strong>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
+(<a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a>, <a href="#clEnqueueNativeKernel"><strong>clEnqueueNativeKernel</strong></a>), read, write, map and
+copy commands on memory objects (
+<a href="#clEnqueueReadBuffer"><strong>clEnqueueReadBuffer</strong></a>, <a href="#clEnqueueWriteBuffer"><strong>clEnqueueWriteBuffer</strong></a>,
+<a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a>, <a href="#clEnqueueUnmapMemObject"><strong>clEnqueueUnmapMemObject</strong></a>,
+<a href="#clEnqueueReadBufferRect"><strong>clEnqueueReadBufferRect</strong></a>, <a href="#clEnqueueWriteBufferRect"><strong>clEnqueueWriteBufferRect</strong></a>,
+<a href="#clEnqueueReadImage"><strong>clEnqueueReadImage</strong></a>, <a href="#clEnqueueWriteImage"><strong>clEnqueueWriteImage</strong></a>, <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>,
+<a href="#clEnqueueCopyBuffer"><strong>clEnqueueCopyBuffer</strong></a>, <a href="#clEnqueueCopyImage"><strong>clEnqueueCopyImage</strong></a>,
+<a href="#clEnqueueCopyBufferRect"><strong>clEnqueueCopyBufferRect</strong></a>,
+<a href="#clEnqueueCopyBufferToImage"><strong>clEnqueueCopyBufferToImage</strong></a>, <a href="#clEnqueueCopyImageToBuffer"><strong>clEnqueueCopyImageToBuffer</strong></a>),
+<a href="#clEnqueueSVMMemcpy"><strong>clEnqueueSVMMemcpy</strong></a>, <a href="#clEnqueueSVMMemFill"><strong>clEnqueueSVMMemFill</strong></a>,
+<a href="#clEnqueueSVMMap"><strong>clEnqueueSVMMap</strong></a>, <a href="#clEnqueueSVMUnmap"><strong>clEnqueueSVMUnmap</strong></a>, <a href="#clEnqueueSVMFree"><strong>clEnqueueSVMFree</strong></a>,
+<a href="#clEnqueueMarkerWithWaitList"><strong>clEnqueueMarkerWithWaitList</strong></a>, <a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a> (refer to
 <a href="#markers-barriers-waiting-for-events">Markers, Barriers and Waiting for
 Events</a>) or user events.</p>
 </div>
@@ -18083,25 +18741,25 @@
 <div class="ulist">
 <ul>
 <li>
-<p>CL_QUEUED This indicates that the command has been enqueued in a
+<p><a id="CL_QUEUED"></a><a href="#CL_QUEUED"><code>CL_&#8203;QUEUED</code></a> 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.
+<p><a id="CL_SUBMITTED"></a><a href="#CL_SUBMITTED"><code>CL_&#8203;SUBMITTED</code></a> 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
+<p><a id="CL_RUNNING"></a><a href="#CL_RUNNING"><code>CL_&#8203;RUNNING</code></a> 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
+<a href="#CL_SUBMITTED"><code>CL_&#8203;SUBMITTED</code></a> to <a href="#CL_RUNNING"><code>CL_&#8203;RUNNING</code></a>, all events that this command is waiting on
 must have completed successfully i.e. their execution status must be
-CL_COMPLETE.</p>
+<a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>.</p>
 </li>
 <li>
-<p>CL_COMPLETE This indicates that the command has successfully completed.</p>
+<p><a id="CL_COMPLETE"></a><a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a> 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
@@ -18120,7 +18778,7 @@
 <td class="content">
 <div class="paragraph">
 <p>A command is considered to be complete if its execution status is
-CL_COMPLETE or is a negative integer value.</p>
+<a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a> or is a negative integer value.</p>
 </div>
 <div class="paragraph">
 <p>If the execution of a command is terminated, the command-queue associated
@@ -18136,100 +18794,84 @@
 </tr>
 </table>
 </div>
-<div class="paragraph">
-<p>The function</p>
-</div>
-<div class="listingblock">
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_event clCreateUserEvent(cl_context context,
-                           cl_int *errcode_ret)</code></pre>
+<div class="paragraph">
+<p>To create a user event object, call the function</p>
 </div>
+<div id="clCreateUserEvent" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_event clCreateUserEvent(
+    cl_context context,
+    cl_int* errcode_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>context</em> must be a valid OpenCL context.</p>
+</li>
+<li>
+<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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>creates a user event object.
-User events allow applications to enqueue commands that wait on a user event
+<p>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 <code>NULL</code>, 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</em>
-is set to CL_SUCCESS if the user event object is created successfully.
+<p><a href="#clCreateUserEvent"><strong>clCreateUserEvent</strong></a> returns a valid non-zero event object and <em>errcode_ret</em>
+is set to <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the user event 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>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> if <em>context</em> is not a valid context.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<a href="#CL_SUBMITTED"><code>CL_&#8203;SUBMITTED</code></a>.</p>
 </div>
-<div class="paragraph">
-<p>The function</p>
 </div>
-<div class="listingblock">
+</div>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clSetUserEventStatus(cl_event event,
-                            cl_int execution_status)</code></pre>
-</div>
-</div>
 <div class="paragraph">
-<p>sets the execution status of a user event object.</p>
+<p>To set the execution status of a user event object, call the function</p>
 </div>
-<div class="paragraph">
-<p><em>event</em> is a user event object created using <strong>clCreateUserEvent</strong>.</p>
+<div id="clSetUserEventStatus" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clSetUserEventStatus(
+    cl_event event,
+    cl_int execution_status);</code></pre>
 </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>
+<p><em>event</em> is a user event object created using <a href="#clCreateUserEvent"><strong>clCreateUserEvent</strong></a>.</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>
+<p><em>execution_status</em> specifies the new execution status to be set and can be
+<a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a> 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.
+<a href="#clSetUserEventStatus"><strong>clSetUserEventStatus</strong></a> can only be called once to change the execution
+status of <em>event</em>.</p>
 </li>
 </ul>
 </div>
@@ -18243,13 +18885,13 @@
 <div class="paragraph">
 <p>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>
+these user events being waited on are set using <a href="#clSetUserEventStatus"><strong>clSetUserEventStatus</strong></a>
 before any OpenCL APIs that release OpenCL objects except for event objects
 are called; otherwise the behavior is undefined.</p>
 </div>
 <div class="paragraph">
 <p>For example, the following code sequence will result in undefined behavior
-of <strong>clReleaseMemObject</strong>.</p>
+of <a href="#clReleaseMemObject"><strong>clReleaseMemObject</strong></a>.</p>
 </div>
 <div class="listingblock">
 <div class="content">
@@ -18277,95 +18919,144 @@
 </table>
 </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 clWaitForEvents(cl_uint num_events,
-                       <span class="directive">const</span> cl_event *event_list)</code></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.
+<p><a href="#clSetUserEventStatus"><strong>clSetUserEventStatus</strong></a> returns  <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the function was executed
+successfully.
 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 <code>NULL</code>.</p>
+<p><a href="#CL_INVALID_EVENT"><code>CL_&#8203;INVALID_&#8203;EVENT</code></a> if <em>event</em> is not a valid user event object.</p>
 </li>
 <li>
-<p>CL_INVALID_CONTEXT if events specified in <em>event_list</em> do not belong to
-the same context.</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if the <em>execution_status</em> is not <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a> or a
+negative integer value.</p>
 </li>
 <li>
-<p>CL_INVALID_EVENT if event objects specified in <em>event_list</em> are not
-valid event objects.</p>
+<p><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a> if the <em>execution_status</em> for <em>event</em> has already
+been changed by a previous call to <a href="#clSetUserEventStatus"><strong>clSetUserEventStatus</strong></a>.</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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetEventInfo(cl_event event,
-                      cl_event_info param_name,
-                      size_t param_value_size,
-                      <span class="directive">void</span> *param_value,
-                      size_t *param_value_size_ret)</code></pre>
+<div class="paragraph">
+<p>To wait for events to complete, call the function</p>
 </div>
+<div id="clWaitForEvents" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clWaitForEvents(
+    cl_uint num_events,
+    <span class="directive">const</span> cl_event* event_list);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>num_events</em> is the number of events in <em>event_list</em>.</p>
+</li>
+<li>
+<p><em>event_list</em> is a pointer to a list of event object handles.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>returns information about the event object.</p>
+<p>This function 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 <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a> or a
+negative value.
+The events specified in <em>event_list</em> act as synchronization points.</p>
 </div>
 <div class="paragraph">
+<p><a href="#clWaitForEvents"><strong>clWaitForEvents</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the execution status of all events
+in <em>event_list</em> is <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>.
+Otherwise, it returns one of the following errors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>num_events</em> is zero or <em>event_list</em> is <code>NULL</code>.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> if events specified in <em>event_list</em> do not belong to
+the same context.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_EVENT"><code>CL_&#8203;INVALID_&#8203;EVENT</code></a> if event objects specified in <em>event_list</em> are not
+valid event objects.</p>
+</li>
+<li>
+<p><a href="#CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"><code>CL_&#8203;EXEC_&#8203;STATUS_&#8203;ERROR_&#8203;FOR_&#8203;EVENTS_&#8203;IN_&#8203;WAIT_&#8203;LIST</code></a> if the execution status of
+any of the events in <em>event_list</em> is a negative integer value.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>To return information about an event object, call the function</p>
+</div>
+<div id="clGetEventInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetEventInfo(
+    cl_event event,
+    cl_event_info param_name,
+    size_t param_value_size,
+    <span class="directive">void</span>* param_value,
+    size_t* param_value_size_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>event</em> specifies the event object being queried.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 the
+<em>param_value</em> by <a href="#clGetEventInfo"><strong>clGetEventInfo</strong></a> is described in the
 <a href="#event-info-table">Event Object Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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="#event-info-table">Event Object Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </div>
 <table id="event-info-table" class="tableblock frame-all grid-all stretch">
-<caption class="title">Table 33. <strong>clGetEventInfo</strong> parameter queries</caption>
+<caption class="title">Table 32. List of supported param_names by <a href="#clGetEventInfo">clGetEventInfo</a></caption>
 <colgroup>
 <col style="width: 30%;">
 <col style="width: 33%;">
@@ -18380,61 +19071,61 @@
 </thead>
 <tbody>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_EVENT_COMMAND_QUEUE</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_EVENT_COMMAND_QUEUE"></a><a href="#CL_EVENT_COMMAND_QUEUE"><code>CL_&#8203;EVENT_&#8203;COMMAND_&#8203;QUEUE</code></a></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 command-queue associated with <em>event</em>.
         For user event objects, a <code>NULL</code> 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"><a id="CL_EVENT_CONTEXT"></a><a href="#CL_EVENT_CONTEXT"><code>CL_&#8203;EVENT_&#8203;CONTEXT</code></a></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_TYPE</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_EVENT_COMMAND_TYPE"></a><a href="#CL_EVENT_COMMAND_TYPE"><code>CL_&#8203;EVENT_&#8203;COMMAND_&#8203;TYPE</code></a></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>
-        CL_COMMAND_NATIVE_KERNEL<br>
-        CL_COMMAND_READ_BUFFER<br>
-        CL_COMMAND_WRITE_BUFFER<br>
-        CL_COMMAND_COPY_BUFFER<br>
-        CL_COMMAND_READ_IMAGE<br>
-        CL_COMMAND_WRITE_IMAGE<br>
-        CL_COMMAND_COPY_IMAGE<br>
-        CL_COMMAND_COPY_BUFFER_TO_IMAGE<br>
-        CL_COMMAND_COPY_IMAGE_TO_BUFFER<br>
-        CL_COMMAND_MAP_BUFFER<br>
-        CL_COMMAND_MAP_IMAGE<br>
-        CL_COMMAND_UNMAP_MEM_OBJECT<br>
-        CL_COMMAND_MARKER<br>
-        CL_COMMAND_ACQUIRE_GL_OBJECTS<br>
-        CL_COMMAND_RELEASE_GL_OBJECTS<br>
-        CL_COMMAND_READ_BUFFER_RECT<br>
-        CL_COMMAND_WRITE_BUFFER_RECT<br>
-        CL_COMMAND_COPY_BUFFER_RECT<br>
-        CL_COMMAND_USER<br>
-        CL_COMMAND_BARRIER<br>
-        CL_COMMAND_MIGRATE_MEM_OBJECTS<br>
-        CL_COMMAND_FILL_BUFFER<br>
-        CL_COMMAND_FILL_IMAGE<br>
-        CL_COMMAND_SVM_FREE<br>
-        CL_COMMAND_SVM_MEMCPY<br>
-        CL_COMMAND_SVM_MEMFILL<br>
-        CL_COMMAND_SVM_MAP<br>
-        CL_COMMAND_SVM_UNMAP</p></td>
+<p class="tableblock">        <a id="CL_COMMAND_NDRANGE_KERNEL"></a><a href="#CL_COMMAND_NDRANGE_KERNEL"><code>CL_&#8203;COMMAND_&#8203;NDRANGE_&#8203;KERNEL</code></a><br>
+        <a id="CL_COMMAND_NATIVE_KERNEL"></a><a href="#CL_COMMAND_NATIVE_KERNEL"><code>CL_&#8203;COMMAND_&#8203;NATIVE_&#8203;KERNEL</code></a><br>
+        <a id="CL_COMMAND_READ_BUFFER"></a><a href="#CL_COMMAND_READ_BUFFER"><code>CL_&#8203;COMMAND_&#8203;READ_&#8203;BUFFER</code></a><br>
+        <a id="CL_COMMAND_WRITE_BUFFER"></a><a href="#CL_COMMAND_WRITE_BUFFER"><code>CL_&#8203;COMMAND_&#8203;WRITE_&#8203;BUFFER</code></a><br>
+        <a id="CL_COMMAND_COPY_BUFFER"></a><a href="#CL_COMMAND_COPY_BUFFER"><code>CL_&#8203;COMMAND_&#8203;COPY_&#8203;BUFFER</code></a><br>
+        <a id="CL_COMMAND_READ_IMAGE"></a><a href="#CL_COMMAND_READ_IMAGE"><code>CL_&#8203;COMMAND_&#8203;READ_&#8203;IMAGE</code></a><br>
+        <a id="CL_COMMAND_WRITE_IMAGE"></a><a href="#CL_COMMAND_WRITE_IMAGE"><code>CL_&#8203;COMMAND_&#8203;WRITE_&#8203;IMAGE</code></a><br>
+        <a id="CL_COMMAND_COPY_IMAGE"></a><a href="#CL_COMMAND_COPY_IMAGE"><code>CL_&#8203;COMMAND_&#8203;COPY_&#8203;IMAGE</code></a><br>
+        <a id="CL_COMMAND_COPY_BUFFER_TO_IMAGE"></a><a href="#CL_COMMAND_COPY_BUFFER_TO_IMAGE"><code>CL_&#8203;COMMAND_&#8203;COPY_&#8203;BUFFER_&#8203;TO_&#8203;IMAGE</code></a><br>
+        <a id="CL_COMMAND_COPY_IMAGE_TO_BUFFER"></a><a href="#CL_COMMAND_COPY_IMAGE_TO_BUFFER"><code>CL_&#8203;COMMAND_&#8203;COPY_&#8203;IMAGE_&#8203;TO_&#8203;BUFFER</code></a><br>
+        <a id="CL_COMMAND_MAP_BUFFER"></a><a href="#CL_COMMAND_MAP_BUFFER"><code>CL_&#8203;COMMAND_&#8203;MAP_&#8203;BUFFER</code></a><br>
+        <a id="CL_COMMAND_MAP_IMAGE"></a><a href="#CL_COMMAND_MAP_IMAGE"><code>CL_&#8203;COMMAND_&#8203;MAP_&#8203;IMAGE</code></a><br>
+        <a id="CL_COMMAND_UNMAP_MEM_OBJECT"></a><a href="#CL_COMMAND_UNMAP_MEM_OBJECT"><code>CL_&#8203;COMMAND_&#8203;UNMAP_&#8203;MEM_&#8203;OBJECT</code></a><br>
+        <a id="CL_COMMAND_MARKER"></a><a href="#CL_COMMAND_MARKER"><code>CL_&#8203;COMMAND_&#8203;MARKER</code></a><br>
+        <a id="CL_COMMAND_ACQUIRE_GL_OBJECTS"></a><a href="#CL_COMMAND_ACQUIRE_GL_OBJECTS"><code>CL_&#8203;COMMAND_&#8203;ACQUIRE_&#8203;GL_&#8203;OBJECTS</code></a><br>
+        <a id="CL_COMMAND_RELEASE_GL_OBJECTS"></a><a href="#CL_COMMAND_RELEASE_GL_OBJECTS"><code>CL_&#8203;COMMAND_&#8203;RELEASE_&#8203;GL_&#8203;OBJECTS</code></a><br>
+        <a id="CL_COMMAND_READ_BUFFER_RECT"></a><a href="#CL_COMMAND_READ_BUFFER_RECT"><code>CL_&#8203;COMMAND_&#8203;READ_&#8203;BUFFER_&#8203;RECT</code></a><br>
+        <a id="CL_COMMAND_WRITE_BUFFER_RECT"></a><a href="#CL_COMMAND_WRITE_BUFFER_RECT"><code>CL_&#8203;COMMAND_&#8203;WRITE_&#8203;BUFFER_&#8203;RECT</code></a><br>
+        <a id="CL_COMMAND_COPY_BUFFER_RECT"></a><a href="#CL_COMMAND_COPY_BUFFER_RECT"><code>CL_&#8203;COMMAND_&#8203;COPY_&#8203;BUFFER_&#8203;RECT</code></a><br>
+        <a id="CL_COMMAND_USER"></a><a href="#CL_COMMAND_USER"><code>CL_&#8203;COMMAND_&#8203;USER</code></a><br>
+        <a id="CL_COMMAND_BARRIER"></a><a href="#CL_COMMAND_BARRIER"><code>CL_&#8203;COMMAND_&#8203;BARRIER</code></a><br>
+        <a id="CL_COMMAND_MIGRATE_MEM_OBJECTS"></a><a href="#CL_COMMAND_MIGRATE_MEM_OBJECTS"><code>CL_&#8203;COMMAND_&#8203;MIGRATE_&#8203;MEM_&#8203;OBJECTS</code></a><br>
+        <a id="CL_COMMAND_FILL_BUFFER"></a><a href="#CL_COMMAND_FILL_BUFFER"><code>CL_&#8203;COMMAND_&#8203;FILL_&#8203;BUFFER</code></a><br>
+        <a id="CL_COMMAND_FILL_IMAGE"></a><a href="#CL_COMMAND_FILL_IMAGE"><code>CL_&#8203;COMMAND_&#8203;FILL_&#8203;IMAGE</code></a><br>
+        <a id="CL_COMMAND_SVM_FREE"></a><a href="#CL_COMMAND_SVM_FREE"><code>CL_&#8203;COMMAND_&#8203;SVM_&#8203;FREE</code></a><br>
+        <a id="CL_COMMAND_SVM_MEMCPY"></a><a href="#CL_COMMAND_SVM_MEMCPY"><code>CL_&#8203;COMMAND_&#8203;SVM_&#8203;MEMCPY</code></a><br>
+        <a id="CL_COMMAND_SVM_MEMFILL"></a><a href="#CL_COMMAND_SVM_MEMFILL"><code>CL_&#8203;COMMAND_&#8203;SVM_&#8203;MEMFILL</code></a><br>
+        <a id="CL_COMMAND_SVM_MAP"></a><a href="#CL_COMMAND_SVM_MAP"><code>CL_&#8203;COMMAND_&#8203;SVM_&#8203;MAP</code></a><br>
+        <a id="CL_COMMAND_SVM_UNMAP"></a><a href="#CL_COMMAND_SVM_UNMAP"><code>CL_&#8203;COMMAND_&#8203;SVM_&#8203;UNMAP</code></a></p></td>
 </tr>
 <tr>
-<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"><a id="CL_EVENT_COMMAND_EXECUTION_STATUS"></a><a href="#CL_EVENT_COMMAND_EXECUTION_STATUS"><code>CL_&#8203;EVENT_&#8203;COMMAND_&#8203;EXECUTION_&#8203;STATUS</code></a><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
+<p class="tableblock">        <a href="#CL_QUEUED"><code>CL_&#8203;QUEUED</code></a> (command has been enqueued in the command-queue),</p>
+<p class="tableblock">        <a href="#CL_SUBMITTED"><code>CL_&#8203;SUBMITTED</code></a> (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">        <a href="#CL_RUNNING"><code>CL_&#8203;RUNNING</code></a> (device is currently executing this command),</p>
+<p class="tableblock">        <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a> (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.).
@@ -18443,7 +19134,7 @@
         errcode_ret values.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_EVENT_REFERENCE_COUNT</strong><sup>20</sup></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_EVENT_REFERENCE_COUNT"></a><a href="#CL_EVENT_REFERENCE_COUNT"><code>CL_&#8203;EVENT_&#8203;REFERENCE_&#8203;COUNT</code></a><sup>20</sup></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>
@@ -18454,10 +19145,10 @@
 <dt class="hdlist1">19</dt>
 <dd>
 <p>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
+The event state values are ordered from the largest value <a href="#CL_QUEUED"><code>CL_&#8203;QUEUED</code></a>
+for the first or initial state to the smallest value (<a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a> or
 negative integer value) for the last or complete state.
-The value of CL_COMPLETE and CL_SUCCESS are the same.</p>
+The value of <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a> and <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> are the same.</p>
 </dd>
 <dt class="hdlist1">20</dt>
 <dd>
@@ -18468,96 +19159,79 @@
 </dl>
 </div>
 <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.
+<p>Using <a href="#clGetEventInfo"><strong>clGetEventInfo</strong></a> to determine if a command identified by <em>event</em> has
+finished execution (i.e. <a href="#CL_EVENT_COMMAND_EXECUTION_STATUS"><code>CL_&#8203;EVENT_&#8203;COMMAND_&#8203;EXECUTION_&#8203;STATUS</code></a> returns
+<a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>) 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
+<p><a href="#clGetEventInfo"><strong>clGetEventInfo</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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-argument-info-table">Kernel Argument Queries</a> table and
 <em>param_value</em> is not <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if information to query given in <em>param_name</em> cannot be
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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>
+<p><a href="#CL_INVALID_EVENT"><code>CL_&#8203;INVALID_&#8203;EVENT</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clSetEventCallback(cl_event event,
-                          cl_int command_exec_callback_type,
-                          <span class="directive">void</span> (CL_CALLBACK *pfn_event_notify)(
-                              cl_event event,
-                              cl_int event_command_exec_status,
-                              <span class="directive">void</span> *user_data),
-                          <span class="directive">void</span> *user_data)</code></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>
+<p>To register a user callback function for a specific command execution
+status, call the function</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 id="clSetEventCallback" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clSetEventCallback(
+    cl_event event,
+    cl_int command_exec_callback_type,
+    <span class="directive">void</span> (CL_CALLBACK* pfn_notify)(cl_event event, cl_int type, <span class="directive">void</span> *user_data),
+    <span class="directive">void</span>* user_data);</code></pre>
 </div>
-<div class="paragraph">
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>event</em> is a valid event object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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<sup>21</sup>.
+are: <a href="#CL_SUBMITTED"><code>CL_&#8203;SUBMITTED</code></a>, <a href="#CL_RUNNING"><code>CL_&#8203;RUNNING</code></a>, or <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a><sup>21</sup>.
 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
+a status other than <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>, 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="dlist">
-<dl>
-<dt class="hdlist1">21</dt>
-<dd>
-<p>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.</p>
-</dd>
-</dl>
-</div>
-<div class="paragraph">
+has completed unless the event is in a state <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>.</p>
+</li>
+<li>
 <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
@@ -18565,7 +19239,6 @@
 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>
@@ -18586,10 +19259,34 @@
 </li>
 </ul>
 </div>
-<div class="paragraph">
+</li>
+<li>
 <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 <code>NULL</code>.</p>
+<div class="dlist">
+<dl>
+<dt class="hdlist1">21</dt>
+<dd>
+<p>The callback function registered for a command_exec_callback_type value
+of <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a> will be called when the command has completed
+successfully or is abnormally terminated.</p>
+</dd>
+</dl>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>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 <a href="#clSetEventCallback"><strong>clSetEventCallback</strong></a> 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>All callbacks registered for an event object must be called.
@@ -18602,29 +19299,29 @@
 <div class="ulist">
 <ul>
 <li>
-<p><strong>clFinish</strong>,</p>
+<p><a href="#clFinish"><strong>clFinish</strong></a>,</p>
 </li>
 <li>
-<p><strong>clWaitForEvents</strong>,</p>
+<p><a href="#clWaitForEvents"><strong>clWaitForEvents</strong></a>,</p>
 </li>
 <li>
-<p>blocking calls to <strong>clEnqueueReadBuffer</strong>, <strong>clEnqueueReadBufferRect</strong>,</p>
+<p>blocking calls to <a href="#clEnqueueReadBuffer"><strong>clEnqueueReadBuffer</strong></a>, <a href="#clEnqueueReadBufferRect"><strong>clEnqueueReadBufferRect</strong></a>,</p>
 </li>
 <li>
-<p><strong>clEnqueueWriteBuffer</strong>, <strong>clEnqueueWriteBufferRect</strong>,</p>
+<p><a href="#clEnqueueWriteBuffer"><strong>clEnqueueWriteBuffer</strong></a>, <a href="#clEnqueueWriteBufferRect"><strong>clEnqueueWriteBufferRect</strong></a>,</p>
 </li>
 <li>
-<p>blocking calls to <strong>clEnqueueReadImage</strong> and <strong>clEnqueueWriteImage</strong>,</p>
+<p>blocking calls to <a href="#clEnqueueReadImage"><strong>clEnqueueReadImage</strong></a> and <a href="#clEnqueueWriteImage"><strong>clEnqueueWriteImage</strong></a>,</p>
 </li>
 <li>
-<p>blocking calls to <strong>clEnqueueMapBuffer</strong> and <strong>clEnqueueMapImage</strong>,</p>
+<p>blocking calls to <a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a> and <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a>,</p>
 </li>
 <li>
-<p>blocking calls to <strong>clBuildProgram</strong>, <strong>clCompileProgram</strong> or
-<strong>clLinkProgram</strong>,</p>
+<p>blocking calls to <a href="#clBuildProgram"><strong>clBuildProgram</strong></a>, <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> or
+<a href="#clLinkProgram"><strong>clLinkProgram</strong></a>,</p>
 </li>
 <li>
-<p>blocking calls to <strong>clEnqueueSVMMemcpy</strong> or <strong>clEnqueueSVMMap</strong></p>
+<p>blocking calls to <a href="#clEnqueueSVMMemcpy"><strong>clEnqueueSVMMemcpy</strong></a> or <a href="#clEnqueueSVMMap"><strong>clEnqueueSVMMap</strong></a></p>
 </li>
 </ul>
 </div>
@@ -18638,103 +19335,108 @@
 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
+enqueue commands on a command queue should either call <a href="#clFlush"><strong>clFlush</strong></a> on the
+queue before returning or arrange for <a href="#clFlush"><strong>clFlush</strong></a> to be called later on
 another thread.</p>
 </div>
 <div class="paragraph">
-<p><strong>clSetEventCallback</strong> returns CL_SUCCESS if the function is executed
+<p><a href="#clSetEventCallback"><strong>clSetEventCallback</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_EVENT"><code>CL_&#8203;INVALID_&#8203;EVENT</code></a> if <em>event</em> is not a valid event object.</p>
 </li>
 <li>
-<p>CL_INVALID_VALUE if <em>pfn_event_notify</em> is <code>NULL</code> or if
-<em>command_exec_callback_type</em> is not CL_SUBMITTED, CL_RUNNING or</p>
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> if <em>pfn_event_notify</em> is <code>NULL</code> or if
+<em>command_exec_callback_type</em> is not <a href="#CL_SUBMITTED"><code>CL_&#8203;SUBMITTED</code></a>, <a href="#CL_RUNNING"><code>CL_&#8203;RUNNING</code></a>, or
+<a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a>.</p>
 </li>
 <li>
-<p>CL_OUT_OF_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clRetainEvent(cl_event event)</code></pre>
+<div class="paragraph">
+<p>To retain an event object, call the function</p>
 </div>
+<div id="clRetainEvent" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clRetainEvent(
+    cl_event event);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>event</em> is the event object to be retained.</p>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p>increments the <em>event</em> reference count.
+<p>The <em>event</em> reference count is incremented.
 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.
+<p><a href="#clRetainEvent"><strong>clRetainEvent</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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>
+<p><a href="#CL_INVALID_EVENT"><code>CL_&#8203;INVALID_&#8203;EVENT</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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>
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clReleaseEvent(cl_event event)</code></pre>
-</div>
-</div>
 <div class="paragraph">
-<p>decrements the <em>event</em> reference count.</p>
+<p>To release an event object, call the function</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 id="clReleaseEvent" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clReleaseEvent(
+    cl_event event);</code></pre>
+</div>
 </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>
+<p><em>event</em> is the event object to be released.</p>
 </li>
 </ul>
 </div>
 <div class="paragraph">
+<p>The <em>event</em> reference count is decremented.</p>
+</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>
+the object or by calling <a href="#clRetainEvent"><strong>clRetainEvent</strong></a> causes undefined behavior.</p>
 </div>
 <div class="admonitionblock note">
 <table>
@@ -18745,12 +19447,12 @@
 <td class="content">
 <div class="paragraph">
 <p>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.
+events created by <a href="#clCreateUserEvent"><strong>clCreateUserEvent</strong></a> that have not yet been set to status
+of <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a> 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
+<a href="#clWaitForEvents"><strong>clWaitForEvents</strong></a>, those commands and host threads will continue to wait for
+the event status to reach <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a> 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
@@ -18764,52 +19466,56 @@
 </tr>
 </table>
 </div>
+<div class="paragraph">
+<p><a href="#clReleaseEvent"><strong>clReleaseEvent</strong></a> returns  <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the function is executed
+successfully.
+Otherwise, it returns one of the following errors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#CL_INVALID_EVENT"><code>CL_&#8203;INVALID_&#8203;EVENT</code></a> if <em>event</em> is not a valid event object.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="sect2">
 <h3 id="markers-barriers-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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueMarkerWithWaitList(cl_command_queue command_queue,
-                                   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>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>
+<p>To enqueue a marker command which waits for events or commands to complete,
+call the function</p>
 </div>
-<div class="paragraph">
+<div id="clEnqueueMarkerWithWaitList" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueMarkerWithWaitList(
+    cl_command_queue command_queue,
+    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="ulist">
+<ul>
+<li>
 <p><em>command_queue</em> is a valid host command-queue.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 <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.
-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 <code>NULL</code>, then this particular command waits until all
-previous enqueued commands to <em>command_queue</em> have completed.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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.
@@ -18819,68 +19525,10 @@
 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>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 <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_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">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clEnqueueBarrierWithWaitList(cl_command_queue command_queue,
-                                    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>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 <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
@@ -18896,6 +19544,83 @@
 previous enqueued commands to <em>command_queue</em> have completed.</p>
 </div>
 <div class="paragraph">
+<p>The marker command either waits for 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><a href="#clEnqueueMarkerWithWaitList"><strong>clEnqueueMarkerWithWaitList</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> if the function is
+successfully executed.
+Otherwise, it returns one of the following errors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> if <em>command_queue</em> is not a valid host
+command-queue.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> if context associated with <em>command_queue</em> and events
+in <em>event_wait_list</em> are not the same.</p>
+</li>
+<li>
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> if there is a failure to allocate resources required
+by the OpenCL implementation on the device.</p>
+</li>
+<li>
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
+required by the OpenCL implementation on the host.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>To enqueue a barrier command which waits for events or commands to complete,
+call the function</p>
+</div>
+<div id="clEnqueueBarrierWithWaitList" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clEnqueueBarrierWithWaitList(
+    cl_command_queue command_queue,
+    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="ulist">
+<ul>
+<li>
+<p><em>command_queue</em> is a valid host command-queue.</p>
+</li>
+<li>
+<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>
+</li>
+<li>
+<p>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.
+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>
+</li>
+<li>
 <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.
@@ -18905,83 +19630,102 @@
 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>
+</li>
+</ul>
 </div>
 <div class="paragraph">
-<p><strong>clEnqueueBarrierWithWaitList</strong> returns CL_SUCCESS if the function is
+<p>If <em>event_wait_list</em> is <code>NULL</code>, then this particular command waits until all
+previous enqueued commands to <em>command_queue</em> have completed.</p>
+</div>
+<div class="paragraph">
+<p>The barrier command either waits for 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><a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a> 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 <code>NULL</code> and
+<p><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a> 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_RESOURCES if there is a failure to allocate resources required
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="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 <em>properties</em> argument in <strong>clCreateCommandQueueWithProperties</strong> can be
+The <em>properties</em> argument in <a href="#clCreateCommandQueueWithProperties"><strong>clCreateCommandQueueWithProperties</strong></a> 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
+<p>If the <a href="#CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE"><code>CL_&#8203;QUEUE_&#8203;OUT_&#8203;OF_&#8203;ORDER_&#8203;EXEC_&#8203;MODE_&#8203;ENABLE</code></a> 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
+For example, if an application calls <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> to execute
+kernel A followed by a <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> 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
+If the <a href="#CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE"><code>CL_&#8203;QUEUE_&#8203;OUT_&#8203;OF_&#8203;ORDER_&#8203;EXEC_&#8203;MODE_&#8203;ENABLE</code></a> 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
+execute out-of-order by setting the <a href="#CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE"><code>CL_&#8203;QUEUE_&#8203;OUT_&#8203;OF_&#8203;ORDER_&#8203;EXEC_&#8203;MODE_&#8203;ENABLE</code></a>
 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
+on when the <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> calls are made within a command-queue,
+it is therefore possible that an earlier <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> 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
+a <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> 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>
+<a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> 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
+<p>In addition, a marker (<a href="#clEnqueueMarkerWithWaitList"><strong>clEnqueueMarkerWithWaitList</strong></a>) or a barrier
+(<a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a>) 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.
@@ -18991,11 +19735,11 @@
 </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
+enqueued after <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> or <a href="#clEnqueueNativeKernel"><strong>clEnqueueNativeKernel</strong></a> 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).
+completed (if the <a href="#CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE"><code>CL_&#8203;QUEUE_&#8203;OUT_&#8203;OF_&#8203;ORDER_&#8203;EXEC_&#8203;MODE_&#8203;ENABLE</code></a> 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
+<a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> or <a href="#clEnqueueNativeKernel"><strong>clEnqueueNativeKernel</strong></a> 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>
@@ -19005,53 +19749,58 @@
 <div class="paragraph">
 <p>This section describes the profiling of OpenCL functions that are enqueued
 as commands to a command-queue. Profiling of OpenCL commands can be enabled
-by using a command-queue created with CL_QUEUE_PROFILING_ENABLE
-flag set in <em>properties</em> argument to <strong>clCreateCommandQueueWithProperties</strong>.
+by using a command-queue created with <a href="#CL_QUEUE_PROFILING_ENABLE"><code>CL_&#8203;QUEUE_&#8203;PROFILING_&#8203;ENABLE</code></a>
+flag set in <em>properties</em> argument to <a href="#clCreateCommandQueueWithProperties"><strong>clCreateCommandQueueWithProperties</strong></a>.
 When profiling is enabled, the event objects that are created from
 enqueuing a command store a timestamp for each of their state transitions.</p>
 </div>
-<div class="paragraph">
-<p>If profiling is enabled, the function</p>
-</div>
-<div class="listingblock">
+<div class="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clGetEventProfilingInfo(cl_event event,
-                               cl_profiling_info param_name,
-                               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 profiling information for the command associated with event.</p>
+<p>To return profiling information for a command associated with an event when
+profiling is enabled, call the function</p>
 </div>
-<div class="paragraph">
+<div id="clGetEventProfilingInfo" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clGetEventProfilingInfo(
+    cl_event event,
+    cl_profiling_info param_name,
+    size_t param_value_size,
+    <span class="directive">void</span>* param_value,
+    size_t* param_value_size_ret);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
 <p><em>event</em> specifies the event object.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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 the
+<em>param_value</em> by <a href="#clGetEventProfilingInfo"><strong>clGetEventProfilingInfo</strong></a> is described in the
 <a href="#event-profiling-info-table">Event Profiling Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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">
+</li>
+<li>
 <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="#event-profiling-info-table">Event Profiling Queries</a> table.</p>
-</div>
-<div class="paragraph">
+</li>
+<li>
 <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>
+</li>
+</ul>
 </div>
 <table id="event-profiling-info-table" class="tableblock frame-all grid-all stretch">
-<caption class="title">Table 34. <strong>clGetEventProfilingInfo</strong> parameter queries</caption>
+<caption class="title">Table 33. List of supported param_names by <a href="#clGetEventProfilingInfo">clGetEventProfilingInfo</a></caption>
 <colgroup>
 <col style="width: 34%;">
 <col style="width: 33%;">
@@ -19066,14 +19815,14 @@
 </thead>
 <tbody>
 <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"><a id="CL_PROFILING_COMMAND_QUEUED"></a><a href="#CL_PROFILING_COMMAND_QUEUED"><code>CL_&#8203;PROFILING_&#8203;COMMAND_&#8203;QUEUED</code></a></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"><a id="CL_PROFILING_COMMAND_SUBMIT"></a><a href="#CL_PROFILING_COMMAND_SUBMIT"><code>CL_&#8203;PROFILING_&#8203;COMMAND_&#8203;SUBMIT</code></a></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
@@ -19081,21 +19830,21 @@
         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"><a id="CL_PROFILING_COMMAND_START"></a><a href="#CL_PROFILING_COMMAND_START"><code>CL_&#8203;PROFILING_&#8203;COMMAND_&#8203;START</code></a></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"><a id="CL_PROFILING_COMMAND_END"></a><a href="#CL_PROFILING_COMMAND_END"><code>CL_&#8203;PROFILING_&#8203;COMMAND_&#8203;END</code></a></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"><a id="CL_PROFILING_COMMAND_COMPLETE"></a><a href="#CL_PROFILING_COMMAND_COMPLETE"><code>CL_&#8203;PROFILING_&#8203;COMMAND_&#8203;COMPLETE</code></a></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
@@ -19111,130 +19860,155 @@
 <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
+The <a href="#CL_DEVICE_PROFILING_TIMER_RESOLUTION"><code>CL_&#8203;DEVICE_&#8203;PROFILING_&#8203;TIMER_&#8203;RESOLUTION</code></a> 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
+<p><a href="#clGetEventProfilingInfo"><strong>clGetEventProfilingInfo</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_PROFILING_INFO_NOT_AVAILABLE"><code>CL_&#8203;PROFILING_&#8203;INFO_&#8203;NOT_&#8203;AVAILABLE</code></a> if the <a href="#CL_QUEUE_PROFILING_ENABLE"><code>CL_&#8203;QUEUE_&#8203;PROFILING_&#8203;ENABLE</code></a> 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> is a user event
+identified by <em>event</em> is not <a href="#CL_COMPLETE"><code>CL_&#8203;COMPLETE</code></a> or if <em>event</em> 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
+<p><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a> 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="#event-profiling-info-table">Event Profiling Queries</a> table and
 <em>param_value</em> is not <code>NULL</code>.</p>
 </li>
 <li>
-<p>CL_INVALID_EVENT if <em>event</em> is a not a valid event object.</p>
+<p><a href="#CL_INVALID_EVENT"><code>CL_&#8203;INVALID_&#8203;EVENT</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clFlush(cl_command_queue command_queue)</code></pre>
+<div class="paragraph">
+<p>To flush commands to a device, call the function</p>
 </div>
+<div id="clFlush" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clFlush(
+    cl_command_queue command_queue);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>command_queue</em> is the command queue to flush.</p>
+</li>
+</ul>
 </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
+<p>All previously queued OpenCL commands in <em>command_queue</em> are issued to the
+device associated with <em>command_queue</em>.
+<a href="#clFlush"><strong>clFlush</strong></a> 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>
+There is no guarantee that they will be complete after <a href="#clFlush"><strong>clFlush</strong></a> returns.</p>
 </div>
 <div class="paragraph">
-<p><strong>clFlush</strong> returns CL_SUCCESS if the function call was executed successfully.
+<p>Any blocking commands queued in a command-queue and <a href="#clReleaseCommandQueue"><strong>clReleaseCommandQueue</strong></a>
+perform an implicit flush of the command-queue.
+These blocking commands are <a href="#clEnqueueReadBuffer"><strong>clEnqueueReadBuffer</strong></a>,
+<a href="#clEnqueueReadBufferRect"><strong>clEnqueueReadBufferRect</strong></a>, <a href="#clEnqueueReadImage"><strong>clEnqueueReadImage</strong></a>, with <em>blocking_read</em> set to
+<a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>; <a href="#clEnqueueWriteBuffer"><strong>clEnqueueWriteBuffer</strong></a>, <a href="#clEnqueueWriteBufferRect"><strong>clEnqueueWriteBufferRect</strong></a>,
+<a href="#clEnqueueWriteImage"><strong>clEnqueueWriteImage</strong></a> with <em>blocking_write</em> set to <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>;
+<a href="#clEnqueueMapBuffer"><strong>clEnqueueMapBuffer</strong></a>, <a href="#clEnqueueMapImage"><strong>clEnqueueMapImage</strong></a> with <em>blocking_map</em> set to
+<a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>; <a href="#clEnqueueSVMMemcpy"><strong>clEnqueueSVMMemcpy</strong></a> with <em>blocking_copy</em> set to <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>;
+<a href="#clEnqueueSVMMap"><strong>clEnqueueSVMMap</strong></a> with <em>blocking_map</em> set to <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> or <a href="#clWaitForEvents"><strong>clWaitForEvents</strong></a>.</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 <a href="#clFlush"><strong>clFlush</strong></a> 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><a href="#clFlush"><strong>clFlush</strong></a> returns  <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> 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="openblock">
 <div class="content">
-<pre class="CodeRay highlight"><code data-lang="c">cl_int clFinish(cl_command_queue command_queue)</code></pre>
+<div class="paragraph">
+<p>To wait for completion of commands on a device, call the function</p>
 </div>
+<div id="clFinish" class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c++">cl_int clFinish(
+    cl_command_queue command_queue);</code></pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>command_queue</em> is the command queue to wait for.</p>
+</li>
+</ul>
 </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
+<p>All previously queued OpenCL commands in <em>command_queue</em> are issued to the
+associated device, and the function blocks until all previously queued
+commands have completed.
+<a href="#clFinish"><strong>clFinish</strong></a> 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>
+<a href="#clFinish"><strong>clFinish</strong></a> is also a synchronization point.</p>
 </div>
 <div class="paragraph">
-<p><strong>clFinish</strong> returns CL_SUCCESS if the function call was executed
+<p><a href="#clFinish"><strong>clFinish</strong></a> returns <a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a> 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
+<p><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a> 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
+<p><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a> 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
+<p><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a> if there is a failure to allocate resources
 required by the OpenCL implementation on the host.</p>
 </li>
 </ul>
@@ -19242,6 +20016,8 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect1">
 <h2 id="_associated_opencl_specification">6. Associated OpenCL specification</h2>
 <div class="sectionbody">
@@ -19250,7 +20026,7 @@
 <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>
+format that may be consumed by the <a href="#clCreateProgramWithIL"><strong>clCreateProgramWithIL</strong></a> interface.</p>
 </div>
 <div class="paragraph">
 <p>The OpenCL specification includes a specification for the SPIR-V 1.2
@@ -19258,7 +20034,7 @@
 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 <strong>clGetDeviceInfo</strong> query.</p>
+<a href="#CL_DEVICE_IL_VERSION"><code>CL_&#8203;DEVICE_&#8203;IL_&#8203;VERSION</code></a> parameter to the <a href="#clGetDeviceInfo"><strong>clGetDeviceInfo</strong></a> query.</p>
 </div>
 </div>
 <div class="sect2">
@@ -19284,7 +20060,7 @@
 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
+specifications are valid to pass to <a href="#clCreateProgramWithSource"><strong>clCreateProgramWithSource</strong></a> executing
 against an OpenCL 2.2 runtime.</p>
 </div>
 </div>
@@ -19331,18 +20107,18 @@
 <div class="openblock line-through">
 <div class="content">
 <div class="paragraph">
-<p>If <strong>CL_DEVICE_IMAGE3D_MAX_WIDTH</strong>, <strong>CL_DEVICE_IMAGE3D_MAX_HEIGHT</strong> and
-<strong>CL_DEVICE_IMAGE3D_MAX_DEPTH</strong> are zero, the call to <strong>clCreateImage</strong> in the
+<p>If <a href="#CL_DEVICE_IMAGE3D_MAX_WIDTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;WIDTH</code></a>, <a href="#CL_DEVICE_IMAGE3D_MAX_HEIGHT"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;HEIGHT</code></a> and
+<a href="#CL_DEVICE_IMAGE3D_MAX_DEPTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;DEPTH</code></a> are zero, the call to <a href="#clCreateImage"><strong>clCreateImage</strong></a> in the
 embedded profile will fail to create the 3D image.
-The <em>errcode_ret</em> argument in <strong>clCreateImage</strong> returns CL_INVALID_OPERATION.
+The <em>errcode_ret</em> argument in <a href="#clCreateImage"><strong>clCreateImage</strong></a> returns <a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a>.
 Declaring arguments of type <code>image3d_t</code> in a kernel will result in a
 compilation error.</p>
 </div>
 <div class="paragraph">
-<p>If <strong>CL_DEVICE_IMAGE3D_MAX_WIDTH</strong>, <strong>CL_DEVICE_IMAGE3D_MAX_HEIGHT</strong> and
-CL_DEVICE_IMAGE3D_MAX_DEPTH &gt; 0, 3D images are supported by the OpenCL
+<p>If <a href="#CL_DEVICE_IMAGE3D_MAX_WIDTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;WIDTH</code></a>, <a href="#CL_DEVICE_IMAGE3D_MAX_HEIGHT"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;HEIGHT</code></a> and
+<a href="#CL_DEVICE_IMAGE3D_MAX_DEPTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;DEPTH</code></a> &gt; 0, 3D images are supported by the OpenCL
 embedded profile implementation.
-<strong>clCreateImage</strong> will work as defined by the OpenCL specification.
+<a href="#clCreateImage"><strong>clCreateImage</strong></a> will work as defined by the OpenCL specification.
 The <code>image3d_t</code> data type can be used in a kernel(s).</p>
 </div>
 </div>
@@ -19355,11 +20131,11 @@
 </li>
 <li>
 <p><span class="line-through">Image and image arrays created with an
-<code>image_channel_data_type</code> value of CL_FLOAT or CL_HALF_FLOAT can only be
-used with samplers that use a filter mode of CL_FILTER_NEAREST.
+<code>image_channel_data_type</code> value of <a href="#CL_FLOAT"><code>CL_&#8203;FLOAT</code></a> or <a href="#CL_HALF_FLOAT"><code>CL_&#8203;HALF_&#8203;FLOAT</code></a> can only be
+used with samplers that use a filter mode of <a href="#CL_FILTER_NEAREST"><code>CL_&#8203;FILTER_&#8203;NEAREST</code></a>.
 The values returned by <strong>read_imagef</strong> and <strong>read_imageh</strong><sup>2</sup> for 2D and 3D
-images if <code>image_channel_data_type</code> value is CL_FLOAT or CL_HALF_FLOAT
-and sampler with filter_mode = CL_FILTER_LINEAR are undefined.</span></p>
+images if <code>image_channel_data_type</code> value is <a href="#CL_FLOAT"><code>CL_&#8203;FLOAT</code></a> or <a href="#CL_HALF_FLOAT"><code>CL_&#8203;HALF_&#8203;FLOAT</code></a>
+and sampler with filter_mode = <a href="#CL_FILTER_LINEAR"><code>CL_&#8203;FILTER_&#8203;LINEAR</code></a> are undefined.</span></p>
 <div class="openblock">
 <div class="content">
 <div class="dlist">
@@ -19375,9 +20151,9 @@
 </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
+<a href="#CL_DEVICE_SINGLE_FP_CONFIG"><code>CL_&#8203;DEVICE_&#8203;SINGLE_&#8203;FP_&#8203;CONFIG</code></a> is <a href="#CL_FP_ROUND_TO_ZERO"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;ZERO</code></a> or
+<a href="#CL_FP_ROUND_TO_NEAREST"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;NEAREST</code></a>.
+If <a href="#CL_FP_ROUND_TO_NEAREST"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;NEAREST</code></a> is supported, the default rounding mode will
 be round to nearest even; otherwise the default rounding mode will be
 round to zero.</p>
 </li>
@@ -19390,7 +20166,7 @@
 <div class="openblock">
 <div class="content">
 <div class="paragraph">
-<p>If CL_FP_INF_NAN is not set in CL_DEVICE_SINGLE_FP_CONFIG, and one of the
+<p>If <a href="#CL_FP_INF_NAN"><code>CL_&#8203;FP_&#8203;INF_&#8203;NAN</code></a> is not set in <a href="#CL_DEVICE_SINGLE_FP_CONFIG"><code>CL_&#8203;DEVICE_&#8203;SINGLE_&#8203;FP_&#8203;CONFIG</code></a>, 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.
@@ -19441,16 +20217,16 @@
 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 ≤ 2 ulp for the embedded profile
+<p>The precision of conversions from <a href="#CL_UNORM_INT8"><code>CL_&#8203;UNORM_&#8203;INT8</code></a>, <a href="#CL_SNORM_INT8"><code>CL_&#8203;SNORM_&#8203;INT8</code></a>,
+<a href="#CL_UNORM_INT16"><code>CL_&#8203;UNORM_&#8203;INT16</code></a>, <a href="#CL_SNORM_INT16"><code>CL_&#8203;SNORM_&#8203;INT16</code></a>, <a href="#CL_UNORM_INT_101010"><code>CL_&#8203;UNORM_&#8203;INT_&#8203;101010</code></a>, and
+<a href="#CL_UNORM_INT_101010_2"><code>CL_&#8203;UNORM_&#8203;INT_&#8203;101010_&#8203;2</code></a> to float is ≤ 2 ulp for the embedded profile
 instead of ≤ 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>
 <div class="openblock">
 <div class="content">
 <div class="paragraph">
-<p>For CL_UNORM_INT8</p>
+<p>For <a href="#CL_UNORM_INT8"><code>CL_&#8203;UNORM_&#8203;INT8</code></a></p>
 </div>
 <div class="ulist">
 <ul>
@@ -19463,7 +20239,7 @@
 </ul>
 </div>
 <div class="paragraph">
-<p>For CL_UNORM_INT16</p>
+<p>For <a href="#CL_UNORM_INT16"><code>CL_&#8203;UNORM_&#8203;INT16</code></a></p>
 </div>
 <div class="ulist">
 <ul>
@@ -19476,7 +20252,7 @@
 </ul>
 </div>
 <div class="paragraph">
-<p>For CL_SNORM_INT8</p>
+<p>For <a href="#CL_SNORM_INT8"><code>CL_&#8203;SNORM_&#8203;INT8</code></a></p>
 </div>
 <div class="ulist">
 <ul>
@@ -19492,7 +20268,7 @@
 </ul>
 </div>
 <div class="paragraph">
-<p>For CL_SNORM_INT16</p>
+<p>For <a href="#CL_SNORM_INT16"><code>CL_&#8203;SNORM_&#8203;INT16</code></a></p>
 </div>
 <div class="ulist">
 <ul>
@@ -19508,7 +20284,7 @@
 </ul>
 </div>
 <div class="paragraph">
-<p>For CL_UNORM_INT_101010</p>
+<p>For <a href="#CL_UNORM_INT_101010"><code>CL_&#8203;UNORM_&#8203;INT_&#8203;101010</code></a></p>
 </div>
 <div class="ulist">
 <ul>
@@ -19521,7 +20297,7 @@
 </ul>
 </div>
 <div class="paragraph">
-<p>For CL_UNORM_INT_101010_2</p>
+<p>For <a href="#CL_UNORM_INT_101010_2"><code>CL_&#8203;UNORM_&#8203;INT_&#8203;101010_&#8203;2</code></a></p>
 </div>
 <div class="ulist">
 <ul>
@@ -19558,13 +20334,13 @@
 </li>
 <li>
 <p><strong>cles_khr_int64</strong>.
-If double precision is supported i.e. CL_DEVICE_DOUBLE_FP_CONFIG is not
+If double precision is supported i.e. <a href="#CL_DEVICE_DOUBLE_FP_CONFIG"><code>CL_&#8203;DEVICE_&#8203;DOUBLE_&#8203;FP_&#8203;CONFIG</code></a> is not
 zero, then cles_khr_int64 must also be supported.</p>
 </li>
 </ul>
 </div>
 <div class="paragraph">
-<p>CL_PLATFORM_PROFILE defined in the <a href="#platform-queries-table">OpenCL Platform
+<p><a href="#CL_PLATFORM_PROFILE"><code>CL_&#8203;PLATFORM_&#8203;PROFILE</code></a> defined in the <a href="#platform-queries-table">OpenCL Platform
 Queries</a> table will return the string EMBEDDED_PROFILE if the OpenCL
 implementation supports the embedded profile only.</p>
 </div>
@@ -19575,7 +20351,7 @@
 Device Queries</a> table.</p>
 </div>
 <table id="embedded-device-queries-table" class="tableblock frame-all grid-all stretch">
-<caption class="title">Table 35. OpenCL Embedded Device Queries</caption>
+<caption class="title">Table 34. List of supported param_names by <a href="#clGetDeviceInfo">clGetDeviceInfo</a> for embedded profile</caption>
 <colgroup>
 <col style="width: 33.3333%;">
 <col style="width: 33.3333%;">
@@ -19590,149 +20366,150 @@
 </thead>
 <tbody>
 <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"><a href="#CL_DEVICE_MAX_READ_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;READ_&#8203;IMAGE_&#8203;ARGS</code></a></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
         <code>read_only</code> qualifier.
-        The minimum value is 8 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
+        The minimum value is 8 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a href="#CL_DEVICE_MAX_WRITE_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WRITE_&#8203;IMAGE_&#8203;ARGS</code></a></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
         <code>write_only</code> qualifier.
-        The minimum value is 8 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
+        The minimum value is 8 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a href="#CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;READ_&#8203;WRITE_&#8203;IMAGE_&#8203;ARGS</code></a></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
         <code>write_only</code> or <code>read_write</code> qualifier.
-        The minimum value is 8 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></td>
+        The minimum value is 8 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a href="#CL_DEVICE_IMAGE2D_MAX_WIDTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE2D_&#8203;MAX_&#8203;WIDTH</code></a></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>
+        The minimum value is 2048 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a href="#CL_DEVICE_IMAGE2D_MAX_HEIGHT"><code>CL_&#8203;DEVICE_&#8203;IMAGE2D_&#8203;MAX_&#8203;HEIGHT</code></a></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>
+        The minimum value is 2048 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a href="#CL_DEVICE_IMAGE3D_MAX_WIDTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;WIDTH</code></a></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>
+        The minimum value is 2048 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a href="#CL_DEVICE_IMAGE3D_MAX_HEIGHT"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;HEIGHT</code></a></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"><a href="#CL_DEVICE_IMAGE3D_MAX_DEPTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;DEPTH</code></a></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"><a href="#CL_DEVICE_IMAGE_MAX_BUFFER_SIZE"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;MAX_&#8203;BUFFER_&#8203;SIZE</code></a></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>
+<p class="tableblock">        The minimum value is 2048 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a href="#CL_DEVICE_IMAGE_MAX_ARRAY_SIZE"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;MAX_&#8203;ARRAY_&#8203;SIZE</code></a></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>
+<p class="tableblock">        The minimum value is 256 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a href="#CL_DEVICE_MAX_SAMPLERS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;SAMPLERS</code></a></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>
+<p class="tableblock">        The minimum value is 8 if <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a href="#CL_DEVICE_MAX_PARAMETER_SIZE"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;PARAMETER_&#8203;SIZE</code></a></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>
+        <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.</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"><a href="#CL_DEVICE_SINGLE_FP_CONFIG"><code>CL_&#8203;DEVICE_&#8203;SINGLE_&#8203;FP_&#8203;CONFIG</code></a></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:</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
+<p class="tableblock">        <a href="#CL_FP_DENORM"><code>CL_&#8203;FP_&#8203;DENORM</code></a> - denorms are supported</p>
+<p class="tableblock">        <a href="#CL_FP_INF_NAN"><code>CL_&#8203;FP_&#8203;INF_&#8203;NAN</code></a> - INF and quiet NaNs are supported.</p>
+<p class="tableblock">        <a href="#CL_FP_ROUND_TO_NEAREST"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;NEAREST</code></a> - 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
+<p class="tableblock">        <a href="#CL_FP_ROUND_TO_ZERO"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;ZERO</code></a> - round to zero rounding mode supported</p>
+<p class="tableblock">        <a href="#CL_FP_ROUND_TO_INF"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;INF</code></a> - 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
+<p class="tableblock">        <a href="#CL_FP_FMA"><code>CL_&#8203;FP_&#8203;FMA</code></a> - IEEE754-2008 fused multiply-add is supported.</p>
+<p class="tableblock">        <a href="#CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT"><code>CL_&#8203;FP_&#8203;CORRECTLY_&#8203;ROUNDED_&#8203;DIVIDE_&#8203;SQRT</code></a> - 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
+<p class="tableblock">        <a href="#CL_FP_SOFT_FLOAT"><code>CL_&#8203;FP_&#8203;SOFT_&#8203;FLOAT</code></a> - 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>
+<p class="tableblock">        <a id="embedded-profile-single-fp-config-requirements"></a>
+        The mandated minimum floating-point capability is:
+        <a href="#CL_FP_ROUND_TO_ZERO"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;ZERO</code></a> or <a href="#CL_FP_ROUND_TO_NEAREST"><code>CL_&#8203;FP_&#8203;ROUND_&#8203;TO_&#8203;NEAREST</code></a> for devices that are
+        not of type <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.</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"><a href="#CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;CONSTANT_&#8203;BUFFER_&#8203;SIZE</code></a></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>
+        <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.</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"><a href="#CL_DEVICE_MAX_CONSTANT_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;CONSTANT_&#8203;ARGS</code></a></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 <code>__constant</code> qualifier
         in a kernel.
         The minimum value is 4 for devices that are not of type
-        CL_DEVICE_TYPE_CUSTOM.</p></td>
+        <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.</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"><a href="#CL_DEVICE_LOCAL_MEM_SIZE"><code>CL_&#8203;DEVICE_&#8203;LOCAL_&#8203;MEM_&#8203;SIZE</code></a></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>
+        <a href="#CL_DEVICE_TYPE_CUSTOM"><code>CL_&#8203;DEVICE_&#8203;TYPE_&#8203;CUSTOM</code></a>.</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"><a href="#CL_DEVICE_COMPILER_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;COMPILER_&#8203;AVAILABLE</code></a></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
+<td class="tableblock halign-left valign-top"><p class="tableblock">Is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> 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.
-        This can be CL_FALSE for the embedded platform profile only.</p></td>
+<p class="tableblock">        Is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> if the compiler is available.
+        This can be <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> 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"><a href="#CL_DEVICE_LINKER_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;LINKER_&#8203;AVAILABLE</code></a></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>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> if the implementation does not have a linker available.
+        Is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> if the linker is available.</p>
+<p class="tableblock">        This can be <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a> for the embedded platform profile only.</p>
+<p class="tableblock">        This must be <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a> if <a href="#CL_DEVICE_COMPILER_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;COMPILER_&#8203;AVAILABLE</code></a> is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>.</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"><a href="#CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE"><code>CL_&#8203;DEVICE_&#8203;QUEUE_&#8203;ON_&#8203;DEVICE_&#8203;MAX_&#8203;SIZE</code></a></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"><a href="#CL_DEVICE_PRINTF_BUFFER_SIZE"><code>CL_&#8203;DEVICE_&#8203;PRINTF_&#8203;BUFFER_&#8203;SIZE</code></a></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.
@@ -19741,12 +20518,12 @@
 </tbody>
 </table>
 <div class="paragraph">
-<p>If CL_DEVICE_IMAGE_SUPPORT specified in the <a href="#device-queries-table">OpenCL
-Device Queries</a> table 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
+<p>If <a href="#CL_DEVICE_IMAGE_SUPPORT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;SUPPORT</code></a> specified in the <a href="#device-queries-table">OpenCL
+Device Queries</a> table is <a href="#CL_TRUE"><code>CL_&#8203;TRUE</code></a>, the values assigned to
+<a href="#CL_DEVICE_MAX_READ_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;READ_&#8203;IMAGE_&#8203;ARGS</code></a>, <a href="#CL_DEVICE_MAX_WRITE_IMAGE_ARGS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;WRITE_&#8203;IMAGE_&#8203;ARGS</code></a>,
+<a href="#CL_DEVICE_IMAGE2D_MAX_WIDTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE2D_&#8203;MAX_&#8203;WIDTH</code></a>, <a href="#CL_DEVICE_IMAGE2D_MAX_HEIGHT"><code>CL_&#8203;DEVICE_&#8203;IMAGE2D_&#8203;MAX_&#8203;HEIGHT</code></a>,
+<a href="#CL_DEVICE_IMAGE3D_MAX_WIDTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;WIDTH</code></a>, <a href="#CL_DEVICE_IMAGE3D_MAX_HEIGHT"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;HEIGHT</code></a>,
+<a href="#CL_DEVICE_IMAGE3D_MAX_DEPTH"><code>CL_&#8203;DEVICE_&#8203;IMAGE3D_&#8203;MAX_&#8203;DEPTH</code></a>, and <a href="#CL_DEVICE_MAX_SAMPLERS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;SAMPLERS</code></a> by the implementation
 must be greater than or equal to the minimum values specified in the
 <a href="#embedded-device-queries-table">OpenCL Embedded Device Queries</a> table.</p>
 </div>
@@ -19794,7 +20571,7 @@
 shared memory object.</p>
 </li>
 <li>
-<p>Call the <strong>clFlush</strong> (or <strong>clFinish</strong>) API to issue any outstanding commands
+<p>Call the <a href="#clFlush"><strong>clFlush</strong></a> (or <a href="#clFinish"><strong>clFinish</strong></a>) API to issue any outstanding commands
 from this command-queue.</p>
 </li>
 </ul>
@@ -19817,14 +20594,14 @@
 <h3 id="_multiple_host_threads">Multiple Host Threads</h3>
 <div class="paragraph">
 <p>All OpenCL API calls are thread-safe<sup>1</sup> except those that modify the state
-of cl_kernel objects: <strong>clSetKernelArg</strong>, <strong>clSetKernelArgSVMPointer</strong>,
-<strong>clSetKernelExecInfo</strong> and <strong>clCloneKernel</strong>.
-<strong>clSetKernelArg</strong> , <strong>clSetKernelArgSVMPointer</strong>, <strong>clSetKernelExecInfo</strong> and
-<strong>clCloneKernel</strong> are safe to call from any host thread, and safe to call
+of cl_kernel objects: <a href="#clSetKernelArg"><strong>clSetKernelArg</strong></a>, <a href="#clSetKernelArgSVMPointer"><strong>clSetKernelArgSVMPointer</strong></a>,
+<a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a> and <a href="#clCloneKernel"><strong>clCloneKernel</strong></a>.
+<a href="#clSetKernelArg"><strong>clSetKernelArg</strong></a> , <a href="#clSetKernelArgSVMPointer"><strong>clSetKernelArgSVMPointer</strong></a>, <a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a> and
+<a href="#clCloneKernel"><strong>clCloneKernel</strong></a> 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 <strong>clSetKernelArg</strong>,
-<strong>clSetKernelArgSVMPointer</strong>, <strong>clSetKernelExecInfo</strong> or <strong>clCloneKernel</strong> are
+The state of the cl_kernel object is undefined if <a href="#clSetKernelArg"><strong>clSetKernelArg</strong></a>,
+<a href="#clSetKernelArgSVMPointer"><strong>clSetKernelArgSVMPointer</strong></a>, <a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a> or <a href="#clCloneKernel"><strong>clCloneKernel</strong></a> are
 called from multiple host threads on the same cl_kernel object at the same
 time<sup>2</sup>.
 Please note that there are additional limitations as to which OpenCL APIs
@@ -19843,7 +20620,7 @@
 <dd>
 <p>There is an inherent race condition in the design of OpenCL that occurs
 between setting a kernel argument and using the kernel with
-<strong>clEnqueueNDRangeKernel</strong>.
+<a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a>.
 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.
@@ -20347,7 +21124,9 @@
 supplied headers.</p>
 </div>
 <div class="sect2">
-<h3 id="scalar-data-types">Shared Application Scalar Data Types</h3>
+<h3 id="scalar-data-types">Supported Application Scalar Data Types</h3>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following application scalar types are provided for application
 convenience.</p>
@@ -20368,8 +21147,12 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect2">
 <h3 id="vector-data-types">Supported Application Vector Data Types</h3>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>Application vector types are unions used to create vectors of the above
 application scalar types.
@@ -20399,29 +21182,31 @@
 <strong>cl_platform.h</strong> header file.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect2">
 <h3 id="alignment-app-data-types">Alignment of Application Data Types</h3>
 <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
+This implies that OpenCL buffers created with <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> 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.
-<code>image_num_channels * sizeof(image_channel_data_type)</code>) except for CL_RGB
-and CL_RGBx images where the data must be aligned to the granularity of a
+<code>image_num_channels * sizeof(image_channel_data_type)</code>) except for <a href="#CL_RGB"><code>CL_&#8203;RGB</code></a>
+and <a href="#CL_RGBx"><code>CL_&#8203;RGBx</code></a> images where the data must be aligned to the granularity of a
 single channel in a pixel (i.e. <code>sizeof(image_channel_data_type)</code>).
-This implies that OpenCL images created with CL_MEM_USE_HOST_PTR must align
+This implies that OpenCL images created with <a href="#CL_MEM_USE_HOST_PTR"><code>CL_&#8203;MEM_&#8203;USE_&#8203;HOST_&#8203;PTR</code></a> must align
 correctly.
 The image alignment value can be queried using the
-CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT query.
-In addition, source pointers for <strong>clEnqueueWriteImage</strong> and other operations
+<a href="#CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT"><code>CL_&#8203;DEVICE_&#8203;IMAGE_&#8203;BASE_&#8203;ADDRESS_&#8203;ALIGNMENT</code></a> query.
+In addition, source pointers for <a href="#clEnqueueWriteImage"><strong>clEnqueueWriteImage</strong></a> and other operations
 that copy to the OpenCL runtime, as well as destination pointers for
-<strong>clEnqueueReadImage</strong> and other operations that copy from the OpenCL runtime
+<a href="#clEnqueueReadImage"><strong>clEnqueueReadImage</strong></a> and other operations that copy from the OpenCL runtime
 must follow the same alignment rules.</p>
 </div>
 <div class="paragraph">
@@ -20479,7 +21264,7 @@
 OpenCL language.
 Use of the <code>.xyzw</code> 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
+Support of these notations is identified by the <code>CL_HAS_NAMED_VECTOR_FIELDS</code>
 preprocessor symbol.
 For example:</p>
 </div>
@@ -20517,7 +21302,7 @@
 <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.
-Support of this notation is identified by the CL_HAS_HI_LO_VECTOR_FIELDS
+Support of this notation is identified by the <code>CL_HAS_HI_LO_VECTOR_FIELDS</code>
 preprocessor symbol.
 For example:</p>
 </div>
@@ -20614,169 +21399,169 @@
 </colgroup>
 <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"><a id="CL_CHAR_BIT"></a><a href="#CL_CHAR_BIT"><code>CL_&#8203;CHAR_&#8203;BIT</code></a></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"><a id="CL_SCHAR_MAX"></a><a href="#CL_SCHAR_MAX"><code>CL_&#8203;SCHAR_&#8203;MAX</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum value of a type <code>cl_char</code></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"><a id="CL_SCHAR_MIN"></a><a href="#CL_SCHAR_MIN"><code>CL_&#8203;SCHAR_&#8203;MIN</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Minimum value of a type <code>cl_char</code></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"><a id="CL_CHAR_MAX"></a><a href="#CL_CHAR_MAX"><code>CL_&#8203;CHAR_&#8203;MAX</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum value of a type <code>cl_char</code></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"><a id="CL_CHAR_MIN"></a><a href="#CL_CHAR_MIN"><code>CL_&#8203;CHAR_&#8203;MIN</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Minimum value of a type <code>cl_char</code></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"><a id="CL_UCHAR_MAX"></a><a href="#CL_UCHAR_MAX"><code>CL_&#8203;UCHAR_&#8203;MAX</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum value of a type <code>cl_uchar</code></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"><a id="CL_SHRT_MAX"></a><a href="#CL_SHRT_MAX"><code>CL_&#8203;SHRT_&#8203;MAX</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum value of a type <code>cl_short</code></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"><a id="CL_SHRT_MIN"></a><a href="#CL_SHRT_MIN"><code>CL_&#8203;SHRT_&#8203;MIN</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Minimum value of a type <code>cl_short</code></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"><a id="CL_USHRT_MAX"></a><a href="#CL_USHRT_MAX"><code>CL_&#8203;USHRT_&#8203;MAX</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum value of a type <code>cl_ushort</code></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"><a id="CL_INT_MAX"></a><a href="#CL_INT_MAX"><code>CL_&#8203;INT_&#8203;MAX</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum value of a type <code>cl_int</code></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"><a id="CL_INT_MIN"></a><a href="#CL_INT_MIN"><code>CL_&#8203;INT_&#8203;MIN</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Minimum value of a type <code>cl_int</code></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"><a id="CL_UINT_MAX"></a><a href="#CL_UINT_MAX"><code>CL_&#8203;UINT_&#8203;MAX</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum value of a type <code>cl_uint</code></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"><a id="CL_LONG_MAX"></a><a href="#CL_LONG_MAX"><code>CL_&#8203;LONG_&#8203;MAX</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum value of a type <code>cl_long</code></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"><a id="CL_LONG_MIN"></a><a href="#CL_LONG_MIN"><code>CL_&#8203;LONG_&#8203;MIN</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Minimum value of a type <code>cl_long</code></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"><a id="CL_ULONG_MAX"></a><a href="#CL_ULONG_MAX"><code>CL_&#8203;ULONG_&#8203;MAX</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum value of a type <code>cl_ulong</code></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"><a id="CL_FLT_DIG"></a><a href="#CL_FLT_DIG"><code>CL_&#8203;FLT_&#8203;DIG</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Number of decimal digits of precision for the type <code>cl_float</code></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"><a id="CL_FLT_MANT_DIG"></a><a href="#CL_FLT_MANT_DIG"><code>CL_&#8203;FLT_&#8203;MANT_&#8203;DIG</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Number of digits in the mantissa of type <code>cl_float</code></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"><a id="CL_FLT_MAX_10_EXP"></a><a href="#CL_FLT_MAX_10_EXP"><code>CL_&#8203;FLT_&#8203;MAX_&#8203;10_&#8203;EXP</code></a></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 <code>cl_float</code></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"><a id="CL_FLT_MAX_EXP"></a><a href="#CL_FLT_MAX_EXP"><code>CL_&#8203;FLT_&#8203;MAX_&#8203;EXP</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum exponent value of type <code>cl_float</code></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"><a id="CL_FLT_MIN_10_EXP"></a><a href="#CL_FLT_MIN_10_EXP"><code>CL_&#8203;FLT_&#8203;MIN_&#8203;10_&#8203;EXP</code></a></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 <code>cl_float</code></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"><a id="CL_FLT_MIN_EXP"></a><a href="#CL_FLT_MIN_EXP"><code>CL_&#8203;FLT_&#8203;MIN_&#8203;EXP</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Minimum exponent value of type <code>cl_float</code></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"><a id="CL_FLT_RADIX"></a><a href="#CL_FLT_RADIX"><code>CL_&#8203;FLT_&#8203;RADIX</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Base value of type <code>cl_float</code></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"><a id="CL_FLT_MAX"></a><a href="#CL_FLT_MAX"><code>CL_&#8203;FLT_&#8203;MAX</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum value of type <code>cl_float</code></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"><a id="CL_FLT_MIN"></a><a href="#CL_FLT_MIN"><code>CL_&#8203;FLT_&#8203;MIN</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Minimum value of type <code>cl_float</code></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"><a id="CL_FLT_EPSILON"></a><a href="#CL_FLT_EPSILON"><code>CL_&#8203;FLT_&#8203;EPSILON</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Minimum positive floating-point number of type <code>cl_float</code> such that <code>1.0
-    +  CL_FLT_EPSILON != 1</code> is true.</p></td>
+    +  <a href="#CL_FLT_EPSILON"><code>CL_&#8203;FLT_&#8203;EPSILON</code></a> != 1</code> 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"><a id="CL_DBL_DIG"></a><a href="#CL_DBL_DIG"><code>CL_&#8203;DBL_&#8203;DIG</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Number of decimal digits of precision for the type <code>cl_double</code></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"><a id="CL_DBL_MANT_DIG"></a><a href="#CL_DBL_MANT_DIG"><code>CL_&#8203;DBL_&#8203;MANT_&#8203;DIG</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Number of digits in the mantissa of type <code>cl_double</code></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"><a id="CL_DBL_MAX_10_EXP"></a><a href="#CL_DBL_MAX_10_EXP"><code>CL_&#8203;DBL_&#8203;MAX_&#8203;10_&#8203;EXP</code></a></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 <code>cl_double</code></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"><a id="CL_DBL_MAX_EXP"></a><a href="#CL_DBL_MAX_EXP"><code>CL_&#8203;DBL_&#8203;MAX_&#8203;EXP</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum exponent value of type <code>cl_double</code></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"><a id="CL_DBL_MIN_10_EXP"></a><a href="#CL_DBL_MIN_10_EXP"><code>CL_&#8203;DBL_&#8203;MIN_&#8203;10_&#8203;EXP</code></a></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 <code>cl_double</code></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"><a id="CL_DBL_MIN_EXP"></a><a href="#CL_DBL_MIN_EXP"><code>CL_&#8203;DBL_&#8203;MIN_&#8203;EXP</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Minimum exponent value of type <code>cl_double</code></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"><a id="CL_DBL_RADIX"></a><a href="#CL_DBL_RADIX"><code>CL_&#8203;DBL_&#8203;RADIX</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Base value of type <code>cl_double</code></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"><a id="CL_DBL_MAX"></a><a href="#CL_DBL_MAX"><code>CL_&#8203;DBL_&#8203;MAX</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum value of type <code>cl_double</code></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"><a id="CL_DBL_MIN"></a><a href="#CL_DBL_MIN"><code>CL_&#8203;DBL_&#8203;MIN</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Minimum value of type <code>cl_double</code></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"><a id="CL_DBL_EPSILON"></a><a href="#CL_DBL_EPSILON"><code>CL_&#8203;DBL_&#8203;EPSILON</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Minimum positive floating-point number of type <code>cl_double</code> such that
-    <code>1.0 +  CL_DBL_EPSILON != 1</code> is true.</p></td>
+    <code>1.0 +  <a href="#CL_DBL_EPSILON"><code>CL_&#8203;DBL_&#8203;EPSILON</code></a> != 1</code> 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"><a id="CL_NAN"></a><a href="#CL_NAN"><code>CL_&#8203;NAN</code></a></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"><a id="CL_HUGE_VALF"></a><a href="#CL_HUGE_VALF"><code>CL_&#8203;HUGE_&#8203;VALF</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Largest representative value of type <code>cl_float</code></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"><a id="CL_HUGE_VAL"></a><a href="#CL_HUGE_VAL"><code>CL_&#8203;HUGE_&#8203;VAL</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Largest representative value of type <code>cl_double</code></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"><a id="CL_MAXFLOAT"></a><a href="#CL_MAXFLOAT"><code>CL_&#8203;MAXFLOAT</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Maximum value of type <code>cl_float</code></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"><a id="CL_INFINITY"></a><a href="#CL_INFINITY"><code>CL_&#8203;INFINITY</code></a></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Macro expanding to a value representing infinity</p></td>
 </tr>
 </tbody>
@@ -20788,11 +21573,11 @@
 </div>
 </div>
 <div class="sect1">
-<h2 id="check-copy-overlap">Appendix D: CL_MEM_COPY_OVERLAP</h2>
+<h2 id="check-copy-overlap">Appendix D: Checking for Memory 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>
+the source and destination rectangles specified to <a href="#clEnqueueCopyBufferRect"><strong>clEnqueueCopyBufferRect</strong></a>
 provided the source and destination buffers refer to the same buffer object.</p>
 </div>
 <div class="listingblock">
@@ -20863,10 +21648,14 @@
 </div>
 </div>
 <div class="sect1">
-<h2 id="_changes">Appendix E: Changes</h2>
+<h2 id="changes_to_opencl">Appendix E: Changes to OpenCL</h2>
 <div class="sectionbody">
+<div class="paragraph">
+<p>Changes to the OpenCL API and OpenCL C between successive versions are
+summarized below.</p>
+</div>
 <div class="sect2">
-<h3 id="_summary_of_changes_from_opencl_1_0">Summary of changes from OpenCL 1.0</h3>
+<h3 id="_summary_of_changes_from_opencl_1_0_to_opencl_1_1">Summary of changes from OpenCL 1.0 to OpenCL 1.1</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>
@@ -20878,37 +21667,42 @@
 <div class="ulist">
 <ul>
 <li>
-<p>CL_DEVICE_NATIVE_VECTOR_WIDTH_{CHAR | SHORT | INT | LONG | FLOAT |
-DOUBLE | HALF}</p>
+<p><a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;CHAR</code></a>,
+<a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;SHORT</code></a>,
+<a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_INT"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;INT</code></a>,
+<a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;LONG</code></a>,
+<a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;FLOAT</code></a>,
+<a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;DOUBLE</code></a>,
+<a href="#CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF"><code>CL_&#8203;DEVICE_&#8203;NATIVE_&#8203;VECTOR_&#8203;WIDTH_&#8203;HALF</code></a></p>
 </li>
 <li>
-<p>CL_DEVICE_HOST_UNIFIED_MEMORY</p>
+<p><a href="#CL_DEVICE_HOST_UNIFIED_MEMORY"><code>CL_&#8203;DEVICE_&#8203;HOST_&#8203;UNIFIED_&#8203;MEMORY</code></a></p>
 </li>
 <li>
-<p>CL_DEVICE_OPENCL_C_VERSION</p>
+<p><a href="#CL_DEVICE_OPENCL_C_VERSION"><code>CL_&#8203;DEVICE_&#8203;OPENCL_&#8203;C_&#8203;VERSION</code></a></p>
 </li>
 </ul>
 </div>
 </li>
 <li>
-<p>CL_CONTEXT_NUM_DEVICES to the list of queries specified to
-<strong>clGetContextInfo</strong>.</p>
+<p><a href="#CL_CONTEXT_NUM_DEVICES"><code>CL_&#8203;CONTEXT_&#8203;NUM_&#8203;DEVICES</code></a> to the list of queries specified to
+<a href="#clGetContextInfo"><strong>clGetContextInfo</strong></a>.</p>
 </li>
 <li>
-<p>Optional image formats: CL_Rx, CL_RGx and CL_RGBx.</p>
+<p>Optional image formats: <a href="#CL_Rx"><code>CL_&#8203;Rx</code></a>, <a href="#CL_RGx"><code>CL_&#8203;RGx</code></a>, and <a href="#CL_RGBx"><code>CL_&#8203;RGBx</code></a>.</p>
 </li>
 <li>
 <p>Support for sub-buffer objects ability to create a buffer object that
 refers to a specific region in another buffer object using
-<strong>clCreateSubBuffer</strong>.</p>
+<a href="#clCreateSubBuffer"><strong>clCreateSubBuffer</strong></a>.</p>
 </li>
 <li>
-<p><strong>clEnqueueReadBufferRect</strong>, <strong>clEnqueueWriteBufferRect</strong> and
-<strong>clEnqueueCopyBufferRect</strong> APIs to read from, write to and copy a
+<p><a href="#clEnqueueReadBufferRect"><strong>clEnqueueReadBufferRect</strong></a>, <a href="#clEnqueueWriteBufferRect"><strong>clEnqueueWriteBufferRect</strong></a> and
+<a href="#clEnqueueCopyBufferRect"><strong>clEnqueueCopyBufferRect</strong></a> 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
+<p><a href="#clSetMemObjectDestructorCallback"><strong>clSetMemObjectDestructorCallback</strong></a> 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>
@@ -20917,18 +21711,18 @@
 when building a program executable.</p>
 </li>
 <li>
-<p>CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE to the list of queries
-specified to <strong>clGetKernelWorkGroupInfo</strong>.</p>
+<p><a href="#CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE"><code>CL_&#8203;KERNEL_&#8203;PREFERRED_&#8203;WORK_&#8203;GROUP_&#8203;SIZE_&#8203;MULTIPLE</code></a> to the list of queries
+specified to <a href="#clGetKernelWorkGroupInfo"><strong>clGetKernelWorkGroupInfo</strong></a>.</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 - <strong>clCreateUserEvent</strong> and
-<strong>clSetUserEventStatus</strong>.</p>
+Following new APIs are added - <a href="#clCreateUserEvent"><strong>clCreateUserEvent</strong></a> and
+<a href="#clSetUserEventStatus"><strong>clSetUserEventStatus</strong></a>.</p>
 </li>
 <li>
-<p><strong>clSetEventCallback</strong> API to register a callback function for a specific
+<p><a href="#clSetEventCallback"><strong>clSetEventCallback</strong></a> API to register a callback function for a specific
 command execution status.</p>
 </li>
 </ul>
@@ -20944,20 +21738,20 @@
 <div class="ulist">
 <ul>
 <li>
-<p>CL_DEVICE_MAX_PARAMETER_SIZE from 256 to 1024 bytes</p>
+<p><a href="#CL_DEVICE_MAX_PARAMETER_SIZE"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;PARAMETER_&#8203;SIZE</code></a> from 256 to 1024 bytes</p>
 </li>
 <li>
-<p>CL_DEVICE_LOCAL_MEM_SIZE from 16 KB to 32 KB.</p>
+<p><a href="#CL_DEVICE_LOCAL_MEM_SIZE"><code>CL_&#8203;DEVICE_&#8203;LOCAL_&#8203;MEM_&#8203;SIZE</code></a> from 16 KB to 32 KB.</p>
 </li>
 </ul>
 </div>
 </li>
 <li>
-<p>The <em>global_work_offset</em> argument in <strong>clEnqueueNDRangeKernel</strong> can be a
+<p>The <em>global_work_offset</em> argument in <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> can be a
 non-<code>NULL</code> value.</p>
 </li>
 <li>
-<p>All API calls except <strong>clSetKernelArg</strong> are thread-safe.</p>
+<p>All API calls except <a href="#clSetKernelArg"><strong>clSetKernelArg</strong></a> are thread-safe.</p>
 </li>
 </ul>
 </div>
@@ -21008,7 +21802,7 @@
 prefix instead of <strong>atom_</strong>.</p>
 </li>
 <li>
-<p>Macros CL_VERSION_1_0 and CL_VERSION_1_1.</p>
+<p>Macros <code>CL_VERSION_1_0</code> and <code>CL_VERSION_1_1</code>.</p>
 </li>
 </ul>
 </div>
@@ -21019,15 +21813,15 @@
 <div class="ulist">
 <ul>
 <li>
-<p>The <strong>clSetCommandQueueProperty</strong> API is no longer supported in OpenCL
+<p>The <a href="#clSetCommandQueueProperty"><strong>clSetCommandQueueProperty</strong></a> API is no longer supported in OpenCL
 1.1.</p>
 </li>
 <li>
-<p>The <code>__ROUNDING_MODE__</code> macro is no longer supported in OpenCL C 1.1.</p>
+<p>The <code><em>ROUNDING_MODE</em></code> macro is no longer supported in OpenCL C 1.1.</p>
 </li>
 <li>
 <p>The cl-strict-aliasing option that can be specified in <em>options</em>
-argument to <strong>clBuildProgram</strong> is no longer supported in OpenCL 1.1.</p>
+argument to <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> is no longer supported in OpenCL 1.1.</p>
 </li>
 </ul>
 </div>
@@ -21057,7 +21851,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_summary_of_changes_from_opencl_1_1">Summary of changes from OpenCL 1.1</h3>
+<h3 id="_summary_of_changes_from_opencl_1_1_to_opencl_1_2">Summary of changes from OpenCL 1.1 to OpenCL 1.2</h3>
 <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>
@@ -21076,12 +21870,12 @@
 cl_mem object.</p>
 </li>
 <li>
-<p><strong>clEnqueueFillBuffer</strong> and <strong>clEnqueueFillImage</strong> to support filling a
+<p><a href="#clEnqueueFillBuffer"><strong>clEnqueueFillBuffer</strong></a> and <a href="#clEnqueueFillImage"><strong>clEnqueueFillImage</strong></a> to support filling a
 buffer with a pattern or an image with a color.</p>
 </li>
 <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
+<p>Add <a href="#CL_MAP_WRITE_INVALIDATE_REGION"><code>CL_&#8203;MAP_&#8203;WRITE_&#8203;INVALIDATE_&#8203;REGION</code></a> to <em>cl_map_flags</em>.
+Appropriate clarification to the behavior of <a href="#CL_MAP_WRITE"><code>CL_&#8203;MAP_&#8203;WRITE</code></a> has been added
 to the spec.</p>
 </li>
 <li>
@@ -21089,10 +21883,10 @@
 and 2D image arrays.</p>
 </li>
 <li>
-<p><strong>clCreateImage</strong> to create an image object.</p>
+<p><a href="#clCreateImage"><strong>clCreateImage</strong></a> to create an image object.</p>
 </li>
 <li>
-<p><strong>clEnqueueMigrateMemObjects</strong> API that allows a developer to have
+<p><a href="#clEnqueueMigrateMemObjects"><strong>clEnqueueMigrateMemObjects</strong></a> 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>
 </li>
@@ -21101,18 +21895,18 @@
 </li>
 <li>
 <p>Additional queries to get the number of kernels and kernel names in a
-program have been added to <strong>clGetProgramInfo</strong>.</p>
+program have been added to <a href="#clGetProgramInfo"><strong>clGetProgramInfo</strong></a>.</p>
 </li>
 <li>
 <p>Additional queries to get the compile and link status and options have
-been added to <strong>clGetProgramBuildInfo</strong>.</p>
+been added to <a href="#clGetProgramBuildInfo"><strong>clGetProgramBuildInfo</strong></a>.</p>
 </li>
 <li>
-<p><strong>clGetKernelArgInfo</strong> API that returns information about the arguments of
+<p><a href="#clGetKernelArgInfo"><strong>clGetKernelArgInfo</strong></a> API that returns information about the arguments of
 a kernel.</p>
 </li>
 <li>
-<p><strong>clEnqueueMarkerWithWaitList</strong> and <strong>clEnqueueBarrierWithWaitList</strong> APIs.</p>
+<p><a href="#clEnqueueMarkerWithWaitList"><strong>clEnqueueMarkerWithWaitList</strong></a> and <a href="#clEnqueueBarrierWithWaitList"><strong>clEnqueueBarrierWithWaitList</strong></a> APIs.</p>
 </li>
 </ul>
 </div>
@@ -21155,7 +21949,7 @@
 6.8</em>.</p>
 </li>
 <li>
-<p>Macros <code>CL_VERSION_1_2</code> and <code>__OPENCL_C_VERSION__</code>.</p>
+<p>Macros <code>CL_VERSION_1_2</code> and <code><em>OPENCL_C_VERSION</em></code>.</p>
 </li>
 </ul>
 </div>
@@ -21166,13 +21960,13 @@
 <div class="ulist">
 <ul>
 <li>
-<p><strong>clEnqueueMarker</strong>, <strong>clEnqueueBarrier</strong> and <strong>clEnqueueWaitForEvents</strong></p>
+<p><a href="#clEnqueueMarker"><strong>clEnqueueMarker</strong></a>, <a href="#clEnqueueBarrier"><strong>clEnqueueBarrier</strong></a> and <a href="#clEnqueueWaitForEvents"><strong>clEnqueueWaitForEvents</strong></a></p>
 </li>
 <li>
-<p><strong>clCreateImage2D</strong> and <strong>clCreateImage3D</strong></p>
+<p><a href="#clCreateImage2D"><strong>clCreateImage2D</strong></a> and <a href="#clCreateImage3D"><strong>clCreateImage3D</strong></a></p>
 </li>
 <li>
-<p><strong>clUnloadCompiler</strong> and <strong>clGetExtensionFunctionAddress</strong></p>
+<p><a href="#clUnloadCompiler"><strong>clUnloadCompiler</strong></a> and <a href="#clGetExtensionFunctionAddress"><strong>clGetExtensionFunctionAddress</strong></a></p>
 </li>
 <li>
 <p><strong>clCreateFromGLTexture2D</strong> and <strong>clCreateFromGLTexture3D</strong></p>
@@ -21185,14 +21979,14 @@
 <div class="ulist">
 <ul>
 <li>
-<p><strong>CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE</strong> in <em>table 4.3</em> queried using
-<strong>clGetDeviceInfo</strong>.</p>
+<p><a id="CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE"></a><a href="#CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE"><code>CL_&#8203;DEVICE_&#8203;MIN_&#8203;DATA_&#8203;TYPE_&#8203;ALIGN_&#8203;SIZE</code></a> in <em>table 4.3</em> queried using
+<a href="#clGetDeviceInfo"><strong>clGetDeviceInfo</strong></a>.</p>
 </li>
 </ul>
 </div>
 </div>
 <div class="sect2">
-<h3 id="_summary_of_changes_from_opencl_1_2">Summary of changes from OpenCL 1.2</h3>
+<h3 id="_summary_of_changes_from_opencl_1_2_to_opencl_2_0">Summary of changes from OpenCL 1.2 to OpenCL 2.0</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>
@@ -21220,8 +22014,8 @@
 <div class="ulist">
 <ul>
 <li>
-<p>All API calls except <strong>clSetKernelArg</strong>, <strong>clSetKernelArgSVMPointer</strong> and
-<strong>clSetKernelExecInfo</strong> are thread-safe.</p>
+<p>All API calls except <a href="#clSetKernelArg"><strong>clSetKernelArg</strong></a>, <a href="#clSetKernelArgSVMPointer"><strong>clSetKernelArgSVMPointer</strong></a> and
+<a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a> are thread-safe.</p>
 </li>
 </ul>
 </div>
@@ -21256,7 +22050,7 @@
 <p>3D image writes are a core feature.</p>
 </li>
 <li>
-<p>The CL_VERSION_2_0 macro.</p>
+<p>The <code>CL_VERSION_2_0</code> macro.</p>
 </li>
 </ul>
 </div>
@@ -21266,7 +22060,7 @@
 <div class="ulist">
 <ul>
 <li>
-<p><strong>clCreateCommandQueue</strong>, <strong>clCreateSampler</strong> and <strong>clEnqueueTask</strong></p>
+<p><a href="#clCreateCommandQueue"><strong>clCreateCommandQueue</strong></a>, <a href="#clCreateSampler"><strong>clCreateSampler</strong></a> and <a href="#clEnqueueTask"><strong>clEnqueueTask</strong></a></p>
 </li>
 </ul>
 </div>
@@ -21276,15 +22070,15 @@
 <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>
+<p><a id="CL_DEVICE_HOST_UNIFIED_MEMORY"></a><a href="#CL_DEVICE_HOST_UNIFIED_MEMORY"><code>CL_&#8203;DEVICE_&#8203;HOST_&#8203;UNIFIED_&#8203;MEMORY</code></a> in <em>table 4.3</em> queried using
+<a href="#clGetDeviceInfo"><strong>clGetDeviceInfo</strong></a>.</p>
 </li>
 <li>
-<p><strong>CL_IMAGE_BUFFER</strong> in <em>table 5.10</em> is deprecated.</p>
+<p><a id="CL_IMAGE_BUFFER"></a><a href="#CL_IMAGE_BUFFER"><code>CL_&#8203;IMAGE_&#8203;BUFFER</code></a> in <em>table 5.10</em> is deprecated.</p>
 </li>
 <li>
-<p><strong>CL_DEVICE_QUEUE_PROPERTIES</strong> is replaced by
-<strong>CL_DEVICE_QUEUE_ON_HOST_PROPERTIES</strong>.</p>
+<p><a id="CL_DEVICE_QUEUE_PROPERTIES"></a><a href="#CL_DEVICE_QUEUE_PROPERTIES"><code>CL_&#8203;DEVICE_&#8203;QUEUE_&#8203;PROPERTIES</code></a> is replaced by
+<a href="#CL_DEVICE_QUEUE_ON_HOST_PROPERTIES"><code>CL_&#8203;DEVICE_&#8203;QUEUE_&#8203;ON_&#8203;HOST_&#8203;PROPERTIES</code></a>.</p>
 </li>
 <li>
 <p>The explicit memory fence functions defined in section 6.12.9 of the
@@ -21299,7 +22093,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_summary_of_changes_from_opencl_2_0">Summary of changes from OpenCL 2.0</h3>
+<h3 id="_summary_of_changes_from_opencl_2_0_to_opencl_2_1">Summary of changes from OpenCL 2.0 to OpenCL 2.1</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>
@@ -21307,47 +22101,47 @@
 <div class="ulist">
 <ul>
 <li>
-<p><strong>clGetKernelSubGroupInfo</strong> API call.</p>
+<p><a href="#clGetKernelSubGroupInfo"><strong>clGetKernelSubGroupInfo</strong></a> API call.</p>
 </li>
 <li>
-<p><strong>CL_KERNEL_MAX_NUM_SUB_GROUPS</strong>, <strong>CL_KERNEL_COMPILE_NUM_SUB_GROUPS</strong>
+<p><a href="#CL_KERNEL_MAX_NUM_SUB_GROUPS"><code>CL_&#8203;KERNEL_&#8203;MAX_&#8203;NUM_&#8203;SUB_&#8203;GROUPS</code></a>, <a href="#CL_KERNEL_COMPILE_NUM_SUB_GROUPS"><code>CL_&#8203;KERNEL_&#8203;COMPILE_&#8203;NUM_&#8203;SUB_&#8203;GROUPS</code></a>
 additions to table 5.21 of the API specification.</p>
 </li>
 <li>
-<p><strong>clCreateProgramWithIL</strong> API call.</p>
+<p><a href="#clCreateProgramWithIL"><strong>clCreateProgramWithIL</strong></a> API call.</p>
 </li>
 <li>
-<p><strong>clGetHostTimer</strong> and <strong>clGetDeviceAndHostTimer</strong> API calls.</p>
+<p><a href="#clGetHostTimer"><strong>clGetHostTimer</strong></a> and <a href="#clGetDeviceAndHostTimer"><strong>clGetDeviceAndHostTimer</strong></a> API calls.</p>
 </li>
 <li>
-<p><strong>clEnqueueSVMMigrateMem</strong> API call.</p>
+<p><a href="#clEnqueueSVMMigrateMem"><strong>clEnqueueSVMMigrateMem</strong></a> API call.</p>
 </li>
 <li>
-<p><strong>clCloneKernel</strong> API call.</p>
+<p><a href="#clCloneKernel"><strong>clCloneKernel</strong></a> API call.</p>
 </li>
 <li>
-<p><strong>clSetDefaultDeviceCommandQueue</strong> API call.</p>
+<p><a href="#clSetDefaultDeviceCommandQueue"><strong>clSetDefaultDeviceCommandQueue</strong></a> API call.</p>
 </li>
 <li>
-<p><strong>CL_PLATFORM_HOST_TIMER_RESOLUTION</strong> added to table 4.1 of the API
+<p><a href="#CL_PLATFORM_HOST_TIMER_RESOLUTION"><code>CL_&#8203;PLATFORM_&#8203;HOST_&#8203;TIMER_&#8203;RESOLUTION</code></a> 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
+<p><a href="#CL_DEVICE_IL_VERSION"><code>CL_&#8203;DEVICE_&#8203;IL_&#8203;VERSION</code></a>, <a href="#CL_DEVICE_MAX_NUM_SUB_GROUPS"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;NUM_&#8203;SUB_&#8203;GROUPS</code></a>,
+<a href="#CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS"><code>CL_&#8203;DEVICE_&#8203;SUB_&#8203;GROUP_&#8203;INDEPENDENT_&#8203;FORWARD_&#8203;PROGRESS</code></a> added to table 4.3 of
 the API specification.</p>
 </li>
 <li>
-<p><strong>CL_PROGRAM_IL</strong> to table 5.17 of the API specification.</p>
+<p><a href="#CL_PROGRAM_IL"><code>CL_&#8203;PROGRAM_&#8203;IL</code></a> 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>
+<p><a href="#CL_QUEUE_DEVICE_DEFAULT"><code>CL_&#8203;QUEUE_&#8203;DEVICE_&#8203;DEFAULT</code></a> 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>
+<a href="#CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE"><code>CL_&#8203;KERNEL_&#8203;MAX_&#8203;SUB_&#8203;GROUP_&#8203;SIZE_&#8203;FOR_&#8203;NDRANGE</code></a>,
+<a href="#CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE"><code>CL_&#8203;KERNEL_&#8203;SUB_&#8203;GROUP_&#8203;COUNT_&#8203;FOR_&#8203;NDRANGE</code></a> and
+<a href="#CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT"><code>CL_&#8203;KERNEL_&#8203;LOCAL_&#8203;SIZE_&#8203;FOR_&#8203;SUB_&#8203;GROUP_&#8203;COUNT</code></a></p>
 </li>
 </ul>
 </div>
@@ -21358,8 +22152,8 @@
 <div class="ulist">
 <ul>
 <li>
-<p>All API calls except <strong>clSetKernelArg</strong>, <strong>clSetKernelArgSVMPointer</strong>,
-<strong>clSetKernelExecInfo</strong> and <strong>clCloneKernel</strong> are thread-safe.</p>
+<p>All API calls except <a href="#clSetKernelArg"><strong>clSetKernelArg</strong></a>, <a href="#clSetKernelArgSVMPointer"><strong>clSetKernelArgSVMPointer</strong></a>,
+<a href="#clSetKernelExecInfo"><strong>clSetKernelExecInfo</strong></a> and <a href="#clCloneKernel"><strong>clCloneKernel</strong></a> are thread-safe.</p>
 </li>
 </ul>
 </div>
@@ -21374,7 +22168,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_summary_of_changes_from_opencl_2_1">Summary of changes from OpenCL 2.1</h3>
+<h3 id="_summary_of_changes_from_opencl_2_1_to_opencl_2_2">Summary of changes from OpenCL 2.1 to OpenCL 2.2</h3>
 <div class="paragraph">
 <p>The following changes have been made to the OpenCL 2.2 execution model
 (section 3)</p>
@@ -21394,14 +22188,14 @@
 <div class="ulist">
 <ul>
 <li>
-<p><strong>clSetProgramSpecializationConstant</strong> API call</p>
+<p><a href="#clSetProgramSpecializationConstant"><strong>clSetProgramSpecializationConstant</strong></a> API call</p>
 </li>
 <li>
-<p><strong>clSetProgramReleaseCallback</strong> API call</p>
+<p><a href="#clSetProgramReleaseCallback"><strong>clSetProgramReleaseCallback</strong></a> API call</p>
 </li>
 <li>
-<p>Queries for CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT,
-CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT</p>
+<p>Queries for <a href="#CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT"><code>CL_&#8203;PROGRAM_&#8203;SCOPE_&#8203;GLOBAL_&#8203;CTORS_&#8203;PRESENT</code></a> and
+<a href="#CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT"><code>CL_&#8203;PROGRAM_&#8203;SCOPE_&#8203;GLOBAL_&#8203;DTORS_&#8203;PRESENT</code></a></p>
 </li>
 </ul>
 </div>
@@ -21412,11 +22206,11 @@
 <div class="ulist">
 <ul>
 <li>
-<p>Modified description of CL_DEVICE_MAX_CLOCK_FREQUENCY query.</p>
+<p>Modified description of <a href="#CL_DEVICE_MAX_CLOCK_FREQUENCY"><code>CL_&#8203;DEVICE_&#8203;MAX_&#8203;CLOCK_&#8203;FREQUENCY</code></a> query.</p>
 </li>
 <li>
-<p>Added a new error code CL_MAX_SIZE_RESTRICTION_EXCEEDED to
-<strong>clSetKernelArg</strong> API call</p>
+<p>Added a new error code <a href="#CL_MAX_SIZE_RESTRICTION_EXCEEDED"><code>CL_&#8203;MAX_&#8203;SIZE_&#8203;RESTRICTION_&#8203;EXCEEDED</code></a> to
+<a href="#clSetKernelArg"><strong>clSetKernelArg</strong></a> API call</p>
 </li>
 </ul>
 </div>
@@ -21427,11 +22221,456 @@
 </div>
 </div>
 </div>
+<div class="sect1">
+<h2 id="error_codes">Appendix F: Error Codes</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This section lists OpenCL error codes and their meanings.</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>Error Code</strong></th>
+<th class="tableblock halign-left valign-top"><strong>Brief Description</strong></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_SUCCESS"></a><a href="#CL_SUCCESS"><code>CL_&#8203;SUCCESS</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">This is a special error code to indicate that the API executed successfully, without errors.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_BUILD_PROGRAM_FAILURE"></a><a href="#CL_BUILD_PROGRAM_FAILURE"><code>CL_&#8203;BUILD_&#8203;PROGRAM_&#8203;FAILURE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> failed to build the specified program.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_COMPILE_PROGRAM_FAILURE"></a><a href="#CL_COMPILE_PROGRAM_FAILURE"><code>CL_&#8203;COMPILE_&#8203;PROGRAM_&#8203;FAILURE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> failed to compile the specified program.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_COMPILER_NOT_AVAILABLE"></a><a href="#CL_COMPILER_NOT_AVAILABLE"><code>CL_&#8203;COMPILER_&#8203;NOT_&#8203;AVAILABLE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when compiling or building a program from source or IL when <a href="#CL_DEVICE_COMPILER_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;COMPILER_&#8203;AVAILABLE</code></a> is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_NOT_FOUND"></a><a href="#CL_DEVICE_NOT_FOUND"><code>CL_&#8203;DEVICE_&#8203;NOT_&#8203;FOUND</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when no devices were found that match the specified device type.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_NOT_AVAILABLE"></a><a href="#CL_DEVICE_NOT_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;NOT_&#8203;AVAILABLE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when attempting to use a device when <a href="#CL_DEVICE_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;AVAILABLE</code></a> is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_DEVICE_PARTITION_FAILED"></a><a href="#CL_DEVICE_PARTITION_FAILED"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;FAILED</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when device partitioning is supported but the device could not be further partitioned.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"></a><a href="#CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"><code>CL_&#8203;EXEC_&#8203;STATUS_&#8203;ERROR_&#8203;FOR_&#8203;EVENTS_&#8203;IN_&#8203;WAIT_&#8203;LIST</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned by blocking APIs when an event in the event wait list has a negative value, indicating it is in an error state.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_IMAGE_FORMAT_MISMATCH"></a><a href="#CL_IMAGE_FORMAT_MISMATCH"><code>CL_&#8203;IMAGE_&#8203;FORMAT_&#8203;MISMATCH</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when attempting to copy images that do not use the same image format.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_IMAGE_FORMAT_NOT_SUPPORTED"></a><a href="#CL_IMAGE_FORMAT_NOT_SUPPORTED"><code>CL_&#8203;IMAGE_&#8203;FORMAT_&#8203;NOT_&#8203;SUPPORTED</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when attempting to create or use an image format that is not supported.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_ARG_INDEX"></a><a href="#CL_INVALID_ARG_INDEX"><code>CL_&#8203;INVALID_&#8203;ARG_&#8203;INDEX</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when attempting to get or set a kernel argument using an invalid index for the specified kernel.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_ARG_SIZE"></a><a href="#CL_INVALID_ARG_SIZE"><code>CL_&#8203;INVALID_&#8203;ARG_&#8203;SIZE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the specified size of a kernel argument does not match the size of the kernel argument.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_ARG_VALUE"></a><a href="#CL_INVALID_ARG_VALUE"><code>CL_&#8203;INVALID_&#8203;ARG_&#8203;VALUE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when attempting to set a kernel argument that is not valid.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_BINARY"></a><a href="#CL_INVALID_BINARY"><code>CL_&#8203;INVALID_&#8203;BINARY</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when a program binary is not valid for a device.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_BUFFER_SIZE"></a><a href="#CL_INVALID_BUFFER_SIZE"><code>CL_&#8203;INVALID_&#8203;BUFFER_&#8203;SIZE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when attempting to create a buffer or a sub-buffer with an invalid size.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_BUILD_OPTIONS"></a><a href="#CL_INVALID_BUILD_OPTIONS"><code>CL_&#8203;INVALID_&#8203;BUILD_&#8203;OPTIONS</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when build options passed to <a href="#clBuildProgram"><strong>clBuildProgram</strong></a> are not valid.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_COMMAND_QUEUE"></a><a href="#CL_INVALID_COMMAND_QUEUE"><code>CL_&#8203;INVALID_&#8203;COMMAND_&#8203;QUEUE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the specified command queue is not a valid command queue.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_COMPILER_OPTIONS"></a><a href="#CL_INVALID_COMPILER_OPTIONS"><code>CL_&#8203;INVALID_&#8203;COMPILER_&#8203;OPTIONS</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when compiler options passed to <a href="#clCompileProgram"><strong>clCompileProgram</strong></a> are not valid.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_CONTEXT"></a><a href="#CL_INVALID_CONTEXT"><code>CL_&#8203;INVALID_&#8203;CONTEXT</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when a specified context is not a valid context, or when mixing objects from multiple contexts.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_DEVICE"></a><a href="#CL_INVALID_DEVICE"><code>CL_&#8203;INVALID_&#8203;DEVICE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when a specified device is not valid.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_DEVICE_PARTITION_COUNT"></a><a href="#CL_INVALID_DEVICE_PARTITION_COUNT"><code>CL_&#8203;INVALID_&#8203;DEVICE_&#8203;PARTITION_&#8203;COUNT</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the requested device partitioning using <a href="#CL_DEVICE_PARTITION_BY_COUNTS"><code>CL_&#8203;DEVICE_&#8203;PARTITION_&#8203;BY_&#8203;COUNTS</code></a> is not valid.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_DEVICE_QUEUE"></a><a href="#CL_INVALID_DEVICE_QUEUE"><code>CL_&#8203;INVALID_&#8203;DEVICE_&#8203;QUEUE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when setting a device queue kernel argument to a value that is not a valid device command queue.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_DEVICE_TYPE"></a><a href="#CL_INVALID_DEVICE_TYPE"><code>CL_&#8203;INVALID_&#8203;DEVICE_&#8203;TYPE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the requested device type is not a valid value.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_EVENT"></a><a href="#CL_INVALID_EVENT"><code>CL_&#8203;INVALID_&#8203;EVENT</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when a specified event object is not a valid event object.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_EVENT_WAIT_LIST"></a><a href="#CL_INVALID_EVENT_WAIT_LIST"><code>CL_&#8203;INVALID_&#8203;EVENT_&#8203;WAIT_&#8203;LIST</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the specified event wait list or number of events in the wait list is not valid.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_GLOBAL_OFFSET"></a><a href="#CL_INVALID_GLOBAL_OFFSET"><code>CL_&#8203;INVALID_&#8203;GLOBAL_&#8203;OFFSET</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the specified global offset and global work size exceeds the limits of the device.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_GLOBAL_WORK_SIZE"></a><a href="#CL_INVALID_GLOBAL_WORK_SIZE"><code>CL_&#8203;INVALID_&#8203;GLOBAL_&#8203;WORK_&#8203;SIZE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the specified global work size exceeds the limits of the device.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_HOST_PTR"></a><a href="#CL_INVALID_HOST_PTR"><code>CL_&#8203;INVALID_&#8203;HOST_&#8203;PTR</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the specified host pointer is not valid for the specified flags.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_IMAGE_DESCRIPTOR"></a><a href="#CL_INVALID_IMAGE_DESCRIPTOR"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;DESCRIPTOR</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the specified image descriptor is <code>NULL</code> or specifies invalid values.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_IMAGE_FORMAT_DESCRIPTOR"></a><a href="#CL_INVALID_IMAGE_FORMAT_DESCRIPTOR"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;FORMAT_&#8203;DESCRIPTOR</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the specified image format descriptor is <code>NULL</code> or specifies invalid value.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_IMAGE_SIZE"></a><a href="#CL_INVALID_IMAGE_SIZE"><code>CL_&#8203;INVALID_&#8203;IMAGE_&#8203;SIZE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the specified image dimensions exceed the maximum dimensions for a device or all devices in a context.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_KERNEL"></a><a href="#CL_INVALID_KERNEL"><code>CL_&#8203;INVALID_&#8203;KERNEL</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the specified kernel is not a valid kernel.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_KERNEL_ARGS"></a><a href="#CL_INVALID_KERNEL_ARGS"><code>CL_&#8203;INVALID_&#8203;KERNEL_&#8203;ARGS</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when enqueing a kernel when some kernel arguments have not been set or are invalid.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_KERNEL_DEFINITION"></a><a href="#CL_INVALID_KERNEL_DEFINITION"><code>CL_&#8203;INVALID_&#8203;KERNEL_&#8203;DEFINITION</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when creating a kernel for multiple devices where the number of kernel arguments or kernel argument types are not the same for all devices.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_KERNEL_NAME"></a><a href="#CL_INVALID_KERNEL_NAME"><code>CL_&#8203;INVALID_&#8203;KERNEL_&#8203;NAME</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when creating a kernel when no kernel with the specified name exists in the program object.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_LINKER_OPTIONS"></a><a href="#CL_INVALID_LINKER_OPTIONS"><code>CL_&#8203;INVALID_&#8203;LINKER_&#8203;OPTIONS</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when build options passed to <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> are not valid.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_MEM_OBJECT"></a><a href="#CL_INVALID_MEM_OBJECT"><code>CL_&#8203;INVALID_&#8203;MEM_&#8203;OBJECT</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when a specified memory object is not a valid memory object.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_OPERATION"></a><a href="#CL_INVALID_OPERATION"><code>CL_&#8203;INVALID_&#8203;OPERATION</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">This is a generic error code that is returned when the requested operation is not a valid operation.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_PIPE_SIZE"></a><a href="#CL_INVALID_PIPE_SIZE"><code>CL_&#8203;INVALID_&#8203;PIPE_&#8203;SIZE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when attempting to create a pipe with an invalid packet size or number of packets.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_PLATFORM"></a><a href="#CL_INVALID_PLATFORM"><code>CL_&#8203;INVALID_&#8203;PLATFORM</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the specified platform is not a valid platform.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_PROGRAM"></a><a href="#CL_INVALID_PROGRAM"><code>CL_&#8203;INVALID_&#8203;PROGRAM</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when a specified program is not a valid program object.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_PROGRAM_EXECUTABLE"></a><a href="#CL_INVALID_PROGRAM_EXECUTABLE"><code>CL_&#8203;INVALID_&#8203;PROGRAM_&#8203;EXECUTABLE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the specified program is valid but has not been successfully built.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_PROPERTY"></a><a href="#CL_INVALID_PROPERTY"><code>CL_&#8203;INVALID_&#8203;PROPERTY</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when a specified property name is invalid, when the value for a property name is invalid, or when the same property name is specified more than once.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_QUEUE_PROPERTIES"></a><a href="#CL_INVALID_QUEUE_PROPERTIES"><code>CL_&#8203;INVALID_&#8203;QUEUE_&#8203;PROPERTIES</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when specified queue properties are valid but are not supported by the device.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_SAMPLER"></a><a href="#CL_INVALID_SAMPLER"><code>CL_&#8203;INVALID_&#8203;SAMPLER</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when a specified sampler is not a valid sampler object.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_SPEC_ID"></a><a href="#CL_INVALID_SPEC_ID"><code>CL_&#8203;INVALID_&#8203;SPEC_&#8203;ID</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the specified specialization constant ID is not valid for the specified program.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_VALUE"></a><a href="#CL_INVALID_VALUE"><code>CL_&#8203;INVALID_&#8203;VALUE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">This is a generic error that is returned when a specified value is not a valid value.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_WORK_DIMENSION"></a><a href="#CL_INVALID_WORK_DIMENSION"><code>CL_&#8203;INVALID_&#8203;WORK_&#8203;DIMENSION</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned by <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> when the specified work dimension is not valid.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_WORK_GROUP_SIZE"></a><a href="#CL_INVALID_WORK_GROUP_SIZE"><code>CL_&#8203;INVALID_&#8203;WORK_&#8203;GROUP_&#8203;SIZE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned by <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> when the specified total work group size is not valid for the specified kernel or device.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_INVALID_WORK_ITEM_SIZE"></a><a href="#CL_INVALID_WORK_ITEM_SIZE"><code>CL_&#8203;INVALID_&#8203;WORK_&#8203;ITEM_&#8203;SIZE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned by <a href="#clEnqueueNDRangeKernel"><strong>clEnqueueNDRangeKernel</strong></a> when the specified work group size in one dimension is not valid for the device.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_KERNEL_ARG_INFO_NOT_AVAILABLE"></a><a href="#CL_KERNEL_ARG_INFO_NOT_AVAILABLE"><code>CL_&#8203;KERNEL_&#8203;ARG_&#8203;INFO_&#8203;NOT_&#8203;AVAILABLE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned by <a href="#clGetKernelArgInfo"><strong>clGetKernelArgInfo</strong></a> when kernel argument information is not available for the specified kernel.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_LINK_PROGRAM_FAILURE"></a><a href="#CL_LINK_PROGRAM_FAILURE"><code>CL_&#8203;LINK_&#8203;PROGRAM_&#8203;FAILURE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned by <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> when there is a failure to link the specified binaries or libraries.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_LINKER_NOT_AVAILABLE"></a><a href="#CL_LINKER_NOT_AVAILABLE"><code>CL_&#8203;LINKER_&#8203;NOT_&#8203;AVAILABLE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned by <a href="#clLinkProgram"><strong>clLinkProgram</strong></a> when <a href="#CL_DEVICE_LINKER_AVAILABLE"><code>CL_&#8203;DEVICE_&#8203;LINKER_&#8203;AVAILABLE</code></a> is <a href="#CL_FALSE"><code>CL_&#8203;FALSE</code></a>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_MAP_FAILURE"></a><a href="#CL_MAP_FAILURE"><code>CL_&#8203;MAP_&#8203;FAILURE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when there is a failure to map the specified region into the host address space.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_MEM_COPY_OVERLAP"></a><a href="#CL_MEM_COPY_OVERLAP"><code>CL_&#8203;MEM_&#8203;COPY_&#8203;OVERLAP</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when copying from one region of a memory object to another where the source and destination regions overlap.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_MEM_OBJECT_ALLOCATION_FAILURE"></a><a href="#CL_MEM_OBJECT_ALLOCATION_FAILURE"><code>CL_&#8203;MEM_&#8203;OBJECT_&#8203;ALLOCATION_&#8203;FAILURE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when there is a failure to allocate memory for a memory object.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_MISALIGNED_SUB_BUFFER_OFFSET"></a><a href="#CL_MISALIGNED_SUB_BUFFER_OFFSET"><code>CL_&#8203;MISALIGNED_&#8203;SUB_&#8203;BUFFER_&#8203;OFFSET</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when a sub-buffer object is created or used that is not aligned to <a href="#CL_DEVICE_MEM_BASE_ADDR_ALIGN"><code>CL_&#8203;DEVICE_&#8203;MEM_&#8203;BASE_&#8203;ADDR_&#8203;ALIGN</code></a> for the device.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_OUT_OF_HOST_MEMORY"></a><a href="#CL_OUT_OF_HOST_MEMORY"><code>CL_&#8203;OUT_&#8203;OF_&#8203;HOST_&#8203;MEMORY</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">This is a generic error that is returned when memory could not be allocated on the host.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_OUT_OF_RESOURCES"></a><a href="#CL_OUT_OF_RESOURCES"><code>CL_&#8203;OUT_&#8203;OF_&#8203;RESOURCES</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">This is a generic error that is returned when resources could not be allocated on the device.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_MAX_SIZE_RESTRICTION_EXCEEDED"></a><a href="#CL_MAX_SIZE_RESTRICTION_EXCEEDED"><code>CL_&#8203;MAX_&#8203;SIZE_&#8203;RESTRICTION_&#8203;EXCEEDED</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned when the size of the specified kernel argument value exceeds the maximum size defined for the kernel argument.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a id="CL_PROFILING_INFO_NOT_AVAILABLE"></a><a href="#CL_PROFILING_INFO_NOT_AVAILABLE"><code>CL_&#8203;PROFILING_&#8203;INFO_&#8203;NOT_&#8203;AVAILABLE</code></a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returned by <a href="#clGetEventProfilingInfo"><strong>clGetEventProfilingInfo</strong></a> when the command associated with the specified event was not enqueued into a command queue with <a href="#CL_QUEUE_PROFILING_ENABLE"><code>CL_&#8203;QUEUE_&#8203;PROFILING_&#8203;ENABLE</code></a>.</p></td>
+</tr>
+</tbody>
+</table>
+<div style="page-break-after: always;"></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_acknowledgements">Acknowledgements</h2>
+<div class="sectionbody">
+<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>
+Jon Leech, Independent<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>
+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, StreamHPC<br>
+Jakub Szuppe, StreamHPC<br>
+Vincent Hindriksen, StreamHPC<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>
+</div>
 </div>
 <div id="footer">
 <div id="footer-text">
-Version v2.2-10<br>
-Last updated 2019-02-05 16:03:11 EST
+Version V2.2-11<br>
+Last updated 2019-07-19 08:25:57 EDT
 </div>
 </div>
 
diff --git a/specs/2.2/html/OpenCL_C.html b/specs/2.2/html/OpenCL_C.html
index 55ef0f3..5a56766 100644
--- a/specs/2.2/html/OpenCL_C.html
+++ b/specs/2.2/html/OpenCL_C.html
@@ -841,9 +841,9 @@
 <h1>The OpenCL<sup>&#8482;</sup> C 2.0 Specification</h1>
 <div class="details">
 <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>
+<span id="revnumber">version V2.2-11,</span>
+<span id="revdate">Fri, 19 Jul 2019 14:12:56 +0000</span>
+<br><span id="revremark">from git branch: master commit: 2aaf7b58ead9567d8799b22ecc748b4892a1e04e</span>
 </div>
 <div id="toc" class="toc2">
 <div id="toctitle">Table of Contents</div>
@@ -877,7 +877,7 @@
 <ul class="sectlevel3">
 <li><a href="#operators-arithmetic">6.3.1. Arithmetic Operators</a></li>
 <li><a href="#operators-unary">6.3.2. Unary Operators</a></li>
-<li><a href="#operators-prepost">6.3.3. Operators</a></li>
+<li><a href="#operators-prepost">6.3.3. Pre- and Post-Operators</a></li>
 <li><a href="#operators-relational">6.3.4. Relational Operators</a></li>
 <li><a href="#operators-equality">6.3.5. Equality Operators</a></li>
 <li><a href="#operators-bitwise">6.3.6. Bitwise Operators</a></li>
@@ -987,6 +987,7 @@
 </ul>
 </li>
 <li><a href="#references">9. Normative References</a></li>
+<li><a href="#_acknowledgements">10. Acknowledgements</a></li>
 </ul>
 </div>
 </div>
@@ -1037,183 +1038,6 @@
 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>
-Jon Leech, Independent<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>
-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, StreamHPC<br>
-Jakub Szuppe, StreamHPC<br>
-Vincent Hindriksen, StreamHPC<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">
@@ -1260,6 +1084,8 @@
 </div>
 <div class="sect3">
 <h4 id="built-in-scalar-data-types">6.1.1. Built-in Scalar Data Types</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following table describes the list of built-in scalar data types.</p>
 </div>
@@ -1459,8 +1285,12 @@
 </tr>
 </tbody>
 </table>
+</div>
+</div>
 <div class="sect4">
-<h5 id="the-half-data-type">The <code>half</code> data type</h5>
+<h5 id="the-half-data-type">The <code>half</code> Data Type</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The <code>half</code> data type must be IEEE 754-2008 compliant.
 <code>half</code> numbers have 1 sign bit, 5 exponent bits, and 10 mantissa bits.
@@ -1525,8 +1355,12 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="built-in-vector-data-types">6.1.2. Built-in Vector Data Types<sup>4</sup></h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The <code>char</code>, <code>unsigned char</code>, <code>short</code>, <code>unsigned short</code>, <code>int</code>, <code>unsigned
 int</code>, <code>long</code>, <code>unsigned long</code>, and <code>float</code> vector data types are supported.
@@ -1665,8 +1499,12 @@
 </tbody>
 </table>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="other-built-in-data-types">6.1.3. Other Built-in Data Types</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following table describes the list of additional data types supported by
 OpenCL.</p>
@@ -1811,8 +1649,12 @@
 </tbody>
 </table>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="reserved-data-types">6.1.4. Reserved Data Types</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The data type names described in the following table are reserved and cannot
 be used by applications as type names.
@@ -1885,7 +1727,7 @@
       stored in column-major order.</p></td>
 </tr>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><code>long double</code> <code>long double<em>n</em></code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>long double</code>, <code>long double<em>n</em></code></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">A floating-point scalar and vector type with at least as much
       precision and range as a <code>double</code> and no more precision and range than
       a quad.</p></td>
@@ -1903,8 +1745,12 @@
 </tbody>
 </table>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="alignment-of-types">6.1.5. Alignment of Types</h4>
+<div class="openblock">
+<div class="content">
 <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.
@@ -1941,6 +1787,8 @@
 element type of the vector.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="vector-literals">6.1.6. Vector Literals</h4>
 <div class="paragraph">
@@ -2705,6 +2553,8 @@
 </div>
 <div class="sect4">
 <h5 id="reinterpreting-types-using-as_type-and-as_typen">Reinterpreting Types Using <strong>as_type</strong>() and <strong>as_type<em>n</em></strong>()</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>All data types described in <a href="#table-builtin-scalar-types">Built-in Scalar Data Types</a> and
 <a href="#table-builtin-vector-types">Built-in Vector Data Types</a> (except <code>bool</code>, <code>half</code><sup>12</sup> and <code>void</code>) may be
@@ -2803,6 +2653,8 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="pointer-casting">6.2.5. Pointer Casting</h4>
 <div class="paragraph">
@@ -2913,6 +2765,8 @@
 <h3 id="operators">6.3. Operators</h3>
 <div class="sect3">
 <h4 id="operators-arithmetic">6.3.1. Arithmetic Operators</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The arithmetic operators add (<strong>+</strong>), subtract (<strong>-</strong>), multiply (<strong>*</strong>) and
 divide (<strong>/</strong>) operate on built-in integer and floating-point scalar, and
@@ -2957,15 +2811,23 @@
 vector dot product and the vector cross product.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="operators-unary">6.3.2. Unary Operators</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The arithmetic unary operators (<strong>+</strong> and <strong>-</strong>) operate on built-in scalar and
 vector types.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
-<h4 id="operators-prepost">6.3.3. Operators</h4>
+<h4 id="operators-prepost">6.3.3. Pre- and Post-Operators</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The arithmetic post- and pre-increment and decrement operators (<strong>--</strong> and
 <strong>++</strong>) operate on built-in scalar and vector types except the built-in scalar
@@ -2994,8 +2856,12 @@
 <code><em>a</em>++</code> or <code><em>a</em>--</code> for large <em>a</em>.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="operators-relational">6.3.4. Relational Operators</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The relational operators<sup>16</sup> greater than (<strong>&gt;</strong>), less than (<strong>&lt;</strong>), greater
 than or equal (<strong>&gt;=</strong>), and less than or equal (<strong>&lt;=</strong>) operate on scalar and
@@ -3051,8 +2917,12 @@
 (NaN).</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="operators-equality">6.3.5. Equality Operators</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The equality operators<sup>17</sup> equal (<strong>==</strong>) and not equal (<strong>!=</strong>) operate on
 built-in scalar and vector types.
@@ -3112,8 +2982,12 @@
 not a number (NaN).</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="operators-bitwise">6.3.6. Bitwise Operators</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The bitwise operators and (<strong>&amp;</strong>), or (<strong>|</strong>), exclusive or (<strong>^</strong>), and not
 (<strong>~</strong>) operate on all scalar and vector built-in types except the built-in
@@ -3127,8 +3001,12 @@
 The operation is done component-wise resulting in the same size vector.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="operators-logical">6.3.7. Logical Operators</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The logical operators and (<strong>&amp;&amp;</strong>) and or (<strong>||</strong>) operate on all scalar and
 vector built-in types.
@@ -3166,8 +3044,12 @@
 operation is <em>false</em> and -1 (i.e. all bits set) if the result is <em>true</em>.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="operators-logical-unary">6.3.8. Unary Logical Operator</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The logical unary operator not (<strong>!</strong>) operates on all scalar and vector
 built-in types.
@@ -3193,8 +3075,12 @@
 its operand compares equal to 0.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="operators-ternary-selection">6.3.9. Ternary Selection Operator</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The ternary selection operator (<strong>?:</strong>) operates on three expressions (<em>exp1</em>
 <strong>?</strong> <em>exp2</em> <strong>:</strong> <em>exp3</em>).
@@ -3214,8 +3100,12 @@
 This resulting matching type is the type of the entire expression.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="operators-shift">6.3.10. Shift Operators</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The operators right-shift (<strong>&gt;&gt;</strong>), left-shift (<strong>&lt;&lt;</strong>) operate on all scalar
 and vector built-in types except the built-in scalar and vector <code>float</code>
@@ -3249,8 +3139,12 @@
 with ones.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="operators-sizeof">6.3.11. Sizeof Operator</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The <code>sizeof</code> operator yields the size (in bytes) of its operand, including
 any <a href="#alignment-of-types">padding bytes needed for alignment</a>, which may be
@@ -3299,16 +3193,24 @@
 <code>clk_event_t</code>, <code>queue_t</code> and <code>event_t</code> types is implementation-defined.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="operators-comma">6.3.12. Comma Operator</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The comma (<strong>,</strong>) operator operates on expressions by returning the type and
 value of the right-most expression in a comma separated list of expressions.
 All expressions are evaluated, in order, from left to right.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="operators-indirection">6.3.13. Indirection Operator</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The unary (<strong>*</strong>) operator denotes indirection.
 If the operand points to an object, the result is an l-value designating the
@@ -3327,8 +3229,12 @@
 is an l-value that has a type compatible with that to which <strong>T</strong> points.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="operators-address">6.3.14. Address Operator</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The unary (<strong>&amp;</strong>) operator returns the address of its operand.
 If the operand has type &#8220;<em>type</em>&#8221;, the result has type &#8220;pointer to
@@ -3351,8 +3257,12 @@
 unary <strong>&amp;</strong> operator, <strong>&amp;E</strong> is an l-value equal to <strong>E</strong>.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="operators-assignment">6.3.15. Assignment Operator</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>Assignments of values to variable names are done with the assignment
 operator (<strong>=</strong>), like</p>
@@ -3443,6 +3353,8 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect2">
 <h3 id="vector-operations">6.4. Vector Operations</h3>
 <div class="paragraph">
@@ -3500,6 +3412,8 @@
 </div>
 <div class="sect2">
 <h3 id="address-space-qualifiers">6.5. Address Space Qualifiers</h3>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>OpenCL implements the following disjoint named address spaces: <code>__global</code>,
 <code>__local</code>, <code>__constant</code> and <code>__private</code>.
@@ -3599,8 +3513,12 @@
 </tr>
 </table>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="global-or-global">6.5.1. <code>__global</code> (or <code>global</code>)</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The <code>__global</code> or <code>global</code> address space name is used to refer to memory
 objects (buffer or image objects) allocated from the <code>global</code> memory pool.</p>
@@ -3702,8 +3620,12 @@
 specify a read-only buffer memory object.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="local-or-local">6.5.2. <code>__local</code> (or <code>local</code>)</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The <code>__local</code> or <code>local</code> address space name is used to describe variables
 that need to be allocated in local memory and are shared by all work-items
@@ -3768,8 +3690,12 @@
 </table>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="constant-or-constant">6.5.3. <code>__constant</code> (or <code>constant</code>)</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The <code>__constant</code> or <code>constant</code> address space name is used to describe
 variables allocated in <code>global</code> memory and which are accessed inside a
@@ -3819,8 +3745,12 @@
 address space counts as a separate constant argument.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="private-or-private">6.5.4. <code>__private</code> (or <code>private</code>)</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>Variables inside a kernel function not declared with an address space
 qualifier, all variables inside non-kernel functions, and all function
@@ -3829,8 +3759,12 @@
 <code>__private</code> address space if an address space qualifier is not specified</strong>.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="the-generic-address-space">6.5.5. The generic address space</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following rules apply when using pointers that point to the generic
 address space:</p>
@@ -3946,6 +3880,8 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="changes-to-C99">6.5.6. Changes to C99</h4>
 <div class="paragraph">
@@ -4299,6 +4235,8 @@
 </div>
 <div class="sect2">
 <h3 id="access-qualifiers">6.6. Access Qualifiers</h3>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>Image objects specified as arguments to a kernel can be declared to be
 read-only, write-only or read-write.
@@ -4348,10 +4286,14 @@
 qualifiers and shall not be used otherwise.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect2">
 <h3 id="function-qualifiers">6.7. Function Qualifiers</h3>
 <div class="sect3">
 <h4 id="kernel-or-kernel">6.7.1. <code>__kernel</code> (or <code>kernel</code>)</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The <code>__kernel</code> (or <code>kernel</code>) qualifier declares a function to be a kernel
 that can be executed by an application on an OpenCL device(s).
@@ -4393,8 +4335,12 @@
 qualifiers and shall not be used otherwise.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="optional-attribute-qualifiers">6.7.2. Optional Attribute Qualifiers</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The <code>__kernel</code> qualifier can be used with the keyword <em>attribute</em> to
 declare additional information about the kernel function as described below.</p>
@@ -4526,8 +4472,12 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect2">
 <h3 id="storage-class-specifiers">6.8. Storage-Class Specifiers</h3>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The <code>typedef</code>, <code>extern</code> and <code>static</code> storage-class specifiers are supported.
 The <code>auto</code> and <code>register</code> storage-class specifiers are not supported.</p>
@@ -4572,8 +4522,12 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect2">
 <h3 id="restrictions">6.9. Restrictions</h3>
+<div class="openblock">
+<div class="content">
 <div class="admonitionblock note">
 <table>
 <tr>
@@ -4625,8 +4579,6 @@
 An image function argument cannot be modified.
 Elements of an image can only be accessed using the built-in
 <a href="#image-read-and-write-functions">image read and write functions</a>.</p>
-<div class="openblock">
-<div class="content">
 <div class="paragraph">
 <p>An image type cannot be used to declare a variable, a structure or union
 field, an array of images, a pointer to an image, or the return type of a
@@ -4652,8 +4604,6 @@
 The sampler type cannot be used with the <code>__local</code> and <code>__global</code>
 address space qualifiers.</p>
 </div>
-</div>
-</div>
 </li>
 <li>
 <p><a id="restrictions-bitfield"></a> Bit-field struct members are currently not
@@ -4724,8 +4674,9 @@
 elements of a struct that are of type <code>char</code>, <code>uchar</code>, <code>char2</code>,
 <code>uchar2</code>, <code>short</code> and <code>ushort</code> are not supported.
 Refer to <em>section 9.9</em> for additional information.</span></p>
-<div class="openblock">
-<div class="content">
+</li>
+</ul>
+</div>
 <div class="paragraph">
 <p><span class="line-through">The kernel example below shows what memory operations are not
 supported on built-in types less than 32-bits in size.</span></p>
@@ -4747,11 +4698,6 @@
 }</code></pre>
 </div>
 </div>
-</div>
-</div>
-</li>
-</ul>
-</div>
 </li>
 <li>
 <p>The type qualifiers <code>const</code>, <code>restrict</code> and <code>volatile</code> as defined by the
@@ -4796,8 +4742,12 @@
 <p>[25] Unless the <strong>cl_khr_fp16</strong> extension is supported and has been enabled.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect2">
 <h3 id="preprocessor-directives-and-macros">6.10. Preprocessor Directives and Macros</h3>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The preprocessing directives defined by the C99 specification are supported.</p>
 </div>
@@ -4936,6 +4886,8 @@
 <p>The predefined identifier <code>__func__</code> is available.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect2">
 <h3 id="attribute-qualifiers">6.11. Attribute Qualifiers</h3>
 <div class="paragraph">
@@ -5018,6 +4970,8 @@
 </div>
 <div class="sect3">
 <h4 id="specifying-attributes-of-types">6.11.1. Specifying Attributes of Types</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The keyword <code>__attribute__</code> allows you to specify special attributes of
 enum, struct and union types when you define such types.
@@ -5042,68 +4996,76 @@
 <p>This attribute specifies a minimum alignment (in bytes) for variables of the
 specified type.
 For example, the declarations:</p>
-<div class="openblock">
-<div class="content">
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="c"><span class="keyword">struct</span> S { <span class="predefined-type">short</span> f[<span class="integer">3</span>]; } __attribute__ ((aligned (<span class="integer">8</span>)));
 <span class="keyword">typedef</span> <span class="predefined-type">int</span> more_aligned_int __attribute__ ((aligned (<span class="integer">8</span>)));</code></pre>
 </div>
 </div>
-<div class="paragraph">
-<p>force the compiler to insure (as far as it can) that each variable whose
-type is <code>struct S</code> or <code>more_aligned_int</code> will be allocated and aligned <em>at
-least</em> on a 8-byte boundary.</p>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">force the compiler to insure (as far as it can) that each variable whose
+type is <span class="error">`</span><span class="keyword">struct</span> S<span class="error">`</span> or <span class="error">`</span>more_aligned_int<span class="error">`</span> will be allocated and aligned _at
+least_ on a <span class="integer">8</span>-byte boundary.</code></pre>
 </div>
-<div class="paragraph">
-<p>Note that the alignment of any given struct or union type is required by the
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">Note that the alignment of any given <span class="keyword">struct</span> or <span class="keyword">union</span> type is required by the
 ISO 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
+multiple of the alignments of all of the members of the <span class="keyword">struct</span> or <span class="keyword">union</span> in
 question and must also be a power of two.
-This means that you <em>can</em> effectively adjust the alignment of a struct or
-union type by attaching an aligned attribute to any one of the members of
+This means that you _can_ effectively adjust the alignment of a <span class="keyword">struct</span> or
+<span class="keyword">union</span> 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 struct or union type.</p>
+alignment of an entire <span class="keyword">struct</span> or <span class="keyword">union</span> type.</code></pre>
 </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 struct or union type.
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">As in the preceding example, you can explicitly specify the alignment (in
+bytes) that you wish the compiler to use <span class="keyword">for</span> a given <span class="keyword">struct</span> or <span class="keyword">union</span> 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>
+compiler to align a type to the maximum useful alignment <span class="keyword">for</span> the target
+machine you are compiling <span class="keyword">for</span>.
+For example, you could write:</code></pre>
+</div>
 </div>
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="c"><span class="keyword">struct</span> S { <span class="predefined-type">short</span> f[<span class="integer">3</span>]; } __attribute__ ((aligned));</code></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 <code>short</code> is 2 bytes, and therefore the
-size of the entire <code>struct S</code> 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 <code>struct S</code> type to 8 bytes.</p>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">Whenever you leave out the alignment factor in an aligned attribute
+specification, the compiler automatically sets the alignment <span class="keyword">for</span> the type to
+the largest alignment which is ever used <span class="keyword">for</span> any data type on the target
+machine you are compiling <span class="keyword">for</span>.
+In the example above, the size of each <span class="error">`</span><span class="predefined-type">short</span><span class="error">`</span> is <span class="integer">2</span> bytes, and therefore the
+size of the entire <span class="error">`</span><span class="keyword">struct</span> S<span class="error">`</span> type is <span class="integer">6</span> bytes.
+The smallest power of two which is greater than or equal to that is <span class="integer">8</span>, so
+the compiler sets the alignment <span class="keyword">for</span> the entire <span class="error">`</span><span class="keyword">struct</span> S<span class="error">`</span> type to <span class="integer">8</span> bytes.</code></pre>
 </div>
-<div class="paragraph">
-<p>Note that the effectiveness of aligned attributes may be limited by inherent
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">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
+For some devices, the OpenCL compiler may only be able to arrange <span class="keyword">for</span>
 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 <code>aligned(16)</code> in an <code>__attribute__</code> will
-still only provide you with 8 byte alignment.
-See your platform-specific documentation for further information.</p>
+If the OpenCL compiler is only able to align variables up to a maximum of <span class="integer">8</span>
+byte alignment, then specifying <span class="error">`</span>aligned(<span class="integer">16</span>)<span class="error">`</span> in an <span class="error">`</span>+__attribute__+<span class="error">`</span> will
+still only provide you with <span class="integer">8</span> byte alignment.
+See your platform-specific documentation <span class="keyword">for</span> further information.</code></pre>
 </div>
-<div class="paragraph">
-<p>The aligned attribute can only increase the alignment; but you can decrease
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">The aligned attribute can only increase the alignment; but you can decrease
 it by specifying packed as well.
-See below.</p>
-</div>
+See below.</code></pre>
 </div>
 </div>
 </dd>
@@ -5114,8 +5076,6 @@
 required.
 When attached to an enum definition, it indicates that the smallest integral
 type should be used.</p>
-<div class="openblock">
-<div class="content">
 <div class="paragraph">
 <p>Specifying this attribute for struct and union types is equivalent to
 specifying the packed attribute on each of the structure or union members.</p>
@@ -5141,17 +5101,19 @@
 };</code></pre>
 </div>
 </div>
-<div class="paragraph">
-<p>You may only specify this attribute on the definition of a enum, struct or
-union, not on a <code>typedef</code> which does not also define the enumerated type,
-structure or union.</p>
-</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">You may only specify this attribute on the definition of a <span class="keyword">enum</span>, <span class="keyword">struct</span> or
+<span class="keyword">union</span>, not on a <span class="error">`</span><span class="keyword">typedef</span><span class="error">`</span> which does not also define the enumerated type,
+structure or <span class="keyword">union</span>.</code></pre>
 </div>
 </div>
 </dd>
 </dl>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="specifying-attributes-of-functions">6.11.2. Specifying Attributes of Functions</h4>
 <div class="paragraph">
@@ -5161,6 +5123,8 @@
 </div>
 <div class="sect3">
 <h4 id="specifying-attributes-of-variables">6.11.3. Specifying Attributes of Variables</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The keyword <code>__attribute__</code> allows you to specify special attributes of
 variables or structure fields.
@@ -5175,69 +5139,79 @@
 <p>This attribute specifies a minimum alignment for the variable or structure
 field, measured in bytes.
 For example, the declaration:</p>
-<div class="openblock">
-<div class="content">
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="c"><span class="predefined-type">int</span> x __attribute__ ((aligned (<span class="integer">16</span>))) = <span class="integer">0</span>;</code></pre>
 </div>
 </div>
-<div class="paragraph">
-<p>causes the compiler to allocate the global variable <code>x</code> on a 16-byte
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">causes the compiler to allocate the global variable <span class="error">`</span>x<span class="error">`</span> on a <span class="integer">16</span>-byte
 boundary.
-The alignment value specified must be a power of two.</p>
+The alignment value specified must be a power of two.</code></pre>
 </div>
-<div class="paragraph">
-<p>You can also specify the alignment of structure fields.
-For example, to create a double-word aligned <code>int</code> pair, you could write:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">You can also specify the alignment of structure fields.
+For example, to create a <span class="predefined-type">double</span>-word aligned <span class="error">`</span><span class="predefined-type">int</span><span class="error">`</span> pair, you could write:</code></pre>
+</div>
 </div>
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="c"><span class="keyword">struct</span> foo { <span class="predefined-type">int</span> x[<span class="integer">2</span>] __attribute__ ((aligned (<span class="integer">8</span>))); };</code></pre>
 </div>
 </div>
-<div class="paragraph">
-<p>This is an alternative to creating a union with a <code>double</code> member that
-forces the union to be double-word aligned.</p>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">This is an alternative to creating a <span class="keyword">union</span> with a <span class="error">`</span><span class="predefined-type">double</span><span class="error">`</span> member that
+forces the <span class="keyword">union</span> to be <span class="predefined-type">double</span>-word aligned.</code></pre>
 </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
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">As in the preceding examples, you can explicitly specify the alignment (in
+bytes) that you wish the compiler to use <span class="keyword">for</span> 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>
+compiler to align a variable or field to the maximum useful alignment <span class="keyword">for</span>
+the target machine you are compiling <span class="keyword">for</span>.
+For example, you could write:</code></pre>
+</div>
 </div>
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="c"><span class="predefined-type">short</span> array[<span class="integer">3</span>] __attribute__ ((aligned));</code></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 class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">Whenever you leave out the alignment factor in an aligned attribute
+specification, the OpenCL compiler automatically sets the alignment <span class="keyword">for</span> the
+declared variable or field to the largest alignment which is ever used <span class="keyword">for</span>
+any data type on the target device you are compiling <span class="keyword">for</span>.</code></pre>
 </div>
-<div class="paragraph">
-<p>When used on a struct, or struct member, the aligned attribute can only
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">When used on a <span class="keyword">struct</span>, or <span class="keyword">struct</span> 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 <code>typedef</code>, the aligned attribute can both increase
+When used as part of a <span class="error">`</span><span class="keyword">typedef</span><span class="error">`</span>, the aligned attribute can both increase
 and decrease alignment, and specifying the packed attribute will generate a
-warning.</p>
+warning.</code></pre>
 </div>
-<div class="paragraph">
-<p>Note that the effectiveness of aligned attributes may be limited by inherent
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">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
+For some devices, the OpenCL compiler may only be able to arrange <span class="keyword">for</span>
 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 <code>aligned(16)</code> in an <code>__attribute__</code> will
-still only provide you with 8 byte alignment.
-See your platform-specific documentation for further information.</p>
-</div>
+If the OpenCL compiler is only able to align variables up to a maximum of <span class="integer">8</span>
+byte alignment, then specifying <span class="error">`</span>aligned(<span class="integer">16</span>)<span class="error">`</span> in an <span class="error">`</span>+__attribute__+<span class="error">`</span> will
+still only provide you with <span class="integer">8</span> byte alignment.
+See your platform-specific documentation <span class="keyword">for</span> further information.</code></pre>
 </div>
 </div>
 </dd>
@@ -5246,8 +5220,6 @@
 <p>The packed attribute specifies that a variable or structure field should
 have the smallest possible alignment&#8201;&#8212;&#8201;one byte for a variable, unless you
 specify a larger value with the aligned attribute.</p>
-<div class="openblock">
-<div class="content">
 <div class="paragraph">
 <p>Here is a structure in which the field <code>x</code> is packed, so that it immediately
 follows a:</p>
@@ -5261,13 +5233,17 @@
 };</code></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 class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">An attribute list placed at the beginning of a user-defined type applies to
+the variable of that type and not the type, <span class="keyword">while</span> attributes following the
+type body apply to the type.</code></pre>
 </div>
-<div class="paragraph">
-<p>For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">For example:</code></pre>
+</div>
 </div>
 <div class="listingblock">
 <div class="content">
@@ -5283,8 +5259,6 @@
 <span class="keyword">struct</span> B b1; <span class="comment">/* b1 has alignment of 32 */</span></code></pre>
 </div>
 </div>
-</div>
-</div>
 </dd>
 <dt class="hdlist1"><code>endian (<em>endiantype</em>)</code> </dt>
 <dd>
@@ -5294,8 +5268,6 @@
 variable uses the endianness of the device on which the kernel will be
 executed.
 The default is <code>device</code>.</p>
-<div class="openblock">
-<div class="content">
 <div class="paragraph">
 <p>For example:</p>
 </div>
@@ -5304,26 +5276,32 @@
 <pre class="CodeRay highlight"><code data-lang="c">global float4 *p __attribute__ ((endian(host)));</code></pre>
 </div>
 </div>
-<div class="paragraph">
-<p>specifies that data stored in memory pointed to by p will be in the host
-endian format.</p>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">specifies that data stored in memory pointed to by p will be in the host
+endian format.</code></pre>
 </div>
-<div class="paragraph">
-<p>The endian attribute can only be applied to pointer types that are in the
-<code>global</code> or <code>constant</code> address space.
-The endian attribute cannot be used for variables that are not a pointer
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="c">The endian attribute can only be applied to pointer types that are in the
+<span class="error">`</span>global<span class="error">`</span> or <span class="error">`</span>constant<span class="error">`</span> address space.
+The endian attribute cannot be used <span class="keyword">for</span> variables that are not a pointer
 type.
-The endian attribute value for both pointers must be the same when one
-pointer is assigned to another.</p>
-</div>
+The endian attribute value <span class="keyword">for</span> both pointers must be the same when one
+pointer is assigned to another.</code></pre>
 </div>
 </div>
 </dd>
 </dl>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="specifying-attributes-of-blocks-and-control-flow-statements">6.11.4. Specifying Attributes of Blocks and Control-Flow-Statements</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>For basic blocks and control-flow-statements the attribute is placed before
 the structure in question, for example:</p>
@@ -5344,8 +5322,12 @@
 defined.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="specifying-attribute-for-unrolling-loops">6.11.5. Specifying Attribute For Unrolling Loops</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The <code>__attribute__((opencl_unroll_hint))</code> and
 <code>__attribute__((opencl_unroll_hint(n)))</code> attribute qualifiers can be used
@@ -5463,6 +5445,8 @@
 compile-time constant expression.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="extending-attribute-qualifiers">6.11.6. Extending Attribute Qualifiers</h4>
 <div class="paragraph">
@@ -5487,6 +5471,8 @@
 </div>
 <div class="sect2">
 <h3 id="blocks">6.12. Blocks</h3>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>OpenCL C 2.0 adds support for the clang block syntax<sup>26</sup>.
 Like function types, the Block type is a pair consisting of a result value
@@ -5503,6 +5489,8 @@
 Specifically, Mac OS X&#8217;s Grand Central Dispatch allows applications to queue
 tasks as a block.</p>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="declaring-and-using-a-block">6.12.1. Declaring and Using a Block</h4>
 <div class="paragraph">
@@ -5757,7 +5745,11 @@
 and may not be reassigned.</p>
 </li>
 <li>
-<p>A block cannot be the return value of a function.</p>
+<p>A block cannot be a return value or a parameter of a function.</p>
+</li>
+<li>
+<p>Blocks cannot be used as expressions of the ternary selection operator
+(<strong>?:</strong>).</p>
 </li>
 </ul>
 </div>
@@ -5769,10 +5761,6 @@
 <p>Pointers to Blocks are not allowed.</p>
 </li>
 <li>
-<p>Blocks cannot be used as expressions of the ternary selection operator
-(<strong>?:</strong>).</p>
-</li>
-<li>
 <p>A Block cannot capture another Block variable declared in the outer
 scope (Example 4).</p>
 </li>
@@ -5916,6 +5904,8 @@
 </div>
 <div class="sect3">
 <h4 id="work-item-functions">6.13.1. Work-Item Functions</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following table describes the list of built-in work-item functions that
 can be used to query the number of dimensions, the global and local work
@@ -6047,8 +6037,12 @@
 are not evenly divisible by the <em>local_work_size</em> values for each dimension.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="math-functions">6.13.2. Math Functions</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The built-in math functions are categorized into the following:</p>
 </div>
@@ -6676,6 +6670,10 @@
 Support for denormal values is implementation-defined for <strong>native_</strong>
 functions.</p>
 </div>
+</div>
+</div>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following symbolic constants are available.
 Their values are of type <code>float</code> and are accurate within the precision of a
@@ -6734,8 +6732,12 @@
 </tr>
 </tbody>
 </table>
+</div>
+</div>
 <div class="sect4">
 <h5 id="floating-point-macros-and-pragmas">Floating-point macros and pragmas</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The <code>FP_CONTRACT</code> pragma can be used to allow (if the state is on) or
 disallow (if the state is off) the implementation to contract expressions.
@@ -7072,8 +7074,12 @@
 </table>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="integer-functions">6.13.3. Integer Functions</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following table describes the built-in integer functions that take
 scalar or vector arguments.
@@ -7266,6 +7272,12 @@
 </tr>
 </tbody>
 </table>
+</div>
+</div>
+<div class="sect4">
+<h5 id="integer-macros">Integer Macros</h5>
+<div class="openblock">
+<div class="content">
 <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 <code>#if</code>
@@ -7368,12 +7380,17 @@
 </tbody>
 </table>
 </div>
+</div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="common-functions">6.13.4. Common Functions<sup>33</sup></h4>
 <div class="paragraph">
 <p>[33] The <strong>mix</strong> and <strong>smoothstep</strong> functions can be implemented using
 contractions such as <strong>mad</strong> or <strong>fma</strong>.</p>
 </div>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following table describes the list of built-in common functions.
 These all operate component-wise.
@@ -7460,8 +7477,6 @@
       This is useful in cases where you would want a threshold function with
       a smooth transition.</p>
 </div>
-<div class="openblock">
-<div class="content">
 <div class="paragraph">
 <p>This is equivalent to:</p>
 </div>
@@ -7475,8 +7490,6 @@
 <div class="paragraph">
 <p>Results are undefined if <em>edge0</em> &gt;= <em>edge1</em> or if <em>x</em>, <em>edge0</em> or <em>edge1</em> is
 a NaN.</p>
-</div>
-</div>
 </div></div></td>
 </tr>
 <tr>
@@ -7488,12 +7501,16 @@
 </tbody>
 </table>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="geometric-functions">6.13.5. Geometric Functions<sup>34</sup></h4>
 <div class="paragraph">
 <p>[34] The geometric functions can be implemented using contractions such as
 <strong>mad</strong> or <strong>fma</strong>.</p>
 </div>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following table describes the list of built-in geometric functions.
 These all operate component-wise.
@@ -7563,15 +7580,18 @@
 <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>
-<div class="openblock">
-<div class="content">
 <div class="paragraph">
-<p><em>p</em> * <strong>half_rsqrt</strong>(<em>p.x</em><sup>2</sup> + <em>p.y</em><sup>2</sup> + &#8230;&#8203;)</p>
+<p>+
+<em>p</em> * <strong>half_rsqrt</strong>(<em>p.x</em><sup>2</sup> + <em>p.y</em><sup>2</sup> + &#8230;&#8203;)</p>
 </div>
 <div class="paragraph">
-<p>The result shall be within 8192 ulps error from the infinitely precise
+<p>+
+The result shall be within 8192 ulps error from the infinitely precise
 result of</p>
 </div>
+<div class="paragraph">
+<p>+</p>
+</div>
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="c"><span class="keyword">if</span> (all(p == <span class="float">0</span><span class="float">.0f</span>))
@@ -7581,33 +7601,29 @@
 </div>
 </div>
 <div class="paragraph">
-<p>with the following exceptions:</p>
+<p>+
+with the following exceptions:</p>
 </div>
-<div class="olist arabic">
-<ol class="arabic">
-<li>
-<p>If the sum of squares is greater than <code>FLT_MAX</code> 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 <code>FLT_MIN</code> then the implementation
-may return back <em>p</em>.</p>
-</li>
-<li>
-<p>If the device is in &#8220;denorms are flushed to zero&#8221; mode, individual
-operand elements with magnitude less than <strong>sqrt</strong>(<code>FLT_MIN</code>) may be flushed
-to zero before proceeding with the calculation.</p>
-</li>
-</ol>
-</div>
-</div>
+<div class="paragraph">
+<p>+
+. If the sum of squares is greater than <code>FLT_MAX</code> then the value of the
+  floating-point values in the result vector are undefined.
+. If the sum of squares is less than <code>FLT_MIN</code> then the implementation
+  may return back <em>p</em>.
+. If the device is in &#8220;denorms are flushed to zero&#8221; mode, individual
+  operand elements with magnitude less than <strong>sqrt</strong>(<code>FLT_MIN</code>) may be flushed
+  to zero before proceeding with the calculation.</p>
 </div></div></td>
 </tr>
 </tbody>
 </table>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="relational-functions">6.13.6. Relational Functions</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The <a href="#operators-relational">relational</a> and <a href="#operators-equality">equality</a>
 operators (<strong>&lt;</strong>, <strong>&lt;=</strong>, <strong>&gt;</strong>, <strong>&gt;=</strong>, <strong>!=</strong>, <strong>==</strong>) can be used with scalar and
@@ -7817,8 +7833,12 @@
 interpretations of the bit pattern of <em>c</em>.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="vector-data-load-and-store-functions">6.13.7. Vector Data Load and Store Functions</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following table describes the list of supported functions that allow you
 to read and write vector types from a pointer to memory.
@@ -8037,8 +8057,12 @@
 </table>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="synchronization-functions">6.13.8. Synchronization Functions</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The OpenCL C programming language implements the following synchronization
 functions.</p>
@@ -8119,8 +8143,12 @@
 <p>[40] Refer to the <a href="#atomic-functions">description of <code>memory_scope</code></a>.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="address-space-qualifier-functions">6.13.9. Address Space Qualifier Functions</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The OpenCL C programming language implements the following address space
 qualifier functions.
@@ -8167,8 +8195,12 @@
 </tbody>
 </table>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="async-copies">6.13.10. Async Copies from Global to Local Memory, Local to Global Memory, and Prefetch</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The OpenCL C programming language implements the following functions that
 provide asynchronous copies between <code>global</code> and local memory and a prefetch
@@ -8308,6 +8340,8 @@
 </table>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="atomic-functions">6.13.11. Atomic Functions</h4>
 <div class="paragraph">
@@ -8425,6 +8459,8 @@
 </div>
 <div class="sect4">
 <h5 id="the-atomic_var_init-macro">The <code>ATOMIC_VAR_INIT</code> macro</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The <code>ATOMIC_VAR_INIT</code> macro expands to a token sequence suitable for
 initializing an atomic object of a type that is initialization-compatible
@@ -8456,10 +8492,14 @@
 operation, constitutes a data-race.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="the-atomic_init-function">The atomic_init function</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
-<p>The atomic_init function non-atomically initializes the atomic object
+<p>The <code>atomic_init</code> function non-atomically initializes the atomic object
 pointed to by obj to the value value.</p>
 </div>
 <div class="listingblock">
@@ -8479,8 +8519,12 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="order-and-consistency">Order and Consistency</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The enumerated type <code>memory_order</code> specifies the detailed regular
 (non-atomic) memory synchronization operations as defined in
@@ -8517,8 +8561,12 @@
 or <code>local</code> memory.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="memory-scope">Memory Scope</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The enumerated type <code>memory_scope</code> specifies whether the memory ordering
 constraints given by <code>memory_order</code> apply to work-items in a work-group or
@@ -8558,8 +8606,12 @@
 value.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="fences">Fences</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following fence operations are supported.</p>
 </div>
@@ -8614,8 +8666,12 @@
 that image by that work-item.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="atomic-integer-and-floating-point-types">Atomic integer and floating-point types</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The list of supported atomic type names are:</p>
 </div>
@@ -8691,6 +8747,8 @@
 The atomic_flag type must be implemented as a 32-bit integer.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="operations-on-atomic-types">Operations on atomic types</h5>
 <div class="paragraph">
@@ -8699,7 +8757,9 @@
 This section specifies each general kind.</p>
 </div>
 <div class="sect5">
-<h6 id="_the_atomic_store_functions"><strong>The atomic_store functions</strong></h6>
+<h6 id="atomic_store"><strong>The atomic_store Functions</strong></h6>
+<div class="openblock">
+<div class="content">
 <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)
@@ -8722,8 +8782,12 @@
 Memory is affected according to the value of <em>order</em>.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect5">
-<h6 id="_the_atomic_load_functions"><strong>The atomic_load functions</strong></h6>
+<h6 id="atomic_load"><strong>The atomic_load Functions</strong></h6>
+<div class="openblock">
+<div class="content">
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="c">C atomic_load(<span class="directive">volatile</span> A *object)
@@ -8743,8 +8807,12 @@
 Atomically returns the value pointed to by <em>object</em>.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect5">
-<h6 id="_the_atomic_exchange_functions"><strong>The atomic_exchange functions</strong></h6>
+<h6 id="atomic_exchange"><strong>The atomic_exchange Functions</strong></h6>
+<div class="openblock">
+<div class="content">
 <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)
@@ -8768,8 +8836,12 @@
 effects.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect5">
-<h6 id="_the_atomic_compare_exchange_functions"><strong>The atomic_compare_exchange functions</strong></h6>
+<h6 id="atomic_compare_exchange"><strong>The atomic_compare_exchange Functions</strong></h6>
+<div class="openblock">
+<div class="content">
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="c"><span class="predefined-type">bool</span> atomic_compare_exchange_strong(
@@ -8862,8 +8934,12 @@
 <p>These generic functions return the result of the comparison.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect5">
-<h6 id="_the_atomic_fetch_and_modify_functions"><strong>The <code>atomic_fetch</code> and modify functions</strong></h6>
+<h6 id="atomic_fetch_key"><strong>The atomic_fetch and modify Functions</strong></h6>
+<div class="openblock">
+<div class="content">
 <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
@@ -8967,17 +9043,21 @@
 effects.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect5">
-<h6 id="_atomic_flag_type_and_operations"><strong>Atomic flag type and operations</strong></h6>
+<h6 id="atomic_flag"><strong>Atomic Flag Type and Operations</strong></h6>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
-<p>The atomic_flag type provides the classic test-and-set functionality.
+<p>The <code>atomic_flag</code> 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).
-Operations on an object of type atomic_flag shall be lock free.</p>
+Operations on an object of type <code>atomic_flag</code> shall be lock free.</p>
 </div>
 <div class="paragraph">
-<p>The macro <code>ATOMIC_FLAG_INIT</code> may be used to initialize an atomic_flag to the
+<p>The macro <code>ATOMIC_FLAG_INIT</code> may be used to initialize an <code>atomic_flag</code> to the
 <em>clear</em> state.
-An atomic_flag that is not explicitly initialized with <code>ATOMIC_FLAG_INIT</code> is
+An <code>atomic_flag</code> that is not explicitly initialized with <code>ATOMIC_FLAG_INIT</code> is
 initially in an indeterminate state.</p>
 </div>
 <div class="paragraph">
@@ -8993,8 +9073,12 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect5">
-<h6 id="_the_atomic_flag_test_and_set_functions"><strong>The atomic_flag_test_and_set functions</strong></h6>
+<h6 id="atomic_flag_test_and_set"><strong>The atomic_flag_test_and_set Functions</strong></h6>
+<div class="openblock">
+<div class="content">
 <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(
@@ -9018,8 +9102,12 @@
 Returns atomically the value of the <code>object</code> immediately before the effects.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect5">
-<h6 id="_the_atomic_flag_clear_functions"><strong>The atomic_flag_clear functions</strong></h6>
+<h6 id="atomic_flag_clear"><strong>The atomic_flag_clear Functions</strong></h6>
+<div class="openblock">
+<div class="content">
 <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)
@@ -9042,8 +9130,12 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect4">
-<h5 id="restrictions-2">Restrictions</h5>
+<h5 id="atomic-restrictions">Restrictions</h5>
+<div class="openblock">
+<div class="content">
 <div class="ulist">
 <ul>
 <li>
@@ -9063,7 +9155,7 @@
 lock-free.</p>
 </li>
 <li>
-<p>The _Atomic type specifier and _Atomic type qualifier are not supported
+<p>The <em>Atomic</em> type specifier and <em>Atomic</em> type qualifier are not supported
 by OpenCL C.</p>
 </li>
 <li>
@@ -9075,8 +9167,12 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="miscellaneous-vector-functions">6.13.12. Miscellaneous Vector Functions</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The OpenCL C programming language implements the following additional
 built-in vector functions.
@@ -9147,8 +9243,6 @@
       each <em>mask</em> element are considered.
       Other bits in the mask shall be ignored.</p>
 </div>
-<div class="openblock">
-<div class="content">
 <div class="paragraph">
 <p>The elements of the input vectors are numbered from left to right across one
 or both of the vectors.
@@ -9188,15 +9282,17 @@
 
 b = shuffle(a, mask); <span class="comment">//  not valid</span></code></pre>
 </div>
-</div>
-</div>
 </div></div></td>
 </tr>
 </tbody>
 </table>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="printf">6.13.13. printf</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The OpenCL C programming language implements the <strong>printf</strong> function.</p>
 </div>
@@ -9227,6 +9323,8 @@
 </tr>
 </tbody>
 </table>
+</div>
+</div>
 <div class="sect4">
 <h5 id="printf-output-synchronization">printf output synchronization</h5>
 <div class="paragraph">
@@ -9767,6 +9865,8 @@
 </div>
 <div class="sect4">
 <h5 id="samplers">Samplers</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The image read functions take a sampler argument.
 The sampler can be passed as an argument to the kernel using
@@ -9913,6 +10013,8 @@
 <p>The maximum number of samplers that can be declared in a kernel can be
 queried using the <code>CL_DEVICE_MAX_SAMPLERS</code> token in <strong>clGetDeviceInfo</strong>.</p>
 </div>
+</div>
+</div>
 <div class="sect5">
 <h6 id="determining-the-border-color-or-value"><strong>Determining the border color or value</strong></h6>
 <div class="paragraph">
@@ -9963,6 +10065,8 @@
 </div>
 <div class="sect4">
 <h5 id="built-in-image-read-functions">Built-in Image Read Functions</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following built-in function calls to read images with a sampler<sup>58</sup> are
 supported.</p>
@@ -10379,8 +10483,12 @@
 </tbody>
 </table>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="built-in-image-sampler-less-read-functions">Built-in Image Sampler-less Read Functions</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The sampler-less image read functions behave exactly as the corresponding
 <a href="#built-in-image-read-functions">built-in image read functions</a> that take
@@ -10691,8 +10799,12 @@
 </tbody>
 </table>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="built-in-image-write-functions">Built-in Image Write Functions</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following built-in function calls to write images are supported.
 Note that image writes to sRGB images are only supported if the
@@ -10974,8 +11086,12 @@
 </tbody>
 </table>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="built-in-image-query-functions">Built-in Image Query Functions</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following built-in function calls to query image information are
 supported.</p>
@@ -11123,6 +11239,8 @@
 channel data type that is an unnormalized unsigned 8-bit integer.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="reading-and-writing-to-the-same-image-in-a-kernel">Reading and writing to the same image in a kernel</h5>
 <div class="paragraph">
@@ -11252,6 +11370,8 @@
 </div>
 <div class="sect3">
 <h4 id="work-group-functions">6.13.15. Work-group Functions</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The OpenCL C programming language implements the following built-in
 functions that operate on a work-group level.
@@ -11390,6 +11510,8 @@
 </table>
 </div>
 </div>
+</div>
+</div>
 <div class="sect3">
 <h4 id="pipe-functions">6.13.16. Pipe Functions</h4>
 <div class="paragraph">
@@ -11463,6 +11585,8 @@
 </div>
 <div class="sect4">
 <h5 id="built-in-pipe-read-and-write-functions">Built-in Pipe Read and Write Functions</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The OpenCL C programming language implements the following built-in
 functions that read from or write to a pipe.
@@ -11551,8 +11675,12 @@
 </tbody>
 </table>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="built-in-work-group-pipe-read-and-write-functions">Built-in Work-group Pipe Read and Write Functions</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The OpenCL C programming language implements the following built-in pipe
 functions that operate at a work-group level.
@@ -11646,8 +11774,12 @@
 implementation defined.</p>
 </div>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="built-in-pipe-query-functions">Built-in Pipe Query Functions</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The OpenCL C programming language implements the following built-in query
 functions for a pipe.
@@ -11691,10 +11823,12 @@
 </tbody>
 </table>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="restrictions-4">Restrictions</h5>
 <div class="paragraph">
-<p>The following behavior is undefined:</p>
+<p>The following behavior is undefined</p>
 </div>
 <div class="ulist">
 <ul>
@@ -11743,6 +11877,8 @@
 </div>
 <div class="sect3">
 <h4 id="enqueuing-kernels">6.13.17. Enqueuing Kernels</h4>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>OpenCL 2.0 allows a kernel to independently enqueue to the same device,
 without host interaction.
@@ -11760,6 +11896,8 @@
 <p>The macro <code>CLK_NULL_EVENT</code> refers to an invalid device event.
 The macro <code>CLK_NULL_QUEUE</code> refers to an invalid device queue.</p>
 </div>
+</div>
+</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 stretch">
@@ -12192,6 +12330,8 @@
 </div>
 <div class="sect4">
 <h5 id="built-in-functions-kernel-query-functions">Built-in Functions - Kernel Query Functions</h5>
+<div class="openblock">
+<div class="content">
 <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>
@@ -12225,8 +12365,12 @@
 </tbody>
 </table>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="built-in-functions-queuing-other-commands">Built-in Functions - Queuing other commands</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following table describes the list of built-in functions that can be
 used to enqueue commands such as a marker.</p>
@@ -12287,8 +12431,12 @@
 </ul>
 </div>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="built-in-functions-event-functions">Built-in Functions - Event Functions</h5>
+<div class="openblock">
+<div class="content">
 <div class="paragraph">
 <p>The following table describes the list of built-in functions that work on
 events.</p>
@@ -12351,26 +12499,51 @@
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock">void <strong>capture_event_profiling_info</strong>(clk_event_t <em>event</em>,
   clk_profiling_info <em>name</em>, global void *<em>value</em>)</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Captures the profiling information for functions that are enqueued as
+<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
+<p>Captures the profiling information for functions that are enqueued as
       commands.
       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.</p>
+</div>
+<div class="paragraph">
+<p><em>event</em> must be an event returned by enqueue_kernel.</p>
+</div>
+<div class="paragraph">
+<p><em>name</em> identifies which profiling information is to be queried and can be:</p>
+</div>
+<div class="paragraph">
+<p><code>CLK_PROFILING_COMMAND_EXEC_TIME</code></p>
+</div>
+<div class="paragraph">
+<p><em>value</em> is a pointer to two 64-bit values.</p>
+</div>
+<div class="paragraph">
+<p>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
+</div>
+<div class="paragraph">
+<p>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]
-====
-The behavior of capture_event_profiling_info when called multiple times for
-the same <em>event</em> is undefined.
-====&#8201;&#8212;&#8201;</p></td>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>The behavior of capture_event_profiling_info when called multiple times for
+the same <em>event</em> is undefined.</p>
+</div>
+</td>
+</tr>
+</table>
+</div></div></td>
 </tr>
 </tbody>
 </table>
@@ -12484,8 +12657,12 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect4">
 <h5 id="built-in-functions-helper-functions">Built-in Functions - Helper Functions</h5>
+<div class="openblock">
+<div class="content">
 <table id="table-builtin-helper" class="tableblock frame-all grid-all stretch">
 <caption class="title">Table 35. Built-in Helper Functions</caption>
 <colgroup>
@@ -12534,6 +12711,8 @@
 </div>
 </div>
 </div>
+</div>
+</div>
 <div class="sect1">
 <h2 id="opencl-numerical-compliance">7. OpenCL Numerical Compliance</h2>
 <div class="sectionbody">
@@ -12773,6 +12952,10 @@
 <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>clamp</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>copysign</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
 </tr>
@@ -12789,6 +12972,22 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 4 ulp</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cross</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 'max * max * (3 * FLT_EPSILON)', where max is the maximum input operand value</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>degrees</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 2 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>distance</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 3 + (1.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>dot</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 'max * max * (2 * (n - 1)) * FLT_EPSILON', For vector width n and maximum input operand value 'max'</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">≤ 16 ulp</p></td>
 </tr>
@@ -12857,6 +13056,10 @@
 <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>length</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 3 + 0.5 * 0.5 * n) + (0.5 * (n - 1) ulp, for gentype with vector width n</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>
@@ -12887,14 +13090,26 @@
                           correctly rounded</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>max</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>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>min</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>mix</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 1e-3</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>
@@ -12907,6 +13122,10 @@
 <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>normalize</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 2.5 + (0.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</p></td>
+</tr>
+<tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>pow</strong>(<em>x</em>, <em>y</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 16 ulp</p></td>
 </tr>
@@ -12919,6 +13138,10 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 16 ulp</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>radians</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 2 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>
@@ -12943,6 +13166,10 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 2 ulp</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sign</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>sin</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 4 ulp</p></td>
 </tr>
@@ -12959,10 +13186,18 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 4 ulp</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>smoothstep</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 1e-5</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">≤ 3 ulp</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>step</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>tan</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 5 ulp</p></td>
 </tr>
@@ -13047,6 +13282,22 @@
 <td class="tableblock halign-left valign-top"></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>fast_distance</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 8192 + (1.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>fast_length</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 8192 + (0.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>fast_normalize</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 8192.5 + (0.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</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>native_cos</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Implementation-defined</p></td>
 </tr>
@@ -13202,6 +13453,10 @@
 <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>clamp</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>copysign</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
 </tr>
@@ -13218,6 +13473,22 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 4 ulp</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cross</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>degrees</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 2 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>distance</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>dot</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>erfc</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 16 ulp</p></td>
 </tr>
@@ -13290,6 +13561,10 @@
 <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>length</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>log</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 4 ulp</p></td>
 </tr>
@@ -13314,14 +13589,26 @@
 <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"><strong>max</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>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>min</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>mix</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>modf</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
 </tr>
@@ -13330,6 +13617,10 @@
 <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>normalize</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>nextafter</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
 </tr>
@@ -13346,6 +13637,10 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 16 ulp</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>radians</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 2 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>
@@ -13370,6 +13665,10 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 4 ulp</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sign</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>sin</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 4 ulp</p></td>
 </tr>
@@ -13386,10 +13685,18 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 4 ulp</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>smoothstep</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>sqrt</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 4 ulp</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>step</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>tan</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 5 ulp</p></td>
 </tr>
@@ -13474,6 +13781,22 @@
 <td class="tableblock halign-left valign-top"></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>fast_distance</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>fast_length</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>fast_normalize</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"></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>native_cos</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Implementation-defined</p></td>
 </tr>
@@ -13864,6 +14187,10 @@
 <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>clamp</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>copysign</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
 </tr>
@@ -13880,6 +14207,22 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 4 ulp</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cross</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 'max * max * (3 * FLT_EPSILON)', where max is the maximum input operand value</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>degrees</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 2 ulp</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>distance</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 2 * (3 + 0.5 * 1.5 * n) + (0.5 * (n - 1)) For vector width n</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>dot</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 'max * max * (2 * (n - 1)) * FLT_EPSILON', For vector width n and maximum input operand value 'max'</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">≤ 16 ulp</p></td>
 </tr>
@@ -13948,6 +14291,10 @@
 <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>length</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 2 * (3 + 0.5 * 0.5 * n) + (0.5 * (n - 1)) For vector width n</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>
@@ -13976,14 +14323,26 @@
 <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"><strong>max</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>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>min</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>mix</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>modf</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
 </tr>
@@ -13996,6 +14355,10 @@
 <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>normalize</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 2 * (2.5 + 0.5 * 0.5 * n) + (0.5 * (n - 1)) For vector width n</p></td>
+</tr>
+<tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>pow</strong>(<em>x</em>, <em>y</em>)</p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 16 ulp</p></td>
 </tr>
@@ -14008,6 +14371,10 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 16 ulp</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>radians</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">≤ 2 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>
@@ -14032,6 +14399,10 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 2 ulp</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sign</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>sin</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 4 ulp</p></td>
 </tr>
@@ -14048,6 +14419,14 @@
 <td class="tableblock halign-left valign-top"><p class="tableblock">≤ 4 ulp</p></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>smoothstep</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>step</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>fsqrt</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Correctly rounded</p></td>
 </tr>
@@ -15731,13 +16110,192 @@
 </li>
 </ol>
 </div>
+<div style="page-break-after: always;"></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_acknowledgements">10. Acknowledgements</h2>
+<div class="sectionbody">
+<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>
+Jon Leech, Independent<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>
+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, StreamHPC<br>
+Jakub Szuppe, StreamHPC<br>
+Vincent Hindriksen, StreamHPC<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>
 </div>
 </div>
 <div id="footer">
 <div id="footer-text">
-Version v2.2-10<br>
-Last updated 2019-02-05 16:03:11 EST
+Version V2.2-11<br>
+Last updated 2019-07-19 09:52:48 EDT
 </div>
 </div>
 
diff --git a/specs/2.2/html/OpenCL_Cxx.html b/specs/2.2/html/OpenCL_Cxx.html
index 974e5e4..bd3ee09 100644
--- a/specs/2.2/html/OpenCL_Cxx.html
+++ b/specs/2.2/html/OpenCL_Cxx.html
@@ -841,9 +841,9 @@
 <h1>The OpenCL<sup>&#8482;</sup> C++ 1.0 Specification</h1>
 <div class="details">
 <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>
+<span id="revnumber">version V2.2-11,</span>
+<span id="revdate">Fri, 19 Jul 2019 14:11:30 +0000</span>
+<br><span id="revremark">from git branch: master commit: 2aaf7b58ead9567d8799b22ecc748b4892a1e04e</span>
 </div>
 <div id="toc" class="toc2">
 <div id="toctitle">Table of Contents</div>
@@ -971,97 +971,6 @@
 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">
@@ -9616,7 +9525,7 @@
 </ul>
 </div>
 <div class="paragraph">
-<p>The following behavior is undefined:</p>
+<p>The following behavior is undefined</p>
 </div>
 <div class="ulist">
 <ul>
@@ -9657,7 +9566,7 @@
 </ul>
 </div>
 <div class="paragraph">
-<p>The following behavior is undefined:</p>
+<p>The following behavior is undefined</p>
 </div>
 <div class="ulist">
 <ul>
@@ -20924,14 +20833,105 @@
 <div id="ftn35" class="paragraph">
 <p><a href="#ftnref35">[35]</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.</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>
 </div>
 </div>
 </div>
 <div id="footer">
 <div id="footer-text">
-Version v2.2-10<br>
-Last updated 2019-02-05 16:03:11 EST
+Version V2.2-11<br>
+Last updated 2019-07-19 08:25:57 EDT
 </div>
 </div>
 
diff --git a/specs/2.2/html/OpenCL_Env.html b/specs/2.2/html/OpenCL_Env.html
index abb366c..84936be 100644
--- a/specs/2.2/html/OpenCL_Env.html
+++ b/specs/2.2/html/OpenCL_Env.html
@@ -841,85 +841,64 @@
 <h1>The OpenCL<sup>&#8482;</sup> SPIR-V Environment Specification</h1>
 <div class="details">
 <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>
+<span id="revnumber">version V2.2-11,</span>
+<span id="revdate">Fri, 19 Jul 2019 14:09:33 +0000</span>
+<br><span id="revremark">from git branch: master commit: 2aaf7b58ead9567d8799b22ecc748b4892a1e04e</span>
 </div>
 <div id="toc" class="toc2">
 <div id="toctitle">Table of Contents</div>
 <ul class="sectlevel1">
 <li><a href="#introduction">1. Introduction</a></li>
-<li><a href="#consumption">2. SPIR-V Consumption</a>
+<li><a href="#common-properties">2. Common Properties</a>
 <ul class="sectlevel2">
-<li><a href="#_validation_rules">2.1. Validation Rules</a></li>
-<li><a href="#_source_language_encoding">2.2. Source Language Encoding</a></li>
-<li><a href="#_numerical_type_formats">2.3. Numerical Type Formats</a></li>
-<li><a href="#_supported_types">2.4. Supported Types</a></li>
-<li><a href="#_image_channel_order_mapping">2.5. Image Channel Order Mapping</a></li>
-<li><a href="#_image_channel_data_type_mapping">2.6. Image Channel Data Type Mapping</a></li>
-<li><a href="#_kernels">2.7. Kernels</a></li>
-<li><a href="#_kernel_return_types">2.8. Kernel Return Types</a></li>
-<li><a href="#_kernel_arguments">2.9. Kernel Arguments</a></li>
+<li><a href="#_supported_spir_v_versions">2.1. Supported SPIR-V Versions</a></li>
+<li><a href="#_extended_instruction_sets">2.2. Extended Instruction Sets</a></li>
+<li><a href="#_source_language_encoding">2.3. Source Language Encoding</a></li>
+<li><a href="#_numerical_type_formats">2.4. Numerical Type Formats</a></li>
+<li><a href="#_supported_types">2.5. Supported Types</a></li>
+<li><a href="#_image_channel_order_mapping">2.6. Image Channel Order Mapping</a></li>
+<li><a href="#_image_channel_data_type_mapping">2.7. Image Channel Data Type Mapping</a></li>
+<li><a href="#_kernels">2.8. Kernels</a></li>
 </ul>
 </li>
-<li><a href="#opencl2_2">3. OpenCL 2.2</a>
+<li><a href="#required-capabilities">3. Required Capabilities</a>
 <ul class="sectlevel2">
-<li><a href="#_full_profile">3.1. Full Profile</a></li>
-<li><a href="#_embedded_profile">3.2. Embedded Profile</a></li>
-<li><a href="#_validation_rules_2">3.3. Validation Rules</a></li>
+<li><a href="#required-capabilities-1.0">3.1. SPIR-V 1.0</a></li>
+<li><a href="#required-capabilities-1.1">3.2. SPIR-V 1.1</a></li>
+<li><a href="#required-capabilities-1.2">3.3. SPIR-V 1.2</a></li>
 </ul>
 </li>
-<li><a href="#opencl2_1">4. OpenCL 2.1</a>
+<li><a href="#validation-rules">4. Validation Rules</a></li>
+<li><a href="#opencl_extensions">5. OpenCL Extensions</a>
 <ul class="sectlevel2">
-<li><a href="#_full_profile_2">4.1. Full Profile</a></li>
-<li><a href="#_embedded_profile_2">4.2. Embedded Profile</a></li>
-<li><a href="#_validation_rules_3">4.3. Validation Rules</a></li>
+<li><a href="#_declaring_spir_v_extensions">5.1. Declaring SPIR-V Extensions</a></li>
+<li><a href="#_full_and_embedded_profile_extensions">5.2. Full and Embedded Profile Extensions</a></li>
+<li><a href="#_embedded_profile_extensions">5.3. Embedded Profile Extensions</a></li>
 </ul>
 </li>
-<li><a href="#opencl2_0">5. OpenCL 2.0</a>
+<li><a href="#numerical_compliance">6. OpenCL Numerical Compliance</a>
 <ul class="sectlevel2">
-<li><a href="#_full_profile_3">5.1. Full Profile</a></li>
-<li><a href="#_embedded_profile_3">5.2. Embedded Profile</a></li>
-<li><a href="#_validation_rules_4">5.3. Validation Rules</a></li>
+<li><a href="#_rounding_modes">6.1. Rounding Modes</a></li>
+<li><a href="#_rounding_modes_for_conversions">6.2. Rounding Modes for Conversions</a></li>
+<li><a href="#_out_of_range_conversions">6.3. Out-of-Range Conversions</a></li>
+<li><a href="#_inf_nan_and_denormalized_numbers">6.4. INF, NaN, and Denormalized Numbers</a></li>
+<li><a href="#_floating_point_exceptions">6.5. Floating-Point Exceptions</a></li>
+<li><a href="#relative-error-as-ulps">6.6. Relative Error as ULPs</a></li>
+<li><a href="#_edge_case_behavior">6.7. Edge Case Behavior</a></li>
 </ul>
 </li>
-<li><a href="#opencl1_2">6. OpenCL 1.2</a>
+<li><a href="#image_addressing_and_filtering">7. Image Addressing and Filtering</a>
 <ul class="sectlevel2">
-<li><a href="#_full_profile_4">6.1. Full Profile</a></li>
-<li><a href="#_embedded_profile_4">6.2. Embedded Profile</a></li>
-<li><a href="#_validation_rules_5">6.3. Validation Rules</a></li>
+<li><a href="#image-coordinates">7.1. Image Coordinates</a></li>
+<li><a href="#addressing-and-filter-modes">7.2. Addressing and Filter Modes</a></li>
+<li><a href="#precision-of-addressing-and-filter-modes">7.3. Precision of Addressing and Filter Modes</a></li>
+<li><a href="#conversion-rules">7.4. Conversion Rules</a></li>
+<li><a href="#selecting-an-image-from-an-image-array">7.5. Selecting an Image from an Image Array</a></li>
+<li><a href="#_data_format_for_reading_and_writing_images">7.6. Data Format for Reading and Writing Images</a></li>
+<li><a href="#_sampled_and_sampler_less_reads">7.7. Sampled and Sampler-less Reads</a></li>
 </ul>
 </li>
-<li><a href="#opencl_extensions">7. OpenCL Extensions</a>
-<ul class="sectlevel2">
-<li><a href="#_declaring_spir_v_extensions">7.1. Declaring SPIR-V Extensions</a></li>
-<li><a href="#_full_and_embedded_profile_extensions">7.2. Full and Embedded Profile Extensions</a></li>
-<li><a href="#_embedded_profile_extensions">7.3. Embedded Profile Extensions</a></li>
-</ul>
-</li>
-<li><a href="#numerical_compliance">8. OpenCL Numerical Compliance</a>
-<ul class="sectlevel2">
-<li><a href="#_rounding_modes">8.1. Rounding Modes</a></li>
-<li><a href="#_rounding_modes_for_conversions">8.2. Rounding Modes for Conversions</a></li>
-<li><a href="#_out_of_range_conversions">8.3. Out-of-Range Conversions</a></li>
-<li><a href="#_inf_nan_and_denormalized_numbers">8.4. INF, NaN, and Denormalized Numbers</a></li>
-<li><a href="#_floating_point_exceptions">8.5. Floating-Point Exceptions</a></li>
-<li><a href="#relative-error-as-ulps">8.6. Relative Error as ULPs</a></li>
-<li><a href="#_edge_case_behavior">8.7. Edge Case Behavior</a></li>
-</ul>
-</li>
-<li><a href="#image_addressing_and_filtering">9. Image Addressing and Filtering</a>
-<ul class="sectlevel2">
-<li><a href="#image-coordinates">9.1. Image Coordinates</a></li>
-<li><a href="#addressing-and-filter-modes">9.2. Addressing and Filter Modes</a></li>
-<li><a href="#precision-of-addressing-and-filter-modes">9.3. Precision of Addressing and Filter Modes</a></li>
-<li><a href="#conversion-rules">9.4. Conversion Rules</a></li>
-<li><a href="#selecting-an-image-from-an-image-array">9.5. Selecting an Image from an Image Array</a></li>
-<li><a href="#_data_format_for_reading_and_writing_images">9.6. Data Format for Reading and Writing Images</a></li>
-<li><a href="#_sampled_and_sampler_less_reads">9.7. Sampled and Sampler-less Reads</a></li>
-</ul>
-</li>
-<li><a href="#references">10. Normative References</a></li>
+<li><a href="#references">8. Normative References</a></li>
 </ul>
 </div>
 </div>
@@ -975,41 +954,40 @@
 <h2 id="introduction">1. Introduction</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p><a href="#opencl-spec"><strong>OpenCL</strong></a> (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>
+<p><a href="#opencl-spec">OpenCL</a> 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
+heterogeneous processing platforms.</p>
 </div>
 <div class="paragraph">
-<p>Parallel programs in OpenCL may be written in the <a href="#opencl-c-spec">OpenCL C</a>
-source language, or may compiled from OpenCL C, <a href="#opencl-cpp-spec">OpenCL
-C++</a>, or other source languages into SPIR-V modules.</p>
+<p><a href="#spirv-spec">SPIR-V</a> is an open, royalty-free, standard intermediate
+language capable of representing parallel compute kernels that are executed
+by implementations of the OpenCL standard.</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>
+<p>SPIR-V is adaptable to multiple execution environments: a SPIR-V module is
+consumed by an execution environment, as specified by a client API.
+This document describes the SPIR-V execution environment for implementations
+of the OpenCL standard.
+The SPIR-V execution environment describes required support for some SPIR-V
+capabilities, additional semantics for some SPIR-V instructions, and
+additional validation rules that a SPIR-V binary 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>
+<p>This document is written for compiler developers who are generating SPIR-V
+modules intended to be consumed by the OpenCL API, for implementors of the
+OpenCL API who are consuming SPIR-V modules, and for software developers who
+are using SPIR-V modules with the OpenCL API.</p>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="consumption">2. SPIR-V Consumption</h2>
+<h2 id="common-properties">2. Common Properties</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>
+<p>This section describes common properties of all OpenCL environments that
+consume SPIR-V modules.</p>
 </div>
 <div class="paragraph">
 <p>A SPIR-V module passed to an OpenCL environment is interpreted as a series
@@ -1019,111 +997,34 @@
 version number, as described in the SPIR-V specification.</p>
 </div>
 <div class="sect2">
-<h3 id="_validation_rules">2.1. Validation Rules</h3>
+<h3 id="_supported_spir_v_versions">2.1. Supported SPIR-V Versions</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>
+<p>An OpenCL environment describes the versions of SPIR-V modules that it
+supports using the <code>CL_DEVICE_IL_VERSION</code> query in OpenCL 2.1 or newer, or the
+<code>CL_DEVICE_IL_VERSION_KHR</code> query in the <code>cl_khr_il_program</code> extension.</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 <code>32</code> for <code>CL_DEVICE_ADDRESS_BITS</code>.</p>
-</li>
-<li>
-<p>Modules indicating a <strong>Physical64</strong> <em>Addressing Model</em> are valid for
-OpenCL devices reporting <code>64</code> for <code>CL_DEVICE_ADDRESS_BITS</code>.</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>OpTypeInt</strong> integer type-declaration instructions:</p>
-<div class="ulist">
-<ul>
-<li>
-<p><em>Signedness</em> must be 0, indicating no signedness semantics.</p>
-</li>
-</ul>
-</div>
-</li>
-<li>
-<p>For all <strong>OpTypeImage</strong> type-declaration instructions:</p>
-<div class="ulist">
-<ul>
-<li>
-<p><em>Sampled Type</em> must be <strong>OpTypeVoid</strong>.</p>
-</li>
-<li>
-<p><em>Sampled</em> must be 0, indicating that the image usage will be known at
-run time, not at compile time.</p>
-</li>
-<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>
-<li>
-<p><em>Image Format</em> must be <strong>Unknown</strong>, indicating that the image does not
-have a specified format.</p>
-</li>
-<li>
-<p>The optional image <em>Access Qualifier</em> must be present.</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> and <strong>OpImageSampleExplicitLod</strong>
-must not include the optional <em>Image Operand</em> <strong>ConstOffset</strong>.</p>
-</li>
-<li>
-<p>For all <strong>Atomic Instructions</strong>:</p>
-<div class="ulist">
-<ul>
-<li>
-<p>Only 32-bit integer types are supported for the <em>Result Type</em> and/or
-type of <em>Value</em>.</p>
-</li>
-<li>
-<p>The <em>Pointer</em> operand must be a pointer to the <strong>Function</strong>, <strong>Workgroup</strong>,
-or <strong>CrossWorkGroup</strong> <em>Storage Classes</em>.  Note that an <strong>Atomic Instruction</strong>
-on a pointer to the <strong>Function</strong> <em>Storage Class</em> is valid, but does not
-have defined behavior.</p>
-</li>
-</ul>
-</div>
-</li>
-<li>
-<p>Recursion is not supported.
-The static function call graph for an entry point must not contain
-cycles.</p>
-</li>
-<li>
-<p>Whether irreducible control flow is legal is implementation defined.</p>
-</li>
-</ul>
+<div class="paragraph">
+<p>OpenCL environments that support the <code>cl_khr_il_program</code> extension or
+OpenCL 2.1 must support SPIR-V 1.0 modules.  OpenCL environments that support
+OpenCL 2.2 must support SPIR-V 1.0, 1.1, and 1.2 modules.</p>
 </div>
 </div>
 <div class="sect2">
-<h3 id="_source_language_encoding">2.2. Source Language Encoding</h3>
+<h3 id="_extended_instruction_sets">2.2. Extended Instruction Sets</h3>
+<div class="paragraph">
+<p>OpenCL environments supporting SPIR-V must support SPIR-V modules that import
+the <strong>OpenCL.std</strong>
+<a href="#opencl-extended-instruction-set">extended instruction set for OpenCL</a>
+using <strong>OpExtInstImport</strong>. For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>... = OpExtInstImport "OpenCL.std"</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_source_language_encoding">2.3. 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
@@ -1136,15 +1037,10 @@
 </div>
 </div>
 <div class="paragraph">
-<p>Hence, OpenCL C 1.2 would be encoded as <code>0x00010200</code>, and OpenCL C 2.0 as
-<code>0x00020000</code>.</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 <code>0x00020200</code>.</p>
+version of OpenCL C++, encoded similarly.</p>
 </div>
 <div class="paragraph">
 <p>The source language version is purely informational and has no semantic
@@ -1152,7 +1048,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_numerical_type_formats">2.3. Numerical Type Formats</h3>
+<h3 id="_numerical_type_formats">2.4. Numerical Type Formats</h3>
 <div class="paragraph">
 <p>For all OpenCL environments, floating-point types are represented and stored
 using <a href="#ieee-754-spec">IEEE-754</a> semantics.
@@ -1160,7 +1056,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_supported_types">2.4. Supported Types</h3>
+<h3 id="_supported_types">2.5. Supported Types</h3>
 <div class="paragraph">
 <p>The following types are supported by OpenCL environments.
 Note that some types may require additional capabilities, and may not be
@@ -1172,7 +1068,7 @@
 and pointers declared using <strong>OpTypePointer</strong>.</p>
 </div>
 <div class="sect3">
-<h4 id="_basic_scalar_and_vector_types">2.4.1. Basic Scalar and Vector Types</h4>
+<h4 id="_basic_scalar_and_vector_types">2.5.1. Basic Scalar and Vector Types</h4>
 <div class="paragraph">
 <p><strong>OpTypeVoid</strong> is supported.</p>
 </div>
@@ -1201,7 +1097,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="_image_related_data_types">2.4.2. Image-Related Data Types</h4>
+<h4 id="_image_related_data_types">2.5.2. Image-Related Data Types</h4>
 <div class="paragraph">
 <p>The following table describes the <strong>OpTypeImage</strong> image types supported by
 OpenCL environments:</p>
@@ -1214,13 +1110,15 @@
 <col style="width: 16.6666%;">
 <col style="width: 50.0002%;">
 </colgroup>
-<tbody>
+<thead>
 <tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><em>Dim</em></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><em>Depth</em></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><em>Arrayed</em></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Description</strong></p></td>
+<th class="tableblock halign-left valign-top"><em>Dim</em></th>
+<th class="tableblock halign-left valign-top"><em>Depth</em></th>
+<th class="tableblock halign-left valign-top"><em>Arrayed</em></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>1D</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><code>0</code></p></td>
@@ -1276,7 +1174,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="_other_data_types">2.4.3. Other Data Types</h4>
+<h4 id="_other_data_types">2.5.3. Other Data Types</h4>
 <div class="paragraph">
 <p>The following table describes other data types that may be used in an
 OpenCL environment:</p>
@@ -1287,22 +1185,24 @@
 <col style="width: 50%;">
 <col style="width: 50%;">
 </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>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>OpTypeEvent</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">OpenCL event type.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">OpenCL event representing async copies from global to local memory and vice-versa.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>OpTypeDeviceEvent</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">OpenCL device-side event type.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">OpenCL device-side event representing commands enqueued to device command queues.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>OpTypePipe</strong></p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">OpenCL pipe type</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">OpenCL pipe.</p></td>
 </tr>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>OpTypeReserveId</strong></p></td>
@@ -1317,7 +1217,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_image_channel_order_mapping">2.5. Image Channel Order Mapping</h3>
+<h3 id="_image_channel_order_mapping">2.6. 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
@@ -1416,7 +1316,7 @@
 </table>
 </div>
 <div class="sect2">
-<h3 id="_image_channel_data_type_mapping">2.6. Image Channel Data Type Mapping</h3>
+<h3 id="_image_channel_data_type_mapping">2.7. 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
@@ -1503,22 +1403,21 @@
 </table>
 </div>
 <div class="sect2">
-<h3 id="_kernels">2.7. Kernels</h3>
+<h3 id="_kernels">2.8. 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">2.8. Kernel Return Types</h3>
+<div class="sect3">
+<h4 id="_kernel_return_types">2.8.1. Kernel Return Types</h4>
 <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">2.9. Kernel Arguments</h3>
+<div class="sect3">
+<h4 id="_kernel_arguments">2.8.2. Kernel Arguments</h4>
 <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.
@@ -1611,201 +1510,223 @@
 </div>
 </div>
 </div>
+</div>
 <div class="sect1">
-<h2 id="opencl2_2">3. OpenCL 2.2</h2>
+<h2 id="required-capabilities">3. Required Capabilities</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="required-capabilities-1.0">3.1. SPIR-V 1.0</h3>
+<div class="paragraph">
+<p>An OpenCL environment that supports SPIR-V 1.0 must support SPIR-V 1.0
+modules that declare the following capabilities:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><strong>Addresses</strong></p>
+</li>
+<li>
+<p><strong>Float16Buffer</strong></p>
+</li>
+<li>
+<p><strong>Int64</strong> (Full Profile Only)</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>
+<li>
+<p><strong>DeviceEnqueue</strong> (OpenCL 2.0 and Newer)</p>
+</li>
+<li>
+<p><strong>GenericPointer</strong> (OpenCL 2.0 and Newer)</p>
+</li>
+<li>
+<p><strong>Groups</strong> (OpenCL 2.0 and Newer)</p>
+</li>
+<li>
+<p><strong>Pipes</strong> (OpenCL 2.0 and Newer)</p>
+</li>
+<li>
+<p><strong>ImageBasic</strong> (if <code>CL_DEVICE_IMAGE_SUPPORT</code> is <code>CL_TRUE</code>)</p>
+</li>
+<li>
+<p><strong>Float64</strong> (if the device supports double precision floating-point)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>If the OpenCL environment supports the <strong>ImageBasic</strong> capability, 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>
+<li>
+<p><strong>ImageReadWrite</strong> (OpenCL 2.0 and Newer)</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="required-capabilities-1.1">3.2. SPIR-V 1.1</h3>
+<div class="paragraph">
+<p>An OpenCL environment supporting SPIR-V 1.1 must support SPIR-V 1.1
+modules that declare the capabilities required for SPIR-V 1.0 modules,
+above.</p>
+</div>
+<div class="paragraph">
+<p>In addition, an OpenCL environment consuming SPIR-V 1.1 must support
+SPIR-V 1.1 modules that declare the following capabilities:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><strong>SubgroupDispatch</strong> (OpenCL 2.2 and Newer)</p>
+</li>
+<li>
+<p><strong>PipeStorage</strong> (OpenCL 2.2 and Newer)</p>
+</li>
+<li>
+<p><strong>Initializer</strong> (OpenCL 2.2 and Newer)</p>
+</li>
+<li>
+<p><strong>Finalizer</strong> (OpenCL 2.2 and Newer)</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="required-capabilities-1.2">3.3. SPIR-V 1.2</h3>
+<div class="paragraph">
+<p>An OpenCL environment supporting SPIR-V 1.2 must support SPIR-V 1.2
+modules that declare the capabilities required for SPIR-V 1.1 modules,
+above.</p>
+</div>
+<div class="paragraph">
+<p>SPIR-V 1.2 does not add any new required capabilities.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="validation-rules">4. Validation Rules</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>
+<p>The following are a list of validation rules that apply to SPIR-V modules
+executing in all OpenCL environments:</p>
 </div>
-<div class="sect2">
-<h3 id="_full_profile">3.1. Full Profile</h3>
 <div class="paragraph">
-<p>An OpenCL 2.2 Full Profile environment is guaranteed to support the
-following SPIR-V capabilities:</p>
+<p>The <em>Execution Model</em> declared in <strong>OpEntryPoint</strong> must be <strong>Kernel</strong>.</p>
+</div>
+<div class="paragraph">
+<p>The <em>Addressing Model</em> declared in <strong>OpMemoryModel</strong> must be either:</p>
 </div>
 <div class="ulist">
 <ul>
 <li>
-<p><strong>Address</strong></p>
+<p><strong>Physical32</strong> (for OpenCL devices reporting <code>32</code> for <code>CL_DEVICE_ADDRESS_BITS</code>)</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>
+<p><strong>Physical64</strong> (for OpenCL devices reporting <code>64</code> for <code>CL_DEVICE_ADDRESS_BITS</code>)</p>
 </li>
 </ul>
 </div>
 <div class="paragraph">
-<p>The following capabilities may be optionally supported:</p>
+<p>The <em>Memory Model</em> declared in <strong>OpMemoryModel</strong> must be <strong>OpenCL</strong>.</p>
+</div>
+<div class="paragraph">
+<p>For all <strong>OpTypeInt</strong> integer type-declaration instructions:</p>
 </div>
 <div class="ulist">
 <ul>
 <li>
-<p><strong>ImageBasic</strong>, if <code>CL_DEVICE_IMAGE_SUPPORT</code> is <code>CL_TRUE</code></p>
-</li>
-<li>
-<p><strong>Float64</strong>, if the device supports double precision floating-point</p>
+<p><em>Signedness</em> must be 0, indicating no signedness semantics.</p>
 </li>
 </ul>
 </div>
 <div class="paragraph">
-<p>If <strong>ImageBasic</strong> is supported then the following capabilities must also be
-supported:</p>
+<p>For all <strong>OpTypeImage</strong> type-declaration instructions:
+  * <em>Sampled Type</em> must be <strong>OpTypeVoid</strong>.
+  * <em>Sampled</em> must be 0, indicating that the image usage will be known at
+     run time, not at compile time.
+  * <em>MS</em> must be 0, indicating single-sampled content.
+  * <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>.
+  * <em>Image Format</em> must be <strong>Unknown</strong>, indicating that the image does not
+     have a specified format.
+  * The optional image <em>Access Qualifier</em> must be present.</p>
+</div>
+<div class="paragraph">
+<p>The image write instruction <strong>OpImageWrite</strong> must not include any optional
+<em>Image Operands</em>.</p>
+</div>
+<div class="paragraph">
+<p>The image read instructions <strong>OpImageRead</strong> and <strong>OpImageSampleExplicitLod</strong>
+must not include the optional <em>Image Operand</em> <strong>ConstOffset</strong>.</p>
+</div>
+<div class="paragraph">
+<p>For all <strong>Atomic Instructions</strong>:</p>
 </div>
 <div class="ulist">
 <ul>
 <li>
-<p><strong>ImageReadWrite</strong></p>
+<p>Only 32-bit integer types are supported for the <em>Result Type</em> and/or
+type of <em>Value</em>.</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>
+<p>The <em>Pointer</em> operand must be a pointer to the <strong>Function</strong>, <strong>Workgroup</strong>,
+or <strong>CrossWorkGroup</strong> <em>Storage Classes</em>.  Note that an <strong>Atomic Instruction</strong>
+on a pointer to the <strong>Function</strong> <em>Storage Class</em> is valid, but does not
+have defined behavior.</p>
 </li>
 </ul>
 </div>
-</div>
-<div class="sect2">
-<h3 id="_embedded_profile">3.2. Embedded Profile</h3>
 <div class="paragraph">
-<p>An OpenCL 2.2 Embedded Profile environment is guaranteed to support the
-following SPIR-V capabilities:</p>
+<p>Recursion is not supported.
+The static function call graph for an entry point must not contain cycles.</p>
+</div>
+<div class="paragraph">
+<p>Whether irreducible control flow is legal is implementation defined.</p>
+</div>
+<div class="paragraph">
+<p>For the instructions <strong>OpGroupAsyncCopy</strong> and <strong>OpGroupWaitEvents</strong>,
+<em>Scope</em> for <em>Execution</em> must be:</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>
+<p><strong>Workgroup</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 <code>CL_DEVICE_IMAGE_SUPPORT</code> is <code>CL_TRUE</code></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">3.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.2 environment:</p>
-</div>
-<div class="paragraph">
-<p><em>Scope</em> for <em>Execution</em> is generally limited to:</p>
+<p>For all other instructions, <em>Scope</em> for <em>Execution</em> must be one of:</p>
 </div>
 <div class="ulist">
 <ul>
@@ -1813,12 +1734,23 @@
 <p><strong>Workgroup</strong></p>
 </li>
 <li>
-<p><strong>Subgroup</strong></p>
+<p><strong>Subgroup</strong> (OpenCL 2.1 and Newer)</p>
 </li>
 </ul>
 </div>
 <div class="paragraph">
-<p><em>Scope</em> for <em>Memory</em> is generally limited to:</p>
+<p>In an OpenCL 1.2 environment,
+for the <strong>Barrier Instructions</strong> <strong>OpControlBarrier</strong> and <strong>OpMemoryBarrier</strong>, the
+<em>Scope</em> for <em>Memory</em> must be <strong>Workgroup</strong>, and the memory-order constraint in
+<em>Memory Semantics</em> must be <strong>SequentiallyConsistent</strong>.</p>
+</div>
+<div class="paragraph">
+<p>In an OpenCL 1.2 environment,
+for the <strong>Atomic Instructions</strong>, the <em>Scope</em> for <em>Memory</em> must be <strong>Device</strong>,
+and the memory-order constraint in <em>Memory Semantics</em> must be <strong>Relaxed</strong>.</p>
+</div>
+<div class="paragraph">
+<p>Otherwise, <em>Scope</em> for <em>Memory</em> must be one of:</p>
 </div>
 <div class="ulist">
 <ul>
@@ -1834,727 +1766,22 @@
 <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>
+<p><strong>Subgroup</strong> (OpenCL 2.1 and Newer)</p>
 </li>
 </ul>
 </div>
 <div class="paragraph">
-<p>The <em>Pointer</em> operand to all <strong>Atomic Instructions</strong> may additionally be a
-pointer to the <strong>Generic</strong> <em>Storage Class</em>, however behavior is still
-undefined if the <strong>Generic</strong> pointer represents a pointer to the <strong>Function</strong>
+<p>In OpenCL 2.0 and newer environments,
+the <em>Pointer</em> operand to all <strong>Atomic Instructions</strong> may be a pointer to
+the <strong>Generic</strong> <em>Storage Class</em>, however behavior is still undefined if
+the <strong>Generic</strong> pointer represents a pointer to the <strong>Function</strong>
 <em>Storage Class</em>.</p>
 </div>
 </div>
 </div>
-</div>
 <div class="sect1">
-<h2 id="opencl2_1">4. 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">4.1. 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 <code>CL_DEVICE_IMAGE_SUPPORT</code> is <code>CL_TRUE</code></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">4.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 <code>CL_DEVICE_IMAGE_SUPPORT</code> is <code>CL_TRUE</code></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">4.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 class="paragraph">
-<p>The <em>Pointer</em> operand to all <strong>Atomic Instructions</strong> may additionally be a
-pointer to the <strong>Generic</strong> <em>Storage Class</em>, however behavior is still
-undefined if the <strong>Generic</strong> pointer represents a pointer to the <strong>Function</strong>
-<em>Storage Class</em>.</p>
-</div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="opencl2_0">5. 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 <code>cl_khr_il_program</code> in the host API
-<code>CL_PLATFORM_EXTENSIONS</code> or <code>CL_DEVICE_EXTENSIONS</code> string.</p>
-</div>
-<div class="sect2">
-<h3 id="_full_profile_3">5.1. 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 <code>CL_DEVICE_IMAGE_SUPPORT</code> is <code>CL_TRUE</code></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">5.2. 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 <code>CL_DEVICE_IMAGE_SUPPORT</code> is <code>CL_TRUE</code></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">5.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.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 class="paragraph">
-<p>The <em>Pointer</em> operand to all <strong>Atomic Instructions</strong> may additionally be a
-pointer to the <strong>Generic</strong> <em>Storage Class</em>, however behavior is still
-undefined if the <strong>Generic</strong> pointer represents a pointer to the <strong>Function</strong>
-<em>Storage Class</em>.</p>
-</div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="opencl1_2">6. 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 <code>cl_khr_il_program</code> in the host API
-<code>CL_PLATFORM_EXTENSIONS</code> or <code>CL_DEVICE_EXTENSIONS</code> string.</p>
-</div>
-<div class="sect2">
-<h3 id="_full_profile_4">6.1. 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 <code>CL_DEVICE_IMAGE_SUPPORT</code> is <code>CL_TRUE</code></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">6.2. 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 <code>CL_DEVICE_IMAGE_SUPPORT</code> is <code>CL_TRUE</code></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">6.3. 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">7. OpenCL Extensions</h2>
+<h2 id="opencl_extensions">5. OpenCL Extensions</h2>
 <div class="sectionbody">
 <div class="paragraph">
 <p>An OpenCL environment may be modified by <a href="#opencl-extension-spec">OpenCL
@@ -2575,7 +1802,7 @@
 Khronos OpenCL extensions require no corresponding SPIR-V extensions.</p>
 </div>
 <div class="sect2">
-<h3 id="_declaring_spir_v_extensions">7.1. Declaring SPIR-V Extensions</h3>
+<h3 id="_declaring_spir_v_extensions">5.1. Declaring SPIR-V Extensions</h3>
 <div class="paragraph">
 <p>A SPIR-V module declares use of a SPIR-V extension using <strong>OpExtension</strong> and
 the name of the SPIR-V extension.  For example:</p>
@@ -2592,9 +1819,9 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_full_and_embedded_profile_extensions">7.2. Full and Embedded Profile Extensions</h3>
+<h3 id="_full_and_embedded_profile_extensions">5.2. Full and Embedded Profile Extensions</h3>
 <div class="sect3">
-<h4 id="_cl_khr_3d_image_writes">7.2.1. <code>cl_khr_3d_image_writes</code></h4>
+<h4 id="_cl_khr_3d_image_writes">5.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 +1829,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="_cl_khr_depth_images">7.2.2. <code>cl_khr_depth_images</code></h4>
+<h4 id="_cl_khr_depth_images">5.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 +1850,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="_cl_khr_device_enqueue_local_arg_types">7.2.3. <code>cl_khr_device_enqueue_local_arg_types</code></h4>
+<h4 id="_cl_khr_device_enqueue_local_arg_types">5.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 +1859,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="_cl_khr_fp16">7.2.4. <code>cl_khr_fp16</code></h4>
+<h4 id="_cl_khr_fp16">5.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 +1874,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="_cl_khr_fp64">7.2.5. <code>cl_khr_fp64</code></h4>
+<h4 id="_cl_khr_fp64">5.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 +1889,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="_cl_khr_gl_depth_images">7.2.6. <code>cl_khr_gl_depth_images</code></h4>
+<h4 id="_cl_khr_gl_depth_images">5.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 +1915,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="_cl_khr_gl_msaa_sharing">7.2.7. <code>cl_khr_gl_msaa_sharing</code></h4>
+<h4 id="_cl_khr_gl_msaa_sharing">5.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,15 +1947,22 @@
 </div>
 </div>
 <div class="sect3">
-<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>
+<h4 id="_cl_khr_int64_base_atomics_and_cl_khr_int64_extended_atomics">5.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
-integer operands for all of the SPIR-V <strong>Atomic Instructions</strong>.</p>
+or <code>cl_khr_int64_extended_atomics</code>, then the environment must accept modules
+that declare the following SPIR-V capabilities:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><strong>Int64Atomics</strong></p>
+</li>
+</ul>
 </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>
+<p>When the <strong>Int64Atomics</strong> capability is declared, 64-bit integer types are
+valid for the <em>Result Type</em> and type of <em>Value</em> for all <strong>Atomic Instructions</strong>.</p>
 </div>
 <div class="paragraph">
 <p>Note: OpenCL environments that consume SPIR-V must support both
@@ -2737,7 +1971,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="_cl_khr_mipmap_image">7.2.9. <code>cl_khr_mipmap_image</code></h4>
+<h4 id="_cl_khr_mipmap_image">5.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 +1997,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="_cl_khr_mipmap_image_writes">7.2.10. <code>cl_khr_mipmap_image_writes</code></h4>
+<h4 id="_cl_khr_mipmap_image_writes">5.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,10 +2017,11 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="_cl_khr_subgroups">7.2.11. <code>cl_khr_subgroups</code></h4>
+<h4 id="_cl_khr_subgroups">5.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>
+for all instructions except <strong>OpGroupAsyncCopy</strong> and <strong>OpGroupWaitEvents</strong>
+the <em>Scope</em> for <em>Execution</em> may be:</p>
 </div>
 <div class="ulist">
 <ul>
@@ -2796,19 +2031,19 @@
 </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>
+<p>Additionally, for all instructions except <strong>Atomic Instructions</strong> in an
+OpenCL 1.2 environment, the <em>Scope</em> for <em>Memory</em> may be:</p>
 </div>
 <div class="ulist">
 <ul>
 <li>
-<p><strong>Workgroup</strong></p>
+<p><strong>Subgroup</strong></p>
 </li>
 </ul>
 </div>
 </div>
 <div class="sect3">
-<h4 id="_cl_khr_subgroup_named_barrier">7.2.12. <code>cl_khr_subgroup_named_barrier</code></h4>
+<h4 id="_cl_khr_subgroup_named_barrier">5.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
@@ -2823,7 +2058,7 @@
 </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>
+<h4 id="_cl_khr_spirv_no_integer_wrap_decoration">5.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>
@@ -2833,9 +2068,9 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_embedded_profile_extensions">7.3. Embedded Profile Extensions</h3>
+<h3 id="_embedded_profile_extensions">5.3. Embedded Profile Extensions</h3>
 <div class="sect3">
-<h4 id="_cles_khr_int64">7.3.1. <code>cles_khr_int64</code></h4>
+<h4 id="_cles_khr_int64">5.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
@@ -2853,7 +2088,7 @@
 </div>
 </div>
 <div class="sect1">
-<h2 id="numerical_compliance">8. OpenCL Numerical Compliance</h2>
+<h2 id="numerical_compliance">6. OpenCL Numerical Compliance</h2>
 <div class="sectionbody">
 <div class="paragraph">
 <p>This section describes features of the <a href="#cpp14-spec">C++14</a> and
@@ -2870,7 +2105,7 @@
 <strong>Float64</strong> capability.</p>
 </div>
 <div class="sect2">
-<h3 id="_rounding_modes">8.1. Rounding Modes</h3>
+<h3 id="_rounding_modes">6.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.
@@ -2922,7 +2157,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_rounding_modes_for_conversions">8.2. Rounding Modes for Conversions</h3>
+<h3 id="_rounding_modes_for_conversions">6.2. Rounding Modes for Conversions</h3>
 <div class="paragraph">
 <p>Results of the following conversion instructions may include an optional
 <strong>FPRoundingMode</strong> decoration:</p>
@@ -2966,7 +2201,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_out_of_range_conversions">8.3. Out-of-Range Conversions</h3>
+<h3 id="_out_of_range_conversions">6.3. Out-of-Range Conversions</h3>
 <div class="paragraph">
 <p>When a conversion operand is either greater than the greatest representable
 destination value or less than the least representable destination value,
@@ -2982,7 +2217,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_inf_nan_and_denormalized_numbers">8.4. INF, NaN, and Denormalized Numbers</h3>
+<h3 id="_inf_nan_and_denormalized_numbers">6.4. INF, NaN, and Denormalized Numbers</h3>
 <div class="paragraph">
 <p>INFs and NaNs must be supported.
 Support for signaling NaNs is not required.</p>
@@ -3003,7 +2238,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_floating_point_exceptions">8.5. Floating-Point Exceptions</h3>
+<h3 id="_floating_point_exceptions">6.5. 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
@@ -3036,7 +2271,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="relative-error-as-ulps">8.6. Relative Error as ULPs</h3>
+<h3 id="relative-error-as-ulps">6.6. 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).
@@ -3070,7 +2305,7 @@
 result.</p>
 </div>
 <div class="sect3">
-<h4 id="_ulp_values_for_math_instructions_full_profile">8.6.1. ULP Values for Math Instructions - Full Profile</h4>
+<h4 id="_ulp_values_for_math_instructions_full_profile">6.6.1. 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
@@ -3220,6 +2455,30 @@
 <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>cross</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 'max * max * (3 * HLF_EPSILON)', where max is the maximum input operand value</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 'max * max * (3 * FLT_EPSILON)', where max is the maximum input operand value</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 'max * max * (3 * FLT_EPSILON)', where max is the maximum input operand value</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>OpExtInst</strong> <strong>degrees</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>distance</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 0.5 + (1.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 3 + (1.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 2 * (3 + 0.5 * 1.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>OpExtInst</strong> <strong>dot</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 'max * max * (2 * (n - 1)) * HLF_EPSILON', For vector width n and maximum input operand value 'max'</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 'max * max * (2 * (n - 1)) * FLT_EPSILON', For vector width n and maximum input operand value 'max'</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 'max * max * (2 * (n - 1)) * FLT_EPSILON', For vector width n and maximum input operand value max</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>
@@ -3262,6 +2521,12 @@
 <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>fclamp</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>
@@ -3286,12 +2551,24 @@
 <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>fmax_common</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>fmin_common</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>
@@ -3328,6 +2605,12 @@
 <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>length</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 0.5 + 0.5 * 0.5 * n) + (0.5 * (n - 1) ulp, for gentype with vector width n</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 3 + 0.5 * 0.5 * n) + (0.5 * (n - 1) ulp, for gentype with vector width n</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 2 * (3 + 0.5 * 0.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</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>
@@ -3391,6 +2674,12 @@
 <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>mix</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">absolute error tolerance of 1e-3</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>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>
@@ -3409,6 +2698,12 @@
 <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>normalize</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 1.5 + (0.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 2.5 + (0.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 2 * (2.5 + 0.5 * 0.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</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>
@@ -3427,6 +2722,12 @@
 <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>radians</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>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>
@@ -3463,6 +2764,12 @@
 <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>sign</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>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>
@@ -3487,12 +2794,24 @@
 <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>smoothstep</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">absolute error tolerance of 1e-5</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>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>step</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>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>
@@ -3607,6 +2926,24 @@
 <td class="tableblock halign-left valign-top"></td>
 </tr>
 <tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>OpExtInst</strong> <strong>fast_distance</strong></p></td>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 8192 + (1.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</p></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>OpExtInst</strong> <strong>fast_length</strong></p></td>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 8192 + (0.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</p></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>OpExtInst</strong> <strong>fast_normalize</strong></p></td>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 8192.5 + (0.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</p></td>
+<td class="tableblock halign-left valign-top"></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"></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">Implementation-defined</p></td>
@@ -3694,7 +3031,7 @@
 </table>
 </div>
 <div class="sect3">
-<h4 id="_ulp_values_for_math_instructions_embedded_profile">8.6.2. ULP Values for Math Instructions - Embedded Profile</h4>
+<h4 id="_ulp_values_for_math_instructions_embedded_profile">6.6.2. 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
@@ -3844,6 +3181,12 @@
 <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>degrees</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>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>
@@ -3886,6 +3229,12 @@
 <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>fclamp</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>
@@ -3910,12 +3259,24 @@
 <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>fmax_common</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>fmin_common</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>
@@ -4012,6 +3373,12 @@
 <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>mix</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>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>
@@ -4048,6 +3415,12 @@
 <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>radians</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>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>
@@ -4084,6 +3457,12 @@
 <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>sign</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>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>
@@ -4108,12 +3487,24 @@
 <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>smoothstep</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>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>step</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>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>
@@ -4315,7 +3706,7 @@
 </table>
 </div>
 <div class="sect3">
-<h4 id="_ulp_values_for_math_instructions_unsafe_math_optimizations_enabled">8.6.3. ULP Values for Math Instructions - Unsafe Math Optimizations Enabled</h4>
+<h4 id="_ulp_values_for_math_instructions_unsafe_math_optimizations_enabled">6.6.3. ULP Values for Math Instructions - Unsafe Math Optimizations Enabled</h4>
 <div class="paragraph">
 <p>The ULP Values for Math Instructions with Unsafe Math Optimizations table below
 describes the minimum accuracy of commonly used single precision
@@ -4575,7 +3966,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_edge_case_behavior">8.7. Edge Case Behavior</h3>
+<h3 id="_edge_case_behavior">6.7. 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
@@ -4583,7 +3974,7 @@
 Beyond ISO/IEC 9899:TC2</a> section</em>.</p>
 </div>
 <div class="sect3">
-<h4 id="additional-requirements-beyond-isoiec-9899tc2">8.7.1. Additional Requirements Beyond ISO/IEC 9899:TC2</h4>
+<h4 id="additional-requirements-beyond-isoiec-9899tc2">6.7.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.
@@ -5060,7 +4451,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="changes-to-isoiec-9899-tc2-behavior">8.7.2. Changes to ISO/IEC 9899: TC2 Behavior</h4>
+<h4 id="changes-to-isoiec-9899-tc2-behavior">6.7.2. 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>
@@ -5079,7 +4470,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="edge-case-behavior-in-flush-to-zero-mode">8.7.3. Edge Case Behavior in Flush To Zero Mode</h4>
+<h4 id="edge-case-behavior-in-flush-to-zero-mode">6.7.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>
@@ -5142,13 +4533,13 @@
 </div>
 </div>
 <div class="sect1">
-<h2 id="image_addressing_and_filtering">9. Image Addressing and Filtering</h2>
+<h2 id="image_addressing_and_filtering">7. Image Addressing and Filtering</h2>
 <div class="sectionbody">
 <div class="paragraph">
 <p>This section describes how image operations behave in an OpenCL environment.</p>
 </div>
 <div class="sect2">
-<h3 id="image-coordinates">9.1. Image Coordinates</h3>
+<h3 id="image-coordinates">7.1. Image Coordinates</h3>
 <div class="paragraph">
 <p>Let <code>w<sub>t</sub></code>, <code>h<sub>t</sub></code> and <code>d<sub>t</sub></code> 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 <code>coord.xy</code> (also referred to as <code>(s,t)</code>) or <code>coord.xyz</code> (also referred to as <code>(s,t,r)</code>) be the coordinates specified to an image read instruction (such as <strong>OpImageRead</strong>) or an image write instruction (such as <strong>OpImageWrite</strong>).</p>
@@ -5168,12 +4559,12 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="addressing-and-filter-modes">9.2. Addressing and Filter Modes</h3>
+<h3 id="addressing-and-filter-modes">7.2. Addressing and Filter Modes</h3>
 <div class="paragraph">
 <p>After generating the image coordinate <code>(u,v,w)</code> we apply the appropriate addressing and filter mode to generate the appropriate sample locations to read from the image.</p>
 </div>
 <div class="sect3">
-<h4 id="clamp-addressing">9.2.1. Clamp and None Addressing Modes</h4>
+<h4 id="clamp-addressing">7.2.1. Clamp and None Addressing Modes</h4>
 <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 <code>CL_ADDRESS_CLAMP</code>, <code>CL_ADDRESS_CLAMP_TO_EDGE</code>, or <code>CL_ADDRESS_NONE</code>.</p>
 </div>
@@ -5340,7 +4731,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="repeat-addressing">9.2.2. Repeat Addressing Mode</h4>
+<h4 id="repeat-addressing">7.2.2. Repeat Addressing Mode</h4>
 <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 <code>CL_ADDRESS_REPEAT</code>.</p>
 </div>
@@ -5454,7 +4845,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="mirrored-repeat-addressing">9.2.3. Mirrored Repeat Addressing Mode</h4>
+<h4 id="mirrored-repeat-addressing">7.2.3. Mirrored Repeat Addressing Mode</h4>
 <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 <code>CL_ADDRESS_MIRRORED_REPEAT</code>.
 The <code>CL_ADDRESS_MIRRORED_REPEAT</code> 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.</p>
@@ -5586,7 +4977,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="precision-of-addressing-and-filter-modes">9.3. Precision of Addressing and Filter Modes</h3>
+<h3 id="precision-of-addressing-and-filter-modes">7.3. Precision of Addressing and Filter Modes</h3>
 <div class="paragraph">
 <p>If the sampler is specified as using unnormalized coordinates (floating-point or integer coordinates), filter mode set to <code>CL_FILTER_NEAREST</code> and addressing mode set to one of the following modes - <code>CL_ADDRESS_CLAMP</code>, <code>CL_ADDRESS_CLAMP_TO_EDGE</code> or <code>CL_ADDRESS_NONE</code> - the location of the image element in the image given by <code>(i,j,k)</code> will be computed without any loss of precision.</p>
 </div>
@@ -5596,12 +4987,12 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="conversion-rules">9.4. Conversion Rules</h3>
+<h3 id="conversion-rules">7.4. 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">9.4.1. Conversion Rules for Normalized Integer Channel Data Types</h4>
+<h4 id="conversion-rules-for-normalized-integer-channel-data-types">7.4.1. Conversion Rules for Normalized Integer Channel Data Types</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>
@@ -6114,7 +5505,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="conversion-rules-for-half-precision-floating-point-channel-data-type">9.4.2. Conversion Rules for Half Precision Floating-point Channel Data Type</h4>
+<h4 id="conversion-rules-for-half-precision-floating-point-channel-data-type">7.4.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 <code>CL_HALF_FLOAT</code>, the conversions of half to float and half to half are lossless.
 Conversions from float to half round the mantissa using the round to nearest even or round to zero rounding mode.
@@ -6124,7 +5515,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="conversion-rules-for-floating-point-channel-data-type">9.4.3. Conversion Rules for Floating-point Channel Data Type</h4>
+<h4 id="conversion-rules-for-floating-point-channel-data-type">7.4.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 <code>CL_FLOAT</code>.</p>
 </div>
@@ -6143,7 +5534,7 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="conversion-rules-for-signed-and-unsigned-8-bit-16-bit-and-32-bit-integer-channel-data-types">9.4.4. Conversion Rules for Signed and Unsigned 8-bit, 16-bit and 32-bit Integer Channel Data Types</h4>
+<h4 id="conversion-rules-for-signed-and-unsigned-8-bit-16-bit-and-32-bit-integer-channel-data-types">7.4.4. Conversion Rules for Signed and Unsigned 8-bit, 16-bit and 32-bit Integer Channel Data Types</h4>
 <div class="paragraph">
 <p>For images created with image channel data type of <code>CL_SIGNED_INT8</code>, <code>CL_SIGNED_INT16</code> and <code>CL_SIGNED_INT32</code>, image read instructions will return the unmodified integer values stored in the image at specified location.</p>
 </div>
@@ -6210,11 +5601,11 @@
 </div>
 </div>
 <div class="sect3">
-<h4 id="conversion-rules-for-srgba-and-sbgra-images">9.4.5. Conversion Rules for sRGBA and sBGRA Images</h4>
+<h4 id="conversion-rules-for-srgba-and-sbgra-images">7.4.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`s maps to 0.0f, and all 1`s maps to 1.0f.
-The sequence of unsigned integer encodings between all 0`s and all 1`s represent a nonlinear progression in the floating-point interpretation of the numbers between 0.0f to 1.0f.
+All 0s maps to 0.0f, and all 1s maps to 1.0f.
+The sequence of unsigned integer encodings between all 0s and all 1s represent a nonlinear progression in the floating-point interpretation of the numbers between 0.0f to 1.0f.
 For more detail, see the <a href="#sRGB-spec">SRGB color standard</a>.</p>
 </div>
 <div class="paragraph">
@@ -6321,7 +5712,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="selecting-an-image-from-an-image-array">9.5. Selecting an Image from an Image Array</h3>
+<h3 id="selecting-an-image-from-an-image-array">7.5. Selecting an Image from an Image Array</h3>
 <div class="paragraph">
 <p>Let <code>(u,v,w)</code> represent the unnormalized image coordinate values for reading from and/or writing to a 2D image in a 2D image array.</p>
 </div>
@@ -6368,7 +5759,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_data_format_for_reading_and_writing_images">9.6. Data Format for Reading and Writing Images</h3>
+<h3 id="_data_format_for_reading_and_writing_images">7.6. Data Format for Reading and Writing Images</h3>
 <div class="paragraph">
 <p>This section describes how image element data is returned by an
 image read instruction or passed as the <em>Texel</em> data that is
@@ -6491,7 +5882,7 @@
 </table>
 </div>
 <div class="sect2">
-<h3 id="_sampled_and_sampler_less_reads">9.7. Sampled and Sampler-less Reads</h3>
+<h3 id="_sampled_and_sampler_less_reads">7.7. Sampled and Sampler-less Reads</h3>
 <div class="paragraph">
 <p>SPIR-V instructions that read from an image without a sampler (such as <strong>OpImageRead</strong>) behave exactly the same as the corresponding image read instruction with a sampler that has <em>Sampler Filter Mode</em> set to <strong>Nearest</strong>, <strong>Non-Normalized</strong> coordinates, and <em>Sampler Addressing Mode</em> set to <strong>None</strong>.</p>
 </div>
@@ -6504,7 +5895,7 @@
 </div>
 </div>
 <div class="sect1">
-<h2 id="references">10. Normative References</h2>
+<h2 id="references">8. Normative References</h2>
 <div class="sectionbody">
 <div class="olist arabic">
 <ol class="arabic">
@@ -6542,6 +5933,10 @@
 <a href="https://www.khronos.org/registry/spir-v/" class="bare">https://www.khronos.org/registry/spir-v/</a> .</p>
 </li>
 <li>
+<p><a id="opencl-extended-instruction-set"></a> &#8220;OpenCL Extended Instruction Set
+Specification&#8221;, <a href="https://www.khronos.org/registry/spir-v/" class="bare">https://www.khronos.org/registry/spir-v/</a> .</p>
+</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;
 Currently hosted at
@@ -6566,8 +5961,8 @@
 </div>
 <div id="footer">
 <div id="footer-text">
-Version v2.2-10<br>
-Last updated 2019-02-05 16:03:11 EST
+Version V2.2-11<br>
+Last updated 2019-07-19 08:25:57 EDT
 </div>
 </div>
 
diff --git a/specs/2.2/html/OpenCL_Ext.html b/specs/2.2/html/OpenCL_Ext.html
index f1354ab..38e2c9d 100644
--- a/specs/2.2/html/OpenCL_Ext.html
+++ b/specs/2.2/html/OpenCL_Ext.html
@@ -841,9 +841,9 @@
 <h1>The OpenCL<sup>&#8482;</sup> Extension Specification</h1>
 <div class="details">
 <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>
+<span id="revnumber">version V2.2-11,</span>
+<span id="revdate">Fri, 19 Jul 2019 14:10:29 +0000</span>
+<br><span id="revremark">from git branch: master commit: 2aaf7b58ead9567d8799b22ecc748b4892a1e04e</span>
 </div>
 <div id="toc" class="toc2">
 <div id="toctitle">Table of Contents</div>
@@ -2457,7 +2457,7 @@
   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>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <strong>fmin</strong>(<strong>fmax</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>
@@ -3525,6 +3525,11 @@
 <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>clamp</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>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>
@@ -3545,6 +3550,26 @@
 <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>cross</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 'max * max * (3 * HLF_EPSILON)', where max is the maximum input operand value</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>degrees</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>distance</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 0.5 + (1.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</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>dot</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 'max * max * (2 * (n - 1)) * HLF_EPSILON', For vector width n and maximum input operand value 'max'</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>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>
@@ -3635,6 +3660,11 @@
 <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>length</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 0.5 + 0.5 * 0.5 * n) + (0.5 * (n - 1) ulp, for gentype with vector width n</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>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>
@@ -3665,16 +3695,31 @@
 <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>max</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>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>min</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>mix</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>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>
@@ -3690,6 +3735,11 @@
 <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>normalize</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 1.5 + (0.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</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>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>
@@ -3705,6 +3755,11 @@
 <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>radians</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>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>
@@ -3735,6 +3790,11 @@
 <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>sign</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>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>
@@ -3755,11 +3815,21 @@
 <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>smoothstep</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>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>step</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>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>
@@ -4487,7 +4557,7 @@
   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>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Returns <strong>fmin</strong>(<strong>fmax</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>
@@ -5172,6 +5242,10 @@
 <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>clamp</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>copysign</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
 </tr>
@@ -5188,6 +5262,22 @@
 <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>cross</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 'max * max * (3 * FLT_EPSILON)', where max is the maximum input operand value</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>degrees</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>distance</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 2 * (3 + 0.5 * 1.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>dot</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">absolute error tolerance of 'max * max * (2 * (n - 1)) * FLT_EPSILON', For vector width n and maximum input operand value 'max'</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>
@@ -5260,6 +5350,10 @@
 <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>length</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 2 * (3 + 0.5 * 0.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</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>
@@ -5284,14 +5378,26 @@
 <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>max</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>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>min</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>mix</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>modf</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
 </tr>
@@ -5304,6 +5410,10 @@
 <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>normalize</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 2 * (2.5 + 0.5 * 0.5 * n) + (0.5 * (n - 1)) ulp, for gentype with vector width n</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>
@@ -5316,6 +5426,10 @@
 <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>radians</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>remainder</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">0 ulp</p></td>
 </tr>
@@ -5340,6 +5454,10 @@
 <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>sign</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>sin</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 4 ulp</p></td>
 </tr>
@@ -5356,10 +5474,18 @@
 <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>smoothstep</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>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>step</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>tan</strong></p></td>
 <td class="tableblock halign-left valign-top"><p class="tableblock">&lt;= 5 ulp</p></td>
 </tr>
@@ -5857,15 +5983,12 @@
 <div class="sect2">
 <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
-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>
+<p>This section describes functionality in the <strong>cl_khr_gl_sharing</strong> extension
+to associate an OpenCL context with an OpenGL context or share group object.
+Once an OpenCL context is associated with an OpenGL context or share group
+object, the functionality described in the section
+<a href="#cl_khr_gl_sharing__memobjs">Creating OpenCL Memory Objects from OpenGL Objects</a>
+may be used to share OpenGL buffer, texture, and renderbuffer objects with the OpenCL context.</p>
 </div>
 <div class="paragraph">
 <p>An OpenGL implementation supporting buffer objects and sharing of texture
@@ -6478,37 +6601,21 @@
 <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
-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>
+<p>This section describes functionality in the <strong>cl_khr_gl_sharing</strong> extension
+to use OpenGL buffer, texture, and renderbuffer objects as OpenCL memory objects.
+OpenCL memory objects may be created from OpenGL objects if and only if the
+OpenCL context is associated with an OpenGL context or share group object.
+The section <a href="#cl_khr_gl_sharing">Creating an OpenCL Context from an OpenGL Context or Share Group</a>
+describes how to create an OpenCL context associated with an OpenGL context or share group object.</p>
 </div>
 <div class="paragraph">
-<p>An OpenCL image object may be created from an OpenGL texture or renderbuffer
-object.
+<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/" class="bare">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>
+<p>Any supported OpenGL object defined within the associated OpenGL context
+or share group object 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="sect2">
 <h3 id="cl_khr_gl_sharing__memobjs-lifetime-of-shared-objects">11.1. Lifetime of Shared Objects</h3>
@@ -13343,17 +13450,17 @@
 <tbody>
 <tr>
 <td class="tableblock halign-left valign-top"><p class="tableblock"><strong>CL_DEVICE_IMAGE_<br>
-PITCH_ALIGNMENT</strong></p></td>
+PITCH_ALIGNMENT_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">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"><strong>CL_DEVICE_IMAGE_BASE_<br>
+ADDRESS_ALIGNMENT_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">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>
+<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 <code>CL_MEM_USE_HOST_PTR</code>. 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>
@@ -13368,24 +13475,22 @@
 <p>Add to Section 5.3.1: Creating Image Objects:</p>
 </div>
 <div class="paragraph">
-<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>
+<p>A 2D image can be created from a buffer by specifying a <em>buffer</em> object in the <em>image_desc</em> passed to <strong>clCreateImage</strong> for an <em>image_type</em> equal to <code>CL_MEM_OBJECT_IMAGE2D</code>. 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 <code>CL_INVALID_IMAGE_FORMAT_DESCRIPTOR</code>.  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="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>
+<p>The pitch specified (or computed if pitch specified is 0) must be a multiple of the maximum of the <code>CL_DEVICE_IMAGE_PITCH_ALIGNMENT_KHR</code> value for all devices in the context associated with the <em>buffer</em> that support images.  Otherwise, <strong>clCreateImage</strong> returns a NULL value with <em>errcode_ret</em> set to <code>CL_INVALID_IMAGE_FORMAT_DESCRIPTOR</code>.</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>
+<p>If the <em>buffer</em> was created with <code>CL_MEM_USE_HOST_PTR</code>, the <em>host_ptr</em> specified to <strong>clCreateBuffer</strong> must be aligned to the maximum of the <code>CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR</code> value for all devices in the context associated with the <em>buffer</em> that support images.  Otherwise, <strong>clCreateImage</strong> returns a NULL value with <em>errcode_ret</em> set to <code>CL_INVALID_IMAGE_FORMAT_DESCRIPTOR</code>.</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>
+<p>The OpenCL runtime APIs that operate on images (i.e. <strong>clEnqueueReadImage</strong>, <strong>clEnqueueWriteImage</strong>, <strong>clEnqueueFillImage</strong>, <strong>clEnqueueCopyImage</strong>, <strong>clEnqueueCopyImageToBuffer</strong>, <strong>clEnqueueCopyBufferToImage</strong> and <strong>clEnqueueMapImage</strong>) 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>
+<p>When the contents of a buffer object data store are modified, those changes are reflected in the contents of the 2D image object and vice-versa at corresponding synchronization points. The <em>image_height</em> × <em>image_row_pitch</em> specified in <em>image_desc</em> must be less than or equal to the size of the buffer object data store.</p>
 </div>
 <div class="admonitionblock note">
 <table>
@@ -13394,7 +13499,7 @@
 <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.
+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 and a 2D image created from a buffer use the same image type in OpenCL C (<code>image2d_t</code>). 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 <code>image2d_t</code> behave the same way for a 2D image and a 2D image from a buffer.
 </td>
 </tr>
 </table>
@@ -14248,7 +14353,7 @@
 <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
+<p>This extension allows arguments to blocks that are passed to the <strong>enqueue_kernel</strong> 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>
@@ -15420,8 +15525,8 @@
 </div>
 <div id="footer">
 <div id="footer-text">
-Version v2.2-10<br>
-Last updated 2019-02-05 16:03:11 EST
+Version V2.2-11<br>
+Last updated 2019-07-19 08:25:57 EDT
 </div>
 </div>
 
diff --git a/specs/2.2/html/OpenCL_ICD_Installation.html b/specs/2.2/html/OpenCL_ICD_Installation.html
index 14ae55c..dddc8f8 100644
--- a/specs/2.2/html/OpenCL_ICD_Installation.html
+++ b/specs/2.2/html/OpenCL_ICD_Installation.html
@@ -841,9 +841,9 @@
 <h1>OpenCL<sup>&#8482;</sup> ICD Installation Guidelines</h1>
 <div class="details">
 <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>
+<span id="revnumber">version V2.2-11,</span>
+<span id="revdate">Fri, 19 Jul 2019 14:14:06 +0000</span>
+<br><span id="revremark">from git branch: master commit: 2aaf7b58ead9567d8799b22ecc748b4892a1e04e</span>
 </div>
 <div id="toc" class="toc2">
 <div id="toctitle">Table of Contents</div>
@@ -1120,8 +1120,8 @@
 </div>
 <div id="footer">
 <div id="footer-text">
-Version v2.2-10<br>
-Last updated 2019-02-05 16:03:11 EST
+Version V2.2-11<br>
+Last updated 2019-07-19 08:25:57 EDT
 </div>
 </div>
 
diff --git a/specs/2.2/pdf/OpenCL_API.pdf b/specs/2.2/pdf/OpenCL_API.pdf
index d053b51..815237b 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 a51089b..12a76a3 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 7e57222..24638df 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 77dd2b5..c8a7557 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 5046d34..7f1cc79 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 4089e72..f3901b2 100644
--- a/specs/2.2/pdf/OpenCL_ICD_Installation.pdf
+++ b/specs/2.2/pdf/OpenCL_ICD_Installation.pdf
Binary files differ