Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions sycl/doc/design/DeviceAspectTraitDesign.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ traits `any_device_has` and `all_devices_have` as described in the
[SYCL 2020 Specification Rev. 6 Section 4.6.4.3][1].

In summary, `any_device_has<aspect>` and `all_devices_have<aspect>` must inherit
from either `std::true_t` or `std::false_t` depending on whether the
from either `std::true_type` or `std::false_type` depending on whether the
corresponding compilation environment can guarantee that any and all the
supported devices support the `aspect`.

Expand Down Expand Up @@ -86,7 +86,7 @@ template<> all_devices_have<aspect::gpu> : std::bool_constant<__SYCL_ALL_DEVICES

#ifdef __SYCL_ANY_DEVICE_HAS_ANY_ASPECT__
// Special case where any_device_has is trivially true.
template <aspect Aspect> any_device_has : std::true_t {};
template <aspect Aspect> any_device_has : std::true_type {};
#else
template <aspect Aspect> any_device_has;
template<> any_device_has<aspect::host> : std::bool_constant<__SYCL_ANY_DEVICE_HAS_0__> {};
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/device_aspect_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ struct all_devices_have<aspect::ext_intel_legacy_image>

#ifdef __SYCL_ANY_DEVICE_HAS_ANY_ASPECT__
// Special case where any_device_has is trivially true.
template <aspect Aspect> struct any_device_has : std::true_t {};
template <aspect Aspect> struct any_device_has : std::true_type {};
Copy link
Contributor

Choose a reason for hiding this comment

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

We use undefined type, and no tests detects this!?!

Copy link
Contributor

Choose a reason for hiding this comment

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

This implementation was intended as base work for upcoming patches. The path could not previously be hit, unless someone from the outside defined the macro, so it was not actually an issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay. Please, make sure it's covered with tests in "upcoming patches".

#else
template <aspect Aspect> struct any_device_has;
template <>
Expand Down