Skip to content

C++ binding updates for OpenCL 3.1#340

Merged
bashbaug merged 3 commits into
KhronosGroup:mainfrom
bashbaug:opencl-3.1
May 19, 2026
Merged

C++ binding updates for OpenCL 3.1#340
bashbaug merged 3 commits into
KhronosGroup:mainfrom
bashbaug:opencl-3.1

Conversation

@bashbaug
Copy link
Copy Markdown
Contributor

Updates the C++ bindings for OpenCL 3.1.

This mostly involved adding support for the new clGetKernelSuggestedLocalWorkSize with an associated new test, plus a bit of tidy up.

Copy link
Copy Markdown
Contributor

@Kerilk Kerilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me. Took me a bit of time to get why local is initialized to global (you want the same dimentionality, so the copy constructor gives you that). I think I would prefer it to be initialized to zero, but at the right dimentionality, but that is a refactoring of the class that may be out of scope of this PR.

@bashbaug
Copy link
Copy Markdown
Contributor Author

Took me a bit of time to get why local is initialized to global [...]

Yeah, I couldn't think of a way to initialize it to zero (or some other default value) without either expanding the NDRange class a bunch or needing a bunch of conditional code. Initializing to global mostly does what I want it to do, so I went with it for now.

I've added a comment to avoid possible confusion in the future. We can revisit if we ever decide to update the NDRange class.

@bashbaug bashbaug merged commit 5661a0e into KhronosGroup:main May 19, 2026
52 checks passed
@bashbaug bashbaug deleted the opencl-3.1 branch May 19, 2026 21:44
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.

2 participants