Skip to content

Commit cdf2313

Browse files
committed
[SYCL] Remove detail::empty_properties_t
1 parent 5e8085d commit cdf2313

File tree

9 files changed

+445
-468
lines changed

9 files changed

+445
-468
lines changed

sycl/doc/extensions/supported/sycl_ext_intel_esimd/sycl_ext_intel_esimd_functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ template <atomic_op Op, typename T, int N, typename Toffset, typename PropertyLi
650650
651651
// Similar to (usm-au0-1,2), but `byte_offset` is `simd_view`.
652652
template <atomic_op Op, typename T, int N, typename OffsetSimdViewT,
653-
typename PropertyListT = detail::empty_properties_t>
653+
typename PropertyListT = empty_properties_t>
654654
/*usm-au0-3*/ simd<T, N> atomic_update(T *p, OffsetSimdViewT byte_offset, simd_mask<N> mask, props = {});
655655
/*usm-au0-4*/ simd<T, N> atomic_update(T *p, OffsetSimdViewT byte_offset, props = {});
656656

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

Lines changed: 401 additions & 419 deletions
Large diffs are not rendered by default.

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace experimental {
3535
// 3. "xxx_alloc_host_annotated" (defined in alloc_host.hpp)
3636
// 4. "xxx_alloc_shared_annotated" (defined in alloc_shared.hpp)
3737
////
38-
template <typename propertyListA = detail::empty_properties_t,
38+
template <typename propertyListA = empty_properties_t,
3939
typename propertyListB =
4040
typename detail::GetCompileTimeProperties<propertyListA>::type>
4141
std::enable_if_t<
@@ -77,7 +77,7 @@ aligned_alloc_annotated(size_t alignment, size_t numBytes,
7777
return annotated_ptr<void, propertyListB>(rawPtr);
7878
}
7979

80-
template <typename T, typename propertyListA = detail::empty_properties_t,
80+
template <typename T, typename propertyListA = empty_properties_t,
8181
typename propertyListB =
8282
typename detail::GetCompileTimeProperties<propertyListA>::type>
8383
std::enable_if_t<
@@ -119,7 +119,7 @@ aligned_alloc_annotated(size_t alignment, size_t count,
119119
return annotated_ptr<T, propertyListB>(rawPtr);
120120
}
121121

122-
template <typename propertyListA = detail::empty_properties_t,
122+
template <typename propertyListA = empty_properties_t,
123123
typename propertyListB =
124124
typename detail::GetCompileTimeProperties<propertyListA>::type>
125125
std::enable_if_t<
@@ -132,7 +132,7 @@ aligned_alloc_annotated(size_t alignment, size_t numBytes,
132132
syclQueue.get_context(), kind, propList);
133133
}
134134

135-
template <typename T, typename propertyListA = detail::empty_properties_t,
135+
template <typename T, typename propertyListA = empty_properties_t,
136136
typename propertyListB =
137137
typename detail::GetCompileTimeProperties<propertyListA>::type>
138138
std::enable_if_t<
@@ -145,7 +145,7 @@ aligned_alloc_annotated(size_t alignment, size_t count, const queue &syclQueue,
145145
syclQueue.get_context(), kind, propList);
146146
}
147147

148-
template <typename propertyListA = detail::empty_properties_t,
148+
template <typename propertyListA = empty_properties_t,
149149
typename propertyListB =
150150
typename detail::GetCompileTimeProperties<propertyListA>::type>
151151
std::enable_if_t<
@@ -158,7 +158,7 @@ malloc_annotated(size_t numBytes, const device &syclDevice,
158158
propList);
159159
}
160160

161-
template <typename T, typename propertyListA = detail::empty_properties_t,
161+
template <typename T, typename propertyListA = empty_properties_t,
162162
typename propertyListB =
163163
typename detail::GetCompileTimeProperties<propertyListA>::type>
164164
std::enable_if_t<
@@ -171,7 +171,7 @@ malloc_annotated(size_t count, const device &syclDevice,
171171
propList);
172172
}
173173

