![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
Public Member Functions | |
| template<class CharType > | |
| FNameHash (const CharType *Str, int32 Len) | |
| template<class CharType > | |
| FNameHash (const CharType *Str, int32 Len, uint64 Hash) | |
| FNameHash (FNameEntryId StringPart, int32 NumberPart) | |
| FNameHash (ENoInit) | |
| FNameHash (uint64 Hash, int32 Len, bool IsNone, bool bIsWide) | |
| uint32 | GetProbeStart (uint32 SlotMask) const |
| bool | operator== (const FNameHash &Rhs) const |
Static Public Member Functions | |
| static uint32 | GetShardIndex (uint64 Hash) |
| template<class CharType > | |
| static uint64 | GenerateHash (const CharType *Str, int32 Len) |
| static uint64 | GenerateHash (FNameEntryId StringPart, int32 NumberPart) |
| static uint32 | GetProbeStart (uint32 UnmaskedSlotIndex, uint32 SlotMask) |
| static uint32 | IsAnsiNone (const WIDECHAR *Str, int32 Len) |
| static uint32 | IsAnsiNone (const ANSICHAR *Str, int32 Len) |
Public Attributes | |
| uint32 | ShardIndex |
| uint32 | UnmaskedSlotIndex |
| uint32 | SlotProbeHash |
| FNameEntryHeader | EntryProbeHeader |
Static Public Attributes | |
| static constexpr uint64 | AlgorithmId = 0xC1640000 |
| static constexpr uint32 | ShardMask = FNamePoolShards - 1 |
Hashes name into 64 bits that determines shard and slot index.
A small part of the hash is also stored in unused bits of the slot and entry. The former optimizes linear probing by accessing less entry data. The latter optimizes linear probing by avoiding copying and deobfuscating entry data.
The slot index could be stored in the slot, at least in non shipping / test configs. This costs memory by doubling slot size but would essentially never touch entry data nor copy and deobfuscate a name needlessy. It also allows growing the hash table without rehashing the strings, since the unmasked slot index would be known.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
| FNameEntryHeader FNameHash::EntryProbeHeader |
| uint32 FNameHash::ShardIndex |
|
staticconstexpr |
| uint32 FNameHash::SlotProbeHash |
| uint32 FNameHash::UnmaskedSlotIndex |