Skip to content

[SYCL][Doc] Update spec wording regarding C++20 #16713

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
Jan 23, 2025

Conversation

gmlueck
Copy link
Contributor

@gmlueck gmlueck commented Jan 21, 2025

We decided in KhronosGroup/SYCL-Docs#667 to use this wording for SYCL APIs that require C++ features added after C++17. The next version of the SYCL spec formally adopts this wording in
KhronosGroup/SYCL-Docs#680.

We decided in KhronosGroup/SYCL-Docs#667 to use this wording for SYCL
APIs that require C++ features added after C++17.  The next version of
the SYCL spec formally adopts this wording in
KhronosGroup/SYCL-Docs#680.
@gmlueck gmlueck requested a review from a team as a code owner January 21, 2025 13:17
@@ -154,8 +152,7 @@ std::span<std::byte> ext_oneapi_get_content_backend_view() const;
----
!====

Available only when the compiler defines the `__cpp_lib_span` feature-test macro
(which is defined in {cpp}20 and higher).
Minimum C++ Version: {cpp}20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be in italics?

Suggested change
Minimum C++ Version: {cpp}20
_Minimum C++ Version:_ {cpp}20

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking it would not be in italics. In the core SYCL spec, our style is to add an initial paragraph for APIs that are deprecated, and that initial paragraph is not in italics. For example:

.[apidef]#platform::has_extension#
[source,role=synopsis,id=api:platform-has-extension]
----
bool has_extension(const std::string& extension) const
----

Deprecated by SYCL 2020.

{note}Use [api]#platform::has# instead.
{endnote}

_Returns:_ The value [code]#true# if this platform supports the extension
queried by the [code]#extension# parameter.
A platform only supports an extension if all associated devices support that
extension.
Returns [code]#false# if this platform does not contain any devices.

My thought was that the "Minimum C++ version" paragraph would be similar to the "Deprecated by" paragraph.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. My preference here would be to adopt a consistent style for all paragraphs rather than mixing the old and new styles. I find the paragraph sub-headings really helpful when reading the specification, so something like a "Deprecated: SYCL 2020" looks better to me.

But I don't think we can solve this here, so I'll approve. But maybe we should talk to some other folks to see if anybody else has a preference either way.

@gmlueck
Copy link
Contributor Author

gmlueck commented Jan 23, 2025

@intel/llvm-gatekeepers can this be merged? It seems like the CI failure is unrelated.

@sommerlukas sommerlukas merged commit e880f95 into intel:sycl Jan 23, 2025
4 checks passed
@gmlueck gmlueck deleted the gmlueck/cpp20 branch January 31, 2025 12:51
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.

3 participants