@@ -117,7 +117,7 @@ event queue_impl::memset(const std::shared_ptr<detail::queue_impl> &Self,
117
117
}
118
118
}
119
119
// Track only if we won't be able to handle it with piQueueFinish.
120
- if (!MSupportOOO )
120
+ if (MEmulateOOO )
121
121
addSharedEvent (ResEvent);
122
122
return MDiscardEvents ? createDiscardedEvent () : ResEvent;
123
123
}
@@ -180,7 +180,7 @@ event queue_impl::memcpy(const std::shared_ptr<detail::queue_impl> &Self,
180
180
}
181
181
}
182
182
// Track only if we won't be able to handle it with piQueueFinish.
183
- if (!MSupportOOO )
183
+ if (MEmulateOOO )
184
184
addSharedEvent (ResEvent);
185
185
return MDiscardEvents ? createDiscardedEvent () : ResEvent;
186
186
}
@@ -224,7 +224,7 @@ event queue_impl::mem_advise(const std::shared_ptr<detail::queue_impl> &Self,
224
224
}
225
225
}
226
226
// Track only if we won't be able to handle it with piQueueFinish.
227
- if (!MSupportOOO )
227
+ if (MEmulateOOO )
228
228
addSharedEvent (ResEvent);
229
229
return MDiscardEvents ? createDiscardedEvent () : ResEvent;
230
230
}
@@ -237,12 +237,12 @@ void queue_impl::addEvent(const event &Event) {
237
237
// if there is no command on the event, we cannot track it with MEventsWeak
238
238
// as that will leave it with no owner. Track in MEventsShared only if we're
239
239
// unable to call piQueueFinish during wait.
240
- if (is_host () || !MSupportOOO )
240
+ if (is_host () || MEmulateOOO )
241
241
addSharedEvent (Event);
242
242
}
243
243
// As long as the queue supports piQueueFinish we only need to store events
244
244
// for unenqueued commands and host tasks.
245
- else if (is_host () || !MSupportOOO || EImpl->getHandleRef () == nullptr ) {
245
+ else if (is_host () || MEmulateOOO || EImpl->getHandleRef () == nullptr ) {
246
246
std::weak_ptr<event_impl> EventWeakPtr{EImpl};
247
247
std::lock_guard<std::mutex> Lock{MMutex};
248
248
MEventsWeak.push_back (std::move (EventWeakPtr));
@@ -253,7 +253,7 @@ void queue_impl::addEvent(const event &Event) {
253
253
// / but some events have no other owner. In this case,
254
254
// / addSharedEvent will have the queue track the events via a shared pointer.
255
255
void queue_impl::addSharedEvent (const event &Event) {
256
- assert (is_host () || !MSupportOOO );
256
+ assert (is_host () || MEmulateOOO );
257
257
std::lock_guard<std::mutex> Lock (MMutex);
258
258
// Events stored in MEventsShared are not released anywhere else aside from
259
259
// calls to queue::wait/wait_and_throw, which a user application might not
@@ -388,7 +388,7 @@ void queue_impl::wait(const detail::code_location &CodeLoc) {
388
388
// directly. Otherwise, only wait for unenqueued or host task events, starting
389
389
// from the latest submitted task in order to minimize total amount of calls,
390
390
// then handle the rest with piQueueFinish.
391
- const bool SupportsPiFinish = !is_host () && MSupportOOO ;
391
+ const bool SupportsPiFinish = !is_host () && !MEmulateOOO ;
392
392
for (auto EventImplWeakPtrIt = WeakEvents.rbegin ();
393
393
EventImplWeakPtrIt != WeakEvents.rend (); ++EventImplWeakPtrIt) {
394
394
if (std::shared_ptr<event_impl> EventImplSharedPtr =
0 commit comments