Skip to content

Commit eef0acf

Browse files
committed
Add revision to XML extensions
This extension adds the revision field to the XML tag for extensions. This allows a version macro to be generated with: * KhronosGroup/OpenCL-Headers#251 * KhronosGroup/OpenCL-Headers#248 KHR extensions are given a revision based on the semantic version of the spec. However other extensions don't use semantic versioning, and so are given a placeholder `0.0.0` value until they can be updated by the owner. The XML schema is also updated to make the revision field mandatory in the XML entry for extensions and the existence of the macro this enables is advertised to users in the spec.
1 parent 0483627 commit eef0acf

File tree

3 files changed

+147
-129
lines changed

3 files changed

+147
-129
lines changed

api/opencl_architecture.asciidoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,6 +2263,24 @@ typedef cl_uint cl_version;
22632263
((patch) & CL_VERSION_PATCH_MASK))
22642264
----
22652265

2266+
[NOTE]
2267+
--
2268+
The OpenCL headers make the version of an extension defined in the headers
2269+
available using a macro. This macro takes the format of the uppercase extension
2270+
name followed by the `EXTENSION_VERSION` suffix. For example,
2271+
`CL_KHR_CREATE_COMMAND_QUEUE_EXTENSION_VERSION` is the macro defining the
2272+
version of the {cl_khr_command_queue_EXT} extension.
2273+
2274+
The value of this macro is set to the {cl_version_TYPE} of the extension using
2275+
the semantic version of the extension. If no semantic version is defined for
2276+
the extension, then the value of the macro is set to `0` (semantic version
2277+
`0.0.0`).
2278+
2279+
Applications can use this macro to guard their code against API breaking
2280+
changes to the API of extensions, in particular provisional KHR extensions
2281+
which have yet to finalize the API.
2282+
--
2283+
22662284
[[version-name-pairing]]
22672285
==== Version-Name Pairing
22682286

0 commit comments

Comments
 (0)