[SYCL] Make sub_group a class instead of a struct - #23104
Draft
KornevNikita wants to merge 3 commits into
Draft
Conversation
SYCL 2020 section 4.9.1.8 declares sub_group as a class. Switch the definition and the forward declarations of sycl::sub_group accordingly, adding an explicit `public:` to keep the interface unchanged. The deprecated sycl::ext::oneapi::sub_group stays a struct. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SYCL 2020 section 4.9.1.8 declares
sub_groupas a class. This switches the definition and the forward declarations ofsycl::sub_groupfromstructtoclass, with an explicitpublic:so the interface is unchanged.Forward declarations had to be updated together with the definition, otherwise the mismatched tag triggers
-Wmismatched-tags(and MSVC C4099).The deprecated
sycl::ext::oneapi::sub_groupis left as astruct— it is a separate type, and keeping it a struct preserves its public inheritance fromsycl::sub_group.No functional change: no data members, no accessibility changes, and the class/struct keyword does not affect mangling or aggregate-ness here.
🤖 Generated with Claude Code