file
hash.hContains various hashing functions.
Hashing
These hashing functions allow you to map an arbitrary number of parameters to a uint64_t
, float
, or vector of floats.
-
template<typename T>auto hash_buffer(const T* ptr, size_t size, uint64_t seed = 0) -> uint64_t
- Hash an buffer of input values to a single uint64_t.
-
template<typename... Args>auto hash(Args... args) -> uint64_t
- Hash an arbitrary number of input parameters to a single uint64_t.
-
template<typename... Args>auto hash_to_float(Args... args) -> float
- Hash an arbitrary number of input parameters to a single float.
-
template<typename... Args>auto hash_to_float2(Args... args) -> Vec2f
- Hash an arbitrary number of input parameters to a Vec2f.
-
template<typename... Args>auto hash_to_float3(Args... args) -> Vec3f
- Hash an arbitrary number of input parameters to a Vec3f.
-
template<typename... Args>auto hash_to_float4(Args... args) -> Vec4f
- Hash an arbitrary number of input parameters to a Vec4f.