Skip to content

Commit 5182889

Browse files
committed
Remove unneeded mutex
Signed-off-by: Steffen Larsen <[email protected]>
1 parent 40dc13d commit 5182889

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

sycl/source/detail/handler_impl.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ class handler_impl {
6666
/// submission is a fallback from a previous submission.
6767
std::shared_ptr<queue_impl> MSubmissionSecondaryQueue;
6868

69-
// Protects MAuxiliaryResources.
70-
std::mutex MAuxiliaryResourcesMutex;
71-
7269
// Stores auxiliary resources used by internal operations.
7370
std::vector<std::shared_ptr<const void>> MAuxiliaryResources;
7471
};

sycl/source/handler.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,7 @@ event handler::finalize() {
405405
}
406406

407407
void handler::addReduction(const std::shared_ptr<const void> &ReduObj) {
408-
std::shared_ptr<detail::handler_impl> Impl = getHandlerImpl();
409-
std::lock_guard<std::mutex> Lock(Impl->MAuxiliaryResourcesMutex);
410-
Impl->MAuxiliaryResources.push_back(ReduObj);
408+
getHandlerImpl()->MAuxiliaryResources.push_back(ReduObj);
411409
}
412410

413411
void handler::associateWithHandler(detail::AccessorBaseHost *AccBase,

0 commit comments

Comments
 (0)