Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::hash Namespace Reference

Functions

constexpr u64 fnv1aWord (u64 h, u64 word)
u64 fnv1aBytes (u64 h, const void *data, usize bytes)
constexpr u32 fnv1a32 (std::string_view text)
constexpr u64 combine (u64 h, u64 v)
u64 combineWords (u64 h, const void *data, usize bytes)

Variables

constexpr u64 kFnv64Offset = 0xcbf29ce484222325ull
constexpr u64 kFnv64Prime = 0x100000001b3ull
constexpr u32 kFnv32Offset = 0x811c9dc5u
constexpr u32 kFnv32Prime = 0x01000193u

Function Documentation

◆ combine()

u64 esengine::hash::combine ( u64 h,
u64 v )
constexpr

◆ combineWords()

u64 esengine::hash::combineWords ( u64 h,
const void * data,
usize bytes )
inline

◆ fnv1a32()

u32 esengine::hash::fnv1a32 ( std::string_view text)
constexpr

Definition at line 27 of file Hash.hpp.

References kFnv32Offset, and kFnv32Prime.

Referenced by esengine::RandomSource::stream().

◆ fnv1aBytes()

u64 esengine::hash::fnv1aBytes ( u64 h,
const void * data,
usize bytes )
inline

◆ fnv1aWord()

u64 esengine::hash::fnv1aWord ( u64 h,
u64 word )
constexpr

Definition at line 17 of file Hash.hpp.

References kFnv64Prime.

Referenced by esengine::PipelineDescHash::operator()(), and esengine::ecs::UITree::rebuild().

Variable Documentation

◆ kFnv32Offset

u32 esengine::hash::kFnv32Offset = 0x811c9dc5u
inlineconstexpr

Definition at line 14 of file Hash.hpp.

Referenced by fnv1a32().

◆ kFnv32Prime

u32 esengine::hash::kFnv32Prime = 0x01000193u
inlineconstexpr

Definition at line 15 of file Hash.hpp.

Referenced by fnv1a32().

◆ kFnv64Offset

◆ kFnv64Prime

u64 esengine::hash::kFnv64Prime = 0x100000001b3ull
inlineconstexpr

Definition at line 13 of file Hash.hpp.

Referenced by fnv1aBytes(), and fnv1aWord().