Skip to content

Commit 0fa3f45

Browse files
Remove calls of handler::addAccessorReq.
1 parent 9f0e3ef commit 0fa3f45

File tree

2 files changed

+2
-28
lines changed

2 files changed

+2
-28
lines changed

sycl/include/sycl/handler.hpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,6 @@ class __SYCL_EXPORT handler {
618618
detail::AccessorBaseHost *AccBase = (detail::AccessorBaseHost *)&Arg;
619619
detail::AccessorImplPtr AccImpl = detail::getSyclObjImpl(*AccBase);
620620
detail::AccessorImplHost *Req = AccImpl.get();
621-
addAccessorReq(std::move(AccImpl));
622621
// Add accessor to the list of arguments.
623622
addArg(detail::kernel_param_kind_t::kind_accessor, Req,
624623
static_cast<int>(AccessTarget), ArgIndex);
@@ -2580,9 +2579,6 @@ class __SYCL_EXPORT handler {
25802579

25812580
MSrcPtr = static_cast<void *>(AccImpl.get());
25822581
MDstPtr = static_cast<void *>(Dst);
2583-
// Store copy of accessor to the local storage to make sure it is alive
2584-
// until we finish
2585-
addAccessorReq(std::move(AccImpl));
25862582
}
25872583

25882584
/// Copies the content of memory pointed by Src into the memory object
@@ -2618,9 +2614,6 @@ class __SYCL_EXPORT handler {
26182614

26192615
MSrcPtr = const_cast<T_Src *>(Src);
26202616
MDstPtr = static_cast<void *>(AccImpl.get());
2621-
// Store copy of accessor to the local storage to make sure it is alive
2622-
// until we finish
2623-
addAccessorReq(std::move(AccImpl));
26242617
}
26252618

26262619
/// Copies the content of memory object accessed by Src to the memory
@@ -2675,10 +2668,6 @@ class __SYCL_EXPORT handler {
26752668

26762669
MSrcPtr = AccImplSrc.get();
26772670
MDstPtr = AccImplDst.get();
2678-
// Store copy of accessor to the local storage to make sure it is alive
2679-
// until we finish
2680-
addAccessorReq(std::move(AccImplSrc));
2681-
addAccessorReq(std::move(AccImplDst));
26822671
}
26832672

26842673
/// Provides guarantees that the memory object accessed via Acc is updated
@@ -2704,7 +2693,6 @@ class __SYCL_EXPORT handler {
27042693
detail::AccessorImplPtr AccImpl = detail::getSyclObjImpl(*AccBase);
27052694

27062695
MDstPtr = static_cast<void *>(AccImpl.get());
2707-
addAccessorReq(std::move(AccImpl));
27082696
}
27092697

27102698
public:
@@ -3459,7 +3447,6 @@ class __SYCL_EXPORT handler {
34593447
detail::AccessorImplPtr AccImpl = detail::getSyclObjImpl(*AccBase);
34603448

34613449
MDstPtr = static_cast<void *>(AccImpl.get());
3462-
addAccessorReq(std::move(AccImpl));
34633450

34643451
MPattern.resize(sizeof(T));
34653452
auto PatternPtr = reinterpret_cast<T *>(MPattern.data());

sycl/source/handler.cpp

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,21 +2055,8 @@ void handler::SetHostTask(std::function<void(interop_handle)> &&Func) {
20552055
setType(detail::CGType::CodeplayHostTask);
20562056
}
20572057

2058-
void handler::addAccessorReq(detail::AccessorImplPtr Accessor) {
2059-
#if 0
2060-
// Constructor of accessors add them to MRequirements and MAccStorage
2061-
// of the associated handler, so do not add duplicates if use same
2062-
// handler as during construction.
2063-
if (impl->CGData.MRequirements.end() !=
2064-
std::find(impl->CGData.MRequirements.begin(),
2065-
impl->CGData.MRequirements.end(), Accessor.get()))
2066-
return;
2067-
2068-
// Add accessor to the list of requirements.
2069-
impl->CGData.MRequirements.push_back(Accessor.get());
2070-
// Store copy of the accessor.
2071-
impl->CGData.MAccStorage.push_back(std::move(Accessor));
2072-
#endif
2058+
void handler::addAccessorReq(detail::AccessorImplPtr) {
2059+
assert(false && "The function must not be used.");
20732060
}
20742061

20752062
void handler::addLifetimeSharedPtrStorage(std::shared_ptr<const void> SPtr) {

0 commit comments

Comments
 (0)