#include "absl/container/internal/raw_hash_set.h"
#include <atomic>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include "absl/base/attributes.h"
#include "absl/base/config.h"
#include "absl/base/dynamic_annotations.h"
#include "absl/base/internal/endian.h"
#include "absl/base/optimization.h"
#include "absl/container/internal/container_memory.h"
#include "absl/container/internal/hashtablez_sampler.h"
#include "absl/hash/hash.h"
namespace absl {
ABSL_NAMESPACE_BEGIN
namespace container_internal {
constexpr ctrl_t ZeroCtrlT() { … }
alignas(16) ABSL_CONST_INIT ABSL_DLL const ctrl_t kEmptyGroup[32] = …;
ABSL_CONST_INIT ABSL_DLL const ctrl_t kSooControl[17] = …;
static_assert …;
#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL
constexpr size_t Group::kWidth;
#endif
namespace {
inline size_t RandomSeed() { … }
bool ShouldRehashForBugDetection(const ctrl_t* ctrl, size_t capacity) { … }
}
GenerationType* EmptyGeneration() { … }
bool CommonFieldsGenerationInfoEnabled::
should_rehash_for_bug_detection_on_insert(const ctrl_t* ctrl,
size_t capacity) const { … }
bool CommonFieldsGenerationInfoEnabled::should_rehash_for_bug_detection_on_move(
const ctrl_t* ctrl, size_t capacity) const { … }
bool ShouldInsertBackwardsForDebug(size_t capacity, size_t hash,
const ctrl_t* ctrl) { … }
size_t PrepareInsertAfterSoo(size_t hash, size_t slot_size,
CommonFields& common) { … }
void ConvertDeletedToEmptyAndFullToDeleted(ctrl_t* ctrl, size_t capacity) { … }
template FindInfo find_first_non_full(const CommonFields&, size_t);
FindInfo find_first_non_full_outofline(const CommonFields& common,
size_t hash) { … }
namespace {
static inline void* NextSlot(void* slot, size_t slot_size) { … }
static inline void* PrevSlot(void* slot, size_t slot_size) { … }
size_t FindEmptySlot(size_t start, size_t end, const ctrl_t* ctrl) { … }
void DropDeletesWithoutResize(CommonFields& common,
const PolicyFunctions& policy) { … }
static bool WasNeverFull(CommonFields& c, size_t index) { … }
}
void EraseMetaOnly(CommonFields& c, size_t index, size_t slot_size) { … }
void ClearBackingArray(CommonFields& c, const PolicyFunctions& policy,
bool reuse, bool soo_enabled) { … }
void HashSetResizeHelper::GrowIntoSingleGroupShuffleControlBytes(
ctrl_t* __restrict new_ctrl, size_t new_capacity) const { … }
void HashSetResizeHelper::InitControlBytesAfterSoo(ctrl_t* new_ctrl, ctrl_t h2,
size_t new_capacity) { … }
void HashSetResizeHelper::GrowIntoSingleGroupShuffleTransferableSlots(
void* new_slots, size_t slot_size) const { … }
void HashSetResizeHelper::GrowSizeIntoSingleGroupTransferable(
CommonFields& c, size_t slot_size) { … }
void HashSetResizeHelper::TransferSlotAfterSoo(CommonFields& c,
size_t slot_size) { … }
namespace {
ABSL_ATTRIBUTE_NOINLINE
FindInfo FindInsertPositionWithGrowthOrRehash(CommonFields& common, size_t hash,
const PolicyFunctions& policy) { … }
}
const void* GetHashRefForEmptyHasher(const CommonFields& common) { … }
size_t PrepareInsertNonSoo(CommonFields& common, size_t hash, FindInfo target,
const PolicyFunctions& policy) { … }
}
ABSL_NAMESPACE_END
}