Description
OpenCL extensions approved by the OpenCL working group use the following naming convention:
-
A unique name string of the form
cl_khr_<name>orcl_ext_<name>is associated with each extension. If the extension is supported by an implementation, this string will be present in the implementation’sCL_PLATFORM_string orEXTENSIONS CL_DEVICE_string.EXTENSIONS -
All enumerants defined by the extension will have names of the form CL_<enum_name>_KHR or CL_<enum_name>_EXT.
-
All types defined by the extension will have names of the form cl_<type_name>_khr or cl_<type_name>_ext.
-
All API functions defined by the extension will have names of the form cl<function_name>KHR or cl<function_name>EXT.
Functions and enumerants defined by extensions that are promoted to
core features will have their KHR or EXT affix removed.
OpenCL implementations of such later revisions must also export the name
strings of promoted extensions in the CL_PLATFORM_ or
CL_DEVICE_ string, and support the KHR- or EXT-affixed versions
of functions and enumerants as a transition aid.
Vendor extensions are strongly encouraged to follow a similar naming convention:
-
A unique name string of the form
cl_<vendor_tag>_<name>is associated with each extension. If the extension is supported by an implementation, this string will be present in the implementation’sCL_PLATFORM_string orEXTENSIONS CL_DEVICE_string.EXTENSIONS -
All enumerants defined by the vendor extension should have names of the form CL_<enum_name>_<VENDOR_TAG>.
-
All types defined by the vendor extension should have names of the form cl_<type_name>_<vendor_tag>.
-
All API functions defined by the vendor extension should have names of the form cl<function_name><VENDOR_TAG>.
-
All OpenCL C functions, types, and attribute qualifiers defined by the vendor extension should have names of the form <vendor_tag>_<name>.
Vendor extensions are not currently included in the OpenCL specifications, but vendor extension specifications are frequently included in the online Registry of extensions.
Document Notes
For more information, see the OpenCL Specification
This page is extracted from the OpenCL Specification. Fixes and changes should be made to the Specification, not directly.