From 572dba838d0f9de9559fbf645bd3f3b94b607973 Mon Sep 17 00:00:00 2001 From: Alexey Bader Date: Tue, 1 Aug 2023 14:58:00 -0700 Subject: [PATCH 01/36] Apply include what you use. --- sycl/include/CL/__spirv/spirv_ops.hpp | 8 +- sycl/include/CL/__spirv/spirv_types.hpp | 14 +-- sycl/include/CL/__spirv/spirv_vars.hpp | 3 - sycl/include/sycl/access/access.hpp | 7 +- sycl/include/sycl/accessor.hpp | 98 ++++++++-------- sycl/include/sycl/aliases.hpp | 12 +- sycl/include/sycl/aspects.hpp | 7 +- sycl/include/sycl/async_handler.hpp | 6 +- sycl/include/sycl/atomic.hpp | 20 ++-- sycl/include/sycl/atomic_fence.hpp | 6 +- sycl/include/sycl/atomic_ref.hpp | 17 ++- sycl/include/sycl/backend.hpp | 54 +++++---- sycl/include/sycl/backend/opencl.hpp | 13 ++- sycl/include/sycl/backend_types.hpp | 6 +- sycl/include/sycl/bit_cast.hpp | 5 +- sycl/include/sycl/buffer.hpp | 61 +++++----- sycl/include/sycl/builtins.hpp | 23 ++-- sycl/include/sycl/context.hpp | 30 ++--- .../include/sycl/detail/accessor_iterator.hpp | 15 +-- .../include/sycl/detail/aligned_allocator.hpp | 12 +- sycl/include/sycl/detail/array.hpp | 12 +- sycl/include/sycl/detail/assert_happened.hpp | 4 +- sycl/include/sycl/detail/backend_traits.hpp | 5 +- .../sycl/detail/backend_traits_level_zero.hpp | 30 +++-- .../sycl/detail/backend_traits_opencl.hpp | 23 ++-- sycl/include/sycl/detail/boolean.hpp | 10 +- sycl/include/sycl/detail/builtins.hpp | 6 +- sycl/include/sycl/detail/cg.hpp | 44 +++---- sycl/include/sycl/detail/cg_types.hpp | 31 +++-- sycl/include/sycl/detail/common.hpp | 24 ++-- sycl/include/sycl/detail/defines.hpp | 4 +- .../sycl/detail/generic_type_lists.hpp | 13 +-- .../sycl/detail/generic_type_traits.hpp | 48 +++----- sycl/include/sycl/detail/group_sort_impl.hpp | 6 - sycl/include/sycl/detail/handler_proxy.hpp | 8 +- sycl/include/sycl/detail/helpers.hpp | 37 ++---- .../sycl/detail/host_profiling_info.hpp | 4 +- .../sycl/detail/image_accessor_util.hpp | 27 +++-- sycl/include/sycl/detail/impl_utils.hpp | 5 +- .../include/sycl/detail/info_desc_helpers.hpp | 20 +--- sycl/include/sycl/detail/iostream_proxy.hpp | 3 +- sycl/include/sycl/detail/item_base.hpp | 8 +- sycl/include/sycl/detail/kernel_desc.hpp | 3 - sycl/include/sycl/detail/os_util.hpp | 18 +-- sycl/include/sycl/detail/owner_less_base.hpp | 5 +- sycl/include/sycl/detail/pi.hpp | 26 ++--- sycl/include/sycl/detail/property_helper.hpp | 2 - .../sycl/detail/property_list_base.hpp | 18 +-- .../include/sycl/detail/reduction_forward.hpp | 14 +-- .../sycl/detail/service_kernel_names.hpp | 7 -- sycl/include/sycl/detail/spirv.hpp | 11 -- sycl/include/sycl/detail/stl_type_traits.hpp | 7 +- sycl/include/sycl/detail/sycl_fe_intrins.hpp | 3 - .../sycl/detail/sycl_mem_obj_allocator.hpp | 5 +- sycl/include/sycl/detail/tuple.hpp | 13 +-- sycl/include/sycl/detail/type_list.hpp | 8 +- sycl/include/sycl/detail/type_traits.hpp | 37 ++---- sycl/include/sycl/detail/vector_traits.hpp | 4 +- sycl/include/sycl/device.hpp | 38 +++--- sycl/include/sycl/device_aspect_traits.hpp | 10 +- sycl/include/sycl/device_selector.hpp | 19 ++- sycl/include/sycl/event.hpp | 27 ++--- sycl/include/sycl/exception.hpp | 20 ++-- sycl/include/sycl/exception_list.hpp | 19 +-- .../experimental/fusion_properties.hpp | 17 +-- .../codeplay/experimental/fusion_wrapper.hpp | 11 +- .../fpga_annotated_properties.hpp | 11 +- .../ext/intel/experimental/fpga_utils.hpp | 8 +- .../kernel_execution_properties.hpp | 5 +- .../intel/experimental/pipe_properties.hpp | 6 +- .../sycl/ext/intel/experimental/pipes.hpp | 25 ++-- .../ext/intel/experimental/usm_properties.hpp | 7 +- sycl/include/sycl/ext/intel/pipes.hpp | 7 +- sycl/include/sycl/ext/intel/usm_pointers.hpp | 5 +- .../ext/oneapi/accessor_property_list.hpp | 22 ++-- .../sycl/ext/oneapi/backend/level_zero.hpp | 31 ++++- .../oneapi/backend/level_zero_ownership.hpp | 2 - sycl/include/sycl/ext/oneapi/bfloat16.hpp | 10 +- .../sycl/ext/oneapi/bindless_images.hpp | 21 +++- .../ext/oneapi/bindless_images_descriptor.hpp | 9 +- .../ext/oneapi/bindless_images_interop.hpp | 4 + .../ext/oneapi/bindless_images_memory.hpp | 16 ++- .../oneapi/device_global/device_global.hpp | 18 +-- .../ext/oneapi/device_global/properties.hpp | 8 +- .../annotated_arg/annotated_arg.hpp | 11 +- .../annotated_ptr/annotated_ptr.hpp | 15 ++- .../ext/oneapi/experimental/ballot_group.hpp | 13 ++- .../ext/oneapi/experimental/bfloat16_math.hpp | 13 +-- .../sycl/ext/oneapi/experimental/builtins.hpp | 19 +-- .../properties.hpp | 8 +- .../ext/oneapi/experimental/cuda/barrier.hpp | 8 +- .../cuda/non_uniform_algorithms.hpp | 1 - .../experimental/device_architecture.hpp | 2 - .../oneapi/experimental/fixed_size_group.hpp | 13 ++- .../sycl/ext/oneapi/experimental/graph.hpp | 30 ++--- .../experimental/group_helpers_sorters.hpp | 19 ++- .../ext/oneapi/experimental/group_sort.hpp | 15 ++- .../experimental/non_uniform_groups.hpp | 20 +--- .../experimental/opportunistic_group.hpp | 13 ++- .../ext/oneapi/experimental/tangle_group.hpp | 13 ++- .../sycl/ext/oneapi/filter_selector.hpp | 14 +-- sycl/include/sycl/ext/oneapi/functional.hpp | 7 +- .../sycl/ext/oneapi/group_local_memory.hpp | 17 ++- .../oneapi/kernel_properties/properties.hpp | 15 ++- .../ext/oneapi/latency_control/properties.hpp | 5 +- .../sycl/ext/oneapi/matrix/matrix-intel.hpp | 24 ++-- .../ext/oneapi/matrix/matrix-tensorcores.hpp | 26 ++--- .../sycl/ext/oneapi/matrix/matrix-unified.hpp | 16 ++- .../include/sycl/ext/oneapi/matrix/matrix.hpp | 6 +- .../ext/oneapi/matrix/static-query-use.hpp | 11 +- sycl/include/sycl/ext/oneapi/owner_less.hpp | 28 ++--- .../sycl/ext/oneapi/properties/properties.hpp | 18 ++- .../sycl/ext/oneapi/properties/property.hpp | 4 + .../ext/oneapi/properties/property_utils.hpp | 28 ++--- .../ext/oneapi/properties/property_value.hpp | 5 +- sycl/include/sycl/ext/oneapi/sub_group.hpp | 7 +- .../sycl/ext/oneapi/sub_group_mask.hpp | 33 ++---- sycl/include/sycl/ext/oneapi/weak_object.hpp | 20 +++- .../sycl/ext/oneapi/weak_object_base.hpp | 5 +- sycl/include/sycl/functional.hpp | 6 +- sycl/include/sycl/group.hpp | 42 ++++--- sycl/include/sycl/group_algorithm.hpp | 37 +++--- sycl/include/sycl/group_barrier.hpp | 12 +- sycl/include/sycl/h_item.hpp | 15 ++- sycl/include/sycl/half_type.hpp | 28 ++--- sycl/include/sycl/handler.hpp | 62 +++++----- sycl/include/sycl/id.hpp | 23 ++-- sycl/include/sycl/image.hpp | 58 +++++----- sycl/include/sycl/info/info_desc.hpp | 57 +-------- sycl/include/sycl/interop_handle.hpp | 41 +++---- sycl/include/sycl/item.hpp | 21 ++-- sycl/include/sycl/kernel.hpp | 31 +++-- sycl/include/sycl/kernel_bundle.hpp | 45 ++++---- sycl/include/sycl/kernel_handler.hpp | 9 +- sycl/include/sycl/known_identity.hpp | 18 ++- sycl/include/sycl/marray.hpp | 21 ++-- sycl/include/sycl/memory_enums.hpp | 5 +- sycl/include/sycl/multi_ptr.hpp | 22 ++-- sycl/include/sycl/nd_item.hpp | 40 +++---- sycl/include/sycl/nd_range.hpp | 8 +- sycl/include/sycl/pipes.hpp | 3 +- sycl/include/sycl/platform.hpp | 32 ++--- sycl/include/sycl/pointers.hpp | 7 +- .../sycl/properties/accessor_properties.hpp | 36 ++---- .../sycl/properties/all_properties.hpp | 7 -- .../sycl/properties/buffer_properties.hpp | 15 ++- .../sycl/properties/context_properties.hpp | 11 +- .../sycl/properties/image_properties.hpp | 13 +-- .../sycl/properties/property_traits.hpp | 3 +- .../sycl/properties/queue_properties.hpp | 12 +- .../sycl/properties/reduction_properties.hpp | 4 +- sycl/include/sycl/property_list.hpp | 15 ++- sycl/include/sycl/queue.hpp | 56 +++++++-- sycl/include/sycl/range.hpp | 11 +- sycl/include/sycl/reduction.hpp | 109 ++++++++---------- sycl/include/sycl/sampler.hpp | 22 ++-- sycl/include/sycl/specialization_id.hpp | 5 + sycl/include/sycl/stl.hpp | 5 +- sycl/include/sycl/stream.hpp | 36 ++++-- sycl/include/sycl/sub_group.hpp | 34 +++--- sycl/include/sycl/sycl.hpp | 79 +------------ sycl/include/sycl/sycl_span.hpp | 14 +-- sycl/include/sycl/types.hpp | 64 +++++----- sycl/include/sycl/usm.hpp | 18 +-- sycl/include/sycl/usm/usm_allocator.hpp | 22 ++-- sycl/include/sycl/usm/usm_pointer_info.hpp | 5 +- 166 files changed, 1461 insertions(+), 1626 deletions(-) diff --git a/sycl/include/CL/__spirv/spirv_ops.hpp b/sycl/include/CL/__spirv/spirv_ops.hpp index 4d349dc70ab72..8c89263b6b434 100644 --- a/sycl/include/CL/__spirv/spirv_ops.hpp +++ b/sycl/include/CL/__spirv/spirv_ops.hpp @@ -8,9 +8,11 @@ #pragma once -#include -#include -#include +#include // for Scope, __ocl_event_t +#include // for __DPCPP_SYCL_EXTERNAL +#include // for __SYCL_EXPORT +#include // for size_t +#include // for uint32_t // Convergent attribute #ifdef __SYCL_DEVICE_ONLY__ diff --git a/sycl/include/CL/__spirv/spirv_types.hpp b/sycl/include/CL/__spirv/spirv_types.hpp index 5d9da888f315e..c843cca61529b 100644 --- a/sycl/include/CL/__spirv/spirv_types.hpp +++ b/sycl/include/CL/__spirv/spirv_types.hpp @@ -8,12 +8,12 @@ #pragma once -#include -#include +#include // for half +#include // for complex +#include // for size_t +#include // for uint32_t -#include -#include -#include +#include "detail/defines.hpp" // for SYCL_EXT_ONEAPI_MATRIX_VERSION // TODO: include the header file with SPIR-V declarations from SPIRV-Headers // project. @@ -152,10 +152,6 @@ struct complex_half { }; #if (SYCL_EXT_ONEAPI_MATRIX_VERSION > 1) -template -struct __spirv_JointMatrixINTEL; #else template diff --git a/sycl/include/CL/__spirv/spirv_vars.hpp b/sycl/include/CL/__spirv/spirv_vars.hpp index b236dd1aea244..f44adc6ffc424 100644 --- a/sycl/include/CL/__spirv/spirv_vars.hpp +++ b/sycl/include/CL/__spirv/spirv_vars.hpp @@ -8,9 +8,6 @@ #pragma once -#include -#include - #ifdef __SYCL_DEVICE_ONLY__ #define __SPIRV_VAR_QUALIFIERS extern "C" const diff --git a/sycl/include/sycl/access/access.hpp b/sycl/include/sycl/access/access.hpp index 5a5054fea3fb0..d63e5856b2091 100644 --- a/sycl/include/sycl/access/access.hpp +++ b/sycl/include/sycl/access/access.hpp @@ -7,9 +7,7 @@ //===----------------------------------------------------------------------===// #pragma once -#include -#include -#include +#include "detail/defines_elementary.hpp" // for __SYCL2020_DEPRECATED namespace sycl { inline namespace _V1 { @@ -104,7 +102,6 @@ constexpr bool modeWritesNewData(access::mode m) { return m != access::mode::read; } -template struct NegateDecorated; template <> struct NegateDecorated { static constexpr access::decorated value = access::decorated::no; }; @@ -155,8 +152,6 @@ template <> struct TargetToAS { access::address_space::constant_space; }; -template -struct DecoratedType; template struct DecoratedType { diff --git a/sycl/include/sycl/accessor.hpp b/sycl/include/sycl/accessor.hpp index 9a673a3278ec1..ebd8949ffaab6 100644 --- a/sycl/include/sycl/accessor.hpp +++ b/sycl/include/sycl/accessor.hpp @@ -8,36 +8,52 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include +#include // for atomic +#include // for range +#include // for accessor_iterator +#include // for code_location +#include // for __SYCL_EXPORT +#include // for is_genint, Try... +#include // for associateWithH... +#include // for imageReadSampl... +#include // for OwnerLessBase +#include // for device +#include // for make_error_code +#include // for accessor_prope... +#include // for getSyclWeakObj... +#include // for id +#include // for image, image_c... +#include // for local_ptr, glo... +#include // for buffer_location +#include // for buffer, buffer... +#include // for property_list +#include // for addressing_mode +#include // for uint32_t +#include // for reverse_iterator +#include // for nullopt, optional +#include // for enable_if_t +#include // for size_t +#include // for hash +#include // for numeric_limits +#include // for shared_ptr +#include // for _Swallow_assign +#include // for type_info +#include // for hash + +#include "access/access.hpp" // for target, mode +#include "aliases.hpp" // for float4, int4 +#include "aspects.hpp" // for aspect +#include "detail/defines.hpp" // for __SYCL_SPECIAL... +#include "detail/defines_elementary.hpp" // for __SYCL2020_DEP... +#include "detail/helpers.hpp" // for loop +#include "detail/pi_error.def" // for PI_ERROR_INVAL... +#include "detail/property_helper.hpp" // for PropWithDataKind +#include "detail/property_list_base.hpp" // for PropertyListBase +#include "detail/type_list.hpp" // for is_contained +#include "detail/type_traits.hpp" // for const_if_const_AS +#include "multi_ptr.hpp" // for multi_ptr +#include "range.hpp" // for range +#include "types.hpp" // for vec /// \file accessor.hpp /// The file contains implementations of accessor class. @@ -212,18 +228,7 @@ namespace sycl { inline namespace _V1 { -class stream; -namespace ext::intel::esimd::detail { -// Forward declare a "back-door" access class to support ESIMD. -class AccessorPrivateProxy; -} // namespace ext::intel::esimd::detail -template > -class accessor; namespace detail { @@ -503,11 +508,9 @@ template class AccessorImplDevice { } }; -class AccessorImplHost; void __SYCL_EXPORT addHostAccessorAndWait(AccessorImplHost *Req); -class SYCLMemObjI; using AccessorImplPtr = std::shared_ptr; @@ -563,7 +566,6 @@ class __SYCL_EXPORT AccessorBaseHost { friend class sycl::ext::intel::esimd::detail::AccessorPrivateProxy; }; -class LocalAccessorImplHost; using LocalAccessorImplPtr = std::shared_ptr; class __SYCL_EXPORT LocalAccessorBaseHost { @@ -591,8 +593,6 @@ class __SYCL_EXPORT LocalAccessorBaseHost { LocalAccessorImplPtr impl; }; -class UnsampledImageAccessorImplHost; -class SampledImageAccessorImplHost; using UnsampledImageAccessorImplPtr = std::shared_ptr; using SampledImageAccessorImplPtr = @@ -729,7 +729,6 @@ class __SYCL_EXPORT SampledImageAccessorBaseHost { #endif }; -template struct IsValidCoordDataT; template struct IsValidCoordDataT<1, T> { constexpr static bool value = detail::is_contained< T, detail::type_list>::type::value; @@ -745,7 +744,6 @@ template struct IsValidCoordDataT<3, T> { vec>>::type::value; }; -template struct IsValidUnsampledCoord2020DataT; template struct IsValidUnsampledCoord2020DataT<1, T> { constexpr static bool value = std::is_same_v; }; @@ -756,7 +754,6 @@ template struct IsValidUnsampledCoord2020DataT<3, T> { constexpr static bool value = std::is_same_v; }; -template struct IsValidSampledCoord2020DataT; template struct IsValidSampledCoord2020DataT<1, T> { constexpr static bool value = std::is_same_v; }; @@ -767,9 +764,6 @@ template struct IsValidSampledCoord2020DataT<3, T> { constexpr static bool value = std::is_same_v; }; -template -class __image_array_slice__; // Image accessor template -#include -#include +#include // for __SYCL2020_DEPRECATED +#include // for uint8_t, int16_t, int32_t -#include -#include +#include "half_type.hpp" // for half namespace sycl { inline namespace _V1 { -template class vec; -namespace detail::half_impl { -class half; -} // namespace detail::half_impl } // namespace _V1 } // namespace sycl diff --git a/sycl/include/sycl/aspects.hpp b/sycl/include/sycl/aspects.hpp index e60e25510d79f..45f5c51a9ee11 100644 --- a/sycl/include/sycl/aspects.hpp +++ b/sycl/include/sycl/aspects.hpp @@ -7,7 +7,10 @@ // ===--------------------------------------------------------------------=== // #pragma once -#include +#include // for __SYCL_TYPE + +#include "detail/defines_elementary.hpp" // for __SYCL2020_DEPRECATED +#include "device_aspect_traits.hpp" // for __SYCL_ASPECT_DEPRECATED namespace sycl { inline namespace _V1 { @@ -18,8 +21,6 @@ inline namespace _V1 { #define __SYCL_ASPECT_DEPRECATED_ALIAS(ASPECT, ID, MESSAGE) \ __SYCL_ASPECT_DEPRECATED(ASPECT, ID, MESSAGE) enum class __SYCL_TYPE(aspect) aspect { -#include -#include }; #undef __SYCL_ASPECT_DEPRECATED_ALIAS #undef __SYCL_ASPECT_DEPRECATED diff --git a/sycl/include/sycl/async_handler.hpp b/sycl/include/sycl/async_handler.hpp index 39d8a443d3d30..a7bf4b644a82f 100644 --- a/sycl/include/sycl/async_handler.hpp +++ b/sycl/include/sycl/async_handler.hpp @@ -8,15 +8,11 @@ #pragma once -#include - -#include +#include // for function namespace sycl { inline namespace _V1 { -// Forward declaration -class exception_list; using async_handler = std::function; } // namespace _V1 diff --git a/sycl/include/sycl/atomic.hpp b/sycl/include/sycl/atomic.hpp index c729cae307e9c..969f51ee997c4 100644 --- a/sycl/include/sycl/atomic.hpp +++ b/sycl/include/sycl/atomic.hpp @@ -8,18 +8,20 @@ #pragma once -#include -#include -#include -#include -#include +#include // for address_space, decorated +#include // for getSPIRVMemorySemanticsMask +#include // for memory_order, getStdMemoryO... #ifndef __SYCL_DEVICE_ONLY__ -#include +#include // for atomic, memory_order #else #include #endif -#include +#include // for is_same + +#include "CL/__spirv/spirv_types.hpp" // for Scope, MemorySemanticsMask +#include "detail/defines_elementary.hpp" // for __SYCL2020_DEPRECATED +#include "multi_ptr.hpp" // for multi_ptr #define __SYCL_STATIC_ASSERT_NOT_FLOAT(T) \ static_assert(!std::is_same::value, \ @@ -28,10 +30,6 @@ namespace sycl { inline namespace _V1 { -// Forward declaration -template -class multi_ptr; namespace detail { diff --git a/sycl/include/sycl/atomic_fence.hpp b/sycl/include/sycl/atomic_fence.hpp index 1c1d38bcb7268..a1a7b759ae836 100644 --- a/sycl/include/sycl/atomic_fence.hpp +++ b/sycl/include/sycl/atomic_fence.hpp @@ -8,12 +8,10 @@ #pragma once -#include -#include -#include +#include // for getStdMemoryOrder, memory_order #ifndef __SYCL_DEVICE_ONLY__ -#include +#include // for atomic_thread_fence #endif namespace sycl { diff --git a/sycl/include/sycl/atomic_ref.hpp b/sycl/include/sycl/atomic_ref.hpp index 74bd32ca048c5..a75a774518b05 100644 --- a/sycl/include/sycl/atomic_ref.hpp +++ b/sycl/include/sycl/atomic_ref.hpp @@ -8,20 +8,21 @@ #pragma once -#include -#include -#include -#include -#include +#include // for address_space +#include // for getStdMemoryOrder, memory_order +#include // for size_t, ptrdiff_t +#include // for uintptr_t, uint32_t, uint64_t #ifdef __SYCL_DEVICE_ONLY__ #include #include #endif #ifndef __SYCL_DEVICE_ONLY__ -#include +#include // for atomic #endif -#include +#include // for enable_if_t, bool_constant + +#include "bit_cast.hpp" // for bit_cast namespace sycl { inline namespace _V1 { @@ -53,7 +54,6 @@ using IsValidDefaultOrder = std::bool_constant; -template struct memory_order_traits; template <> struct memory_order_traits { static constexpr memory_order read_order = memory_order::relaxed; @@ -86,7 +86,6 @@ inline constexpr memory_order getLoadOrder(memory_order order) { } } -template struct bit_equal; template struct bit_equal>> { diff --git a/sycl/include/sycl/backend.hpp b/sycl/include/sycl/backend.hpp index b735634393f25..f28c3bb4d8cbc 100644 --- a/sycl/include/sycl/backend.hpp +++ b/sycl/include/sycl/backend.hpp @@ -8,15 +8,16 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include +#include // for accessor +#include // for backend +#include // for buffer_allocator +#include // for context, get_na... +#include // for InteropFeatureS... +#include // for SYCL_BACKEND_OP... +#include // for image, image_al... +#include // for int32_t #if SYCL_BACKEND_OPENCL -#include +#include // for interop #endif #if SYCL_EXT_ONEAPI_BACKEND_CUDA #ifdef SYCL_EXT_ONEAPI_BACKEND_CUDA_EXPERIMENTAL @@ -29,20 +30,29 @@ #include #endif #if SYCL_EXT_ONEAPI_BACKEND_LEVEL_ZERO -#include +#include // for _ze_command_lis... #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include +#include // for __SYCL_EXPORT +#include // for pi_native_handle +#include // for device, get_native +#include // for event, get_native +#include // for make_error_code +#include // for kernel_bundle +#include // for platform, get_n... +#include // for queue, get_native +#include // for enable_if_t +#include // for shared_ptr +#include // for vector + +#include "CL/cl.h" // for _cl_event +#include "access/access.hpp" // for mode, placeholder +#include "async_handler.hpp" // for async_handler +#include "detail/defines_elementary.hpp" // for __SYCL_DEPRECATED +#include "detail/impl_utils.hpp" // for createSyclObjFr... +#include "handler.hpp" // for buffer +#include "kernel.hpp" // for kernel, get_native +#include "kernel_bundle_enums.hpp" // for bundle_state +#include "property_list.hpp" // for property_list namespace sycl { inline namespace _V1 { @@ -214,8 +224,6 @@ auto get_native(const accessor>::type = delete; namespace detail { -// Forward declaration -class kernel_bundle_impl; __SYCL_EXPORT platform make_platform(pi_native_handle NativeHandle, backend Backend); diff --git a/sycl/include/sycl/backend/opencl.hpp b/sycl/include/sycl/backend/opencl.hpp index 6b13bb9767dbd..4ef14ce946759 100644 --- a/sycl/include/sycl/backend/opencl.hpp +++ b/sycl/include/sycl/backend/opencl.hpp @@ -9,9 +9,18 @@ #pragma once -#include +#include // for string +#include // for enable_if_t -#include +#include "backend_types.hpp" // for backend +#include "context.hpp" // for context +#include "detail/backend_traits.hpp" // for interop +#include "detail/defines_elementary.hpp" // for __SYCL_DEPRECATED +#include "detail/export.hpp" // for __SYCL_EXPORT +#include "detail/pi.h" // for pi_native_handle +#include "device.hpp" // for device +#include "platform.hpp" // for platform +#include "queue.hpp" // for queue namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/backend_types.hpp b/sycl/include/sycl/backend_types.hpp index fdc7d7461d8f5..89c4f4db0a434 100644 --- a/sycl/include/sycl/backend_types.hpp +++ b/sycl/include/sycl/backend_types.hpp @@ -8,9 +8,8 @@ #pragma once -#include - -#include +#include // for __SYCL2020_DEPRECATED +#include // for operator<<, ostream namespace sycl { inline namespace _V1 { @@ -26,7 +25,6 @@ enum class backend : char { ext_native_cpu = 7, }; -template class backend_traits; template using backend_input_t = diff --git a/sycl/include/sycl/bit_cast.hpp b/sycl/include/sycl/bit_cast.hpp index 11d0ea7421104..ae8165e24c320 100644 --- a/sycl/include/sycl/bit_cast.hpp +++ b/sycl/include/sycl/bit_cast.hpp @@ -8,10 +8,7 @@ #pragma once -#include -#include - -#include +#include // for is_trivially_copyable, enable_if_t #if __cpp_lib_bit_cast #include diff --git a/sycl/include/sycl/buffer.hpp b/sycl/include/sycl/buffer.hpp index d81d413eb589f..27ca7f3b540da 100644 --- a/sycl/include/sycl/buffer.hpp +++ b/sycl/include/sycl/buffer.hpp @@ -8,42 +8,52 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include // for code_location +#include // for OwnerLessBase +#include // for iterator_value... +#include // for SYCLMemObjAllo... +#include // for event +#include // for invalid_object... +#include // for accessor_prope... +#include // for id +#include // for property_list +#include // for range, rangeTo... +#include // for make_unique_ptr +#include // for uint32_t +#include // for size_t, nullptr_t +#include // for function +#include // for iterator_traits +#include // for shared_ptr +#include // for string +#include // for enable_if_t +#include // for type_info +#include // for declval, move +#include // for hash +#include // for vector + +#include "access/access.hpp" // for placeholder +#include "backend_types.hpp" // for backend, backe... +#include "context.hpp" // for context +#include "detail/array.hpp" // for array +#include "detail/defines_elementary.hpp" // for __SYCL2020_DEP... +#include "detail/export.hpp" // for __SYCL_EXPORT +#include "detail/helpers.hpp" // for buffer_impl +#include "detail/pi.h" // for pi_native_handle +#include "detail/pi_error.def" // for PI_ERROR_INVAL... +#include "detail/property_helper.hpp" // for PropWithDataKind +#include "detail/type_traits.hpp" // for remove_pointer_t namespace sycl { inline namespace _V1 { -class handler; -class queue; -template class range; template using buffer_allocator = detail::sycl_memory_object_allocator; -template -class host_accessor; -template -class buffer; - -namespace ext::oneapi { -template class weak_object; -} // namespace ext::oneapi namespace detail { -class buffer_impl; template buffer @@ -59,9 +69,6 @@ auto get_native_buffer(const buffer &Obj) -> backend_return_t>; -template >> -struct BufferInterop; // The non-template base for the sycl::buffer class class __SYCL_EXPORT buffer_plain { diff --git a/sycl/include/sycl/builtins.hpp b/sycl/include/sycl/builtins.hpp index 43f23204b46c4..f9dd7334830f5 100644 --- a/sycl/include/sycl/builtins.hpp +++ b/sycl/include/sycl/builtins.hpp @@ -8,14 +8,21 @@ #pragma once -#include -#include -#include -#include -#include -#include - -#include +#include // for Boolean +#include // for __invoke_select, __in... +#include // for is_svgenfloat, is_sge... +#include // for vec +#include // for memcpy, size_t +#include // for enable_if_t, conditio... + +#include "access/access.hpp" // for address_space, decorated +#include "aliases.hpp" // for half +#include "detail/defines_elementary.hpp" // for __SYCL_ALWAYS_INLINE +#include "detail/type_list.hpp" // for is_contained, type_list +#include "detail/type_traits.hpp" // for make_larger_t, marray... +#include "half_type.hpp" // for half, intel +#include "marray.hpp" // for marray +#include "multi_ptr.hpp" // for address_space_cast // TODO Decide whether to mark functions with this attribute. #define __NOEXC /*noexcept*/ diff --git a/sycl/include/sycl/context.hpp b/sycl/include/sycl/context.hpp index cff35b33ee28f..ab52542450a93 100644 --- a/sycl/include/sycl/context.hpp +++ b/sycl/include/sycl/context.hpp @@ -8,24 +8,28 @@ #pragma once -#include -#include -#include -#include -#include -#include +#include // for async_handler +#include // for backend, backend_return_t +#include // for __SYCL_EXPORT +#include // for is_context_info_desc +#include // for OwnerLessBase +#include // for property_list +#include // for size_t +#include // for shared_ptr, hash, opera... +#include // for add_pointer_t +#include // for hash +#include // for vector + +#include "detail/defines_elementary.hpp" // for __SYCL2020_DEPRECATED +#include "detail/helpers.hpp" // for context_impl +#include "detail/pi.h" // for pi_native_handle +#include "device.hpp" // for device +#include "platform.hpp" // for platform // 4.6.2 Context class namespace sycl { inline namespace _V1 { -// Forward declarations -class device; -class platform; - -namespace detail { -class context_impl; -} template auto get_native(const SyclT &Obj) -> backend_return_t; diff --git a/sycl/include/sycl/detail/accessor_iterator.hpp b/sycl/include/sycl/detail/accessor_iterator.hpp index aec69ff3ef30a..e8c32279e073d 100644 --- a/sycl/include/sycl/detail/accessor_iterator.hpp +++ b/sycl/include/sycl/detail/accessor_iterator.hpp @@ -8,12 +8,13 @@ #pragma once -#include +#include // for id +#include // for size_t +#include // for random_access_iterator_tag +#include // for operator<<, ostream, ptrdiff_t -#include -#include -#include -#include +#include "access/access.hpp" // for mode, placeholder, target +#include "buffer.hpp" // for range /// \file accessor_iterator.hpp /// The file contains implementation of accessor iterator class. @@ -37,10 +38,6 @@ namespace sycl { inline namespace _V1 { -template -class accessor; namespace detail { diff --git a/sycl/include/sycl/detail/aligned_allocator.hpp b/sycl/include/sycl/detail/aligned_allocator.hpp index 5e18b7e15d186..e086100ced787 100644 --- a/sycl/include/sycl/detail/aligned_allocator.hpp +++ b/sycl/include/sycl/detail/aligned_allocator.hpp @@ -8,12 +8,12 @@ #pragma once -#include -#include - -#include -#include -#include +#include // for OSUtil +#include // for size_t +#include // for numeric_limits +#include // for pointer_traits, allocator_traits +#include // for bad_alloc, operator new +#include // for false_type, is_empty, make_unsign... namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/detail/array.hpp b/sycl/include/sycl/detail/array.hpp index 5a73c331aec86..ec54f4d67b7af 100644 --- a/sycl/include/sycl/detail/array.hpp +++ b/sycl/include/sycl/detail/array.hpp @@ -7,15 +7,15 @@ //===----------------------------------------------------------------------===// #pragma once -#include -#include -#include -#include +#include // for invalid_parameter_error +#include // for size_t +#include // for enable_if_t + +#include "detail/defines_elementary.hpp" // for __SYCL_ALWAYS_INLINE +#include "detail/pi_error.def" // for PI_ERROR_INVALID_VALUE namespace sycl { inline namespace _V1 { -template class id; -template class range; namespace detail { template class array { diff --git a/sycl/include/sycl/detail/assert_happened.hpp b/sycl/include/sycl/detail/assert_happened.hpp index 7ae7ae6b18fe4..fb0a35e8655f9 100644 --- a/sycl/include/sycl/detail/assert_happened.hpp +++ b/sycl/include/sycl/detail/assert_happened.hpp @@ -8,9 +8,7 @@ #pragma once -#include - -#include +#include // for uint64_t, int32_t #ifdef __SYCL_DEVICE_ONLY__ // Reads Flag of AssertHappened on device diff --git a/sycl/include/sycl/detail/backend_traits.hpp b/sycl/include/sycl/detail/backend_traits.hpp index adbbab78642ff..a8ce023c7b483 100644 --- a/sycl/include/sycl/detail/backend_traits.hpp +++ b/sycl/include/sycl/detail/backend_traits.hpp @@ -8,17 +8,14 @@ #pragma once -#include +#include // for backend namespace sycl { inline namespace _V1 { namespace detail { -template struct interop; -template struct BackendInput; -template struct BackendReturn; template struct InteropFeatureSupportMap { static constexpr bool MakePlatform = false; diff --git a/sycl/include/sycl/detail/backend_traits_level_zero.hpp b/sycl/include/sycl/detail/backend_traits_level_zero.hpp index 44f336681aa3f..5deb7f78509ad 100644 --- a/sycl/include/sycl/detail/backend_traits_level_zero.hpp +++ b/sycl/include/sycl/detail/backend_traits_level_zero.hpp @@ -15,16 +15,24 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include // for context +#include // for BackendI... +#include // for device +#include // for event +#include // for ownership +#include // for kernel_b... +#include // for queue +#include // for variant +#include // for vector + +#include "backend_types.hpp" // for backend +#include "handler.hpp" // for buffer +#include "image.hpp" // for image +#include "kernel.hpp" // for kernel +#include "kernel_bundle_enums.hpp" // for bundle_s... +#include "platform.hpp" // for platform +#include "property_list.hpp" // for property... +#include "range.hpp" // for range typedef struct _ze_command_queue_handle_t *ze_command_queue_handle_t; typedef struct _ze_command_list_handle_t *ze_command_list_handle_t; @@ -40,8 +48,6 @@ namespace sycl { inline namespace _V1 { namespace detail { -// Forward declarations -class device_impl; // TODO the interops for context, device, event, platform and program // may be removed after removing the deprecated 'get_native()' methods diff --git a/sycl/include/sycl/detail/backend_traits_opencl.hpp b/sycl/include/sycl/detail/backend_traits_opencl.hpp index 6729f9c783fb1..e41627f5a3067 100644 --- a/sycl/include/sycl/detail/backend_traits_opencl.hpp +++ b/sycl/include/sycl/detail/backend_traits_opencl.hpp @@ -15,14 +15,21 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include +#include // for context +#include // for BackendInput, BackendReturn +#include // for assertion, PiDevice, PiPro... +#include // for device +#include // for event +#include // for kernel_bundle +#include // for queue +#include // for vector + +#include "CL/cl.h" // for _cl_event, cl_event, cl_de... +#include "backend_types.hpp" // for backend +#include "handler.hpp" // for buffer +#include "kernel.hpp" // for kernel +#include "kernel_bundle_enums.hpp" // for bundle_state +#include "platform.hpp" // for platform namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/detail/boolean.hpp b/sycl/include/sycl/detail/boolean.hpp index 62c887ceb3b9f..000acd17b60b3 100644 --- a/sycl/include/sycl/detail/boolean.hpp +++ b/sycl/include/sycl/detail/boolean.hpp @@ -8,11 +8,13 @@ #pragma once -#include -#include +#include // for is_sgeninteger, msbIsSet +#include // for size_t +#include // for int8_t +#include // for initializer_list +#include // for is_same -#include -#include +#include "detail/vector_traits.hpp" // for vector_alignment namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/detail/builtins.hpp b/sycl/include/sycl/detail/builtins.hpp index 9bca78518229d..706249fc539e8 100644 --- a/sycl/include/sycl/detail/builtins.hpp +++ b/sycl/include/sycl/detail/builtins.hpp @@ -8,11 +8,9 @@ #pragma once -#include -#include -#include +#include // for convertDataToType -#include +#include "detail/defines_elementary.hpp" // for __SYCL_ALWAYS_INLINE // TODO Decide whether to mark functions with this attribute. #define __NOEXC /*noexcept*/ diff --git a/sycl/include/sycl/detail/cg.hpp b/sycl/include/sycl/detail/cg.hpp index 68197e4ce599a..71f152759138c 100644 --- a/sycl/include/sycl/detail/cg.hpp +++ b/sycl/include/sycl/detail/cg.hpp @@ -8,41 +8,33 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include +#include // for AccessorImplHost, AccessorImplPtr +#include // for ArgDesc, HostTask, HostKernelBase +#include // for code_location +#include // for context_impl +#include // for kernel_impl +#include // for assert +#include // for size_t +#include // for int32_t +#include // for shared_ptr, unique_ptr +#include // for string +#include // for vector +#include // for move + +#include "detail/pi.h" // for pi_mem_advice, _pi_ext_command_b... +#include "detail/pi.hpp" // for PiImageOffset, PiImageRegion +#include "event.hpp" // for event_impl +#include "exception_list.hpp" // for queue_impl +#include "kernel_bundle.hpp" // for kernel_bundle_impl namespace sycl { inline namespace _V1 { -// Forward declarations -class queue; namespace detail { -class event_impl; using EventImplPtr = std::shared_ptr; -class stream_impl; -class queue_impl; -class kernel_bundle_impl; // If there's a need to add new members to CG classes without breaking ABI // compatibility, we can bring back the extended members mechanism. See diff --git a/sycl/include/sycl/detail/cg_types.hpp b/sycl/include/sycl/detail/cg_types.hpp index 748369c8c1391..df8a7b9d5a182 100644 --- a/sycl/include/sycl/detail/cg_types.hpp +++ b/sycl/include/sycl/detail/cg_types.hpp @@ -8,15 +8,28 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include // for HostProfilingInfo +#include // for kernel_param_kind_t +#include // for group +#include // for id +#include // for interop_handle +#include // for kernel_handler +#include // for nd_item +#include // for range, operator* +#include // for size_t +#include // for function +#include // for enable_if_t, false_type +#include // for declval + +#include "detail/array.hpp" // for array +#include "detail/common.hpp" // for InitializedVal, NDLoop +#include "detail/helpers.hpp" // for Builder +#include "detail/item_base.hpp" // for id +#include "detail/pi_error.def" // for PI_ERROR_INVALID_WORK... +#include "exception.hpp" // for nd_range_error +#include "h_item.hpp" // for h_item +#include "item.hpp" // for item +#include "nd_range.hpp" // for nd_range namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/detail/common.hpp b/sycl/include/sycl/detail/common.hpp index 211ffc2863295..d95f7149753b3 100644 --- a/sycl/include/sycl/detail/common.hpp +++ b/sycl/include/sycl/detail/common.hpp @@ -8,14 +8,15 @@ #pragma once -#include -#include -#include // for pi_int32 - -#include -#include -#include -#include +#include // for __SYCL_ALWAYS_INLINE +#include // for __SYCL_EXPORT +#include // for pi_int32 +#include // for array +#include // for assert +#include // for allocator, operator+ +#include // for size_t +#include // for enable_if_t +#include // for index_sequence, make_i... // Default signature enables the passing of user code location information to // public methods as a default argument. @@ -171,7 +172,6 @@ inline std::string codeToString(pi_int32 code) { "Native API returns: " #ifndef __SYCL_SUPPRESS_PI_ERROR_REPORT -#include // TODO: rename all names with direct use of OCL/OPENCL to be backend agnostic. #define __SYCL_REPORT_PI_ERR_TO_STREAM(expr) \ { \ @@ -184,7 +184,6 @@ inline std::string codeToString(pi_int32 code) { #endif #ifndef SYCL_SUPPRESS_EXCEPTIONS -#include // SYCL 1.2.1 exceptions #define __SYCL_REPORT_PI_ERR_TO_EXC(expr, exc, str) \ { \ @@ -413,11 +412,6 @@ constexpr std::array ConcatArrays(const std::array &A1, std::make_index_sequence()); } -// Utility for creating an std::array from the results of flattening the -// arguments using a flattening functor. -template typename FlattenF, - typename... ArgTN> -struct ArrayCreator; template typename FlattenF, typename ArgT, typename... ArgTN> struct ArrayCreator { diff --git a/sycl/include/sycl/detail/defines.hpp b/sycl/include/sycl/detail/defines.hpp index 057d56f26d306..b287d9a582740 100644 --- a/sycl/include/sycl/detail/defines.hpp +++ b/sycl/include/sycl/detail/defines.hpp @@ -8,9 +8,7 @@ #pragma once -#include - -#include +#include // for __SYCL_ID_QUERIES_FIT_... #if __SYCL_ID_QUERIES_FIT_IN_INT__ && __has_builtin(__builtin_assume) #define __SYCL_ASSUME_INT(x) __builtin_assume((x) <= INT_MAX) diff --git a/sycl/include/sycl/detail/generic_type_lists.hpp b/sycl/include/sycl/detail/generic_type_lists.hpp index 7e54ea1544a3e..af713cb695d5d 100644 --- a/sycl/include/sycl/detail/generic_type_lists.hpp +++ b/sycl/include/sycl/detail/generic_type_lists.hpp @@ -8,12 +8,11 @@ #pragma once -#include -#include -#include -#include - -#include +#include // for address_space +#include // for type_list, address_space_list +#include // for half +#include // for byte, size_t +#include // for conditional_t, is_signed_v, is_... // Generic type name description, which serves as a description for all valid // types of parameters to kernel functions @@ -21,8 +20,6 @@ // Forward declarations namespace sycl { inline namespace _V1 { -template class vec; -template class marray; namespace detail { namespace gtl { diff --git a/sycl/include/sycl/detail/generic_type_traits.hpp b/sycl/include/sycl/detail/generic_type_traits.hpp index 9e447024a179b..a88e7358bdb1b 100644 --- a/sycl/include/sycl/detail/generic_type_traits.hpp +++ b/sycl/include/sycl/detail/generic_type_traits.hpp @@ -8,17 +8,21 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include +#include // for complex_double, comple... +#include // for decorated, address_space +#include // for half, cl_char, cl_double +#include // for nonconst_address_space... +#include // for is_gen_based_on_type_s... +#include // for BIsRepresentationT +#include // for multi_ptr, address_spa... +#include // for complex +#include // for numeric_limits +#include // for byte +#include // for uint8_t +#include // for enable_if_t, condition... + +#include "detail/helpers.hpp" // for marray +#include "detail/type_list.hpp" // for is_contained, find_sam... namespace sycl { inline namespace _V1 { @@ -272,8 +276,6 @@ using is_genptr = std::bool_constant< template using is_nan_type = is_contained; -// nan_types -template struct nan_types; template struct nan_types< @@ -313,8 +315,6 @@ template using make_unsinged_integer_t = make_type_t; -template -struct convert_data_type_impl; template struct convert_data_type_impl>>>; -// select_cl_vector_or_scalar_or_ptr does cl_* type selection for element type -// of a vector type T, pointer type substitution, and scalar type substitution. -// If T is not vector, scalar, or pointer unmodified T is returned. -template -struct select_cl_vector_or_scalar_or_ptr; template struct select_cl_vector_or_scalar_or_ptr< @@ -548,12 +543,6 @@ struct select_cl_vector_or_scalar_or_ptr< #endif }; -// select_cl_mptr_or_vector_or_scalar_or_ptr does cl_* type selection for type -// pointed by multi_ptr, for raw pointers, for element type of a vector type T, -// and does scalar type substitution. If T is not mutlti_ptr or vector or -// scalar or pointer unmodified T is returned. -template -struct select_cl_mptr_or_vector_or_scalar_or_ptr; // this struct helps to use std::uint8_t instead of std::byte, // which is not supported on device @@ -652,11 +641,7 @@ template using common_rel_ret_t = std::conditional_t::value, make_singed_integer_t, bool>; -// forward declaration -template struct Boolean; -// Try to get vector element count or 1 otherwise -template struct TryToGetNumElements; template struct TryToGetNumElements< @@ -701,7 +686,6 @@ template using rel_sign_bit_test_arg_t = typename RelationalTestForSignBitType::argument_type; -template struct RelConverter; template struct RelConverter static constexpr T quiet_NaN() { return std::numeric_limits::quiet_NaN(); } -// is_same_vector_size -template class is_same_vector_size_impl; template class is_same_vector_size_impl { diff --git a/sycl/include/sycl/detail/group_sort_impl.hpp b/sycl/include/sycl/detail/group_sort_impl.hpp index f100403a148c9..7abbdb886efc4 100644 --- a/sycl/include/sycl/detail/group_sort_impl.hpp +++ b/sycl/include/sycl/detail/group_sort_impl.hpp @@ -10,12 +10,6 @@ #pragma once -#include -#include -#include -#include -#include - #ifdef __SYCL_DEVICE_ONLY__ namespace sycl { diff --git a/sycl/include/sycl/detail/handler_proxy.hpp b/sycl/include/sycl/detail/handler_proxy.hpp index 2d74646315e47..58fef3c7aea6a 100644 --- a/sycl/include/sycl/detail/handler_proxy.hpp +++ b/sycl/include/sycl/detail/handler_proxy.hpp @@ -8,19 +8,15 @@ #pragma once -#include -#include +#include // for image_target, target +#include // for __SYCL_EXPORT namespace sycl { inline namespace _V1 { -class handler; namespace detail { -class AccessorBaseHost; -class UnsampledImageAccessorBaseHost; -class SampledImageAccessorBaseHost; #ifdef __SYCL_DEVICE_ONLY__ // In device compilation accessor isn't inherited from host base classes, so diff --git a/sycl/include/sycl/detail/helpers.hpp b/sycl/include/sycl/detail/helpers.hpp index 6f297777152b5..4315623fa0562 100644 --- a/sycl/include/sycl/detail/helpers.hpp +++ b/sycl/include/sycl/detail/helpers.hpp @@ -8,37 +8,24 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include +#include // for MemorySemanticsMask +#include // for fence_space +#include // for __SYCL_EXPORT +#include // for PiEvent +#include // for uint32_t +#include // for shared_ptr +#include // for enable_if_t, integral_constant +#include // for vector +#include // for size_t +#include // for forward, integer_sequence, mak... + +#include "memory_enums.hpp" // for memory_order namespace sycl { inline namespace _V1 { -class context; -class event; -template class item; -template class group; -template class range; -template class id; -template class nd_item; -template class h_item; -template class marray; -enum class memory_order; namespace detail { -class buffer_impl; -class context_impl; // The function returns list of events that can be passed to OpenCL API as // dependency list and waits for others. __SYCL_EXPORT std::vector diff --git a/sycl/include/sycl/detail/host_profiling_info.hpp b/sycl/include/sycl/detail/host_profiling_info.hpp index b8257f56d9fcb..d4ca4f307ad7c 100644 --- a/sycl/include/sycl/detail/host_profiling_info.hpp +++ b/sycl/include/sycl/detail/host_profiling_info.hpp @@ -8,8 +8,8 @@ #pragma once -#include -#include +#include // for __SYCL_EXPORT +#include // for uint64_t namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/detail/image_accessor_util.hpp b/sycl/include/sycl/detail/image_accessor_util.hpp index 5ab87b4f5a3f4..097540dfff7b5 100644 --- a/sycl/include/sycl/detail/image_accessor_util.hpp +++ b/sycl/include/sycl/detail/image_accessor_util.hpp @@ -12,15 +12,24 @@ #pragma once #ifndef __SYCL_DEVICE_ONLY__ -#include -#include -#include -#include -#include -#include - -#include -#include +#include // for clamp, fmax, min +#include // for __SYCL_EXPORT +#include // for max_v, min_v, TryToGe... +#include // for image_channel_type +#include // for addressing_mode, coor... +#include // for vec, operator*, round... +#include // for size_t +#include // for int32_t, uint16_t +#include // for enable_if_t + +#include "aliases.hpp" // for float4, int4, uint4 +#include "detail/array.hpp" // for array +#include "detail/pi_error.def" // for PI_ERROR_INVALID_VALUE +#include "detail/type_list.hpp" // for is_contained, type_list +#include "exception.hpp" // for invalid_parameter_error +#include "id.hpp" // for id +#include "range.hpp" // for range +#include "swizzles.def" // for vec::x, vec::y, vec::z namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/detail/impl_utils.hpp b/sycl/include/sycl/detail/impl_utils.hpp index ec7d049329b57..20224836e3029 100644 --- a/sycl/include/sycl/detail/impl_utils.hpp +++ b/sycl/include/sycl/detail/impl_utils.hpp @@ -8,9 +8,8 @@ #pragma once -#include - -#include +#include // for assert +#include // for add_pointer_t namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/detail/info_desc_helpers.hpp b/sycl/include/sycl/detail/info_desc_helpers.hpp index 331680f0acf56..259fccfcb04fe 100644 --- a/sycl/include/sycl/detail/info_desc_helpers.hpp +++ b/sycl/include/sycl/detail/info_desc_helpers.hpp @@ -8,15 +8,12 @@ #pragma once -#include -#include -#include -#include +#include // for pi_device_info +#include // for true_type namespace sycl { inline namespace _V1 { namespace detail { -template struct PiInfoCode; template struct is_platform_info_desc : std::false_type {}; template struct is_context_info_desc : std::false_type {}; template struct is_device_info_desc : std::false_type {}; @@ -41,11 +38,6 @@ template struct is_event_profiling_info_desc : std::false_type {}; struct is_##DescType##_info_desc : std::true_type { \ using return_type = info::DescType::Desc::return_type; \ }; -#include -#include -#include -#include -#include #undef __SYCL_PARAM_TRAITS_SPEC #define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \ template <> struct PiInfoCode { \ @@ -55,7 +47,6 @@ template struct is_event_profiling_info_desc : std::false_type {}; struct is_##DescType##_info_desc : std::true_type { \ using return_type = info::DescType::Desc::return_type; \ }; -#include #undef __SYCL_PARAM_TRAITS_SPEC template struct IsSubGroupInfo : std::false_type {}; @@ -83,7 +74,8 @@ struct IsSubGroupInfo struct is_##DescType##_info_desc : std::true_type { \ using return_type = info::DescType::Desc::return_type; \ }; -#include +#include // for compile_num_s... + #undef __SYCL_PARAM_TRAITS_SPEC // Need a static_cast here since piDeviceGetInfo can also accept // pi_usm_capability_query values. @@ -99,7 +91,6 @@ struct IsSubGroupInfo #define __SYCL_PARAM_TRAITS_SPEC_SPECIALIZED(DescType, Desc, ReturnT, PiCode) \ __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) -#include #undef __SYCL_PARAM_TRAITS_SPEC #undef __SYCL_PARAM_TRAITS_SPEC_SPECIALIZED @@ -114,9 +105,6 @@ struct IsSubGroupInfo : std::true_type { \ using return_type = Namespace::info::DescType::Desc::return_type; \ }; -#include -#include -#include #undef __SYCL_PARAM_TRAITS_SPEC } // namespace detail diff --git a/sycl/include/sycl/detail/iostream_proxy.hpp b/sycl/include/sycl/detail/iostream_proxy.hpp index 1d8251f226e08..a9bb4e17efd67 100644 --- a/sycl/include/sycl/detail/iostream_proxy.hpp +++ b/sycl/include/sycl/detail/iostream_proxy.hpp @@ -8,8 +8,7 @@ #pragma once -#include -#include +#include // for ostream, istream // Hotfix to account for the different namespaces in libstdc++ and libc++ #ifdef _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/sycl/include/sycl/detail/item_base.hpp b/sycl/include/sycl/detail/item_base.hpp index 432cde97ae65e..e69016c0af425 100644 --- a/sycl/include/sycl/detail/item_base.hpp +++ b/sycl/include/sycl/detail/item_base.hpp @@ -8,16 +8,14 @@ #pragma once -#include -#include +#include // for id +#include // for range +#include // for size_t namespace sycl { inline namespace _V1 { -template class id; -template class range; namespace detail { -template struct ItemBase; template struct ItemBase { diff --git a/sycl/include/sycl/detail/kernel_desc.hpp b/sycl/include/sycl/detail/kernel_desc.hpp index 40122cb7f481f..03c3b33583488 100644 --- a/sycl/include/sycl/detail/kernel_desc.hpp +++ b/sycl/include/sycl/detail/kernel_desc.hpp @@ -10,9 +10,6 @@ // This header file must not include any standard C++ header files. -#include -#include - namespace sycl { inline namespace _V1 { namespace detail { diff --git a/sycl/include/sycl/detail/os_util.hpp b/sycl/include/sycl/detail/os_util.hpp index d2f8d4aa0f792..b60c205ae583a 100644 --- a/sycl/include/sycl/detail/os_util.hpp +++ b/sycl/include/sycl/detail/os_util.hpp @@ -10,23 +10,13 @@ #pragma once -#include -#include - -#include -#include -#include -#include -#include +#include // for __SYCL_EXPORT +#include // for stat +#include // for size_t +#include // for string #ifdef _WIN32 #define __SYCL_RT_OS_WINDOWS -// Windows platform -#ifdef _WIN64 -// 64-bit Windows platform -#else -// 32-bit Windows platform -#endif // _WIN64 #elif __linux__ // Linux platform #define __SYCL_RT_OS_LINUX diff --git a/sycl/include/sycl/detail/owner_less_base.hpp b/sycl/include/sycl/detail/owner_less_base.hpp index 788245ddd53f3..cf9b50a58a5d7 100644 --- a/sycl/include/sycl/detail/owner_less_base.hpp +++ b/sycl/include/sycl/detail/owner_less_base.hpp @@ -8,9 +8,8 @@ #pragma once -#include -#include -#include +#include // for getSyclObjImpl +#include // for getSyclWeakObjImpl namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/detail/pi.hpp b/sycl/include/sycl/detail/pi.hpp index 56b2e9570f8cd..19fd5795a0878 100644 --- a/sycl/include/sycl/detail/pi.hpp +++ b/sycl/include/sycl/detail/pi.hpp @@ -13,17 +13,17 @@ #pragma once -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include +#include // for backend +#include // for __SYCL_EXPORT +#include // for __SYCL_RT_OS_LINUX +#include // for piContextCreate, piContextGetInfo +#include // for size_t +#include // for uint64_t, uint32_t +#include // for shared_ptr +#include // for operator<<, basic_ostream, string... +#include // for char_traits, string +#include // for vector +#include // for false_type, true_type #ifdef XPTI_ENABLE_INSTRUMENTATION // Forward declarations @@ -35,15 +35,12 @@ struct trace_event_data_t; namespace sycl { inline namespace _V1 { -class context; namespace detail { enum class PiApiKind { #define _PI_API(api) api, -#include }; -class plugin; using PluginPtr = std::shared_ptr; template @@ -221,7 +218,6 @@ template struct PiFuncInfo {}; return MPlugin.PiFunctionTable.api; \ } \ }; -#include /// Emits an XPTI trace before a PI API call is made /// \param FName The name of the PI API call diff --git a/sycl/include/sycl/detail/property_helper.hpp b/sycl/include/sycl/detail/property_helper.hpp index 3dfadf746d272..a76efb84304fc 100644 --- a/sycl/include/sycl/detail/property_helper.hpp +++ b/sycl/include/sycl/detail/property_helper.hpp @@ -8,8 +8,6 @@ #pragma once -#include - namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/detail/property_list_base.hpp b/sycl/include/sycl/detail/property_list_base.hpp index 5ff5899ee1af6..422ef18c8ceb0 100644 --- a/sycl/include/sycl/detail/property_list_base.hpp +++ b/sycl/include/sycl/detail/property_list_base.hpp @@ -8,14 +8,16 @@ #pragma once -#include -#include -#include - -#include -#include -#include -#include +#include // for DataLessPropKind, Propert... +#include // for invalid_object_error +#include // for iter_swap +#include // for bitset +#include // for shared_ptr, __shared_ptr_... +#include // for vector +#include // for enable_if_t +#include // for move + +#include "detail/pi_error.def" // for PI_ERROR_INVALID_VALUE namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/detail/reduction_forward.hpp b/sycl/include/sycl/detail/reduction_forward.hpp index 730ed63f76753..c290e52f94d39 100644 --- a/sycl/include/sycl/detail/reduction_forward.hpp +++ b/sycl/include/sycl/detail/reduction_forward.hpp @@ -8,18 +8,20 @@ #pragma once +#include // for size_t + +#include "detail/item_base.hpp" // for range +#include "id.hpp" // for id +#include "item.hpp" // for getDelinearizedItem, item +#include "nd_range.hpp" // for nd_range +#include "range.hpp" // for range // To be included in . Note that reductions implementation // need complete sycl::handler type so we cannot include whole // there. -#include - namespace sycl { inline namespace _V1 { namespace detail { -template -class reduction_impl_algo; namespace reduction { enum class strategy : int { @@ -61,8 +63,6 @@ template NDRange, PropertiesT Properties, RestT... Rest); -template struct IsReduction; -template struct AreAllButLastReductions; } // namespace detail } // namespace _V1 diff --git a/sycl/include/sycl/detail/service_kernel_names.hpp b/sycl/include/sycl/detail/service_kernel_names.hpp index b1ed3289310bd..af7c0fac46cba 100644 --- a/sycl/include/sycl/detail/service_kernel_names.hpp +++ b/sycl/include/sycl/detail/service_kernel_names.hpp @@ -10,12 +10,5 @@ namespace sycl { inline namespace _V1 { -namespace detail { -namespace __sycl_service_kernel__ { - -class AssertInfoCopier; - -} // namespace __sycl_service_kernel__ -} // namespace detail } // namespace _V1 } // namespace sycl diff --git a/sycl/include/sycl/detail/spirv.hpp b/sycl/include/sycl/detail/spirv.hpp index d793d826f2b9b..8e72cb0cff68e 100644 --- a/sycl/include/sycl/detail/spirv.hpp +++ b/sycl/include/sycl/detail/spirv.hpp @@ -7,17 +7,6 @@ //===----------------------------------------------------------------------===// #pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef __SYCL_DEVICE_ONLY__ namespace sycl { diff --git a/sycl/include/sycl/detail/stl_type_traits.hpp b/sycl/include/sycl/detail/stl_type_traits.hpp index bc5f428cf6176..d9c488cedb9d5 100644 --- a/sycl/include/sycl/detail/stl_type_traits.hpp +++ b/sycl/include/sycl/detail/stl_type_traits.hpp @@ -8,10 +8,9 @@ #pragma once -#include - -#include -#include +#include // for iterator_traits +#include // for is_const, remove_pointer_t, void_t +#include // for declval namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/detail/sycl_fe_intrins.hpp b/sycl/include/sycl/detail/sycl_fe_intrins.hpp index 64147d4c8eb14..88a5928496515 100644 --- a/sycl/include/sycl/detail/sycl_fe_intrins.hpp +++ b/sycl/include/sycl/detail/sycl_fe_intrins.hpp @@ -10,9 +10,6 @@ #pragma once -#include -#include - #ifdef __SYCL_DEVICE_ONLY__ // Get the value of the specialization constant with given symbolic ID. diff --git a/sycl/include/sycl/detail/sycl_mem_obj_allocator.hpp b/sycl/include/sycl/detail/sycl_mem_obj_allocator.hpp index 85bc98abd71f9..6e3aaa4aca6ce 100644 --- a/sycl/include/sycl/detail/sycl_mem_obj_allocator.hpp +++ b/sycl/include/sycl/detail/sycl_mem_obj_allocator.hpp @@ -8,7 +8,10 @@ #pragma once -#include +#include // for aligned_allocator +#include // for max +#include // for size_t +#include // for enable_if_t namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/detail/tuple.hpp b/sycl/include/sycl/detail/tuple.hpp index 1447d8489cd53..fcd74af9126a7 100644 --- a/sycl/include/sycl/detail/tuple.hpp +++ b/sycl/include/sycl/detail/tuple.hpp @@ -8,18 +8,16 @@ #pragma once -#include - -#include -#include -#include -#include +#include // for tuple +#include // for tuple_element +#include // for size_t +#include // for make_index_sequence, index_sequence +#include // for tuple namespace sycl { inline namespace _V1 { namespace detail { -template struct tuple; template std::tuple get_tuple_tail_impl(const std::tuple &Tuple, @@ -41,7 +39,6 @@ template auto tie(Ts &...Args) { return sycl::detail::tuple(Args...); } -template struct tuple_element; template struct tuple_element> diff --git a/sycl/include/sycl/detail/type_list.hpp b/sycl/include/sycl/detail/type_list.hpp index 154c5460fa876..9d2f45833db12 100644 --- a/sycl/include/sycl/detail/type_list.hpp +++ b/sycl/include/sycl/detail/type_list.hpp @@ -8,8 +8,8 @@ #pragma once -#include -#include +#include // for address_space +#include // for bool_constant, conditional_t, fals... namespace sycl { inline namespace _V1 { @@ -19,8 +19,6 @@ template using head_t = typename T::head; template using tail_t = typename T::tail; -// type_list -template struct type_list; using empty_type_list = type_list<>; @@ -59,8 +57,6 @@ struct is_contained template struct is_contained : std::false_type {}; -// value_list -template struct value_list; template struct value_list { static constexpr T head = Head; diff --git a/sycl/include/sycl/detail/type_traits.hpp b/sycl/include/sycl/detail/type_traits.hpp index 36ad45752c962..728416488fa67 100644 --- a/sycl/include/sycl/detail/type_traits.hpp +++ b/sycl/include/sycl/detail/type_traits.hpp @@ -8,15 +8,15 @@ #pragma once -#include -#include -#include -#include -#include +#include // for decorated, address_space +#include // for vec, marray, integer_list +#include // for is_contained, find_twi... +#include // for array +#include // for tuple +#include // for true_type, false_type +#include // for size_t -#include -#include -#include +#include "half_type.hpp" // for half namespace sycl { inline namespace _V1 { @@ -27,13 +27,9 @@ template inline constexpr bool is_fixed_size_group_v = is_fixed_size_group::value; } // namespace detail -template class group; -struct sub_group; namespace ext::oneapi { -struct sub_group; namespace experimental { -template class group_with_scratchpad; template struct is_fixed_topology_group : std::false_type {}; @@ -85,17 +81,9 @@ template struct is_generic_group : std::integral_constant::value || is_sub_group::value> {}; - -namespace half_impl { -class half; -} } // namespace detail using half = detail::half_impl::half; -// Forward declaration -template -class multi_ptr; template struct is_group : std::bool_constant::value || @@ -115,7 +103,6 @@ namespace detail { // sycl/doc/extensions/supported/sycl_ext_intel_device_info.md using uuid_type = std::array; -template struct copy_cv_qualifiers; template using copy_cv_qualifiers_t = typename copy_cv_qualifiers::type; @@ -130,8 +117,6 @@ template struct vector_size : vector_size_impl>> {}; -// vector_element -template struct vector_element_impl; template using vector_element_impl_t = typename vector_element_impl::type; template struct vector_element_impl { @@ -183,8 +168,6 @@ template struct copy_cv_qualifiers { using type = typename copy_cv_qualifiers_impl>::type; }; -// make_signed with support SYCL vec class -template struct make_signed_impl; template using make_signed_impl_t = typename make_signed_impl::type; @@ -217,8 +200,6 @@ template struct make_signed { template using make_signed_t = typename make_signed::type; -// make_unsigned with support SYCL vec class -template struct make_unsigned_impl; template using make_unsigned_impl_t = typename make_unsigned_impl::type; @@ -416,8 +397,6 @@ template struct make_type_impl, TL> { template using make_type_t = typename make_type_impl::type; -// make_larger_t -template struct make_larger_impl; template struct make_larger_impl< T, std::enable_if_t::value, T>> { diff --git a/sycl/include/sycl/detail/vector_traits.hpp b/sycl/include/sycl/detail/vector_traits.hpp index c6ccfd2323645..f31c68a8561ed 100644 --- a/sycl/include/sycl/detail/vector_traits.hpp +++ b/sycl/include/sycl/detail/vector_traits.hpp @@ -8,9 +8,7 @@ #pragma once -#include - -#include +#include // for integral_constant, conditional_t, remove_cv_t namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/device.hpp b/sycl/include/sycl/device.hpp index d32b916645a07..b5c7009d21700 100644 --- a/sycl/include/sycl/device.hpp +++ b/sycl/include/sycl/device.hpp @@ -8,38 +8,36 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include +#include // for aspect +#include // for __SY... +#include // for is_d... +#include // for Owne... +#include // for arch... +#include // for part... +#include // for plat... +#include // for shar... +#include // for size_t +#include // for string +#include // for add_... +#include // for hash +#include // for vector + +#include "backend_types.hpp" // for backend +#include "detail/defines_elementary.hpp" // for __SY... +#include "detail/pi.h" // for pi_n... +#include "device_selector.hpp" // for Enab... namespace sycl { inline namespace _V1 { -// Forward declarations -class device_selector; template auto get_native(const SyclObjectT &Obj) -> backend_return_t; namespace detail { -class device_impl; auto getDeviceComparisonLambda(); } // namespace detail -enum class aspect; namespace ext::oneapi { -// Forward declaration -class filter_selector; enum class peer_access { access_supported = 0x0, diff --git a/sycl/include/sycl/device_aspect_traits.hpp b/sycl/include/sycl/device_aspect_traits.hpp index 1ce7b4231b126..076c3b4c5a728 100644 --- a/sycl/include/sycl/device_aspect_traits.hpp +++ b/sycl/include/sycl/device_aspect_traits.hpp @@ -6,10 +6,12 @@ // //===----------------------------------------------------------------------===// -#include "device_aspect_macros.hpp" - #pragma once +#include // for bool_constant + +#include "aspects.hpp" // for aspect + // This macro creates an alias from an aspect to another. To avoid // redeclarations, we need to define it empty for this file, otherwise we would // have multiple declarations of `any_device_has` and `all_devices_have`, one @@ -27,7 +29,6 @@ template struct all_devices_have; struct all_devices_have \ : std::bool_constant<__SYCL_ALL_DEVICES_HAVE_##ASPECT##__> {}; -#include #undef __SYCL_ASPECT @@ -35,7 +36,6 @@ template struct all_devices_have; template <> \ struct all_devices_have \ : std::bool_constant<__SYCL_ALL_DEVICES_HAVE_##ASPECT##__> {}; -#include #undef __SYCL_ASPECT_DEPRECATED @@ -52,7 +52,6 @@ template struct any_device_has; struct any_device_has \ : std::bool_constant<__SYCL_ANY_DEVICE_HAS_##ASPECT##__> {}; -#include #undef __SYCL_ASPECT @@ -60,7 +59,6 @@ template struct any_device_has; template <> \ struct any_device_has \ : std::bool_constant<__SYCL_ANY_DEVICE_HAS_##ASPECT##__> {}; -#include #undef __SYCL_ASPECT_DEPRECATED #endif // __SYCL_ANY_DEVICE_HAS_ANY_ASPECT__ diff --git a/sycl/include/sycl/device_selector.hpp b/sycl/include/sycl/device_selector.hpp index af6593a973a5d..b9186c3255ab6 100644 --- a/sycl/include/sycl/device_selector.hpp +++ b/sycl/include/sycl/device_selector.hpp @@ -8,25 +8,20 @@ #pragma once -#include -#include +#include // for __SYCL2020_DEPRECATED +#include // for __SYCL_EXPORT +#include // for function +#include // for vector +#include // for enable_if_t -#include -#include +#include "aspects.hpp" // for aspect +#include "context.hpp" // for context // 4.6.1 Device selection class namespace sycl { inline namespace _V1 { -// Forward declarations -class device; -class context; -enum class aspect; - -namespace ext::oneapi { -class filter_selector; -} // namespace ext::oneapi /// The SYCL 1.2.1 device_selector class provides ability to choose the /// best SYCL device based on heuristics specified by the user. diff --git a/sycl/include/sycl/event.hpp b/sycl/include/sycl/event.hpp index 99c6b44ae8bc2..aa210b6b36306 100644 --- a/sycl/include/sycl/event.hpp +++ b/sycl/include/sycl/event.hpp @@ -8,30 +8,25 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include - -#include +#include // for __SYCL_EXPORT +#include // for is_event_info_desc, is_... +#include // for OwnerLessBase +#include // for shared_ptr, hash +#include // for size_t +#include // for hash +#include // for vector + +#include "backend_types.hpp" // for backend, backend_return_t +#include "detail/defines_elementary.hpp" // for __SYCL2020_DEPRECATED +#include "detail/pi.h" // for pi_native_handle namespace sycl { inline namespace _V1 { -// Forward declaration -class context; template auto get_native(const SyclObjectT &Obj) -> backend_return_t; -namespace detail { -class event_impl; -} - /// An event object can be used to synchronize memory transfers, enqueues of /// kernels and signaling barriers. /// diff --git a/sycl/include/sycl/exception.hpp b/sycl/include/sycl/exception.hpp index 0805636228da1..7170dcec47b42 100644 --- a/sycl/include/sycl/exception.hpp +++ b/sycl/include/sycl/exception.hpp @@ -10,19 +10,21 @@ // 4.9.2 Exception Class Interface -#include -#include -#include -#include -#include - -#include +#include // for backend +#include // for __SYCL_EXPORT +#include // for pi_int32 +#include // for exception +#include // for allocator, shared_ptr, make... +#include // for string, basic_string, opera... +#include // for error_code, error_category +#include // for true_type + +#include "CL/cl_platform.h" // for cl_int +#include "detail/defines_elementary.hpp" // for __SYCL2020_DEPRECATED namespace sycl { inline namespace _V1 { -// Forward declaration -class context; enum class errc : unsigned int { success = 0, diff --git a/sycl/include/sycl/exception_list.hpp b/sycl/include/sycl/exception_list.hpp index 50913a7f32206..a030b9b8ffd33 100644 --- a/sycl/include/sycl/exception_list.hpp +++ b/sycl/include/sycl/exception_list.hpp @@ -10,23 +10,16 @@ // 4.9.2 Exception Class Interface -#include -#include -#include -#include - -#include -#include -#include +#include // for __SYCL_EXPORT +#include // for cerr +#include // for size_t +#include // for exception_ptr, exception +#include // for vector +#include // for operator<<, basic_ostream namespace sycl { inline namespace _V1 { -// Forward declaration -namespace detail { -class queue_impl; -} - /// A list of asynchronous exceptions. /// /// \ingroup sycl_api diff --git a/sycl/include/sycl/ext/codeplay/experimental/fusion_properties.hpp b/sycl/include/sycl/ext/codeplay/experimental/fusion_properties.hpp index 3216584751cb0..18b896ac862a2 100644 --- a/sycl/include/sycl/ext/codeplay/experimental/fusion_properties.hpp +++ b/sycl/include/sycl/ext/codeplay/experimental/fusion_properties.hpp @@ -8,9 +8,12 @@ #pragma once -#include -#include -#include +#include // for mode, placeholder +#include // for DataLessPropKind, Dat... +#include // for is_property, is_prope... +#include // for true_type + +#include "queue.hpp" // for queue namespace sycl { inline namespace _V1 { @@ -32,16 +35,8 @@ class enable_fusion : public detail::DataLessProperty {}; } // namespace ext::codeplay::experimental::property -// Forward declarations -template -class buffer; -template -class accessor; -class queue; // Property trait specializations. template <> diff --git a/sycl/include/sycl/ext/codeplay/experimental/fusion_wrapper.hpp b/sycl/include/sycl/ext/codeplay/experimental/fusion_wrapper.hpp index f38a4f3ec548b..4e70a1815ba44 100644 --- a/sycl/include/sycl/ext/codeplay/experimental/fusion_wrapper.hpp +++ b/sycl/include/sycl/ext/codeplay/experimental/fusion_wrapper.hpp @@ -8,15 +8,16 @@ #pragma once -#include +#include // for queue +#include // for shared_ptr + +#include "detail/export.hpp" // for __SYCL_EXPORT +#include "event.hpp" // for event +#include "property_list.hpp" // for property_list namespace sycl { inline namespace _V1 { -namespace detail { -class fusion_wrapper_impl; -} - namespace ext::codeplay::experimental { /// diff --git a/sycl/include/sycl/ext/intel/experimental/fpga_annotated_properties.hpp b/sycl/include/sycl/ext/intel/experimental/fpga_annotated_properties.hpp index 1eb0ce06a1cbd..3f3c2e891429b 100644 --- a/sycl/include/sycl/ext/intel/experimental/fpga_annotated_properties.hpp +++ b/sycl/include/sycl/ext/intel/experimental/fpga_annotated_properties.hpp @@ -10,6 +10,14 @@ #pragma once #include +#include +#include +#include +#include + +#include "ext/oneapi/properties/properties.hpp" +#include "ext/oneapi/properties/property.hpp" +#include "ext/oneapi/properties/property_value.hpp" namespace sycl { inline namespace _V1 { @@ -107,10 +115,7 @@ inline constexpr read_write_mode_key::value_t namespace oneapi { namespace experimental { -template class annotated_arg; -template class annotated_ptr; -struct alignment_key; using register_map_key = intel::experimental::register_map_key; using conduit_key = intel::experimental::conduit_key; using stable_key = intel::experimental::stable_key; diff --git a/sycl/include/sycl/ext/intel/experimental/fpga_utils.hpp b/sycl/include/sycl/ext/intel/experimental/fpga_utils.hpp index 7960447e81e82..25da34a920bb0 100644 --- a/sycl/include/sycl/ext/intel/experimental/fpga_utils.hpp +++ b/sycl/include/sycl/ext/intel/experimental/fpga_utils.hpp @@ -8,11 +8,9 @@ #pragma once -#include -#include -#include -#include -#include +#include // for latency_co... +#include // for int32_t +#include // for conditional_t namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/intel/experimental/kernel_execution_properties.hpp b/sycl/include/sycl/ext/intel/experimental/kernel_execution_properties.hpp index b4aa5dac13602..5419022dc2f6e 100644 --- a/sycl/include/sycl/ext/intel/experimental/kernel_execution_properties.hpp +++ b/sycl/include/sycl/ext/intel/experimental/kernel_execution_properties.hpp @@ -8,13 +8,14 @@ #pragma once -#include +#include // for PropKind, IsRunti... +#include // for uint16_t +#include // for true_type namespace sycl { inline namespace _V1 { namespace ext::intel::experimental { -template class gpu_kernel_attribute; enum class cache_config_enum : std::uint16_t { large_slm, large_data }; diff --git a/sycl/include/sycl/ext/intel/experimental/pipe_properties.hpp b/sycl/include/sycl/ext/intel/experimental/pipe_properties.hpp index d38453ab472e9..f757194a8e3d6 100644 --- a/sycl/include/sycl/ext/intel/experimental/pipe_properties.hpp +++ b/sycl/include/sycl/ext/intel/experimental/pipe_properties.hpp @@ -9,8 +9,10 @@ #pragma once -#include -#include +#include // for PropKind +#include // for property_value +#include // for uint16_t +#include // for true_type namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/intel/experimental/pipes.hpp b/sycl/include/sycl/ext/intel/experimental/pipes.hpp index 0bbea2ad3cec0..448702d488b8c 100644 --- a/sycl/include/sycl/ext/intel/experimental/pipes.hpp +++ b/sycl/include/sycl/ext/intel/experimental/pipes.hpp @@ -8,16 +8,21 @@ #pragma once -#include "fpga_utils.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include // for device +#include // for protocol_... +#include // for ValueOrDe... +#include // for queue +#include // for int32_t +#include // for string +#include // for _Swallow_... + +#include "detail/export.hpp" // for __SYCL_EX... +#include "event.hpp" // for event +#include "exception.hpp" // for make_erro... +#include "handler.hpp" // for handler +#include "info/event_traits.def" // for command_e... +#include "info/info_desc.hpp" // for event_com... +#include "memory_enums.hpp" // for memory_order #ifdef XPTI_ENABLE_INSTRUMENTATION #include diff --git a/sycl/include/sycl/ext/intel/experimental/usm_properties.hpp b/sycl/include/sycl/ext/intel/experimental/usm_properties.hpp index a1d48deea3e5f..19be63df0ffb8 100644 --- a/sycl/include/sycl/ext/intel/experimental/usm_properties.hpp +++ b/sycl/include/sycl/ext/intel/experimental/usm_properties.hpp @@ -8,9 +8,10 @@ #pragma once -#include -#include -#include +#include // for PropWithDataKind, Dat... +#include // for is_property +#include // for uint64_t +#include // for true_type namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/intel/pipes.hpp b/sycl/include/sycl/ext/intel/pipes.hpp index 1206e9d7d8920..0b123075c907e 100644 --- a/sycl/include/sycl/ext/intel/pipes.hpp +++ b/sycl/include/sycl/ext/intel/pipes.hpp @@ -8,9 +8,10 @@ #pragma once -#include -#include -#include +#include // for size_t +#include // for int32_t + +#include "exception.hpp" // for make_error_code, errc, exception namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/intel/usm_pointers.hpp b/sycl/include/sycl/ext/intel/usm_pointers.hpp index a7113f7b2a5ca..59ba7675a2a92 100644 --- a/sycl/include/sycl/ext/intel/usm_pointers.hpp +++ b/sycl/include/sycl/ext/intel/usm_pointers.hpp @@ -7,14 +7,11 @@ //===----------------------------------------------------------------------===// #pragma once -#include +#include // for decorated, address_space namespace sycl { inline namespace _V1 { -template -class multi_ptr; namespace ext { namespace intel { diff --git a/sycl/include/sycl/ext/oneapi/accessor_property_list.hpp b/sycl/include/sycl/ext/oneapi/accessor_property_list.hpp index d7e84171df07c..3c9d999dd2ddc 100644 --- a/sycl/include/sycl/ext/oneapi/accessor_property_list.hpp +++ b/sycl/include/sycl/ext/oneapi/accessor_property_list.hpp @@ -8,18 +8,21 @@ #pragma once -#include -#include -#include -#include +#include // for mode, placeholder, target +#include // for PropertyListBase +#include // for property_list +#include // for bitset +#include // for shared_ptr +#include // for conditional_t, enable_... +#include // for vector + +#include "detail/defines.hpp" // for __SYCL_TYPE +#include "detail/pi_error.def" // for PI_ERROR_INVALID_VALUE +#include "detail/property_helper.hpp" // for DataLessPropKind, Prop... +#include "exception.hpp" // for invalid_object_error namespace sycl { inline namespace _V1 { -// Forward declaration -template -class accessor; namespace detail { // This helper template must be specialized for nested instance template // of each compile-time-constant property. @@ -58,6 +61,7 @@ class __SYCL_TYPE(accessor_property_list) accessor_property_list // property of PropT type, where PropT is a nested instance template of // compile-time-constant property. template struct ContainsProperty; + template struct ContainsProperty : std::false_type {}; template struct ContainsProperty diff --git a/sycl/include/sycl/ext/oneapi/backend/level_zero.hpp b/sycl/include/sycl/ext/oneapi/backend/level_zero.hpp index c8b085fa49740..171e94c320431 100644 --- a/sycl/include/sycl/ext/oneapi/backend/level_zero.hpp +++ b/sycl/include/sycl/ext/oneapi/backend/level_zero.hpp @@ -8,9 +8,36 @@ #pragma once -#include +#include // for backend_i... +#include // for int32_t +#include // for vector +#include // for shared_ptr +#include // for enable_if_t +#include // for get_if -#include +#include "async_handler.hpp" // for async_han... +#include "backend_types.hpp" // for backend +#include "buffer.hpp" // for buffer_al... +#include "context.hpp" // for context +#include "detail/backend_traits.hpp" // for interop +#include "detail/backend_traits_level_zero.hpp" // for ze_comman... +#include "detail/defines_elementary.hpp" // for __SYCL_DE... +#include "detail/export.hpp" // for __SYCL_EX... +#include "detail/impl_utils.hpp" // for createSyc... +#include "detail/pi.h" // for pi_native... +#include "detail/pi.hpp" // for cast +#include "device.hpp" // for device +#include "event.hpp" // for event +#include "ext/codeplay/experimental/fusion_properties.hpp" // for buffer +#include "ext/oneapi/backend/level_zero_ownership.hpp" // for ownership +#include "image.hpp" // for image +#include "kernel.hpp" // for kernel +#include "kernel_bundle.hpp" // for kernel_bu... +#include "kernel_bundle_enums.hpp" // for bundle_state +#include "platform.hpp" // for platform +#include "properties/image_properties.hpp" // for image +#include "property_list.hpp" // for property_... +#include "queue.hpp" // for queue namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/backend/level_zero_ownership.hpp b/sycl/include/sycl/ext/oneapi/backend/level_zero_ownership.hpp index 7c18a6e4d669b..67bdd88771d6e 100644 --- a/sycl/include/sycl/ext/oneapi/backend/level_zero_ownership.hpp +++ b/sycl/include/sycl/ext/oneapi/backend/level_zero_ownership.hpp @@ -8,8 +8,6 @@ #pragma once -#include - namespace sycl { inline namespace _V1 { namespace ext::oneapi::level_zero { diff --git a/sycl/include/sycl/ext/oneapi/bfloat16.hpp b/sycl/include/sycl/ext/oneapi/bfloat16.hpp index 13d077b0f1d65..9373b40426b81 100644 --- a/sycl/include/sycl/ext/oneapi/bfloat16.hpp +++ b/sycl/include/sycl/ext/oneapi/bfloat16.hpp @@ -8,9 +8,12 @@ #pragma once -#include -#include -#include +#include // for isnan +#include // for half +#include // for uint16_t, uint32_t + +#include "aliases.hpp" // for half +#include "detail/defines_elementary.hpp" // for __DPCPP_SYCL_EXTERNAL extern "C" __DPCPP_SYCL_EXTERNAL uint16_t __devicelib_ConvertFToBF16INTEL(const float &) noexcept; @@ -21,7 +24,6 @@ namespace sycl { inline namespace _V1 { namespace ext::oneapi { -class bfloat16; namespace detail { using Bfloat16StorageT = uint16_t; diff --git a/sycl/include/sycl/ext/oneapi/bindless_images.hpp b/sycl/include/sycl/ext/oneapi/bindless_images.hpp index 9b26c462d4253..1fc98093b6155 100644 --- a/sycl/include/sycl/ext/oneapi/bindless_images.hpp +++ b/sycl/include/sycl/ext/oneapi/bindless_images.hpp @@ -8,12 +8,21 @@ #pragma once -#include - -#include -#include -#include -#include +#include // for queue +#include // for image_desc... +#include // for interop_me... +#include // for image_mem_... +#include // for bindless_i... +#include // for assert +#include // for size_t +#include // for is_scalar + +#include "context.hpp" // for context +#include "detail/export.hpp" // for __SYCL_EXPORT +#include "detail/pi.h" // for pi_uint64 +#include "device.hpp" // for device +#include "image.hpp" // for image_chan... +#include "range.hpp" // for range namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/bindless_images_descriptor.hpp b/sycl/include/sycl/ext/oneapi/bindless_images_descriptor.hpp index 5576c41beeb82..1cb95e2fbda5c 100644 --- a/sycl/include/sycl/ext/oneapi/bindless_images_descriptor.hpp +++ b/sycl/include/sycl/ext/oneapi/bindless_images_descriptor.hpp @@ -8,7 +8,14 @@ #pragma once -#include +#include // for image_channel_order, image_channel_type +#include // for size_t +#include // for max +#include // for error_code + +#include "detail/array.hpp" // for array +#include "exception.hpp" // for errc, exception +#include "range.hpp" // for range namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/bindless_images_interop.hpp b/sycl/include/sycl/ext/oneapi/bindless_images_interop.hpp index 3982a55554230..6fe075b05ede3 100644 --- a/sycl/include/sycl/ext/oneapi/bindless_images_interop.hpp +++ b/sycl/include/sycl/ext/oneapi/bindless_images_interop.hpp @@ -8,6 +8,10 @@ #pragma once +#include // for size_t + +#include "detail/pi.h" // for pi_uint64 + namespace sycl { inline namespace _V1 { namespace ext::oneapi::experimental { diff --git a/sycl/include/sycl/ext/oneapi/bindless_images_memory.hpp b/sycl/include/sycl/ext/oneapi/bindless_images_memory.hpp index 941b0315342a1..eaf1b10e2bd13 100644 --- a/sycl/include/sycl/ext/oneapi/bindless_images_memory.hpp +++ b/sycl/include/sycl/ext/oneapi/bindless_images_memory.hpp @@ -8,16 +8,20 @@ #pragma once -#include -#include -#include -#include +#include // for context +#include // for device +#include // for image_desc... +#include // for image_chan... +#include // for size_t +#include // for shared_ptr +#include // for hash + +#include "detail/export.hpp" // for __SYCL_EXPORT +#include "range.hpp" // for range namespace sycl { inline namespace _V1 { -// Forward declaration -class queue; namespace ext::oneapi::experimental { diff --git a/sycl/include/sycl/ext/oneapi/device_global/device_global.hpp b/sycl/include/sycl/ext/oneapi/device_global/device_global.hpp index 7a2d834188886..9c45dc06725ed 100644 --- a/sycl/include/sycl/ext/oneapi/device_global/device_global.hpp +++ b/sycl/include/sycl/ext/oneapi/device_global/device_global.hpp @@ -8,14 +8,16 @@ #pragma once -#include -#include - -#include -#include -#include -#include -#include +#include // for make_error_code +#include // for device_image... +#include // for properties_t +#include // for decorated_gl... +#include // for ptrdiff_t +#include // for enable_if_t +#include // for declval + +#include "access/access.hpp" // for address_space +#include "multi_ptr.hpp" // for multi_ptr #ifdef __SYCL_DEVICE_ONLY__ #define __SYCL_HOST_NOT_SUPPORTED(Op) diff --git a/sycl/include/sycl/ext/oneapi/device_global/properties.hpp b/sycl/include/sycl/ext/oneapi/device_global/properties.hpp index 99817c910a6d6..b140080977af2 100644 --- a/sycl/include/sycl/ext/oneapi/device_global/properties.hpp +++ b/sycl/include/sycl/ext/oneapi/device_global/properties.hpp @@ -8,14 +8,16 @@ #pragma once -#include -#include +#include // for PropKind +#include // for property_value +#include // for uint16_t +#include // for nullptr_t +#include // for true_type namespace sycl { inline namespace _V1 { namespace ext::oneapi::experimental { -template class device_global; struct device_image_scope_key { using value_t = property_value; diff --git a/sycl/include/sycl/ext/oneapi/experimental/annotated_arg/annotated_arg.hpp b/sycl/include/sycl/ext/oneapi/experimental/annotated_arg/annotated_arg.hpp index e9e15da78caf2..96b21a2895c87 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/annotated_arg/annotated_arg.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/annotated_arg/annotated_arg.hpp @@ -8,14 +8,15 @@ #pragma once -#include -#include - -#include -#include #include #include #include +#include +#include +#include +#include + +#include "detail/defines.hpp" namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/experimental/annotated_ptr/annotated_ptr.hpp b/sycl/include/sycl/ext/oneapi/experimental/annotated_ptr/annotated_ptr.hpp index 30dc79c174801..29964b5fdf21b 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/annotated_ptr/annotated_ptr.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/annotated_ptr/annotated_ptr.hpp @@ -8,14 +8,19 @@ #pragma once -#include -#include - -#include -#include #include #include #include +#include +#include +#include +#include +#include +#include + +#include "detail/defines.hpp" +#include "ext/oneapi/properties/property.hpp" +#include "ext/oneapi/properties/property_value.hpp" namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/experimental/ballot_group.hpp b/sycl/include/sycl/ext/oneapi/experimental/ballot_group.hpp index 335da7151a00c..5a92075d5a12a 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/ballot_group.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/ballot_group.hpp @@ -7,14 +7,21 @@ //===----------------------------------------------------------------------===// #pragma once -#include -#include +#include // for sub_group_mask +#include // for enable_if_t, decay_t + +#include "detail/pi_error.def" // for PI_ERROR_INVALID_DEVICE +#include "detail/type_traits.hpp" // for is_group, is_user_cons... +#include "exception.hpp" // for runtime_error +#include "id.hpp" // for id +#include "memory_enums.hpp" // for memory_scope +#include "range.hpp" // for range +#include "sub_group.hpp" // for sub_group namespace sycl { inline namespace _V1 { namespace ext::oneapi::experimental { -template class ballot_group; template inline std::enable_if_t> && diff --git a/sycl/include/sycl/ext/oneapi/experimental/bfloat16_math.hpp b/sycl/include/sycl/ext/oneapi/experimental/bfloat16_math.hpp index 838ad3d500490..c1f16de4a57cb 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/bfloat16_math.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/bfloat16_math.hpp @@ -8,14 +8,13 @@ #pragma once -#include -#include -#include -#include +#include // for bfloat16, bfloat16ToBits +#include // for marray +#include // for uint32_t +#include // for size_t, memcpy +#include // for enable_if_t, is_same -#include -#include -#include +#include "builtins.hpp" // for ceil, cos, exp, exp10, exp2 namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/experimental/builtins.hpp b/sycl/include/sycl/ext/oneapi/experimental/builtins.hpp index 0941a46459653..f98749b020cf6 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/builtins.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/builtins.hpp @@ -8,14 +8,17 @@ #pragma once -#include -#include -#include -#include -#include - -#include -#include +#include // for to_vec2 +#include // for __invoke_exp2, __invo... +#include // for is_svgenfloath, is_sv... +#include // for printf +#include // for memcpy, size_t +#include // for enable_if_t + +#include "aliases.hpp" // for half +#include "detail/defines_elementary.hpp" // for __SYCL_ALWAYS_INLINE +#include "marray.hpp" // for marray +#include "types.hpp" // for vec // TODO Decide whether to mark functions with this attribute. #define __NOEXC /*noexcept*/ diff --git a/sycl/include/sycl/ext/oneapi/experimental/common_annotated_properties/properties.hpp b/sycl/include/sycl/ext/oneapi/experimental/common_annotated_properties/properties.hpp index 69cfa8c9e16dc..533cab18daa18 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/common_annotated_properties/properties.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/common_annotated_properties/properties.hpp @@ -9,9 +9,9 @@ #pragma once -#include -#include -#include +#include // for properties_t +#include // for false_type, con... +#include // for declval namespace sycl { inline namespace _V1 { @@ -19,8 +19,6 @@ namespace ext { namespace oneapi { namespace experimental { -template class annotated_arg; -template class annotated_ptr; //===----------------------------------------------------------------------===// // Common properties of annotated_arg/annotated_ptr diff --git a/sycl/include/sycl/ext/oneapi/experimental/cuda/barrier.hpp b/sycl/include/sycl/ext/oneapi/experimental/cuda/barrier.hpp index 55c37889a8991..7fa4245b336fb 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/cuda/barrier.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/cuda/barrier.hpp @@ -8,10 +8,12 @@ #pragma once -#define SYCL_EXT_ONEAPI_CUDA_ASYNC_BARRIER 1 +#include // for int32_t, int64_t, uint32_t, uint64_t + +#include "detail/pi_error.def" // for PI_ERROR_INVALID_DEVICE +#include "exception.hpp" // for runtime_error -#include -#include +#define SYCL_EXT_ONEAPI_CUDA_ASYNC_BARRIER 1 namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/experimental/cuda/non_uniform_algorithms.hpp b/sycl/include/sycl/ext/oneapi/experimental/cuda/non_uniform_algorithms.hpp index 21111098734db..ac5f0b23e10ce 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/cuda/non_uniform_algorithms.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/cuda/non_uniform_algorithms.hpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #pragma once -#include namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/experimental/device_architecture.hpp b/sycl/include/sycl/ext/oneapi/experimental/device_architecture.hpp index 6f6eae3477f52..92fda8191124b 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/device_architecture.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/device_architecture.hpp @@ -8,8 +8,6 @@ #pragma once -#include - namespace sycl { inline namespace _V1 { namespace ext::oneapi::experimental { diff --git a/sycl/include/sycl/ext/oneapi/experimental/fixed_size_group.hpp b/sycl/include/sycl/ext/oneapi/experimental/fixed_size_group.hpp index a03d25886b34e..33c5d6011a754 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/fixed_size_group.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/fixed_size_group.hpp @@ -8,13 +8,22 @@ #pragma once -#include +#include // for size_t +#include // for enable_if_t, true_type, dec... + +#include "detail/pi_error.def" // for PI_ERROR_INVALID_DEVICE +#include "detail/type_traits.hpp" // for is_fixed_size_group, is_group +#include "exception.hpp" // for runtime_error +#include "ext/oneapi/sub_group_mask.hpp" // for sub_group_mask +#include "id.hpp" // for id +#include "memory_enums.hpp" // for memory_scope +#include "range.hpp" // for range +#include "sub_group.hpp" // for sub_group namespace sycl { inline namespace _V1 { namespace ext::oneapi::experimental { -template class fixed_size_group; template inline std::enable_if_t> && diff --git a/sycl/include/sycl/ext/oneapi/experimental/graph.hpp b/sycl/include/sycl/ext/oneapi/experimental/graph.hpp index be5210922fb08..5c0a8a5c95461 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/graph.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/graph.hpp @@ -8,32 +8,25 @@ #pragma once -#include -#include -#include -#include - -#include -#include -#include +#include // for property_list +#include // for function +#include // for shared_ptr +#include // for vector +#include // for true_type + +#include "context.hpp" // for context +#include "detail/export.hpp" // for __SYCL_EXPORT +#include "detail/property_helper.hpp" // for DataLessPropKind, PropWith... +#include "device.hpp" // for device +#include "properties/property_traits.hpp" // for is_property, is_property_of namespace sycl { inline namespace _V1 { -class handler; -class queue; -class device; namespace ext { namespace oneapi { namespace experimental { -namespace detail { -class node_impl; -class graph_impl; -class exec_graph_impl; - -} // namespace detail - /// State to template the command_graph class on. enum class graph_state { modifiable, ///< In modifiable state, commands can be added to graph. @@ -89,7 +82,6 @@ class depends_on : public ::sycl::detail::PropertyWithData< } // namespace node } // namespace property -template class command_graph; namespace detail { // Templateless modifiable command-graph base class. diff --git a/sycl/include/sycl/ext/oneapi/experimental/group_helpers_sorters.hpp b/sycl/include/sycl/ext/oneapi/experimental/group_helpers_sorters.hpp index e55ccac0bc808..1171eb558c3e7 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/group_helpers_sorters.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/group_helpers_sorters.hpp @@ -9,9 +9,22 @@ #pragma once #if (!defined(_HAS_STD_BYTE) || _HAS_STD_BYTE != 0) -#include -#include -#include +#include // for span +#include // for CHAR_BIT +#include // for uint32_t +#include // for bitset +#include // for size_t, byte +#include // for less, greater +#include // for numeric_limits +#include // for error_code +#include // for is_same, is_arithmetic + +#include "aliases.hpp" // for half +#include "detail/pi_error.def" // for PI_ERROR_INVALID_DEVICE +#include "exception.hpp" // for sycl_category, exception +#include "ext/oneapi/bfloat16.hpp" // for bfloat16 +#include "memory_enums.hpp" // for memory_scope +#include "range.hpp" // for range namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/experimental/group_sort.hpp b/sycl/include/sycl/ext/oneapi/experimental/group_sort.hpp index 9aa8c3bec9d3b..cb041b50d575a 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/group_sort.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/group_sort.hpp @@ -9,12 +9,15 @@ #pragma once #if (!defined(_HAS_STD_BYTE) || _HAS_STD_BYTE != 0) -#include -#include -#include -#include - -#include "group_helpers_sorters.hpp" +#include // for is_generic_group +#include // for size_t +#include // for enable_if_t, decay_t, false_type +#include // for error_code +#include // for declval + +#include "group_helpers_sorters.hpp" // for default_sorter, group_with_sc... +#include "detail/pi_error.def" // for PI_ERROR_INVALID_DEVICE +#include "exception.hpp" // for sycl_category, exception namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp b/sycl/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp index 90275945b13fc..ae1a15e0d9214 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp @@ -7,10 +7,12 @@ //===----------------------------------------------------------------------===// #pragma once -#include -#include -#include -#include +#include // for sub_group_mask +#include // for vec +#include // for size_t +#include // for uint32_t + +#include "marray.hpp" // for marray namespace sycl { inline namespace _V1 { @@ -68,15 +70,5 @@ inline uint32_t IdToMaskPosition(NonUniformGroup Group, uint32_t Id) { } // namespace detail -namespace ext::oneapi::experimental { - -// Forward declarations of non-uniform group types for algorithm definitions -template class ballot_group; -template class fixed_size_group; -template class tangle_group; -class opportunistic_group; - -} // namespace ext::oneapi::experimental - } // namespace _V1 } // namespace sycl diff --git a/sycl/include/sycl/ext/oneapi/experimental/opportunistic_group.hpp b/sycl/include/sycl/ext/oneapi/experimental/opportunistic_group.hpp index eb4b41269461d..e0b511fe213ec 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/opportunistic_group.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/opportunistic_group.hpp @@ -7,14 +7,21 @@ //===----------------------------------------------------------------------===// #pragma once -#include -#include +#include // for sub_group_mask +#include // for uint32_t +#include // for true_type + +#include "detail/pi_error.def" // for PI_ERROR_INVALID_DEVICE +#include "detail/type_traits.hpp" // for is_group, is_user_cons... +#include "exception.hpp" // for runtime_error +#include "id.hpp" // for id +#include "memory_enums.hpp" // for memory_scope +#include "range.hpp" // for range namespace sycl { inline namespace _V1 { namespace ext::oneapi::experimental { -class opportunistic_group; namespace this_kernel { inline opportunistic_group get_opportunistic_group(); diff --git a/sycl/include/sycl/ext/oneapi/experimental/tangle_group.hpp b/sycl/include/sycl/ext/oneapi/experimental/tangle_group.hpp index f1518405b6f0c..61455c41cb350 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/tangle_group.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/tangle_group.hpp @@ -7,14 +7,21 @@ //===----------------------------------------------------------------------===// #pragma once -#include -#include +#include // for sub_group_mask +#include // for enable_if_t, decay_t + +#include "detail/pi_error.def" // for PI_ERROR_INVALID_DEVICE +#include "detail/type_traits.hpp" // for is_group, is_user_cons... +#include "exception.hpp" // for runtime_error +#include "id.hpp" // for id +#include "memory_enums.hpp" // for memory_scope +#include "range.hpp" // for range +#include "sub_group.hpp" // for sub_group namespace sycl { inline namespace _V1 { namespace ext::oneapi::experimental { -template class tangle_group; template inline std::enable_if_t> && diff --git a/sycl/include/sycl/ext/oneapi/filter_selector.hpp b/sycl/include/sycl/ext/oneapi/filter_selector.hpp index f4cd247e05f29..1e5898980f077 100644 --- a/sycl/include/sycl/ext/oneapi/filter_selector.hpp +++ b/sycl/include/sycl/ext/oneapi/filter_selector.hpp @@ -8,24 +8,20 @@ #pragma once -#include +#include // for device_selector +#include // for shared_ptr +#include // for string -#include -#include +#include "detail/export.hpp" // for __SYCL_EXPORT +#include "device.hpp" // for device // 4.6.1 Device selection class namespace sycl { inline namespace _V1 { -// Forward declarations -class device; -class device_selector; namespace ext::oneapi { -namespace detail { -class filter_selector_impl; -} // namespace detail class __SYCL_EXPORT filter_selector : public device_selector { public: diff --git a/sycl/include/sycl/ext/oneapi/functional.hpp b/sycl/include/sycl/ext/oneapi/functional.hpp index 309178f14577e..90bacfe1ff908 100644 --- a/sycl/include/sycl/ext/oneapi/functional.hpp +++ b/sycl/include/sycl/ext/oneapi/functional.hpp @@ -7,11 +7,8 @@ //===----------------------------------------------------------------------===// #pragma once -#include -#include - -#include -#include +#include // for maximum, minimum +#include // for bit_and, bit_or, bit_xor, multiplies namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/group_local_memory.hpp b/sycl/include/sycl/ext/oneapi/group_local_memory.hpp index a30553de58d58..0905624fc638f 100644 --- a/sycl/include/sycl/ext/oneapi/group_local_memory.hpp +++ b/sycl/include/sycl/ext/oneapi/group_local_memory.hpp @@ -7,17 +7,14 @@ //===----------------------------------------------------------------------===// #pragma once -#include -#include -#include -#include -#include -#include -#include +#include // for __SYCL_ALWAYS_INLINE +#include // for is_group +#include // for feature_not_supported +#include // for enable_if_t -#include -#include -#include +#include "access/access.hpp" // for address_space, decorated +#include "detail/pi_error.def" // for PI_ERROR_INVALID_OPERA... +#include "ext/intel/usm_pointers.hpp" // for multi_ptr namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/kernel_properties/properties.hpp b/sycl/include/sycl/ext/oneapi/kernel_properties/properties.hpp index 5463d2a183f7c..ffa378c899209 100644 --- a/sycl/include/sycl/ext/oneapi/kernel_properties/properties.hpp +++ b/sycl/include/sycl/ext/oneapi/kernel_properties/properties.hpp @@ -8,12 +8,15 @@ #pragma once -#include -#include -#include -#include - -#include +#include // for aspect +#include // for PropKind +#include // for SizeListToStr +#include // for property_value +#include // for size_t +#include // for uint32_t +#include // for array +#include // for true_type +#include // for declval namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/latency_control/properties.hpp b/sycl/include/sycl/ext/oneapi/latency_control/properties.hpp index 61df621d83c9b..889306cc839e0 100644 --- a/sycl/include/sycl/ext/oneapi/latency_control/properties.hpp +++ b/sycl/include/sycl/ext/oneapi/latency_control/properties.hpp @@ -8,8 +8,9 @@ #pragma once -#include -#include +#include // for PropKind +#include // for property_value +#include // for true_type namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/matrix/matrix-intel.hpp b/sycl/include/sycl/ext/oneapi/matrix/matrix-intel.hpp index 224789a0f304b..a7899ae5996a4 100644 --- a/sycl/include/sycl/ext/oneapi/matrix/matrix-intel.hpp +++ b/sycl/include/sycl/ext/oneapi/matrix/matrix-intel.hpp @@ -8,11 +8,21 @@ #pragma once -#include "matrix-unified-utils.hpp" -#include "utils.hpp" -#include -#include -#include +#include // for __SYCL_ALWAYS_INLINE +#include // for uint32_t +#include // for size_t +#include // for ignore, tuple, _Swallo... +#include // for enable_if_t + +#include "matrix-unified-utils.hpp" // for use, layout, tf32, matrix +#include "CL/__spirv/spirv_types.hpp" // for MatrixLayout, MatrixUse +#include "access/access.hpp" // for address_space, decorated +#include "detail/pi_error.def" // for PI_ERROR_INVALID_DEVICE +#include "exception.hpp" // for runtime_error +#include "ext/oneapi/bfloat16.hpp" // for bfloat16 +#include "group.hpp" // for group +#include "multi_ptr.hpp" // for multi_ptr +#include "sub_group.hpp" // for sub_group namespace sycl { inline namespace _V1 { @@ -61,10 +71,6 @@ template struct spv_scope_traits> { constexpr static auto value = __spv::Scope::Workgroup; }; -// forward declarations -template -struct joint_matrix; } // namespace matrix } // namespace experimental diff --git a/sycl/include/sycl/ext/oneapi/matrix/matrix-tensorcores.hpp b/sycl/include/sycl/ext/oneapi/matrix/matrix-tensorcores.hpp index 53f11ab3f5e08..dc5faa1d9220f 100644 --- a/sycl/include/sycl/ext/oneapi/matrix/matrix-tensorcores.hpp +++ b/sycl/include/sycl/ext/oneapi/matrix/matrix-tensorcores.hpp @@ -8,31 +8,23 @@ // ===-------------------------------------------------------------------=== // #pragma once -#include "matrix-unified-utils.hpp" -#include +#include // for bfloat16 +#include // for size_t +#include // for int8_t, uint8_t, int32_t +#include // for enable_if_t + +#include "matrix-unified-utils.hpp" // for layout, use, tf32 +#include "aliases.hpp" // for half +#include "half_type.hpp" // for half +#include "marray.hpp" // for marray namespace sycl { inline namespace _V1 { namespace ext { namespace oneapi { -namespace experimental { -namespace matrix { - -template -struct joint_matrix; - -} // namespace matrix -} // namespace experimental namespace detail { -template -struct joint_matrix_cuda; #define __SYCL_JOINT_MATRIX_OVERLOAD_ARR(TYPE, USE, M, N, SIZE) \ template \ diff --git a/sycl/include/sycl/ext/oneapi/matrix/matrix-unified.hpp b/sycl/include/sycl/ext/oneapi/matrix/matrix-unified.hpp index ea0d5ace9ea92..b4637b24afb29 100644 --- a/sycl/include/sycl/ext/oneapi/matrix/matrix-unified.hpp +++ b/sycl/include/sycl/ext/oneapi/matrix/matrix-unified.hpp @@ -7,9 +7,19 @@ // ===--------------------------------------------------------------------=== // #pragma once -#include "matrix-intel.hpp" -#include "utils.hpp" -#include +#include // for uint32_t +#include // for size_t, memcpy +#include // for ignore, _Swall... +#include // for is_same, remov... + +#include "access/access.hpp" // for address_space +#include "detail/defines_elementary.hpp" // for __SYCL_ALWAYS_... +#include "detail/pi_error.def" // for PI_ERROR_INVAL... +#include "exception.hpp" // for runtime_error +#include "ext/oneapi/matrix/matrix-unified-utils.hpp" // for layout, use, tf32 +#include "marray.hpp" // for marray +#include "multi_ptr.hpp" // for multi_ptr + namespace sycl { inline namespace _V1 { namespace ext { diff --git a/sycl/include/sycl/ext/oneapi/matrix/matrix.hpp b/sycl/include/sycl/ext/oneapi/matrix/matrix.hpp index 77037885fc28b..0bfad5c0cd869 100644 --- a/sycl/include/sycl/ext/oneapi/matrix/matrix.hpp +++ b/sycl/include/sycl/ext/oneapi/matrix/matrix.hpp @@ -14,13 +14,9 @@ #pragma once -#include +#include // for SYCL_EXT_ONEAPI_MATRIX_VERSION #if (SYCL_EXT_ONEAPI_MATRIX_VERSION == 1) #include #include #endif // SYCL_EXT_ONEAPI_MATRIX_VERSION -#if (SYCL_EXT_ONEAPI_MATRIX_VERSION == 4) -#include -#include -#endif // SYCL_EXT_ONEAPI_MATRIX_VERSION diff --git a/sycl/include/sycl/ext/oneapi/matrix/static-query-use.hpp b/sycl/include/sycl/ext/oneapi/matrix/static-query-use.hpp index f9e46fc4fbab5..83ddee952f671 100644 --- a/sycl/include/sycl/ext/oneapi/matrix/static-query-use.hpp +++ b/sycl/include/sycl/ext/oneapi/matrix/static-query-use.hpp @@ -20,6 +20,14 @@ #pragma once +#include // for uint32_t, int8_t +#include // for size_t +#include // for enable_if + +#include "aliases.hpp" // for half +#include "ext/oneapi/matrix/matrix-unified-utils.hpp" // for use, layout +#include "ext/oneapi/matrix/matrix-unified.hpp" // for joint_matrix + namespace sycl { inline namespace _V1 { namespace ext { @@ -54,9 +62,6 @@ enum class matrix_type { enum class scope_t { sub_group, work_group }; -template -struct tpu_params; template constexpr bool is_combination_valid_amx(int sM, int sN, int sK) { diff --git a/sycl/include/sycl/ext/oneapi/owner_less.hpp b/sycl/include/sycl/ext/oneapi/owner_less.hpp index 069fd3dbaf75c..86a8f8da57eda 100644 --- a/sycl/include/sycl/ext/oneapi/owner_less.hpp +++ b/sycl/include/sycl/ext/oneapi/owner_less.hpp @@ -8,18 +8,21 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include // for host_acce... +#include // for context +#include // for device +#include // for event +#include // for weak_object +#include // for kernel +#include // for kernel_id +#include // for platform +#include // for queue + +#include "access/access.hpp" // for access_mode +#include "ext/codeplay/experimental/fusion_properties.hpp" // for accessor +#include "kernel_bundle_enums.hpp" // for bundle_state +#include "properties/image_properties.hpp" // for sampled_i... +#include "stream.hpp" // for stream namespace sycl { inline namespace _V1 { @@ -48,7 +51,6 @@ template struct owner_less_base { }; } // namespace detail -template struct owner_less; template <> struct owner_less : public detail::owner_less_base {}; diff --git a/sycl/include/sycl/ext/oneapi/properties/properties.hpp b/sycl/include/sycl/ext/oneapi/properties/properties.hpp index e7d547eb89cd6..950f7eb760c71 100644 --- a/sycl/include/sycl/ext/oneapi/properties/properties.hpp +++ b/sycl/include/sycl/ext/oneapi/properties/properties.hpp @@ -8,14 +8,13 @@ #pragma once -#include -#include -#include -#include -#include - -#include -#include +#include // for IsRuntimePr... +#include // for Sorted, Mer... +#include // for property_value +#include // for is_device_c... +#include // for tuple, tupl... +#include // for enable_if_t +#include // for tuple namespace sycl { inline namespace _V1 { @@ -209,9 +208,6 @@ using empty_properties_t = properties>; template using properties_t = properties>; -// Helper for merging two property lists; -template -struct merged_properties; template struct merged_properties, properties_t> { diff --git a/sycl/include/sycl/ext/oneapi/properties/property.hpp b/sycl/include/sycl/ext/oneapi/properties/property.hpp index a6112a6d7ea9f..514717f86e080 100644 --- a/sycl/include/sycl/ext/oneapi/properties/property.hpp +++ b/sycl/include/sycl/ext/oneapi/properties/property.hpp @@ -154,6 +154,10 @@ template <> struct IsRuntimeProperty : std::true_type {}; #pragma once +#include // for uint32_t +#include // for nullptr_t +#include // for false_type + namespace sycl { inline namespace _V1 { namespace ext { diff --git a/sycl/include/sycl/ext/oneapi/properties/property_utils.hpp b/sycl/include/sycl/ext/oneapi/properties/property_utils.hpp index 9f49dc3684888..053d6e4f7165e 100644 --- a/sycl/include/sycl/ext/oneapi/properties/property_utils.hpp +++ b/sycl/include/sycl/ext/oneapi/properties/property_utils.hpp @@ -8,18 +8,22 @@ #pragma once -#include -#include -#include - -#include +#include // for mp_sort_q +#include // for PropertyID, IsRun... +#include // for size_t +#include // for tuple +#include // for tuple_element +#include // for false_type, true_... +#include // for tuple + +#include "detail/boost/mp11/detail/mp_list.hpp" // for mp_list +#include "detail/boost/mp11/detail/mp_rename.hpp" // for mp_rename +#include "detail/boost/mp11/integral.hpp" // for mp_bool namespace sycl { inline namespace _V1 { namespace ext::oneapi::experimental { -// Forward declaration -template struct property_value; namespace detail { @@ -148,10 +152,6 @@ struct SortedAllUnique> // Property merging //****************************************************************************** -// Merges two sets of properties, failing if two properties are the same but -// with different values. -// NOTE: This assumes that the properties are in sorted order. -template struct MergeProperties; template <> struct MergeProperties, std::tuple<>> { using type = std::tuple<>; @@ -210,12 +210,6 @@ template struct CharsToStr { static constexpr const char value[] = {Chars..., '\0'}; }; -// Helper for converting a list of size_t values to a comma-separated string -// representation. This is done by extracting the digit one-by-one and when -// finishing a value, the parsed result is added to a separate list of -// "parsed" characters with the delimiter. -template -struct SizeListToStrHelper; // Specialization for when we are in the process of converting a non-zero value // (Value). Chars will have the already converted digits of the original value diff --git a/sycl/include/sycl/ext/oneapi/properties/property_value.hpp b/sycl/include/sycl/ext/oneapi/properties/property_value.hpp index 1a1e613bd0d70..a3a1de960ced4 100644 --- a/sycl/include/sycl/ext/oneapi/properties/property_value.hpp +++ b/sycl/include/sycl/ext/oneapi/properties/property_value.hpp @@ -8,8 +8,9 @@ #pragma once -#include -#include +#include // for IsCompileTi... +#include // for HasValue +#include // for enable_if_t namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/sub_group.hpp b/sycl/include/sycl/ext/oneapi/sub_group.hpp index e532dece049b3..d4c775619d42c 100644 --- a/sycl/include/sycl/ext/oneapi/sub_group.hpp +++ b/sycl/include/sycl/ext/oneapi/sub_group.hpp @@ -8,9 +8,10 @@ #pragma once -#include -#include -#include +#include // for sub_group +#include // for _Swallow_assign, ignore + +#include "detail/defines_elementary.hpp" // for __SYCL_DEPRECATED namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/sub_group_mask.hpp b/sycl/include/sycl/ext/oneapi/sub_group_mask.hpp index fba15ddf14c47..14847281765dc 100644 --- a/sycl/include/sycl/ext/oneapi/sub_group_mask.hpp +++ b/sycl/include/sycl/ext/oneapi/sub_group_mask.hpp @@ -7,28 +7,20 @@ //===----------------------------------------------------------------------===// #pragma once -#include -#include -#include -#include -#include -#include -#include - -#include +#include // for Builder +#include // for is_sub_group +#include // for errc, exception +#include // for id +#include // for marray +#include // for assert +#include // for size_t +#include // for uint32_t +#include // for CHAR_BIT +#include // for error_code +#include // for enable_if_t, decay_t namespace sycl { inline namespace _V1 { -namespace detail { -class Builder; - -namespace spirv { - -template struct group_scope; - -} // namespace spirv - -} // namespace detail namespace ext::oneapi { @@ -39,9 +31,6 @@ namespace ext::oneapi { #define BITS_TYPE uint32_t #endif -// defining `group_ballot` here to make predicate default `true` -// need to forward declare sub_group_mask first -struct sub_group_mask; template std::enable_if_t::value, sub_group_mask> group_ballot(Group g, bool predicate = true); diff --git a/sycl/include/sycl/ext/oneapi/weak_object.hpp b/sycl/include/sycl/ext/oneapi/weak_object.hpp index f8c4967d7c2d1..0c30802f96319 100644 --- a/sycl/include/sycl/ext/oneapi/weak_object.hpp +++ b/sycl/include/sycl/ext/oneapi/weak_object.hpp @@ -8,12 +8,20 @@ #pragma once -#include -#include -#include -#include - -#include +#include // for buffer +#include // for weak_obje... +#include // for stream +#include // for size_t +#include // for optional +#include // for shared_ptr + +#include "access/access.hpp" // for target, mode +#include "accessor.hpp" // for accessor +#include "detail/impl_utils.hpp" // for createSyc... +#include "detail/memcpy.hpp" // for detail +#include "exception.hpp" // for make_erro... +#include "ext/codeplay/experimental/fusion_properties.hpp" // for buffer +#include "range.hpp" // for range namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/weak_object_base.hpp b/sycl/include/sycl/ext/oneapi/weak_object_base.hpp index 1b5b7fe68f181..2f87995d0b236 100644 --- a/sycl/include/sycl/ext/oneapi/weak_object_base.hpp +++ b/sycl/include/sycl/ext/oneapi/weak_object_base.hpp @@ -8,12 +8,13 @@ #pragma once -#include +#include // for declval + +#include "detail/impl_utils.hpp" // for getSyclObjImpl namespace sycl { inline namespace _V1 { namespace ext::oneapi::detail { -template class weak_object_base; // Helper function for getting the underlying weak_ptr from a weak_object. template diff --git a/sycl/include/sycl/functional.hpp b/sycl/include/sycl/functional.hpp index a33baeb0e7708..a01a610b04d58 100644 --- a/sycl/include/sycl/functional.hpp +++ b/sycl/include/sycl/functional.hpp @@ -8,9 +8,9 @@ #pragma once -#include - -#include +#include // for logical_and, logical_or, bit_and, bit_or, bit... +#include // for common_type +#include // for forward namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/group.hpp b/sycl/include/sycl/group.hpp index db8d3e710eb4b..71521e755fdb2 100644 --- a/sycl/include/sycl/group.hpp +++ b/sycl/include/sycl/group.hpp @@ -8,28 +8,34 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include +#include // for __spirv_MemoryBarrier +#include // for Scope, __ocl_event_t +#include // for NDLoop, __SYCL_ASSERT +#include // for ConvertToOpenCLType_t +#include // for Builder, getSPIRVMemo... +#include // for device_event +#include // for make_error_code, errc +#include // for h_item +#include // for id +#include // for memory_scope +#include // for decorated_global_ptr +#include // for range +#include // for size_t +#include // for uint8_t, uint32_t +#include // for enable_if_t, remove_c... +#include // for unique_ptr + +#include "access/access.hpp" // for decorated, mode, addr... +#include "detail/defines.hpp" // for __SYCL_TYPE +#include "detail/defines_elementary.hpp" // for __SYCL2020_DEPRECATED +#include "detail/item_base.hpp" // for id, range +#include "detail/type_traits.hpp" // for is_bool, change_base_... +#include "item.hpp" // for item +#include "multi_ptr.hpp" // for multi_ptr, address_sp... namespace sycl { inline namespace _V1 { namespace detail { -class Builder; // Implements a barrier accross work items within a work group. inline void workGroupBarrier() { diff --git a/sycl/include/sycl/group_algorithm.hpp b/sycl/include/sycl/group_algorithm.hpp index 93bde1e892c4f..89ee704ec99fd 100644 --- a/sycl/include/sycl/group_algorithm.hpp +++ b/sycl/include/sycl/group_algorithm.hpp @@ -7,23 +7,23 @@ //===----------------------------------------------------------------------===// #pragma once -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include // for remove_pointer, is_pointer +#include // for make_error_code, errc, exception +#include // for plus, multiplies, maximum +#include // for group +#include // for sub_group +#include // for size_t +#include // for complex +#include // for enable_if_t, decay_t, integra... + +#include "aliases.hpp" // for half +#include "detail/array.hpp" // for array +#include "detail/helpers.hpp" // for loop +#include "detail/item_base.hpp" // for id, range +#include "detail/type_list.hpp" // for is_contained, type_list +#include "id.hpp" // for id +#include "range.hpp" // for range +#include "types.hpp" // for vec namespace sycl { inline namespace _V1 { @@ -144,9 +144,6 @@ using is_plus_or_multiplies_if_complex = std::integral_constant< is_multiplies::value) : std::true_type::value)>; -// used to transform a vector op to a scalar op; -// e.g. sycl::plus> to sycl::plus -template struct get_scalar_binary_op; template