Skip to content

Commit 2515b1d

Browse files
authored
add a few missing enums to the XML file (#1118)
* add a few missing enums to the XML file use the feature dictionaries in a lot more places * add versioning macros to OpenCL 3.0 * update dictionary generation for API macros * add missing anchors
1 parent 93f7aaa commit 2515b1d

13 files changed

Lines changed: 617 additions & 523 deletions

OpenCL_C.txt

Lines changed: 382 additions & 379 deletions
Large diffs are not rendered by default.

api/cl_khr_extended_versioning.asciidoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ Versioning>> section.
4747

4848
=== New Macro Names
4949

50-
* {CL_VERSION_MAJOR_BITS_KHR}
51-
* {CL_VERSION_MINOR_BITS_KHR}
52-
* {CL_VERSION_PATCH_BITS_KHR}
53-
* `CL_VERSION_MAJOR_MASK_KHR`
54-
* `CL_VERSION_MINOR_MASK_KHR`
55-
* `CL_VERSION_PATCH_MASK_KHR`
56-
* `CL_VERSION_MAJOR_KHR`
57-
* `CL_VERSION_MINOR_KHR`
58-
* `CL_VERSION_PATCH_KHR`
59-
* `CL_MAKE_VERSION_KHR`
50+
* {CL_VERSION_MAJOR_BITS_KHR_anchor}
51+
* {CL_VERSION_MINOR_BITS_KHR_anchor}
52+
* {CL_VERSION_PATCH_BITS_KHR_anchor}
53+
* {CL_VERSION_MAJOR_MASK_KHR_anchor}
54+
* {CL_VERSION_MINOR_MASK_KHR_anchor}
55+
* {CL_VERSION_PATCH_MASK_KHR_anchor}
56+
* {CL_VERSION_MAJOR_KHR_anchor}
57+
* {CL_VERSION_MINOR_KHR_anchor}
58+
* {CL_VERSION_PATCH_KHR_anchor}
59+
* {CL_MAKE_VERSION_KHR_anchor}
6060

6161
=== New Enums
6262

api/opencl_architecture.asciidoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,19 +2220,19 @@ This enables versions to be ordered using standard C/C++ operators.
22202220
A number of convenience macros are provided by the OpenCL Headers to make
22212221
working with version numbers easier.
22222222

2223-
* `CL_VERSION_MAJOR` extracts the _major_ version from a packed
2223+
* {CL_VERSION_MAJOR_anchor} extracts the _major_ version from a packed
22242224
{cl_version_TYPE}.
2225-
* `CL_VERSION_MINOR` extracts the _minor_ version from a packed
2225+
* {CL_VERSION_MINOR_anchor} extracts the _minor_ version from a packed
22262226
{cl_version_TYPE}.
2227-
* `CL_VERSION_PATCH` extracts the _patch_ version from a packed
2227+
* {CL_VERSION_PATCH_anchor} extracts the _patch_ version from a packed
22282228
{cl_version_TYPE}.
2229-
* `CL_MAKE_VERSION` returns a packed {cl_version_TYPE} from a
2229+
* {CL_MAKE_VERSION_anchor} returns a packed {cl_version_TYPE} from a
22302230
_major_, _minor_ and _patch_ version.
22312231
* {CL_VERSION_MAJOR_BITS_anchor}, {CL_VERSION_MINOR_BITS_anchor}, and
22322232
{CL_VERSION_PATCH_BITS_anchor} are the number of bits in the
22332233
corresponding field.
2234-
* `CL_VERSION_MAJOR_MASK`, `CL_VERSION_MINOR_MASK`, and
2235-
`CL_VERSION_PATCH_MASK` are bitmasks used to extract the
2234+
* {CL_VERSION_MAJOR_MASK_anchor}, {CL_VERSION_MINOR_MASK_anchor}, and
2235+
{CL_VERSION_PATCH_MASK_anchor} are bitmasks used to extract the
22362236
corresponding packed fields from the version number.
22372237

22382238
[source,opencl]

c/dictionary.asciidoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Copyright 2017-2024 The Khronos Group. This work is licensed under a
2+
// Creative Commons Attribution 4.0 International License; see
3+
// http://creativecommons.org/licenses/by/4.0/
4+
5+
include::{generated}/api/api-dictionary-no-links.asciidoc[]

c/footnotes.asciidoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ This is similar to the `GL_ADDRESS_CLAMP_TO_BORDER` addressing mode. \
7272
]
7373

7474
:fn-CLK_UNORM_INT_101010_2: pass:n[ \
75-
Although `CL_UNORM_INT_101010_2` was added in OpenCL 2.1, because there was no OpenCL C 2.1 this image channel order <<unified-spec, requires>> OpenCL 3.0. \
75+
Although {CL_UNORM_INT_101010_2} was added in OpenCL 2.1, because there was no OpenCL C 2.1 this image channel order <<unified-spec, requires>> OpenCL 3.0. \
7676
]
7777

