File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -84,13 +84,23 @@ void event_impl::wait(
84
84
// go via the slow path event waiting in the scheduler
85
85
waitInternal ();
86
86
else
87
+ #ifdef SCHEDULER_20
88
+ detail::Scheduler::getInstance ().waitForEvent (std::move (Self));
89
+ #else
87
90
simple_scheduler::Scheduler::getInstance ().waitForEvent (Self);
91
+ #endif
88
92
}
89
93
90
94
void event_impl::wait_and_throw (
91
95
std::shared_ptr<cl::sycl::detail::event_impl> Self) {
92
96
wait (Self);
97
+ #ifdef SCHEDULER_20
98
+ for (auto &EventImpl :
99
+ detail::Scheduler::getInstance ().getWaitList (std::move (Self)))
100
+ EventImpl->getQueue ()->throw_asynchronous ();
101
+ #else
93
102
cl::sycl::simple_scheduler::Scheduler::getInstance ().throwForEvent (Self);
103
+ #endif
94
104
}
95
105
96
106
template <>
Original file line number Diff line number Diff line change @@ -50,8 +50,17 @@ void event::wait_and_throw(const vector_class<event> &EventList) {
50
50
}
51
51
52
52
vector_class<event> event::get_wait_list () {
53
+ #ifdef SCHEDULER_20
54
+ vector_class<event> Result;
55
+
56
+ for (auto &EventImpl : detail::Scheduler::getInstance ().getWaitList (impl))
57
+ Result.push_back (detail::createSyclObjFromImpl<event>(EventImpl));
58
+
59
+ return Result;
60
+ #else
53
61
return cl::sycl::simple_scheduler::Scheduler::getInstance ().
54
62
getDepEvents (impl);
63
+ #endif
55
64
}
56
65
57
66
event::event (std::shared_ptr<detail::event_impl> event_impl)
You can’t perform that action at this time.
0 commit comments