Skip to content

Commit 9679ead

Browse files
[L0] Refactoring of boolean event parameters
Fixed paratheses. Signed-off-by: Winston Zhang <[email protected]>
1 parent 435f199 commit 9679ead

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/adapters/level_zero/context.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ ur_context_handle_t_::getEventFromContextCache(EventFlags Flags,
561561

562562
auto It = Cache->begin();
563563
ur_event_handle_t Event = *It;
564-
if (Event->CounterBasedEventsEnabled != Flags & COUNTER_BASED) {
564+
if (Event->CounterBasedEventsEnabled != (Flags & COUNTER_BASED)) {
565565
return nullptr;
566566
}
567567
Cache->erase(It);

source/adapters/level_zero/context.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ struct ur_context_handle_t_ : _ur_object {
249249
} else if (Flags & COUNTER_BASED && Flags & HOST_VISIBLE &&
250250
Flags & USING_IMM_CMDLIST) {
251251
CacheType = HostVisibleCounterBasedImmediateCacheType;
252-
} else if (Flags & COUNTER_BASED && !Flags & HOST_VISIBLE &&
252+
} else if (Flags & COUNTER_BASED && !(Flags & HOST_VISIBLE) &&
253253
Flags & USING_IMM_CMDLIST) {
254254
CacheType = HostInvisibleCounterBasedImmediateCacheType;
255255
} else if (!(Flags & COUNTER_BASED) && Flags & HOST_VISIBLE) {

0 commit comments

Comments
 (0)