//===-- HashTable BitMasks Generic Implementation ---------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "src/__support/common.h" #include "src/__support/endian.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { namespace internal { // GPU architectures are 64-bit but use 32-bit general purpose registers. #ifdef LIBC_TARGET_ARCH_IS_GPU using bitmask_t = uint32_t; #else bitmask_t; #endif // Helper function to spread a byte across the whole word. // Accumutively, the procedure looks like: // byte = 0x00000000000000ff // byte | (byte << 8) = 0x000000000000ffff // byte | (byte << 16) = 0x00000000ffffffff // byte | (byte << 32) = 0xffffffffffffffff LIBC_INLINE constexpr bitmask_t repeat_byte(bitmask_t byte) { … } BitMask; IteratableBitMask; struct Group { … }; } // namespace internal } // namespace LIBC_NAMESPACE_DECL