Skip to content

Commit 3a8cfdf

Browse files
[NFC][SYCL] Simplify properties' definitions in virtual_functions.hpp (#15900)
We've been using simpler way to define them since #12831 but somehow that extension missed that.
1 parent 475adaa commit 3a8cfdf

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

sycl/include/sycl/ext/oneapi/experimental/virtual_functions.hpp

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
namespace sycl {
77
inline namespace _V1 {
88
namespace ext::oneapi::experimental {
9-
struct indirectly_callable_key {
9+
struct indirectly_callable_key
10+
: detail::compile_time_property_key<detail::PropKind::IndirectlyCallable> {
1011
template <typename Set>
1112
using value_t =
1213
sycl::ext::oneapi::experimental::property_value<indirectly_callable_key,
@@ -18,7 +19,8 @@ inline constexpr indirectly_callable_key::value_t<void> indirectly_callable;
1819
template <typename Set>
1920
inline constexpr indirectly_callable_key::value_t<Set> indirectly_callable_in;
2021

21-
struct calls_indirectly_key {
22+
struct calls_indirectly_key
23+
: detail::compile_time_property_key<detail::PropKind::CallsIndirectly> {
2224
template <typename... SetIds>
2325
using value_t =
2426
sycl::ext::oneapi::experimental::property_value<calls_indirectly_key,
@@ -31,24 +33,8 @@ template <typename... SetIds>
3133
inline constexpr calls_indirectly_key::value_t<SetIds...>
3234
assume_indirect_calls_to;
3335

34-
template <> struct is_property_key<indirectly_callable_key> : std::true_type {};
35-
template <> struct is_property_key<calls_indirectly_key> : std::true_type {};
36-
3736
namespace detail {
3837

39-
template <>
40-
struct IsCompileTimeProperty<indirectly_callable_key> : std::true_type {};
41-
template <>
42-
struct IsCompileTimeProperty<calls_indirectly_key> : std::true_type {};
43-
44-
template <> struct PropertyToKind<indirectly_callable_key> {
45-
static constexpr PropKind Kind = PropKind::IndirectlyCallable;
46-
};
47-
48-
template <> struct PropertyToKind<calls_indirectly_key> {
49-
static constexpr PropKind Kind = PropKind::CallsIndirectly;
50-
};
51-
5238
template <typename Set>
5339
struct PropertyMetaInfo<indirectly_callable_key::value_t<Set>> {
5440
static constexpr const char *name = "indirectly-callable";

0 commit comments

Comments
 (0)