From 8074617a846db5ba1e917c8ad7a3a13c47aa045d Mon Sep 17 00:00:00 2001 From: Alexey Bader Date: Mon, 11 Dec 2023 09:16:00 -0800 Subject: [PATCH] [SYCL][NFC] Remove item dependency on reduction. (#12135) Use Builder::createItem help function to create `item` object instead of adding one helper function in reduction namespace. --- sycl/include/sycl/detail/reduction_forward.hpp | 5 +++-- sycl/include/sycl/item.hpp | 10 +--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/sycl/include/sycl/detail/reduction_forward.hpp b/sycl/include/sycl/detail/reduction_forward.hpp index 40c6968bfee86..63d6a19990757 100644 --- a/sycl/include/sycl/detail/reduction_forward.hpp +++ b/sycl/include/sycl/detail/reduction_forward.hpp @@ -8,9 +8,10 @@ #pragma once +#include // for Builder #include // for range #include // for id -#include // for getDelinearizedItem, item +#include // for item #include // for nd_range #include // for range @@ -51,7 +52,7 @@ template void withAuxHandler(handler &CGH, FunctorTy Func); template item getDelinearizedItem(range Range, id Id) { - return {Range, Id}; + return Builder::createItem(Range, Id); } } // namespace reduction diff --git a/sycl/include/sycl/item.hpp b/sycl/include/sycl/item.hpp index 6b00c81697830..472668befdddf 100644 --- a/sycl/include/sycl/item.hpp +++ b/sycl/include/sycl/item.hpp @@ -21,17 +21,13 @@ namespace sycl { inline namespace _V1 { + namespace detail { class Builder; template class RoundedRangeKernel; template class RoundedRangeKernelWithKH; - -namespace reduction { -template -item getDelinearizedItem(range Range, id Id); -} // namespace reduction } // namespace detail /// Identifies an instance of the function object executing at each point @@ -133,10 +129,6 @@ template class item { friend class detail::Builder; private: - template - friend item - detail::reduction::getDelinearizedItem(range Range, id Id); - detail::ItemBase MImpl; };