Skip to content

Commit 4871246

Browse files
Fix event isCompleted impl
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
1 parent 65451cb commit 4871246

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

sycl/source/detail/event_impl.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,11 @@ void event_impl::cleanDepEventsThroughOneLevel() {
444444
}
445445
}
446446

447+
bool event_impl::isCompleted() {
448+
return get_info<info::event::command_execution_status>() ==
449+
info::event_command_status::complete;
450+
}
451+
447452
} // namespace detail
448453
} // __SYCL_INLINE_VER_NAMESPACE(_V1)
449454
} // namespace sycl

sycl/source/detail/event_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class event_impl {
237237
/// Checks if this event is complete.
238238
///
239239
/// \return true if this event is complete.
240-
bool isComplete() const { return MState == HES_Complete; }
240+
bool isCompleted();
241241

242242
private:
243243
// When instrumentation is enabled emits trace event for event wait begin and

sycl/source/detail/scheduler/commands.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class Command {
149149
}
150150
// Shows thst command could be enqueud, but is blocking enqueue of all
151151
// commands depending on it. Regular usage - host task.
152-
bool isBlocking() const { return isHostTask() && !MEvent->isComplete(); }
152+
bool isBlocking() const { return isHostTask() && !MEvent->isCompleted(); }
153153

154154
void addBlockedUserUnique(const EventImplPtr &NewUser) {
155155
if (std::find(MBlockedUsers.begin(), MBlockedUsers.end(), NewUser) !=

0 commit comments

Comments
 (0)