Skip to content
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

Redefine SYCL_LANGUAGE_VERSION #634

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gmlueck
Copy link
Contributor

@gmlueck gmlueck commented Sep 30, 2024

Now that we have a unified specification, we need to decouple the SYCL_LANGUAGE_VERSION macro from the document revision. We decided to keep the 6 digit format where the top 4 digits are the year of the SYCL specification. The lower 2 digits are not formally specified, but we plan to use these to identify the month in which we submit the specification for ratification, which is similar to the C++ macro __cplusplus.

Since the SYCL 2020 specification was submitted for ratification in December of 2020, the macro's value is now 202012 for SYCL 2020.

We also decided to add the L literal suffix to make the macro into a long integer literal. This makes sense because an int is only guaranteed to be 16 bits, which is not enough to hold these 6-digit values. This is consistent with __cplusplus, which is also a long integer literal.

Now that we have a unified specification, we need to decouple the
`SYCL_LANGUAGE_VERSION` macro from the document revision.  We decided
to keep the 6 digit format where the top 4 digits are the year of the
SYCL specification.  The lower 2 digits are not formally specified, but
we plan to use these to identify the month in which we submit the
specification for ratification, which is similar to the C++ macro
`__cplusplus`.

Since the SYCL 2020 specification was submitted for ratification in
December of 2020, the macro's value is now `202012` for SYCL 2020.

We also decided to add the `L` literal suffix to make the macro into a
long integer literal.  This makes sense because an `int` is only
guaranteed to be 16 bits, which is not enough to hold these 6-digit
values.  This is consistent with `__cplusplus`, which is also a long
integer literal.
Copy link
Contributor

@tomdeakin tomdeakin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Greg!

bader pushed a commit to llvm/llvm-project that referenced this pull request Dec 5, 2024
Version of SYCL was changed according to the latest agreement:
The lower 2 digits are not formally specified, but we plan to use these
to identify the month in which we submit the specification for
ratification, which is similar to the C++ macro __cplusplus.

Since the SYCL 2020 specification was submitted for ratification in
December of 2020, the macro's value is now 202012 for SYCL 2020.
see PR for details 
KhronosGroup/SYCL-Docs#634
broxigarchen pushed a commit to broxigarchen/llvm-project that referenced this pull request Dec 10, 2024
Version of SYCL was changed according to the latest agreement:
The lower 2 digits are not formally specified, but we plan to use these
to identify the month in which we submit the specification for
ratification, which is similar to the C++ macro __cplusplus.

Since the SYCL 2020 specification was submitted for ratification in
December of 2020, the macro's value is now 202012 for SYCL 2020.
see PR for details 
KhronosGroup/SYCL-Docs#634
chrsmcgrr pushed a commit to RooflineAI/llvm-project that referenced this pull request Dec 12, 2024
Version of SYCL was changed according to the latest agreement:
The lower 2 digits are not formally specified, but we plan to use these
to identify the month in which we submit the specification for
ratification, which is similar to the C++ macro __cplusplus.

Since the SYCL 2020 specification was submitted for ratification in
December of 2020, the macro's value is now 202012 for SYCL 2020.
see PR for details 
KhronosGroup/SYCL-Docs#634
TIFitis pushed a commit to TIFitis/llvm-project that referenced this pull request Dec 18, 2024
Version of SYCL was changed according to the latest agreement:
The lower 2 digits are not formally specified, but we plan to use these
to identify the month in which we submit the specification for
ratification, which is similar to the C++ macro __cplusplus.

Since the SYCL 2020 specification was submitted for ratification in
December of 2020, the macro's value is now 202012 for SYCL 2020.
see PR for details 
KhronosGroup/SYCL-Docs#634
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.

4 participants