From a6b00e18e10b8bf616911636c2daec78a751138c Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Mon, 15 Sep 2025 13:03:42 -0700 Subject: [PATCH] [NFC][SYCL] Reduce dependencies of `` --- sycl/include/sycl/detail/fwd/multi_ptr.hpp | 4 +++ sycl/include/sycl/group.hpp | 26 ++++++++++--------- .../include_deps/sycl_detail_core.hpp.cpp | 2 +- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/sycl/include/sycl/detail/fwd/multi_ptr.hpp b/sycl/include/sycl/detail/fwd/multi_ptr.hpp index 934646f8181ef..c3718463dc070 100644 --- a/sycl/include/sycl/detail/fwd/multi_ptr.hpp +++ b/sycl/include/sycl/detail/fwd/multi_ptr.hpp @@ -16,5 +16,9 @@ inline namespace _V1 { template class multi_ptr; +template +multi_ptr +address_space_cast(ElementType *pointer); } // namespace _V1 } // namespace sycl diff --git a/sycl/include/sycl/group.hpp b/sycl/include/sycl/group.hpp index 86693ac4137d2..0ad23a6c9ceaa 100644 --- a/sycl/include/sycl/group.hpp +++ b/sycl/include/sycl/group.hpp @@ -8,35 +8,37 @@ #pragma once -#include // for Scope, __ocl_event_t -#include // for decorated, mode, addr... -#include // for NDLoop, __SYCL_ASSERT -#include // for __SYCL_TYPE -#include // for __SYCL2020_DEPRECATED +#include // for Scope, __ocl_event_t +#include // for decorated, mode, addr... +#include // for NDLoop +#include // for __SYCL_TYPE +#include // for __SYCL2020_DEPRECATED +#include #include // for convertToOpenCLType #include // for Builder, getSPIRVMemo... -#include // for id, range #include // for is_bool, change_base_... #include // for device_event -#include // for make_error_code, errc -#include // for h_item #include // for id #include // for item #include // for memory_scope -#include // for multi_ptr, address_sp... #include // for decorated_global_ptr #include // for range -#include // for unique_ptr +#ifndef __SYCL_DEVICE_ONLY__ +#include + +#include // for unique_ptr +#endif + #include // for size_t #include // for uint8_t, uint32_t #include // for enable_if_t, remove_c... namespace sycl { inline namespace _V1 { -namespace detail { -class Builder; +template class h_item; +namespace detail { // Implements a barrier accross work items within a work group. inline void workGroupBarrier() { #ifdef __SYCL_DEVICE_ONLY__ diff --git a/sycl/test/include_deps/sycl_detail_core.hpp.cpp b/sycl/test/include_deps/sycl_detail_core.hpp.cpp index 72eea7f16317c..f4c33d1ed938f 100644 --- a/sycl/test/include_deps/sycl_detail_core.hpp.cpp +++ b/sycl/test/include_deps/sycl_detail_core.hpp.cpp @@ -95,8 +95,8 @@ // CHECK-NEXT: detail/kernel_desc.hpp // CHECK-NEXT: group.hpp // CHECK-NEXT: device_event.hpp -// CHECK-NEXT: h_item.hpp // CHECK-NEXT: item.hpp +// CHECK-NEXT: h_item.hpp // CHECK-NEXT: kernel_handler.hpp // CHECK-NEXT: nd_item.hpp // CHECK-NEXT: nd_range.hpp