Skip to content

Commit c14ad30

Browse files
committed
WIP: Rewrite properties storage
1 parent 5662fd2 commit c14ad30

19 files changed

+192
-638
lines changed

sycl/include/sycl/ext/intel/esimd/memory_properties.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ class properties
7777
// Deduction guides
7878
template <typename... PropertyValueTs>
7979
properties(PropertyValueTs... props)
80-
-> properties<typename sycl::ext::oneapi::experimental::detail::Sorted<
81-
PropertyValueTs...>::type>;
80+
-> properties<sycl::ext::oneapi::experimental::detail::sort_properties<
81+
sycl::ext::oneapi::experimental::detail::type_list<
82+
PropertyValueTs...>>>;
8283
#endif
8384

8485
/// The 'alignment' property is used to specify the alignment of memory

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ __SYCL_TYPE(annotated_ptr) annotated_ptr<T, detail::properties_t<Props...>> {
303303
annotated_ptr &operator=(const annotated_ptr &) = default;
304304

305305
explicit annotated_ptr(T *Ptr,
306-
const property_list_t & = properties{}) noexcept
306+
const property_list_t & = property_list_t{}) noexcept
307307
: m_Ptr(Ptr) {}
308308

309309
// Constructs an annotated_ptr object from a raw pointer and variadic

sycl/include/sycl/ext/oneapi/experimental/annotated_usm/alloc_util.hpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,10 @@ using HasBufferLocation = HasProperty<buffer_location_key, PropertyListT>;
4848
// Get the value of a property from a property list
4949
template <typename PropKey, typename ConstType, typename DefaultPropVal,
5050
typename PropertyListT>
51-
struct GetPropertyValueFromPropList {};
52-
53-
template <typename PropKey, typename ConstType, typename DefaultPropVal,
54-
typename... Props>
55-
struct GetPropertyValueFromPropList<PropKey, ConstType, DefaultPropVal,
56-
detail::properties_t<Props...>> {
57-
using prop_val_t = std::conditional_t<
58-
detail::ContainsProperty<PropKey, std::tuple<Props...>>::value,
59-
typename detail::FindCompileTimePropertyValueType<
60-
PropKey, std::tuple<Props...>>::type,
61-
DefaultPropVal>;
51+
struct GetPropertyValueFromPropList {
52+
using prop_val_t =
53+
decltype(detail::ValueOrDefault<PropertyListT, PropKey>::get(
54+
DefaultPropVal()));
6255
static constexpr ConstType value =
6356
detail::PropertyMetaInfo<std::remove_const_t<prop_val_t>>::value;
6457
};

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ inline constexpr prefetch_hint_key::value_t<cache_level::L4, nontemporal>
4848
prefetch_hint_L4_nt;
4949

5050
namespace detail {
51-
template <> struct IsCompileTimeProperty<prefetch_hint_key> : std::true_type {};
52-
5351
template <cache_level Level, typename Hint>
5452
struct PropertyMetaInfo<prefetch_hint_key::value_t<Level, Hint>> {
5553
static constexpr const char *name = std::is_same_v<Hint, nontemporal>

0 commit comments

Comments
 (0)