diff --git a/sycl/include/sycl/atomic.hpp b/sycl/include/sycl/atomic.hpp index c2bedd9989fcd..2f1044537c82c 100644 --- a/sycl/include/sycl/atomic.hpp +++ b/sycl/include/sycl/atomic.hpp @@ -9,12 +9,13 @@ #pragma once #include -#include // for Scope, MemorySemanticsMask -#include // for address_space, decorated +#include // for Scope, MemorySemanticsMask +#include +#include #include // for __SYCL2020_DEPRECATED -#include // for getSPIRVMemorySemanticsMask -#include // for memory_order, getStdMemoryO... -#include // for multi_ptr +#include +#include // for getSPIRVMemorySemanticsMask +#include // for memory_order, getStdMemoryO... #include // for is_same @@ -28,12 +29,6 @@ namespace sycl { inline namespace _V1 { - -// Forward declaration -template -class multi_ptr; - namespace detail { using memory_order = sycl::memory_order; diff --git a/sycl/include/sycl/detail/fwd/multi_ptr.hpp b/sycl/include/sycl/detail/fwd/multi_ptr.hpp new file mode 100644 index 0000000000000..934646f8181ef --- /dev/null +++ b/sycl/include/sycl/detail/fwd/multi_ptr.hpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#pragma once + +#include + +namespace sycl { +inline namespace _V1 { +// Forward declaration +template +class multi_ptr; +} // namespace _V1 +} // namespace sycl diff --git a/sycl/include/sycl/detail/type_traits.hpp b/sycl/include/sycl/detail/type_traits.hpp index 69c30260f21de..78d209ebeb899 100644 --- a/sycl/include/sycl/detail/type_traits.hpp +++ b/sycl/include/sycl/detail/type_traits.hpp @@ -10,11 +10,11 @@ #include -#include // for decorated, address_space +#include -#include // for array -#include // for size_t -#include // for true_type, false_type +#include +#include +#include namespace sycl { inline namespace _V1 { @@ -108,11 +108,6 @@ class half; } // namespace detail using half = detail::half_impl::half; -// Forward declaration -template -class multi_ptr; - template struct is_group : std::bool_constant::value || detail::is_sub_group::value> {}; diff --git a/sycl/include/sycl/ext/intel/usm_pointers.hpp b/sycl/include/sycl/ext/intel/usm_pointers.hpp index fc43845648389..ab49c74136814 100644 --- a/sycl/include/sycl/ext/intel/usm_pointers.hpp +++ b/sycl/include/sycl/ext/intel/usm_pointers.hpp @@ -8,17 +8,11 @@ #pragma once -#include // for decorated, address_space +#include namespace sycl { inline namespace _V1 { - -template -class multi_ptr; - -namespace ext { -namespace intel { +namespace ext::intel { template @@ -59,7 +53,6 @@ using decorated_host_ptr = multi_ptr; -} // namespace intel -} // namespace ext +} // namespace ext::intel } // namespace _V1 } // namespace sycl diff --git a/sycl/include/sycl/multi_ptr.hpp b/sycl/include/sycl/multi_ptr.hpp index 686d0a629a4a9..4a30322ec9936 100644 --- a/sycl/include/sycl/multi_ptr.hpp +++ b/sycl/include/sycl/multi_ptr.hpp @@ -12,8 +12,9 @@ #include // for half #include #include // for __SYCL2020_DEPRECATED -#include // for const_if_const_AS -#include // for BIsRepresentationT +#include +#include // for const_if_const_AS +#include // for BIsRepresentationT #include // for nullptr_t, ptrdiff_t, size_t #include // for random_access_iterator_tag diff --git a/sycl/include/sycl/pointers.hpp b/sycl/include/sycl/pointers.hpp index cd082b9f79904..12bb3b4f03bbe 100644 --- a/sycl/include/sycl/pointers.hpp +++ b/sycl/include/sycl/pointers.hpp @@ -8,14 +8,10 @@ #pragma once -#include // for decorated, address_space +#include namespace sycl { inline namespace _V1 { - -template -class multi_ptr; // Template specialization aliases for different pointer address spaces template -#include // for address_space, decorated #include -#include // for __SYCL_DEPRECATED +#include // for __SYCL_DEPRECATED +#include #include // for select_cl_scalar_inte... #include // for is_scalar_arithmetic #include // for exception, make_error... #include // for id #include // for memory_scope -#include // for multi_ptr #include #include // for range @@ -27,12 +26,7 @@ namespace sycl { inline namespace _V1 { -template -class multi_ptr; -template class __SYCL_EBO vec; namespace detail { - namespace sub_group { // Selects 8, 16, 32, or 64-bit type depending on size of scalar type T. diff --git a/sycl/test/include_deps/sycl_accessor.hpp.cpp b/sycl/test/include_deps/sycl_accessor.hpp.cpp index 668cbc647daef..fd6f33d470b0c 100644 --- a/sycl/test/include_deps/sycl_accessor.hpp.cpp +++ b/sycl/test/include_deps/sycl_accessor.hpp.cpp @@ -44,6 +44,7 @@ // CHECK-NEXT: aliases.hpp // CHECK-NEXT: detail/type_traits.hpp // CHECK-NEXT: detail/type_traits/vec_marray_traits.hpp +// CHECK-NEXT: detail/fwd/multi_ptr.hpp // CHECK-NEXT: half_type.hpp // CHECK-NEXT: bit_cast.hpp // CHECK-NEXT: aspects.hpp diff --git a/sycl/test/include_deps/sycl_detail_core.hpp.cpp b/sycl/test/include_deps/sycl_detail_core.hpp.cpp index 017297c8addc6..cb6d25ca11fb6 100644 --- a/sycl/test/include_deps/sycl_detail_core.hpp.cpp +++ b/sycl/test/include_deps/sycl_detail_core.hpp.cpp @@ -45,6 +45,7 @@ // CHECK-NEXT: aliases.hpp // CHECK-NEXT: detail/type_traits.hpp // CHECK-NEXT: detail/type_traits/vec_marray_traits.hpp +// CHECK-NEXT: detail/fwd/multi_ptr.hpp // CHECK-NEXT: half_type.hpp // CHECK-NEXT: bit_cast.hpp // CHECK-NEXT: aspects.hpp