7878
:fn-double: pass:n[ \
79-
The `double` scalar type is an optional type that is supported if the value of the `CL_DEVICE_DOUBLE_FP_CONFIG` device query is not zero. \
79+
The `double` scalar type is an optional type that is supported if the value of the {CL_DEVICE_DOUBLE_FP_CONFIG} device query is not zero. \
8080
If this is the case then an OpenCL C 3.0 compiler must also define the {opencl_c_fp64} feature macro. \
8181
]
8282

@@ -86,7 +86,7 @@ In OpenCL C 3.0 this will be indicated by the presence of the {opencl_c_fp64} fe
8686
]
8787

8888
:fn-double-vec: pass:n[ \
89-
The `double__n__` vector type is an optional type that is supported if the value of the `CL_DEVICE_DOUBLE_FP_CONFIG` device query is not zero. \
89+
The `double__n__` vector type is an optional type that is supported if the value of the {CL_DEVICE_DOUBLE_FP_CONFIG} device query is not zero. \
9090
If this is the case then an OpenCL C 3.0 compiler must also define the {opencl_c_fp64} feature macro. \
9191
]
9292

@@ -167,12 +167,12 @@ Integer promotion is described in <<C99-spec,section 6.3.1.1 of the C99 Specific
167167
]
168168

169169
:fn-long: pass:n[ \
170-
The `long`, `unsigned long` and `ulong` scalar types are optional types for EMBEDDED profile devices that are supported if the value of the `CL_DEVICE_EXTENSIONS` device query contains *cles_khr_int64*. \
170+
The `long`, `unsigned long` and `ulong` scalar types are optional types for EMBEDDED profile devices that are supported if the value of the {CL_DEVICE_EXTENSIONS} device query contains *cles_khr_int64*. \
171171
An OpenCL C 3.0 compiler must also define the {opencl_c_int64} feature macro unconditionally for FULL profile devices, or for EMBEDDED profile devices that support these types. \
172172
]
173173

174174
:fn-long-vec: pass:n[ \
175-
The `long__n__` and `ulong__n__` vector types are optional types for EMBEDDED profile devices that are supported if the value of the `CL_DEVICE_EXTENSIONS` device query contains *cles_khr_int64*. \
175+
The `long__n__` and `ulong__n__` vector types are optional types for EMBEDDED profile devices that are supported if the value of the {CL_DEVICE_EXTENSIONS} device query contains *cles_khr_int64*. \
176176
An OpenCL C 3.0 compiler must also define the {opencl_c_int64} feature macro unconditionally for FULL profile devices, or for EMBEDDED profile devices that support these types. \
177177
]
178178

@@ -192,7 +192,7 @@ Here `TYPE_MIN` and `TYPE_MIN_EXP` should be substituted by constants appropriat
192192
]
193193

194194
:fn-non-uniform-work-groups: pass:n[ \
195-
I.e. the _global_work_size_ values specified to *clEnqueueNDRangeKernel* are not evenly divisible by the _local_work_size_ values for each dimension. \
195+
I.e. the _global_work_size_ values specified to {clEnqueueNDRangeKernel} are not evenly divisible by the _local_work_size_ values for each dimension. \
196196
]
197197

198198
:fn-OPENCL_VERSION: pass:n[ \
@@ -260,7 +260,7 @@ This definition means that the behavior of select and the ternary operator for v
260260
]
261261

262262
:fn-size_t: pass:n[ \
263-
This is a 32-bit type if the value of the `CL_DEVICE_ADDRESS_BITS` device query is 32-bits, and a 64-bit type if the value of the query is 64-bits. \
263+
This is a 32-bit type if the value of the {CL_DEVICE_ADDRESS_BITS} device query is 32-bits, and a 64-bit type if the value of the query is 64-bits. \
264264
]
265265

