Skip to content

Commit f179968

Browse files
author
Alex Yuan
committed
[SYCL][Readability] Code Cleaning
Non-functional changes, will only make the code more readtable. Signed-off by: Yuan, Alex <[email protected]>
1 parent 346a6c5 commit f179968

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)