Skip to content

Commit

Permalink
add a few missing enums to the XML file
Browse files Browse the repository at this point in the history
use the feature dictionaries in a lot more places
  • Loading branch information
bashbaug committed Mar 31, 2024
1 parent 1bf9208 commit 469625b
Show file tree
Hide file tree
Showing 12 changed files with 543 additions and 520 deletions.
761 changes: 382 additions & 379 deletions OpenCL_C.txt

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions api/cl_khr_extended_versioning.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ Versioning>> section.
* {CL_VERSION_MAJOR_BITS_KHR_anchor}
* {CL_VERSION_MINOR_BITS_KHR_anchor}
* {CL_VERSION_PATCH_BITS_KHR_anchor}
* `CL_VERSION_MAJOR_MASK_KHR`
* `CL_VERSION_MINOR_MASK_KHR`
* `CL_VERSION_PATCH_MASK_KHR`
* `CL_VERSION_MAJOR_KHR`
* `CL_VERSION_MINOR_KHR`
* `CL_VERSION_PATCH_KHR`
* `CL_MAKE_VERSION_KHR`
* {CL_VERSION_MAJOR_MASK_KHR_anchor}
* {CL_VERSION_MINOR_MASK_KHR_anchor}
* {CL_VERSION_PATCH_MASK_KHR_anchor}
* {CL_VERSION_MAJOR_KHR_anchor}
* {CL_VERSION_MINOR_KHR_anchor}
* {CL_VERSION_PATCH_KHR_anchor}
* {CL_MAKE_VERSION_KHR_anchor}

=== New Enums

Expand Down
12 changes: 6 additions & 6 deletions api/opencl_architecture.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2220,19 +2220,19 @@ This enables versions to be ordered using standard C/C++ operators.
A number of convenience macros are provided by the OpenCL Headers to make
working with version numbers easier.

* `CL_VERSION_MAJOR` extracts the _major_ version from a packed
* {CL_VERSION_MAJOR} extracts the _major_ version from a packed
{cl_version_TYPE}.
* `CL_VERSION_MINOR` extracts the _minor_ version from a packed
* {CL_VERSION_MINOR} extracts the _minor_ version from a packed
{cl_version_TYPE}.
* `CL_VERSION_PATCH` extracts the _patch_ version from a packed
* {CL_VERSION_PATCH} extracts the _patch_ version from a packed
{cl_version_TYPE}.
* `CL_MAKE_VERSION` returns a packed `cl_version_TYPE} from a
* {CL_MAKE_VERSION} returns a packed `cl_version_TYPE} from a
_major_, _minor_ and _patch_ version.
* {CL_VERSION_MAJOR_BITS_anchor}, {CL_VERSION_MINOR_BITS_anchor}, and
{CL_VERSION_PATCH_BITS_anchor} are the number of bits in the
corresponding field.
* `CL_VERSION_MAJOR_MASK`, `CL_VERSION_MINOR_MASK`, and
`CL_VERSION_PATCH_MASK` are bitmasks used to extract the
* {CL_VERSION_MAJOR_MASK}, {CL_VERSION_MINOR_MASK}, and
{CL_VERSION_PATCH_MASK} are bitmasks used to extract the
corresponding packed fields from the version number.

[source,opencl]
Expand Down
5 changes: 5 additions & 0 deletions c/dictionary.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright 2017-2024 The Khronos Group. This work is licensed under a
// Creative Commons Attribution 4.0 International License; see
// http://creativecommons.org/licenses/by/4.0/

include::{generated}/api/api-dictionary-no-links.asciidoc[]
14 changes: 7 additions & 7 deletions c/footnotes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ This is similar to the `GL_ADDRESS_CLAMP_TO_BORDER` addressing mode. \
]

:fn-CLK_UNORM_INT_101010_2: pass:n[ \
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. \
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. \
]

:fn-double: pass:n[ \
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. \
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. \
If this is the case then an OpenCL C 3.0 compiler must also define the `+__opencl_c_fp64+` feature macro. \
]