266266
:fn-variable-length-array-restriction: pass:n[ \

env/common_properties.asciidoc

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -218,63 +218,63 @@ channel orders.
218218

219219
| 0
220220
| *R*
221-
| `CL_R`
221+
| {CL_R}
222222

223223
| 1
224224
| *A*
225-
| `CL_A`
225+
| {CL_A}
226226

227227
| 2
228228
| *RG*
229-
| `CL_RG`
229+
| {CL_RG}
230230

231231
| 3
232232
| *RA*
233-
| `CL_RA`
233+
| {CL_RA}
234234

235235
| 4
236236
| *RGB*
237-
| `CL_RGB`
237+
| {CL_RGB}
238238

239239
| 5
240240
| *RGBA*
241-
| `CL_RGBA`
241+
| {CL_RGBA}
242242

243243
| 6
244244
| *BGRA*
245-
| `CL_BGRA`
245+
| {CL_BGRA}
246246

247247
| 7
248248
| *ARGB*
249-
| `CL_ARGB`
249+
| {CL_ARGB}
250250

251251
| 8
252252
| *Intensity*
253-
| `CL_INTENSITY`
253+
| {CL_INTENSITY}
254254

255255
| 9
256256
| *Luminance*
257-
| `CL_LUMINANCE`
257+
| {CL_LUMINANCE}
258258

259259
| 10
260260
| *Rx*
261-
| `CL_Rx`
261+
| {CL_Rx}
262262

263263
| 11
264264
| *RGx*
265-
| `CL_RGx`
265+
| {CL_RGx}
266266

267267
| 12
268268
| *RGBx*
269-
| `CL_RGBx`
269+
| {CL_RGBx}
270270

271271
| 13
272272
| *Depth*
273-
| `CL_DEPTH`
273+
| {CL_DEPTH}
274274

275275
| 14
276276
| *DepthStencil*
277-
| `CL_DEPTH_STENCIL`
277+
| {CL_DEPTH_STENCIL}
278278

279279
| 15
280280
| *sRGB*
@@ -294,7 +294,7 @@ channel orders.
294294

295295
| 19
296296
| *ABGR*
297-
| `CL_ABGR`
297+
| {CL_ABGR}
298298

299299
|====
300300

@@ -318,71 +318,71 @@ channel data types.
318318

319319
| 0
320320
| *SnormInt8*
321-
| `CL_SNORM_INT8`
321+
| {CL_SNORM_INT8}
322322

323323
| 1
324324
| *SnormInt16*
325-
| `CL_SNORM_INT16`
325+
| {CL_SNORM_INT16}
326326

327327
| 2
328328
| *UnormInt8*
329-
| `CL_UNORM_INT8`
329+
| {CL_UNORM_INT8}
330330

331331
| 3
332332
| *UnormInt16*
333-
| `CL_UNORM_INT16`
333+
| {CL_UNORM_INT16}
334334

335335
| 4
336336
| *UnormShort565*
337-
| `CL_UNORM_SHORT_565`
337+
| {CL_UNORM_SHORT_565}
338338

339339
| 5
340340
| *UnormShort555*
341-
| `CL_UNORM_SHORT_555`
341+
| {CL_UNORM_SHORT_555}
342342

343343
| 6
344344
| *UnormInt101010*
345-
| `CL_UNORM_INT_101010`
345+
| {CL_UNORM_INT_101010}
346346

347347
| 7
348348
| *SignedInt8*
349-
| `CL_SIGNED_INT8`
349+
| {CL_SIGNED_INT8}
350350

351351
| 8
352352
| *SignedInt16*
353-
| `CL_SIGNED_INT16`
353+
| {CL_SIGNED_INT16}
354354

355355
| 9
356356
| *SignedInt32*
357-
| `CL_SIGNED_INT32`
357+
| {CL_SIGNED_INT32}
358358

359359
| 10
360360
| *UnsignedInt8*
361-
| `CL_UNSIGNED_INT8`
361+
| {CL_UNSIGNED_INT8}
362362

363363
| 11
364364
| *UnsignedInt16*
365-
| `CL_UNSIGNED_INT16`
365+
| {CL_UNSIGNED_INT16}
366366

367367
| 12
368368
| *UnsignedInt32*
369-
| `CL_UNSIGNED_INT32`
369+
| {CL_UNSIGNED_INT32}
370370

371371
| 13
372372
| *HalfFloat*
373-
| `CL_HALF_FLOAT`
373+
| {CL_HALF_FLOAT}
374374

375375
| 14
376376
| *Float*
377-
| `CL_FLOAT`
377+
| {CL_FLOAT}
378378

379379
| 15
380380
| *UnormInt24*
381-
| `CL_UNORM_INT24`
381+
| {CL_UNORM_INT24}
382382

383383
| 16
384384
| *UnormInt101010_2*
385-
| `CL_UNORM_INT_101010_2`
385+
| {CL_UNORM_INT_101010_2}
386386

387387
|====
388388

env/extensions.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ restrictions.
1212
Some OpenCL extensions may modify the OpenCL environment by requiring
1313
consumption of a SPIR-V module that uses a SPIR-V extension. In this case,
1414
the implementation will include the OpenCL extension in the host API
15-
`CL_PLATFORM_EXTENSIONS` or `CL_DEVICE_EXTENSIONS` string, but not the
15+
{CL_PLATFORM_EXTENSIONS} or {CL_DEVICE_EXTENSIONS} string, but not the
1616
corresponding SPIR-V extension.
1717

1818
This section describes how the OpenCL environment is modified by Khronos
@@ -336,7 +336,7 @@ then the environment must accept modules that require `SPV_KHR_integer_dot_produ
336336
declare the following SPIR-V capabilities:
337337

338338
* *DotProductKHR*
339-
* *DotProductInput4x8BitKHR* if `CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_KHR` is supported
339+
* *DotProductInput4x8BitKHR* if {CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_KHR} is supported
340340
* *DotProductInput4x8BitPackedKHR*
341341

342342
==== `cl_khr_expect_assume`

0 commit comments

Comments
 (0)