Skip to content

Commit 5635959

Browse files
kbobrovsbader
authored andcommitted
[SYCL] Make barrier flags constexpr to avoid its extra runtime translation.
Signed-off-by: Konstantin S Bobrovsky <[email protected]>
1 parent 97f8a03 commit 5635959

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/include/CL/sycl/group.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Builder;
2929
// Implements a barrier accross work items within a work group.
3030
static inline void workGroupBarrier() {
3131
#ifdef __SYCL_DEVICE_ONLY__
32-
uint32_t flags =
32+
constexpr uint32_t flags =
3333
static_cast<uint32_t>(
3434
__spv::MemorySemanticsMask::SequentiallyConsistent) |
3535
static_cast<uint32_t>(__spv::MemorySemanticsMask::WorkgroupMemory);

0 commit comments

Comments
 (0)