Expand All @@ -86,7 +86,7 @@ In OpenCL C 3.0 this will be indicated by the presence of the `+__opencl_c_fp64+
]

:fn-double-vec: pass:n[ \
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. \
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. \
If this is the case then an OpenCL C 3.0 compiler must also define the `+__opencl_c_fp64+` feature macro. \
]

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

:fn-long: pass:n[ \
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*. \
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*. \
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. \
]

:fn-long-vec: pass:n[ \
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*. \
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*. \
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. \
]

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

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

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

:fn-size_t: pass:n[ \
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. \
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. \
]

:fn-variable-length-array-restriction: pass:n[ \
Expand Down
66 changes: 33 additions & 33 deletions env/common_properties.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -218,63 +218,63 @@ channel orders.

| 0
| *R*
| `CL_R`
| {CL_R}

| 1
| *A*
| `CL_A`
| {CL_A}

| 2
| *RG*
| `CL_RG`
| {CL_RG}

| 3
| *RA*
| `CL_RA`
| {CL_RA}

| 4
| *RGB*
| `CL_RGB`
| {CL_RGB}

| 5
| *RGBA*
| `CL_RGBA`
| {CL_RGBA}

| 6
| *BGRA*
| `CL_BGRA`
| {CL_BGRA}

| 7
| *ARGB*
| `CL_ARGB`
| {CL_ARGB}

| 8
| *Intensity*
| `CL_INTENSITY`
| {CL_INTENSITY}

| 9
| *Luminance*
| `CL_LUMINANCE`
| {CL_LUMINANCE}

| 10
| *Rx*
| `CL_Rx`
| {CL_Rx}

| 11
| *RGx*
| `CL_RGx`
| {CL_RGx}

| 12
| *RGBx*
| `CL_RGBx`
| {CL_RGBx}

| 13
| *Depth*
| `CL_DEPTH`
| {CL_DEPTH}

| 14
| *DepthStencil*
| `CL_DEPTH_STENCIL`
| {CL_DEPTH_STENCIL}

| 15
| *sRGB*
Expand All @@ -294,7 +294,7 @@ channel orders.

| 19
| *ABGR*
| `CL_ABGR`
| {CL_ABGR}

|====

Expand All @@ -318,71 +318,71 @@ channel data types.

| 0
| *SnormInt8*
| `CL_SNORM_INT8`
| {CL_SNORM_INT8}

| 1
| *SnormInt16*
| `CL_SNORM_INT16`
| {CL_SNORM_INT16}

| 2
| *UnormInt8*
| `CL_UNORM_INT8`
| {CL_UNORM_INT8}

| 3
| *UnormInt16*
| `CL_UNORM_INT16`
| {CL_UNORM_INT16}

| 4
| *UnormShort565*
| `CL_UNORM_SHORT_565`
| {CL_UNORM_SHORT_565}

| 5
| *UnormShort555*
| `CL_UNORM_SHORT_555`
| {CL_UNORM_SHORT_555}

| 6
| *UnormInt101010*
| `CL_UNORM_INT_101010`
| {CL_UNORM_INT_101010}

| 7
| *SignedInt8*
| `CL_SIGNED_INT8`
| {CL_SIGNED_INT8}

| 8
| *SignedInt16*
| `CL_SIGNED_INT16`
| {CL_SIGNED_INT16}

| 9
| *SignedInt32*
| `CL_SIGNED_INT32`
| {CL_SIGNED_INT32}

| 10
| *UnsignedInt8*
| `CL_UNSIGNED_INT8`
| {CL_UNSIGNED_INT8}

| 11
| *UnsignedInt16*
| `CL_UNSIGNED_INT16`
| {CL_UNSIGNED_INT16}

| 12
| *UnsignedInt32*
| `CL_UNSIGNED_INT32`
| {CL_UNSIGNED_INT32}

| 13
| *HalfFloat*
| `CL_HALF_FLOAT`
| {CL_HALF_FLOAT}

| 14
| *Float*
| `CL_FLOAT`
| {CL_FLOAT}

| 15
| *UnormInt24*
| `CL_UNORM_INT24`
| {CL_UNORM_INT24}

| 16
| *UnormInt101010_2*
| `CL_UNORM_INT_101010_2`
| {CL_UNORM_INT_101010_2}

|====

Expand Down
4 changes: 2 additions & 2 deletions env/extensions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ restrictions.
Some OpenCL extensions may modify the OpenCL environment by requiring
consumption of a SPIR-V module that uses a SPIR-V extension. In this case,
the implementation will include the OpenCL extension in the host API
`CL_PLATFORM_EXTENSIONS` or `CL_DEVICE_EXTENSIONS` string, but not the
{CL_PLATFORM_EXTENSIONS} or {CL_DEVICE_EXTENSIONS} string, but not the
corresponding SPIR-V extension.

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

* *DotProductKHR*
* *DotProductInput4x8BitKHR* if `CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_KHR` is supported
* *DotProductInput4x8BitKHR* if {CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_KHR} is supported
* *DotProductInput4x8BitPackedKHR*

==== `cl_khr_expect_assume`
Expand Down
Loading

0 comments on commit 469625b

Please sign in to comment.