Skip to content

Commit 44b3fd5

Browse files
[NFC][SYCL] Reduce dependencies of sycl/detail/helpers.hpp
1 parent 02c4600 commit 44b3fd5

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

sycl/include/sycl/detail/helpers.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@
1818
#endif
1919

2020
#include <cstddef> // for size_t
21-
#include <memory> // for shared_ptr
2221
#include <stdint.h> // for uint32_t
2322
#include <type_traits> // for enable_if_t, integral_constant
2423
#include <utility> // for forward, integer_sequence, mak...
25-
#include <vector> // for vector
2624

2725
namespace sycl {
2826
inline namespace _V1 {
@@ -38,11 +36,6 @@ template <typename Type, std::size_t NumElements> class marray;
3836
enum class memory_order;
3937

4038
namespace detail {
41-
class buffer_impl;
42-
43-
__SYCL_EXPORT void
44-
markBufferAsInternal(const std::shared_ptr<buffer_impl> &BufImpl);
45-
4639
template <typename T> T *declptr() { return static_cast<T *>(nullptr); }
4740

4841
// Function to get or store id, item, nd_item, group for the host implementation

sycl/include/sycl/handler.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ class graph_impl;
166166
class dynamic_parameter_impl;
167167
} // namespace ext::oneapi::experimental::detail
168168
namespace detail {
169+
class buffer_impl;
170+
171+
__SYCL_EXPORT void
172+
markBufferAsInternal(const std::shared_ptr<buffer_impl> &BufImpl);
169173

170174
class type_erased_cgfo_ty {
171175
// From SYCL 2020, command group function object:

sycl/source/detail/helpers.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ __SYCL_EXPORT void waitEvents(std::vector<sycl::event> DepEvents) {
3434
}
3535
#endif
3636

37-
__SYCL_EXPORT void
38-
markBufferAsInternal(const std::shared_ptr<buffer_impl> &BufImpl) {
39-
BufImpl->markAsInternal();
40-
}
41-
4237
const RTDeviceBinaryImage *retrieveKernelBinary(queue_impl &Queue,
4338
KernelNameStrRefT KernelName,
4439
CGExecKernel *KernelCG) {

sycl/source/handler.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "ur_api.h"
1111
#include <algorithm>
1212

13+
#include <detail/buffer_impl.hpp>
1314
#include <detail/config.hpp>
1415
#include <detail/global_handler.hpp>
1516
#include <detail/graph/dynamic_impl.hpp>
@@ -49,6 +50,10 @@ namespace sycl {
4950
inline namespace _V1 {
5051

5152
namespace detail {
53+
__SYCL_EXPORT void
54+
markBufferAsInternal(const std::shared_ptr<buffer_impl> &BufImpl) {
55+
BufImpl->markAsInternal();
56+
}
5257

5358
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
5459
// TODO: Check if two ABI exports below are still necessary.

0 commit comments

Comments
 (0)