Skip to content
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

fix preprocessor guards for getContextPlatformVersion #245

Merged

Conversation

bashbaug
Copy link
Contributor

fixes #108

This change corrects the preprocessor guards around detail functions to get the OpenCL version from a platform, device, or context.

  • The preprocessor guard for CL_HPP_TARGET_OPENCL_VERSION needs to be the smallest value that callers of these functions test for. This is correctly 120 for current usages of these functions.
  • The preprocessor guard for CL_HPP_MINIMUM_OPENCL_VERSION needs to be the largest value that callers of these functions test for. This needs to be 200, for example for command queue properties.

Debatably the preprocessor guards around these functions should be removed completely, but at least this way things won't be broken while we figure out if this is the right thing to do or not.

@bashbaug
Copy link
Contributor Author

Need to file an issue (or add a test) to ensure these types of failures are caught in the future.

@bashbaug
Copy link
Contributor Author

I've added a test to ensure these issues will be caught in the future - see #252. These tests fail currenlty, but will pass once this PR is merged.

@bashbaug
Copy link
Contributor Author

bashbaug commented Dec 6, 2023

Merging as discussed in the December 5th teleconference.

@bashbaug bashbaug merged commit d3b28f6 into KhronosGroup:main Dec 6, 2023
56 checks passed
@bashbaug bashbaug deleted the getContextPlatformVersion-guards branch December 6, 2023 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error: ‘getContextPlatformVersion’ is not a member of ‘cl::detail’ in some cases
2 participants