mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 22:30:13 +00:00
[libomptarget][nfc] Replace static const with enum
[libomptarget][nfc] Replace static const with enum Semantically identical. Replaces 0xff... with ~0 to spare counting the f. Has the advantage that the compiler doesn't need to prove the 4/8 byte value dead before discarding it, and sidesteps the compilation question associated with what static means for a single source language. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D93328
This commit is contained in:
parent
6e890ec7be
commit
b607837c75
@ -74,8 +74,9 @@ INLINE uint64_t __kmpc_impl_pack(uint32_t lo, uint32_t hi) {
|
||||
return (((uint64_t)hi) << 32) | (uint64_t)lo;
|
||||
}
|
||||
|
||||
static const __kmpc_impl_lanemask_t __kmpc_impl_all_lanes =
|
||||
UINT64_C(0xffffffffffffffff);
|
||||
enum : __kmpc_impl_lanemask_t {
|
||||
__kmpc_impl_all_lanes = ~(__kmpc_impl_lanemask_t)0
|
||||
};
|
||||
|
||||
DEVICE __kmpc_impl_lanemask_t __kmpc_impl_lanemask_lt();
|
||||
|
||||
|
@ -91,8 +91,9 @@ INLINE uint64_t __kmpc_impl_pack(uint32_t lo, uint32_t hi) {
|
||||
return val;
|
||||
}
|
||||
|
||||
static const __kmpc_impl_lanemask_t __kmpc_impl_all_lanes =
|
||||
UINT32_C(0xffffffff);
|
||||
enum : __kmpc_impl_lanemask_t {
|
||||
__kmpc_impl_all_lanes = ~(__kmpc_impl_lanemask_t)0
|
||||
};
|
||||
|
||||
INLINE __kmpc_impl_lanemask_t __kmpc_impl_lanemask_lt() {
|
||||
__kmpc_impl_lanemask_t res;
|
||||
|
Loading…
Reference in New Issue
Block a user