Skip to content

Commit 238753c

Browse files
[SYCL] Split image accessor code into a separate include (#13500)
... that isn't included from `<sycl/detail/core.hpp>`
1 parent d59d1da commit 238753c

17 files changed

+1370
-1350
lines changed

sycl/include/sycl/accessor.hpp

Lines changed: 8 additions & 1340 deletions
Large diffs are not rendered by default.

sycl/include/sycl/accessor_image.hpp

Lines changed: 1344 additions & 0 deletions
Large diffs are not rendered by default.

sycl/include/sycl/sycl.hpp

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

1111
#include <sycl/detail/core.hpp>
1212

13+
#include <sycl/accessor_image.hpp>
1314
#include <sycl/aspects.hpp>
1415
#include <sycl/atomic.hpp>
1516
#include <sycl/atomic_fence.hpp>

sycl/source/accessor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <detail/queue_impl.hpp>
1010
#include <detail/sycl_mem_obj_t.hpp>
1111
#include <sycl/accessor.hpp>
12+
#include <sycl/accessor_image.hpp>
1213

1314
namespace sycl {
1415
inline namespace _V1 {

sycl/source/detail/accessor_impl.hpp

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

1111
#include <sycl/access/access.hpp>
1212
#include <sycl/accessor.hpp>
13+
#include <sycl/accessor_image.hpp>
1314
#include <sycl/detail/export.hpp>
1415
#include <sycl/id.hpp>
1516
#include <sycl/property_list.hpp>

sycl/source/detail/image_accessor_util.cpp

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

99
#include <sycl/accessor.hpp>
10+
#include <sycl/accessor_image.hpp>
1011
#include <sycl/builtins.hpp>
1112

1213
namespace sycl {

sycl/test-e2e/Basic/image/image_accessor_readwrite.cpp

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

1717
#include <cassert>
1818
#include <iomanip>
19+
#include <sycl/accessor_image.hpp>
1920
#include <sycl/detail/core.hpp>
2021
#if DEBUG_OUTPUT
2122
#include <iostream>

sycl/test-e2e/Basic/image/image_max_size.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// The test checks that 'image' with max allowed sizes is handled correctly.
1010

1111
#include <iostream>
12+
#include <sycl/accessor_image.hpp>
1213
#include <sycl/detail/core.hpp>
1314
using namespace sycl;
1415

sycl/test-e2e/Basic/image/image_sample.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Temporarily disable test on Windows due to regressions in GPU driver.
55
// UNSUPPORTED: hip, windows
66

7+
#include <sycl/accessor_image.hpp>
78
#include <sycl/detail/core.hpp>
89

910
#include <iostream>

sycl/test-e2e/Regression/image_access.cpp

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

1616
#include <iostream>
1717

18+
#include <sycl/accessor_image.hpp>
1819
#include <sycl/detail/core.hpp>
1920

2021
int main() {

sycl/test-e2e/Sampler/common.hpp

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

66
#include <sycl/detail/core.hpp>
77

8+
#include <sycl/accessor_image.hpp>
89
#include <sycl/builtins.hpp>
910

1011
using namespace sycl;

sycl/test-e2e/XPTI/image/accessors.cpp

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

1010
#else
1111

12+
#include <sycl/accessor_image.hpp>
1213
#include <sycl/detail/core.hpp>
1314

1415
using namespace sycl::access;

sycl/test/abi/layout_accessors_device.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// clang-format off
66

77
#include <sycl/accessor.hpp>
8+
#include <sycl/accessor_image.hpp>
89

910
using namespace sycl;
1011

sycl/test/abi/layout_accessors_host.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// clang-format off
66

77
#include <sycl/accessor.hpp>
8+
#include <sycl/accessor_image.hpp>
89

910
using namespace sycl;
1011

sycl/test/basic_tests/image_accessor_types.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ int main() {
1313
myQueue.submit([&](handler &cgh) {
1414
accessor<float, 2, access::mode::read, access::target::image> NotValidType1(
1515
srcImage, cgh);
16-
// expected-error@sycl/accessor.hpp:* {{The data type of an image accessor must be only cl_int4, cl_uint4, cl_float4 or cl_half4}}
16+
// expected-error@sycl/accessor_image.hpp:* {{The data type of an image accessor must be only cl_int4, cl_uint4, cl_float4 or cl_half4}}
1717
accessor<int2, 2, access::mode::read, access::target::image> NotValidType2(
1818
srcImage, cgh);
19-
// expected-error@sycl/accessor.hpp:* {{The data type of an image accessor must be only cl_int4, cl_uint4, cl_float4 or cl_half4}}
19+
// expected-error@sycl/accessor_image.hpp:* {{The data type of an image accessor must be only cl_int4, cl_uint4, cl_float4 or cl_half4}}
2020
accessor<float4, 2, access::mode::read, access::target::image>
2121
ValidSYCLFloat(srcImage, cgh);
2222
accessor<int4, 2, access::mode::read, access::target::image> ValidSYCLInt(

sycl/test/include_deps/sycl_accessor.hpp.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,10 @@
113113
// CHECK-NEXT: detail/accessor_iterator.hpp
114114
// CHECK-NEXT: detail/generic_type_traits.hpp
115115
// CHECK-NEXT: detail/handler_proxy.hpp
116-
// CHECK-NEXT: detail/image_accessor_util.hpp
117116
// CHECK-NEXT: device.hpp
118117
// CHECK-NEXT: kernel_bundle_enums.hpp
118+
// CHECK-NEXT: pointers.hpp
119+
// CHECK-NEXT: properties/accessor_properties.hpp
119120
// CHECK-NEXT: image.hpp
120121
// CHECK-NEXT: detail/backend_traits.hpp
121122
// CHECK-NEXT: sampler.hpp
@@ -125,8 +126,5 @@
125126
// CHECK-NEXT: detail/memcpy.hpp
126127
// CHECK-NEXT: detail/vector_convert.hpp
127128
// CHECK-NEXT: swizzles.def
128-
// CHECK-NEXT: pointers.hpp
129-
// CHECK-NEXT: properties/accessor_properties.hpp
130129
// CHECK-NEXT: properties/buffer_properties.hpp
131-
// CHECK-NEXT: detail/image_ocl_types.hpp
132130
// CHECK-EMPTY:

sycl/test/include_deps/sycl_detail_core.hpp.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,10 @@
114114
// CHECK-NEXT: detail/accessor_iterator.hpp
115115
// CHECK-NEXT: detail/generic_type_traits.hpp
116116
// CHECK-NEXT: detail/handler_proxy.hpp
117-
// CHECK-NEXT: detail/image_accessor_util.hpp
118117
// CHECK-NEXT: device.hpp
119118
// CHECK-NEXT: kernel_bundle_enums.hpp
119+
// CHECK-NEXT: pointers.hpp
120+
// CHECK-NEXT: properties/accessor_properties.hpp
120121
// CHECK-NEXT: image.hpp
121122
// CHECK-NEXT: detail/backend_traits.hpp
122123
// CHECK-NEXT: sampler.hpp
@@ -126,10 +127,7 @@
126127
// CHECK-NEXT: detail/memcpy.hpp
127128
// CHECK-NEXT: detail/vector_convert.hpp
128129
// CHECK-NEXT: swizzles.def
129-
// CHECK-NEXT: pointers.hpp
130-
// CHECK-NEXT: properties/accessor_properties.hpp
131130
// CHECK-NEXT: properties/buffer_properties.hpp
132-
// CHECK-NEXT: detail/image_ocl_types.hpp
133131
// CHECK-NEXT: queue.hpp
134132
// CHECK-NEXT: detail/assert_happened.hpp
135133
// CHECK-NEXT: detail/cg_types.hpp

0 commit comments

Comments
 (0)