Skip to content

Commit d0ddb8d

Browse files
setContext cleanup
1 parent 4de4856 commit d0ddb8d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

sycl/source/detail/event_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ void event_impl::setContextImpl(context_impl &Context) {
161161
MContext = Context.shared_from_this();
162162
}
163163
void event_impl::setContextImpl(context_impl *Context) {
164-
MIsHostEvent = false;
164+
MIsHostEvent = Context == nullptr;
165165
MContext = Context ? Context->shared_from_this() : nullptr;
166166
}
167167

sycl/source/detail/event_impl.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,11 @@ class event_impl {
149149

150150
/// Associate event with the context.
151151
///
152-
/// Provided UrContext inside ContextImplPtr must be associated
152+
/// Provided UrContext inside Context must be associated
153153
/// with the UrEvent object stored in this class
154-
///
155-
/// @param Context is a shared pointer to an instance of valid context_impl.
154+
void setContextImpl(std::shared_ptr<context_impl> &&Context);
156155
void setContextImpl(context_impl &Context);
157156
void setContextImpl(context_impl *Context);
158-
void setContextImpl(std::shared_ptr<context_impl> &&Context);
159157

160158
/// Clear the event state
161159
void setStateIncomplete();

0 commit comments

Comments
 (0)