Skip to content

[SYCL][DOC] Clarify "[[uses_aspects()]]" in design #5594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sycl/doc/design/OptionalDeviceFeatures.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,11 @@ instantiations of `sycl::atomic_ref` as an optional feature.

[6]: <#appendix-adding-an-attribute-to-8-byte-atomic_ref>

Because the `[[sycl_detail::uses_aspects()]]` attribute is only needed for the
device compiler, the headers should protect it with
`#ifdef __SYCL_DEVICE_ONLY__`. This avoids warnings when our headers are
compiled with a third-party host compiler.

Although the examples above show only a single aspect parameter to the
`[[sycl_detail::uses_aspects()]]` attribute, this attribute should support a
list of aspects, similar to the `[[sycl::device_has()]]` attribute. This will
Expand Down