Skip to content

Commit a1d7d23

Browse files
[L0] Refactoring of boolean event parameters
Fixed paratheses. Signed-off-by: Winston Zhang <[email protected]>
1 parent 26f6b1d commit a1d7d23

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
@@ -250,7 +250,7 @@ struct ur_context_handle_t_ : _ur_object {
250250
} else if (Flags & COUNTER_BASED && Flags & HOST_VISIBLE &&
251251
Flags & USING_IMM_CMDLIST) {
252252
CacheType = HostVisibleCounterBasedImmediateCacheType;
253-
} else if (Flags & COUNTER_BASED && !Flags & HOST_VISIBLE &&
253+
} else if (Flags & COUNTER_BASED && !(Flags & HOST_VISIBLE) &&
254254
Flags & USING_IMM_CMDLIST) {
255255
CacheType = HostInvisibleCounterBasedImmediateCacheType;
256256
} else if (!(Flags & COUNTER_BASED) && Flags & HOST_VISIBLE) {

0 commit comments

Comments
 (0)