Extensions can then increment the version when they change the APIs without breaking user code, providing applications have guarded their usage.
See CL_MAKE_VERSION for how the macro version is defined. Note that the definitions of this macro and cl_version have been taken out of the CL_VERSION_3_0 version guard to allow them to always be used by an application. This is because there functionality is implemented in the headers and not affected in any way by the OpenCL implementation being used, and the OpenCL version that implementation supports.
Implement idea from https://github.com/KhronosGroup/OpenCL-Headers/issues/248 to add an version macro to the extension headers so that users can guard application code using the macro to ensure the correct APIs are being used. This uses the XML from https://github.com/KhronosGroup/OpenCL-Docs/pull/1161 which forces extension to set a revision value.
Extensions can then increment the version when they change the APIs without breaking user code, providing applications have guarded their usage.
See CL_MAKE_VERSION for how the macro version is defined. Note that the definitions of this macro and
cl_version
have been taken out of theCL_VERSION_3_0
version guard to allow them to always be used by an application. This is because there functionality is implemented in the headers and not affected in any way by the OpenCL implementation being used, and the OpenCL version that implementation supports.