174-
template <typename propertyListA = detail::empty_properties_t,
174+
template <typename propertyListA = empty_properties_t,
175175
typename propertyListB =
176176
typename detail::GetCompileTimeProperties<propertyListA>::type>
177177
std::enable_if_t<
@@ -183,7 +183,7 @@ malloc_annotated(size_t numBytes, const queue &syclQueue, sycl::usm::alloc kind,
183183
syclQueue.get_context(), kind, propList);
184184
}
185185

186-
template <typename T, typename propertyListA = detail::empty_properties_t,
186+
template <typename T, typename propertyListA = empty_properties_t,
187187
typename propertyListB =
188188
typename detail::GetCompileTimeProperties<propertyListA>::type>
189189
std::enable_if_t<

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ using GetAnnotatedDevicePtrProperties =
3737
// `usm_kind<alloc::device>`, so reconstruct the real annotated_ptr that
3838
// contains usm_kind using the raw pointer of "aligned_alloc_annotated" result
3939
////
40-
template <typename propertyListA = detail::empty_properties_t,
40+
template <typename propertyListA = empty_properties_t,
4141
typename propertyListB =
4242
typename GetAnnotatedDevicePtrProperties<propertyListA>::type>
4343
std::enable_if_t<
@@ -53,7 +53,7 @@ aligned_alloc_device_annotated(size_t alignment, size_t numBytes,
5353
return annotated_ptr<void, propertyListB>(tmp.get());
5454
}
5555

56-
template <typename T, typename propertyListA = detail::empty_properties_t,
56+
template <typename T, typename propertyListA = empty_properties_t,
5757
typename propertyListB =
5858
typename GetAnnotatedDevicePtrProperties<propertyListA>::type>
5959
std::enable_if_t<
@@ -69,7 +69,7 @@ aligned_alloc_device_annotated(size_t alignment, size_t count,
6969
return annotated_ptr<T, propertyListB>(tmp.get());
7070
}
7171

72-
template <typename propertyListA = detail::empty_properties_t,
72+
template <typename propertyListA = empty_properties_t,
7373
typename propertyListB =
7474
typename GetAnnotatedDevicePtrProperties<propertyListA>::type>
7575
std::enable_if_t<
@@ -83,7 +83,7 @@ aligned_alloc_device_annotated(size_t alignment, size_t numBytes,
8383
syclQueue.get_context(), propList);
8484
}
8585

86-
template <typename T, typename propertyListA = detail::empty_properties_t,
86+
template <typename T, typename propertyListA = empty_properties_t,
8787
typename propertyListB =
8888
typename GetAnnotatedDevicePtrProperties<propertyListA>::type>
8989
std::enable_if_t<
@@ -104,7 +104,7 @@ aligned_alloc_device_annotated(size_t alignment, size_t count,
104104
// Note: "malloc_device_annotated" functions call
105105
// "aligned_alloc_device_annotated" with alignment 0
106106
////
107-
template <typename propertyListA = detail::empty_properties_t,
107+
template <typename propertyListA = empty_properties_t,
108108
typename propertyListB =
109109
typename GetAnnotatedDevicePtrProperties<propertyListA>::type>
110110
std::enable_if_t<
@@ -117,7 +117,7 @@ malloc_device_annotated(size_t numBytes, const device &syclDevice,
117117
propList);
118118
}
119119

120-
template <typename T, typename propertyListA = detail::empty_properties_t,
120+
template <typename T, typename propertyListA = empty_properties_t,
121121
typename propertyListB =
122122
typename GetAnnotatedDevicePtrProperties<propertyListA>::type>
123123
std::enable_if_t<
@@ -130,7 +130,7 @@ malloc_device_annotated(size_t count, const device &syclDevice,
130130
propList);
131131
}
132132

133-
template <typename propertyListA = detail::empty_properties_t,
133+
template <typename propertyListA = empty_properties_t,
134134
typename propertyListB =
135135
typename GetAnnotatedDevicePtrProperties<propertyListA>::type>
136136
std::enable_if_t<
@@ -142,7 +142,7 @@ malloc_device_annotated(size_t numBytes, const queue &syclQueue,
142142
syclQueue.get_context(), propList);
143143
}
144144

145-
template <typename T, typename propertyListA = detail::empty_properties_t,
145+
template <typename T, typename propertyListA = empty_properties_t,
146146
typename propertyListB =
147147
typename GetAnnotatedDevicePtrProperties<propertyListA>::type>
148148
std::enable_if_t<

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ using GetAnnotatedHostPtrProperties =
3838
// returned annotated_ptr of "aligned_alloc_annotated"
3939
////
4040

41-
template <typename propertyListA = detail::empty_properties_t,
41+
template <typename propertyListA = empty_properties_t,
4242
typename propertyListB =
4343
typename GetAnnotatedHostPtrProperties<propertyListA>::type>
4444
std::enable_if_t<
@@ -52,7 +52,7 @@ aligned_alloc_host_annotated(size_t alignment, size_t numBytes,
5252
return annotated_ptr<void, propertyListB>(tmp.get());
5353
}
5454

55-
template <typename T, typename propertyListA = detail::empty_properties_t,
55+
template <typename T, typename propertyListA = empty_properties_t,
5656
typename propertyListB =
5757
typename GetAnnotatedHostPtrProperties<propertyListA>::type>
5858
std::enable_if_t<
@@ -66,7 +66,7 @@ aligned_alloc_host_annotated(size_t alignment, size_t count,
6666
return annotated_ptr<T, propertyListB>(tmp.get());
6767
}
6868

69-
template <typename propertyListA = detail::empty_properties_t,
69+
template <typename propertyListA = empty_properties_t,
7070
typename propertyListB =
7171
typename GetAnnotatedHostPtrProperties<propertyListA>::type>
7272
std::enable_if_t<
@@ -79,7 +79,7 @@ aligned_alloc_host_annotated(size_t alignment, size_t numBytes,
7979
syclQueue.get_context(), propList);
8080
}
8181

82-
template <typename T, typename propertyListA = detail::empty_properties_t,
82+
template <typename T, typename propertyListA = empty_properties_t,
8383
typename propertyListB =
8484
typename GetAnnotatedHostPtrProperties<propertyListA>::type>
8585
std::enable_if_t<
@@ -99,7 +99,7 @@ aligned_alloc_host_annotated(size_t alignment, size_t count,
9999
// with alignment 0
100100
////
101101

102-
template <typename propertyListA = detail::empty_properties_t,
102+
template <typename propertyListA = empty_properties_t,
103103
typename propertyListB =
104104
typename GetAnnotatedHostPtrProperties<propertyListA>::type>
105105
std::enable_if_t<
@@ -110,7 +110,7 @@ malloc_host_annotated(size_t numBytes, const context &syclContext,
110110
return aligned_alloc_host_annotated(0, numBytes, syclContext, propList);
111111
}
112112

113-
template <typename T, typename propertyListA = detail::empty_properties_t,
113+
template <typename T, typename propertyListA = empty_properties_t,
114114
typename propertyListB =
115115
typename GetAnnotatedHostPtrProperties<propertyListA>::type>
116116
std::enable_if_t<
@@ -121,7 +121,7 @@ malloc_host_annotated(size_t count, const context &syclContext,
121121
return aligned_alloc_host_annotated<T>(0, count, syclContext, propList);
122122
}
123123

124-
template <typename propertyListA = detail::empty_properties_t,
124+
template <typename propertyListA = empty_properties_t,
125125
typename propertyListB =
126126
typename GetAnnotatedHostPtrProperties<propertyListA>::type>
127127
std::enable_if_t<
@@ -132,7 +132,7 @@ malloc_host_annotated(size_t numBytes, const queue &syclQueue,
132132
return malloc_host_annotated(numBytes, syclQueue.get_context(), propList);
133133
}
134134

135-
template <typename T, typename propertyListA = detail::empty_properties_t,
135+
template <typename T, typename propertyListA = empty_properties_t,
136136
typename propertyListB =
137137
typename GetAnnotatedHostPtrProperties<propertyListA>::type>
138138
std::enable_if_t<

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ using GetAnnotatedSharedPtrProperties =
3737
// returned annotated_ptr of "aligned_alloc_annotated"
3838
////
3939

40-
template <typename propertyListA = detail::empty_properties_t,
40+
template <typename propertyListA = empty_properties_t,
4141
typename propertyListB =
4242
typename GetAnnotatedSharedPtrProperties<propertyListA>::type>
4343
std::enable_if_t<
@@ -53,7 +53,7 @@ aligned_alloc_shared_annotated(size_t alignment, size_t numBytes,
5353
return annotated_ptr<void, propertyListB>(tmp.get());
5454
}
5555

56-
template <typename T, typename propertyListA = detail::empty_properties_t,
56+
template <typename T, typename propertyListA = empty_properties_t,
5757
typename propertyListB =
5858
typename GetAnnotatedSharedPtrProperties<propertyListA>::type>
5959
std::enable_if_t<
@@ -69,7 +69,7 @@ aligned_alloc_shared_annotated(size_t alignment, size_t count,
6969
return annotated_ptr<T, propertyListB>(tmp.get());
7070
}
7171

72-
template <typename propertyListA = detail::empty_properties_t,
72+
template <typename propertyListA = empty_properties_t,
7373
typename propertyListB =
7474
typename GetAnnotatedSharedPtrProperties<propertyListA>::type>
7575
std::enable_if_t<
@@ -83,7 +83,7 @@ aligned_alloc_shared_annotated(size_t alignment, size_t numBytes,
8383
syclQueue.get_context(), propList);
8484
}
8585

86-
template <typename T, typename propertyListA = detail::empty_properties_t,
86+
template <typename T, typename propertyListA = empty_properties_t,
8787
typename propertyListB =
8888
typename GetAnnotatedSharedPtrProperties<propertyListA>::type>
8989
std::enable_if_t<
@@ -104,7 +104,7 @@ aligned_alloc_shared_annotated(size_t alignment, size_t count,
104104
// "aligned_alloc_shared_annotated" with alignment 0
105105
////
106106

107-
template <typename propertyListA = detail::empty_properties_t,
107+
template <typename propertyListA = empty_properties_t,
108108
typename propertyListB =
109109
typename GetAnnotatedSharedPtrProperties<propertyListA>::type>
110110
std::enable_if_t<
@@ -117,7 +117,7 @@ malloc_shared_annotated(size_t numBytes, const device &syclDevice,
117117
propList);
118118
}
119119

120-
template <typename T, typename propertyListA = detail::empty_properties_t,
120+
template <typename T, typename propertyListA = empty_properties_t,
121121
typename propertyListB =
122122
typename GetAnnotatedSharedPtrProperties<propertyListA>::type>
123123
std::enable_if_t<
@@ -130,7 +130,7 @@ malloc_shared_annotated(size_t count, const device &syclDevice,
130130
propList);
131131
}
132132

133-
template <typename propertyListA = detail::empty_properties_t,
133+
template <typename propertyListA = empty_properties_t,
134134
typename propertyListB =
135135
typename GetAnnotatedSharedPtrProperties<propertyListA>::type>
136136
std::enable_if_t<
@@ -142,7 +142,7 @@ malloc_shared_annotated(size_t numBytes, const queue &syclQueue,
142142
syclQueue.get_context(), propList);
143143
}
144144

145-
template <typename T, typename propertyListA = detail::empty_properties_t,
145+
template <typename T, typename propertyListA = empty_properties_t,
146146
typename propertyListB =
147147
typename GetAnnotatedSharedPtrProperties<propertyListA>::type>
148148
std::enable_if_t<

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ template <typename Prop> struct IsRuntimePropertyValid : std::false_type {};
9494
template <typename T, typename propertyList>
9595
struct ValidAllocPropertyList : std::false_type {};
9696
template <typename T>
97-
struct ValidAllocPropertyList<T, detail::empty_properties_t> : std::true_type {
98-
};
97+
struct ValidAllocPropertyList<T, empty_properties_t> : std::true_type{};
9998
template <typename T, typename Prop, typename... Props>
10099
struct ValidAllocPropertyList<T, detail::properties_t<Prop, Props...>>
101100
: std::integral_constant<
@@ -117,24 +116,22 @@ struct ValidAllocPropertyList<T, detail::properties_t<Prop, Props...>>
117116
// annotated_ptr
118117
template <typename PropertyListT> struct GetCompileTimeProperties {};
119118

