Skip to content

Add default constructor to nd_range - #1046

Merged
gmlueck merged 2 commits into
KhronosGroup:mainfrom
KornevNikita:nd-range-default-ctor
Sep 10, 2026
Merged

gmlueck merged 2 commits into
KhronosGroup:mainfrom
KornevNikita:nd-range-default-ctor

Conversation

@KornevNikita

@KornevNikita KornevNikita commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

The range and id classes are default constructible, but nd_range is not: its only constructor requires the global and local ranges, which a user may not know at the point where the nd_range object has to be created.

Add nd_range() noexcept, which default constructs the global range, the local range and the (deprecated) offset, so that every component is 0.

SYCL-CTS KhronosGroup/SYCL-CTS#1231

Fixes #1043

The range and id classes are default constructible, but nd_range is not:
its only constructor requires the global and local ranges, which a user
may not know at the point where the nd_range object has to be created.

Add nd_range() noexcept, which default constructs the global range, the
local range and the (deprecated) offset, so that every component is 0.

Fixes KhronosGroup#1043
In the nd_range synopsis the /* -- common interface members -- */ marker
sat above the globalSize/localSize/offset constructor, so that constructor
appeared to be part of the common interface. In the range and id synopses
all constructors are listed before the marker and only the members of the
common interface follow it. Move the marker below both constructors to
match.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@TApplencourt

Copy link
Copy Markdown
Contributor

We just need one more approval, then we can more both this on the CTS :)
Thanks a lot

@KornevNikita

Copy link
Copy Markdown
Contributor Author

@TApplencourt what person do we need to give an approval, some third party, e.g. non-Intel and non-ANL?

@TApplencourt

Copy link
Copy Markdown
Contributor

Exactly.

@KornevNikita

Copy link
Copy Markdown
Contributor Author

@VerenaBeckham @keryell could you please take a look?

@KornevNikita

Copy link
Copy Markdown
Contributor Author

@TApplencourt is Greg the only one with merge rights?

@TApplencourt

Copy link
Copy Markdown
Contributor

He is our editor, so kinda : )
But it will be done, we have 2 approvals now (thanks Verena!).

Do you have some kind of deadline or something?

@KornevNikita

Copy link
Copy Markdown
Contributor Author

He is our editor, so kinda : ) But it will be done, we have 2 approvals now (thanks Verena!).

Do you have some kind of deadline or something?

nope, just wondering as Greg is out of office for some time.

@gmlueck gmlueck added the Agenda To be discussed during a SYCL committee meeting label Sep 9, 2026
@gmlueck

gmlueck commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Adding the Agenda label, so we can merge this in tomorrow's WG call. Did the WG decide that this is OK to merge as a SYCL 2020 errata?

@TApplencourt

Copy link
Copy Markdown
Contributor
  • Ready to merge.
  • Vote for SYCL 2020errata

@gmlueck
gmlueck merged commit bceca86 into KhronosGroup:main Sep 10, 2026
2 checks passed
gmlueck added a commit that referenced this pull request Sep 11, 2026
Cherry pick #1046 from main
(cherry picked from commit bceca86)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Agenda To be discussed during a SYCL committee meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add default nd_range constructor

6 participants