Skip to content

Conversation

@dyniols
Copy link
Contributor

@dyniols dyniols commented Aug 11, 2025

__has_include is part of the C++ standard since C++17: https://en.cppreference.com/w/cpp/preprocessor/include

We require C++17 if sycl.hpp is included, so we can use __has_include without extra checks for its presence.

@dyniols dyniols changed the title [SYCL] Simplify check whether a mdspan header file is available for inclusion [SYCL] Simplify check whether a mdspan header file is available for inclusion group_interface extension Aug 11, 2025
@dyniols dyniols changed the title [SYCL] Simplify check whether a mdspan header file is available for inclusion group_interface extension [SYCL] Simplify check whether a mdspan header file is available for inclusion group_interface extension Aug 11, 2025
@dyniols dyniols marked this pull request as ready for review August 11, 2025 16:47
@dyniols dyniols requested a review from a team as a code owner August 11, 2025 16:47
@dyniols dyniols requested a review from steffenlarsen August 11, 2025 16:47
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

While you're at it, could we apply the same to all other uses of defined(__has_include)? I see it in sycl/source/detail/os_util.cpp and sycl/include/syclcompat/kernel.hpp.

@dyniols
Copy link
Contributor Author

dyniols commented Aug 12, 2025

While you're at it, could we apply the same to all other uses of defined(__has_include)? I see it in sycl/source/detail/os_util.cpp and sycl/include/syclcompat/kernel.hpp.

Sure

@dyniols dyniols requested a review from a team as a code owner August 12, 2025 13:52
@dyniols dyniols requested a review from steffenlarsen August 12, 2025 13:53
@dyniols dyniols changed the title [SYCL] Simplify check whether a mdspan header file is available for inclusion group_interface extension [SYCL] Simplify check whether a header file is available for inclusion in SYCL files Aug 12, 2025
@dyniols dyniols changed the title [SYCL] Simplify check whether a header file is available for inclusion in SYCL files [SYCL] Simplify check whether a header file is available for inclusion Aug 12, 2025
@dyniols
Copy link
Contributor Author

dyniols commented Aug 13, 2025

@intel/syclcompat-lib-reviewers Can you please review?

@dyniols dyniols removed the request for review from a team September 4, 2025 11:21
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2025

@intel/llvm-gatekeepers please consider merging

@againull againull merged commit 3c1237f into intel:sycl Sep 4, 2025
27 checks passed
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