-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed tidy up of CL_{API,EXT}_{PREFIX,SUFFIX}* definitions #153
Comments
Switching to the Is there a usage model for the |
Ok, I'll do that.
I actually started using them in #154 (which I'd like to get in before the tidy up as they would conflict). |
I was actually looking at #154 which prompted my question. Right now it looks like we have a possible use for prefix and suffix defiitions generally (for things like #154), and for prefix and suffix defiitions for deprecations for specific versions, but I don't currently see a need for prefix and suffix definitions for specific versions that are not tied to deprecations. If so, would be fine with:
|
Even if we don't have a use for them at the moment I think I'd rather we keep the version-specific definitions as they enable to centrally manage this should we need to in the future. All the annotation work has been done and I think the burden to keep them is minimal. If someone strongly disagrees though I'm open to making the change as a follow-up PR. |
OK, no problem, makes sense. The version-specific prefixes and suffixes that bother me the most are the ones on extension APIs in the extension headers: Some APIs have them, some APIs don't, and for the APIs that do have them the version appears to be chosen fairly arbitrarily. Would it make sense to have a non-versioned extension prefix and suffix definition? I don't think the answer is to drop the extension prefixes and suffixes entirely if we're going to support user-supplied prefix and suffix definitions, although extension APIs are a little strange so perhaps this needs a bit more thought. |
I agree extension function declarations will need some special care. The first idea that comes to mind is to use the minimum required version (which could at least be 1.0 in all cases). Deprecation of extension function declarations is probably worth a discussion as well. I've added an item to the checklist I added at the end of the description. |
See KhronosGroup/OpenCL-Headers#153 for the discussion. Signed-off-by: Kévin Petit <kpet@free.fr>
Contributes to KhronosGroup#153 Signed-off-by: Kévin Petit <kevin.petit@arm.com>
See KhronosGroup/OpenCL-Headers#153 for the discussion. Signed-off-by: Kévin Petit <kpet@free.fr>
Contributes to KhronosGroup#153 Signed-off-by: Kévin Petit <kevin.petit@arm.com>
Contributes to #153 Signed-off-by: Kévin Petit <kevin.petit@arm.com>
See KhronosGroup/OpenCL-Headers#153 for the discussion. Signed-off-by: Kévin Petit <kpet@free.fr>
See KhronosGroup/OpenCL-Headers#153 for the discussion. Signed-off-by: Kévin Petit <kpet@free.fr>
These definitions are used to prefix/suffix function declarations, for example to handle deprecation warnings. They currently fall into two categories:
CL_{API,EXT}_SUFFIX__{EXPERIMENTAL,VERSION*}
). These are always defined to an empty string.CL_EXT_SUFFIX__VERSION_*_DEPRECATED
). These are defined to compiler-specific values that result in warnings being produced when deprecated functions are used. Note that there are noCL_API_SUFFIX__VERSION_*_DEPRECATED
definitions.Problems
CL_EXT
andCL_API
prefixes are used inconsistently and core API function declarations are marked as deprecated withCL_EXT
definitionsAs another data point, extension functions use
CL_API_{CALL,ENTRY}
in their declarations.Proposed resolution
CL_API_{PREFIX,SUFFIX}
for core declarations as well as extensions and remove allCL_EXT_{PREFIX,SUFFIX}
definitions.OpenCL-Docs and OpenCL-CLHPP would need changing as well.
Agreed actions
CL_EXT_{PREFIX,SUFFIX}*
withCL_API_{PREFIX,SUFFIX}*
CL_API
prefix for internal useThe text was updated successfully, but these errors were encountered: