Skip to content

[SYCL] Make sub_group a class instead of a struct - #23104

Draft
KornevNikita wants to merge 3 commits into
intel:syclfrom
KornevNikita:sub-group-class
Draft

[SYCL] Make sub_group a class instead of a struct#23104
KornevNikita wants to merge 3 commits into
intel:syclfrom
KornevNikita:sub-group-class

Conversation

@KornevNikita

Copy link
Copy Markdown
Contributor

SYCL 2020 section 4.9.1.8 declares sub_group as a class. This switches the definition and the forward declarations of sycl::sub_group from struct to class, with an explicit public: 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_group is left as a struct — it is a separate type, and keeping it a struct preserves its public inheritance from sycl::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

KornevNikita and others added 3 commits September 4, 2026 19:29
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>
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.

1 participant