Skip to content

Commit c275619

Browse files
[SYCL] Delay inclusion of sycl/types.hpp in core.hpp (#13902)
Can't eliminate it completely until #13760 is merged, but this PR brings us closer to that goal.
1 parent 192662b commit c275619

23 files changed

+29
-12
lines changed

sycl/include/sycl/ext/intel/experimental/task_sequence.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <CL/__spirv/spirv_ops.hpp>
1212
#include <CL/__spirv/spirv_types.hpp>
13+
#include <sycl/aspects.hpp>
1314
#include <sycl/exception.hpp>
1415
#include <sycl/ext/intel/experimental/fpga_kernel_properties.hpp>
1516
#include <sycl/ext/intel/experimental/task_sequence_properties.hpp>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <CL/__spirv/spirv_ops.hpp>
1212
#include <sycl/ext/oneapi/properties/properties.hpp>
13+
#include <sycl/types.hpp>
1314

1415
namespace sycl {
1516
inline namespace _V1 {

sycl/include/sycl/ext/oneapi/properties/properties.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
#pragma once
1010

11+
#include <sycl/detail/is_device_copyable.hpp>
1112
#include <sycl/ext/oneapi/properties/property.hpp> // for IsRuntimePr...
1213
#include <sycl/ext/oneapi/properties/property_utils.hpp> // for Sorted, Mer...
1314
#include <sycl/ext/oneapi/properties/property_value.hpp> // for property_value
14-
#include <sycl/types.hpp> // for is_device_c...
1515

1616
#include <tuple> // for tuple, tupl...
1717
#include <type_traits> // for enable_if_t

sycl/include/sycl/sub_group.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <sycl/memory_enums.hpp> // for memory_scope
1919
#include <sycl/multi_ptr.hpp> // for multi_ptr
2020
#include <sycl/range.hpp> // for range
21-
#include <sycl/types.hpp> // for vec
2221

2322
#ifdef __SYCL_DEVICE_ONLY__
2423
#include <sycl/ext/oneapi/functional.hpp>
@@ -33,7 +32,7 @@ inline namespace _V1 {
3332
template <typename T, access::address_space Space,
3433
access::decorated DecorateAddress>
3534
class multi_ptr;
36-
35+
template <typename Type, int NumElements> class vec;
3736
namespace detail {
3837

3938
namespace sub_group {

sycl/test-e2e/Basic/boolean.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#include <cassert>
44
#include <iostream>
55

6-
#include <sycl/detail/core.hpp>
7-
86
#include <sycl/detail/boolean.hpp>
7+
#include <sycl/detail/core.hpp>
8+
#include <sycl/types.hpp>
99

1010
using namespace sycl;
1111
namespace s = sycl;

sycl/test-e2e/Basic/buffer/buffer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <iostream>
1414
#include <memory>
1515
#include <sycl/detail/core.hpp>
16+
#include <sycl/types.hpp>
1617

1718
using namespace sycl;
1819

sycl/test-e2e/Basic/group_async_copy.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <iostream>
88
#include <sycl/detail/core.hpp>
9+
#include <sycl/types.hpp>
910
#include <typeinfo>
1011

1112
using namespace sycl;

sycl/test-e2e/Basic/group_async_copy_legacy.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <iostream>
88
#include <sycl/detail/core.hpp>
9+
#include <sycl/types.hpp>
910
#include <typeinfo>
1011

1112
using namespace sycl;

sycl/test-e2e/Basic/half_type.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <cmath>
1414
#include <iostream>
1515
#include <sycl/detail/core.hpp>
16+
#include <sycl/types.hpp>
1617
#include <unordered_set>
1718

1819
using namespace sycl;

sycl/test-e2e/Basic/parallel_for_indexers.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: %{run} %t2.out
33

44
#include <sycl/detail/core.hpp>
5+
#include <sycl/types.hpp>
56

67
#include <cassert>
78
#include <memory>

sycl/test-e2e/Basic/parallel_for_range_roundup.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
//
2525
#include <iostream>
2626
#include <sycl/detail/core.hpp>
27+
#include <sycl/types.hpp>
2728

2829
using namespace sycl;
2930

sycl/test-e2e/Basic/swizzle_op.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include <cassert>
1313
#include <sycl/detail/core.hpp>
14+
#include <sycl/types.hpp>
1415

1516
using namespace sycl;
1617

sycl/test-e2e/Basic/vector/bool.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
#include <sycl/detail/core.hpp>
16+
#include <sycl/types.hpp>
1617

1718
constexpr int size = 2;
1819

sycl/test-e2e/Basic/vector/byte.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
#include <sycl/detail/core.hpp>
16+
#include <sycl/types.hpp>
1617

1718
#include <cstddef> // std::byte
1819
#include <tuple> // std::ignore

sycl/test-e2e/Basic/vector/int-convert.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %}
1212

1313
#include <sycl/detail/core.hpp>
14+
#include <sycl/types.hpp>
1415

1516
#include <cstdint>
1617
#include <iostream>

sycl/test-e2e/Basic/vector/operators.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#define SYCL_SIMPLE_SWIZZLES
1313
#include <sycl/detail/core.hpp>
14+
#include <sycl/types.hpp>
1415
namespace s = sycl;
1516

1617
template <typename ResultVecT>

sycl/test-e2e/Basic/vector/vec_binary_scalar_order.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#pragma once
44

55
#include <sycl/detail/core.hpp>
6+
#include <sycl/types.hpp>
67

78
template <typename T>
89
using rel_t = std::conditional_t<

sycl/test-e2e/KernelFusion/internalize_non_unit_localsize.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <sycl/detail/core.hpp>
1616
#include <sycl/ext/codeplay/experimental/fusion_wrapper.hpp>
1717
#include <sycl/properties/all_properties.hpp>
18+
#include <sycl/types.hpp>
1819

1920
using namespace sycl;
2021

sycl/test-e2e/KernelFusion/internalize_vfunc.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <sycl/detail/core.hpp>
1010
#include <sycl/ext/codeplay/experimental/fusion_wrapper.hpp>
1111
#include <sycl/properties/all_properties.hpp>
12+
#include <sycl/types.hpp>
1213

1314
using namespace sycl;
1415

sycl/test-e2e/Regression/get_spec_const_vec16.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// of sycl::vec<char, 16> type is correct.
66

77
#include <sycl/detail/core.hpp>
8-
98
#include <sycl/specialization_id.hpp>
9+
#include <sycl/types.hpp>
1010

1111
#include <algorithm>
1212

sycl/test-e2e/Regression/group.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include <iostream>
1313
#include <sycl/detail/core.hpp>
14+
#include <sycl/types.hpp>
1415

1516
using namespace sycl;
1617

sycl/test-e2e/Regression/vec_rel_swizzle_ops.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <cstdlib>
88
#include <sycl/detail/core.hpp>
9+
#include <sycl/types.hpp>
910

1011
template <typename T, typename ResultT>
1112
bool testAndOperator(const std::string &typeName) {

sycl/test/include_deps/sycl_detail_core.hpp.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,6 @@
133133
// CHECK-NEXT: nd_item.hpp
134134
// CHECK-NEXT: nd_range.hpp
135135
// CHECK-NEXT: sub_group.hpp
136-
// CHECK-NEXT: types.hpp
137-
// CHECK-NEXT: marray.hpp
138-
// CHECK-NEXT: vector.hpp
139-
// CHECK-NEXT: detail/memcpy.hpp
140-
// CHECK-NEXT: detail/vector_convert.hpp
141-
// CHECK-NEXT: swizzles.def
142136
// CHECK-NEXT: ext/oneapi/functional.hpp
143137
// CHECK-NEXT: detail/spirv.hpp
144138
// CHECK-NEXT: ext/oneapi/experimental/non_uniform_groups.hpp
@@ -148,6 +142,12 @@
148142
// CHECK-NEXT: builtins_utils_vec.hpp
149143
// CHECK-NEXT: builtins_utils_scalar.hpp
150144
// CHECK-NEXT: detail/boolean.hpp
145+
// CHECK-NEXT: marray.hpp
146+
// CHECK-NEXT: types.hpp
147+
// CHECK-NEXT: vector.hpp
148+
// CHECK-NEXT: detail/memcpy.hpp
149+
// CHECK-NEXT: detail/vector_convert.hpp
150+
// CHECK-NEXT: swizzles.def
151151
// CHECK-NEXT: detail/builtins/common_functions.inc
152152
// CHECK-NEXT: detail/builtins/helper_macros.hpp
153153
// CHECK-NEXT: detail/builtins/geometric_functions.inc

0 commit comments

Comments
 (0)