Skip to content

Commit 506df5f

Browse files
Update for free functions
1 parent 40d5bf3 commit 506df5f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <sycl/builtins.hpp> // for sycl::min
1212
#include <sycl/detail/defines.hpp>
1313
#include <sycl/ext/oneapi/experimental/group_helpers_sorters.hpp>
14+
#include <sycl/ext/oneapi/free_function_queries.hpp>
1415
#include <sycl/group_algorithm.hpp>
1516
#include <sycl/sycl_span.hpp>
1617

@@ -32,7 +33,7 @@ T reduce_over_group_impl(GroupHelper group_helper, T x, size_t num_elements,
3233
std::is_trivial_v<T>) {
3334
// sycl::ext::oneapi::sub_group isn't sycl::sub_group, and shift_group_left
3435
// only accepts the latter.
35-
auto ndi = sycl::ext::oneapi::experimental::this_nd_item<
36+
auto ndi = sycl::ext::oneapi::this_work_item::get_nd_item<
3637
decltype(g)::dimensions>();
3738
auto sg = ndi.get_sub_group();
3839
for (size_t offset = num_elements / 2; offset > 0; offset /= 2) {
@@ -51,7 +52,7 @@ T reduce_over_group_impl(GroupHelper group_helper, T x, size_t num_elements,
5152
std::is_trivial_v<T>) {
5253
// TODO: Use get_child_group from sycl_ext_oneapi_root_group extension
5354
// once it is implemented instead of this free function.
54-
auto ndi = sycl::ext::oneapi::experimental::this_nd_item<
55+
auto ndi = sycl::ext::oneapi::this_work_item::get_nd_item<
5556
decltype(g)::dimensions>();
5657
auto sg = ndi.get_sub_group();
5758

0 commit comments

Comments
 (0)