Skip to content

Commit 99ee13b

Browse files
[SYCL][NFC] Clean-up code to improve readability (#6559)
Non-functional changes, will only make the code more readable. Signed-off by: Yuan, Alex <[email protected]>
1 parent f417a88 commit 99ee13b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

sycl/source/queue.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,11 @@ event queue::mem_advise(const void *Ptr, size_t Length, int Advice,
123123
}
124124

125125
event queue::discard_or_return(const event &Event) {
126-
if (impl->MDiscardEvents) {
127-
using detail::event_impl;
128-
auto Impl = std::make_shared<event_impl>(event_impl::HES_Discarded);
129-
return detail::createSyclObjFromImpl<event>(Impl);
130-
}
131-
return Event;
126+
if (!(impl->MDiscardEvents))
127+
return Event;
128+
using detail::event_impl;
129+
auto Impl = std::make_shared<event_impl>(event_impl::HES_Discarded);
130+
return detail::createSyclObjFromImpl<event>(Impl);
132131
}
133132

134133
event queue::submit_impl(std::function<void(handler &)> CGH,

0 commit comments

Comments
 (0)