[SYCL][SYCL2020] Add missing noexcept to ctors of public SYCL RT classes - #23184
Open
dm-vodopyanov wants to merge 1 commit into
Open
dm-vodopyanov wants to merge 1 commit into
dm-vodopyanov wants to merge 1 commit into
Conversation
…asses Note: this patch must be merged AFTER this one: - KhronosGroup/SYCL-Docs#1044 This patch add missing `noexcept` to some of the classes in accordance with SYCL 2020 spec update above.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The test cannot detect a missing move constructor when a non-throwing copy constructor accepts rvalues.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Implements a pending SYCL 2020 update requiring non-throwing move operations for public runtime classes.
Changes:
- Marks
deviceandbuffermove constructorsnoexcept. - Adds explicit move operations to
h_item. - Adds compile-time checks for common-semantics classes.
File summaries
| File | Description |
|---|---|
sycl/include/sycl/buffer.hpp |
Makes buffer moves non-throwing. |
sycl/include/sycl/device.hpp |
Updates the public device declaration. |
sycl/source/device.cpp |
Updates the device implementation. |
sycl/include/sycl/h_item.hpp |
Adds move constructor and assignment. |
sycl/test/basic_tests/common_semantics_noexcept.cpp |
Tests move-operation requirements. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+19
to
+20
| static_assert(std::is_nothrow_move_constructible_v<__VA_ARGS__>, \ | ||
| #__VA_ARGS__ " must be nothrow move constructible"); \ |
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.
This patch add missing
noexceptto some of the classes in accordance with SYCL 2020 spec update above.Note: this patch must be merged only AFTER this one: