@@ -26,7 +26,7 @@ namespace oneapi {
2626struct sub_group ;
2727namespace experimental {
2828template <typename ParentGroup> class ballot_group ;
29- template <size_t PartitionSize , typename ParentGroup> class fixed_size_group ;
29+ template <size_t ChunkSize , typename ParentGroup> class chunk ;
3030template <int Dimensions> class root_group ;
3131template <typename ParentGroup> class tangle_group ;
3232class opportunistic_group ;
@@ -78,9 +78,9 @@ struct is_ballot_group<
7878
7979template <typename Group> struct is_fixed_size_group : std::false_type {};
8080
81- template <size_t PartitionSize , typename ParentGroup>
82- struct is_fixed_size_group <sycl::ext::oneapi::experimental::fixed_size_group <
83- PartitionSize , ParentGroup>> : std::true_type {};
81+ template <size_t ChunkSize , typename ParentGroup>
82+ struct is_chunk <sycl::ext::oneapi::experimental::chunk <
83+ ChunkSize , ParentGroup>> : std::true_type {};
8484
8585template <typename Group> struct group_scope {};
8686
@@ -105,9 +105,9 @@ struct group_scope<sycl::ext::oneapi::experimental::ballot_group<ParentGroup>> {
105105 static constexpr __spv::Scope::Flag value = group_scope<ParentGroup>::value;
106106};
107107
108- template <size_t PartitionSize , typename ParentGroup>
109- struct group_scope <sycl::ext::oneapi::experimental::fixed_size_group <
110- PartitionSize , ParentGroup>> {
108+ template <size_t ChunkSize , typename ParentGroup>
109+ struct group_scope <sycl::ext::oneapi::experimental::chunk <
110+ ChunkSize , ParentGroup>> {
111111 static constexpr __spv::Scope::Flag value = group_scope<ParentGroup>::value;
112112};
113113
@@ -174,15 +174,15 @@ bool GroupAll(ext::oneapi::experimental::ballot_group<ParentGroup> g,
174174 return __spirv_GroupNonUniformAll (group_scope<ParentGroup>::value, pred);
175175 }
176176}
177- template <size_t PartitionSize , typename ParentGroup>
177+ template <size_t ChunkSize , typename ParentGroup>
178178bool GroupAll (
179- ext::oneapi::experimental::fixed_size_group<PartitionSize , ParentGroup>,
179+ ext::oneapi::experimental::chunk<ChunkSize , ParentGroup>,
180180 bool pred) {
181181 // GroupNonUniformAll doesn't support cluster size, so use a reduction
182182 return __spirv_GroupNonUniformBitwiseAnd (
183183 group_scope<ParentGroup>::value,
184184 static_cast <uint32_t >(__spv::GroupOperation::ClusteredReduce),
185- static_cast <uint32_t >(pred), PartitionSize );
185+ static_cast <uint32_t >(pred), ChunkSize );
186186}
187187template <typename ParentGroup>
188188bool GroupAll (ext::oneapi::experimental::tangle_group<ParentGroup>, bool pred) {
@@ -210,15 +210,15 @@ bool GroupAny(ext::oneapi::experimental::ballot_group<ParentGroup> g,
210210 return __spirv_GroupNonUniformAny (group_scope<ParentGroup>::value, pred);
211211 }
212212}
213- template <size_t PartitionSize , typename ParentGroup>
213+ template <size_t ChunkSize , typename ParentGroup>
214214bool GroupAny (
215- ext::oneapi::experimental::fixed_size_group<PartitionSize , ParentGroup>,
215+ ext::oneapi::experimental::chunk<ChunkSize , ParentGroup>,
216216 bool pred) {
217217 // GroupNonUniformAny doesn't support cluster size, so use a reduction
218218 return __spirv_GroupNonUniformBitwiseOr (
219219 group_scope<ParentGroup>::value,
220220 static_cast <uint32_t >(__spv::GroupOperation::ClusteredReduce),
221- static_cast <uint32_t >(pred), PartitionSize );
221+ static_cast <uint32_t >(pred), ChunkSize );
222222}
223223template <typename ParentGroup>
224224bool GroupAny (ext::oneapi::experimental::tangle_group<ParentGroup>, bool pred) {
@@ -327,12 +327,12 @@ GroupBroadcast(sycl::ext::oneapi::experimental::ballot_group<ParentGroup> g,
327327 WideOCLX, OCLId);
328328 }
329329}
330- template <size_t PartitionSize , typename ParentGroup, typename T, typename IdT>
330+ template <size_t ChunkSize , typename ParentGroup, typename T, typename IdT>
331331EnableIfNativeBroadcast<T, IdT> GroupBroadcast (
332- ext::oneapi::experimental::fixed_size_group<PartitionSize , ParentGroup> g,
332+ ext::oneapi::experimental::chunk<ChunkSize , ParentGroup> g,
333333 T x, IdT local_id) {
334334 // Remap local_id to its original numbering in ParentGroup
335- auto LocalId = g.get_group_linear_id () * PartitionSize + local_id;
335+ auto LocalId = g.get_group_linear_id () * ChunkSize + local_id;
336336
337337 // TODO: Refactor to avoid duplication after design settles.
338338 auto GroupLocalId = static_cast <typename GroupId<ParentGroup>::type>(LocalId);
@@ -341,9 +341,9 @@ EnableIfNativeBroadcast<T, IdT> GroupBroadcast(
341341 auto OCLId = detail::convertToOpenCLType (GroupLocalId);
342342
343343 // NonUniformBroadcast requires Id to be dynamically uniform, which does not
344- // hold here; each partition is broadcasting a separate index. We could
344+ // hold here; each chunk is broadcasting a separate index. We could
345345 // fallback to either NonUniformShuffle or a NonUniformBroadcast per
346- // partition , and it's unclear which will be faster in practice.
346+ // chunk , and it's unclear which will be faster in practice.
347347 return __spirv_GroupNonUniformShuffle (group_scope<ParentGroup>::value,
348348 WideOCLX, OCLId);
349349}
@@ -1298,12 +1298,10 @@ ControlBarrier(Group g, memory_scope FenceScope, memory_order Order) {
12981298 } \
12991299 } \
13001300 \
1301- template <__spv::GroupOperation Op, size_t PartitionSize, \
1301+ template <__spv::GroupOperation Op, size_t ChunkSize, \
13021302 typename ParentGroup, typename T> \
13031303 inline T Group##Instruction( \
1304- ext::oneapi::experimental::fixed_size_group<PartitionSize, ParentGroup> \
1305- g, \
1306- T x) { \
1304+ ext::oneapi::experimental::chunk<ChunkSize, ParentGroup> g, T x) \
13071305 using ConvertedT = detail::ConvertToOpenCLType_t<T>; \
13081306 \
13091307 using OCLT = std::conditional_t < \
@@ -1321,7 +1319,7 @@ ControlBarrier(Group g, memory_scope FenceScope, memory_order Order) {
13211319 constexpr auto OpInt = \
13221320 static_cast <unsigned int >(__spv::GroupOperation::ClusteredReduce); \
13231321 return __spirv_GroupNonUniform##Instruction (Scope, OpInt, Arg, \
1324- PartitionSize ); \
1322+ ChunkSize ); \
13251323 } else { \
13261324 T tmp; \
13271325 for (size_t Cluster = 0 ; Cluster < g.get_group_linear_range (); \
0 commit comments