Skip to content

[NFC][SYCL] Break include's cycle #1770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions sycl/include/CL/sycl/accessor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
#include <CL/sycl/detail/common.hpp>
#include <CL/sycl/detail/export.hpp>
#include <CL/sycl/detail/generic_type_traits.hpp>
#include <CL/sycl/detail/handler_proxy.hpp>
#include <CL/sycl/detail/image_accessor_util.hpp>
#include <CL/sycl/detail/image_ocl_types.hpp>
#include <CL/sycl/exception.hpp>
#include <CL/sycl/handler.hpp>
#include <CL/sycl/id.hpp>
#include <CL/sycl/image.hpp>
#include <CL/sycl/pointers.hpp>
Expand Down Expand Up @@ -797,7 +797,7 @@ class accessor :
detail::convertToArrayOfN<3, 1>(BufferRef.get_range()), AccessMode,
detail::getSyclObjImpl(BufferRef).get(), Dimensions, sizeof(DataT),
BufferRef.OffsetInBytes, BufferRef.IsSubBuffer) {
CommandGroupHandler.associateWithHandler(*this);
detail::associateWithHandler(CommandGroupHandler, this, AccessTarget);
}
#endif

Expand Down Expand Up @@ -839,7 +839,7 @@ class accessor :
detail::convertToArrayOfN<3, 1>(BufferRef.get_range()), AccessMode,
detail::getSyclObjImpl(BufferRef).get(), Dimensions, sizeof(DataT),
BufferRef.OffsetInBytes, BufferRef.IsSubBuffer) {
CommandGroupHandler.associateWithHandler(*this);
detail::associateWithHandler(CommandGroupHandler, this, AccessTarget);
}
#endif

Expand Down Expand Up @@ -883,7 +883,7 @@ class accessor :
AccessMode, detail::getSyclObjImpl(BufferRef).get(),
Dimensions, sizeof(DataT), BufferRef.OffsetInBytes,
BufferRef.IsSubBuffer) {
CommandGroupHandler.associateWithHandler(*this);
detail::associateWithHandler(CommandGroupHandler, this, AccessTarget);
}
#endif

Expand Down Expand Up @@ -1186,7 +1186,10 @@ class accessor<DataT, Dimensions, AccessMode, access::target::image,
access::target::image, IsPlaceholder>(
Image, CommandGroupHandler,
(detail::getSyclObjImpl(Image))->getElementSize()) {
CommandGroupHandler.associateWithHandler(*this);
#ifndef __SYCL_DEVICE_ONLY__
detail::associateWithHandler(CommandGroupHandler, this,
access::target::image);
#endif
}
#ifdef __SYCL_DEVICE_ONLY__
private:
Expand Down Expand Up @@ -1254,7 +1257,10 @@ class accessor<DataT, Dimensions, AccessMode, access::target::image_array,
access::target::image, IsPlaceholder>(
Image, CommandGroupHandler,
(detail::getSyclObjImpl(Image))->getElementSize()) {
CommandGroupHandler.associateWithHandler(*this);
#ifndef __SYCL_DEVICE_ONLY__
detail::associateWithHandler(CommandGroupHandler, this,
access::target::image_array);
#endif
}

detail::__image_array_slice__<DataT, Dimensions, AccessMode, IsPlaceholder>
Expand Down
2 changes: 0 additions & 2 deletions sycl/include/CL/sycl/detail/buffer_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <CL/sycl/detail/export.hpp>
#include <CL/sycl/detail/helpers.hpp>
#include <CL/sycl/detail/sycl_mem_obj_t.hpp>
#include <CL/sycl/handler.hpp>
#include <CL/sycl/property_list.hpp>
#include <CL/sycl/stl.hpp>
#include <CL/sycl/types.hpp>
Expand All @@ -32,7 +31,6 @@ template <typename DataT, int Dimensions, access::mode AccessMode,
class accessor;
template <typename T, int Dimensions, typename AllocatorT, typename Enable>
class buffer;
class handler;

using buffer_allocator = detail::sycl_memory_object_allocator;

Expand Down
Loading