120-
template <> struct GetCompileTimeProperties<detail::empty_properties_t> {
121-
using type = detail::empty_properties_t;
119+
template <> struct GetCompileTimeProperties<empty_properties_t> {
120+
using type = empty_properties_t;
122121
};
123122

124123
template <typename Prop>
125124
struct GetCompileTimeProperties<detail::properties_t<Prop>> {
126125
using type =
127126
std::conditional_t<detail::IsCompileTimePropertyValue<Prop>::value,
128-
detail::properties_t<Prop>,
129-
detail::empty_properties_t>;
127+
detail::properties_t<Prop>, empty_properties_t>;
130128
};
131129

132130
template <typename Prop, typename... Props>
133131
struct GetCompileTimeProperties<detail::properties_t<Prop, Props...>> {
134132
using filtered_this_property_t =
135133
std::conditional_t<detail::IsCompileTimePropertyValue<Prop>::value,
136-
detail::properties_t<Prop>,
137-
detail::empty_properties_t>;
134+
detail::properties_t<Prop>, empty_properties_t>;
138135
using filtered_other_properties_t =
139136
typename GetCompileTimeProperties<detail::properties_t<Props...>>::type;
140137
using type = detail::merged_properties_t<filtered_this_property_t,

sycl/include/sycl/ext/oneapi/properties/properties.hpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ properties(PropertyValueTs... props)
187187
-> properties<typename detail::Sorted<PropertyValueTs...>::type>;
188188
#endif
189189

190-
using empty_properties_t = decltype(properties{});
190+
using empty_properties_t = properties<std::tuple<>>;
191191

192192
// Property list traits
193193
template <typename propertiesT> struct is_property_list : std::false_type {};
@@ -203,8 +203,6 @@ inline constexpr bool is_property_list_v = is_property_list<propertiesT>::value;
203203
#endif
204204

205205
namespace detail {
206-
// Helper for default properties when deduction guides are not enabled.
207-
using empty_properties_t = properties<std::tuple<>>;
208206

209207
// Helper for reconstructing a properties type. This assumes that
210208
// PropertyValueTs is sorted and contains only valid properties.
@@ -247,9 +245,9 @@ template <typename SyclT, typename PropertiesT>
247245
struct all_props_are_keys_of : std::true_type {};
248246

249247
template <typename SyclT>
250-
struct all_props_are_keys_of<
251-
SyclT, ext::oneapi::experimental::detail::empty_properties_t>
252-
: std::true_type {};
248+
struct all_props_are_keys_of<SyclT,
249+
ext::oneapi::experimental::empty_properties_t>
250+
: std::true_type{};
253251

254252
template <typename SyclT, typename PropT>
255253
struct all_props_are_keys_of<

sycl/include/sycl/kernel_bundle.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ build_from_source(kernel_bundle<bundle_state::ext_oneapi_source> &SourceKB,
879879

880880
} // namespace detail
881881

882-
template <typename PropertyListT = detail::empty_properties_t,
882+
template <typename PropertyListT = empty_properties_t,
883883
typename = std::enable_if_t<
884884
is_property_list_v<PropertyListT> &&
885885
detail::all_props_are_keys_of<
@@ -900,7 +900,7 @@ build(kernel_bundle<bundle_state::ext_oneapi_source> &SourceKB,
900900
return detail::build_from_source(SourceKB, Devices, BuildOptionsVec, LogPtr);
901901
}
902902

903-
template <typename PropertyListT = detail::empty_properties_t,
903+
template <typename PropertyListT = empty_properties_t,
904904
typename = std::enable_if_t<
905905
is_property_list_v<PropertyListT> &&
906906
detail::all_props_are_keys_of<

0 commit comments

Comments
 (0)