MCRO
C++23 utilities for Unreal Engine.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
constexpr_xxh3 Namespace Reference

Concepts

concept  ByteType
 
concept  BytePtrType
 
concept  BytesType
 

Functions

constexpr uint32_t swap32 (uint32_t x) noexcept
 
template<typename T >
constexpr uint32_t readLE32 (const T *ptr) noexcept
 
constexpr uint64_t swap64 (uint64_t x) noexcept
 
template<typename T >
constexpr uint64_t readLE64 (const T *ptr) noexcept
 
constexpr void writeLE64 (uint8_t *dst, uint64_t v) noexcept
 
constexpr std::pair< uint64_t, uint64_t > mult64to128 (uint64_t lhs, uint64_t rhs) noexcept
 
constexpr uint64_t mul128_fold64 (uint64_t lhs, uint64_t rhs) noexcept
 
constexpr uint64_t XXH64_avalanche (uint64_t h) noexcept
 
constexpr uint64_t XXH3_avalanche (uint64_t h) noexcept
 
constexpr uint64_t rrmxmx (uint64_t h, uint64_t len) noexcept
 
template<typename T , typename S >
constexpr uint64_t mix16B (const T *input, const S *secret, uint64_t seed) noexcept
 
template<typename T , typename S >
constexpr void accumulate_512 (uint64_t *acc, const T *input, const S *secret) noexcept
 
template<typename T , typename S >
constexpr uint64_t hashLong_64b_internal (const T *input, size_t len, const S *secret, size_t secretSize) noexcept
 
template<typename T , typename S , typename HashLong >
constexpr uint64_t XXH3_64bits_internal (const T *input, size_t len, uint64_t seed, const S *secret, size_t secretLen, HashLong f_hashLong) noexcept
 
template<BytesType Bytes>
constexpr size_t bytes_size (const Bytes &bytes) noexcept
 
template<ByteType T, size_t N>
constexpr size_t bytes_size (T(&)[N]) noexcept
 
template<ByteType T>
consteval uint64_t XXH3_64bits_const (const T *input, size_t len) noexcept
 Basic interfaces.
 
template<ByteType T, ByteType S>
consteval uint64_t XXH3_64bits_withSecret_const (const T *input, size_t len, const S *secret, size_t secretSize) noexcept
 
template<ByteType T>
consteval uint64_t XXH3_64bits_withSeed_const (const T *input, size_t len, uint64_t seed) noexcept
 
template<BytesType Bytes>
consteval uint64_t XXH3_64bits_const (const Bytes &input) noexcept
 Convenient interfaces.
 
template<BytesType Bytes, BytesType Secret>
consteval uint64_t XXH3_64bits_withSecret_const (const Bytes &input, const Secret &secret) noexcept
 
template<BytesType Bytes>
consteval uint64_t XXH3_64bits_withSeed_const (const Bytes &input, uint64_t seed) noexcept
 

Variables

constexpr uint32_t PRIME32_1 = 0x9E3779B1U
 
constexpr uint32_t PRIME32_2 = 0x85EBCA77U
 
constexpr uint32_t PRIME32_3 = 0xC2B2AE3DU
 
constexpr uint64_t PRIME64_1 = 0x9E3779B185EBCA87ULL
 
constexpr uint64_t PRIME64_2 = 0xC2B2AE3D27D4EB4FULL
 
constexpr uint64_t PRIME64_3 = 0x165667B19E3779F9ULL
 
constexpr uint64_t PRIME64_4 = 0x85EBCA77C2B2AE63ULL
 
constexpr uint64_t PRIME64_5 = 0x27D4EB2F165667C5ULL
 
constexpr size_t SECRET_DEFAULT_SIZE = 192
 
constexpr size_t SECRET_SIZE_MIN = 136
 
constexpr uint8_t kSecret [SECRET_DEFAULT_SIZE]
 
constexpr size_t STRIPE_LEN = 64
 
constexpr size_t SECRET_CONSUME_RATE = 8
 
constexpr size_t ACC_NB = STRIPE_LEN / sizeof(uint64_t)
 

Function Documentation

◆ accumulate_512()

template<typename T , typename S >
void constexpr_xxh3::accumulate_512 ( uint64_t * acc,
const T * input,
const S * secret )
constexprnoexcept

Definition at line 188 of file ConstexprXXH3.h.

◆ bytes_size() [1/2]

template<BytesType Bytes>
size_t constexpr_xxh3::bytes_size ( const Bytes & bytes)
constexprnoexcept

Definition at line 286 of file ConstexprXXH3.h.

◆ bytes_size() [2/2]

template<ByteType T, size_t N>
size_t constexpr_xxh3::bytes_size ( T(&) [N])
constexprnoexcept

Definition at line 291 of file ConstexprXXH3.h.

◆ hashLong_64b_internal()

template<typename T , typename S >
uint64_t constexpr_xxh3::hashLong_64b_internal ( const T * input,
size_t len,
const S * secret,
size_t secretSize )
constexprnoexcept

Definition at line 199 of file ConstexprXXH3.h.

◆ mix16B()

template<typename T , typename S >
uint64_t constexpr_xxh3::mix16B ( const T * input,
const S * secret,
uint64_t seed )
constexprnoexcept

Definition at line 177 of file ConstexprXXH3.h.

◆ mul128_fold64()

uint64_t constexpr_xxh3::mul128_fold64 ( uint64_t lhs,
uint64_t rhs )
inlineconstexprnoexcept

Definition at line 146 of file ConstexprXXH3.h.

◆ mult64to128()

std::pair< uint64_t, uint64_t > constexpr_xxh3::mult64to128 ( uint64_t lhs,
uint64_t rhs )
inlineconstexprnoexcept

Definition at line 134 of file ConstexprXXH3.h.

◆ readLE32()

template<typename T >
uint32_t constexpr_xxh3::readLE32 ( const T * ptr)
inlineconstexprnoexcept

Definition at line 77 of file ConstexprXXH3.h.

◆ readLE64()

template<typename T >
uint64_t constexpr_xxh3::readLE64 ( const T * ptr)
inlineconstexprnoexcept

Definition at line 94 of file ConstexprXXH3.h.

◆ rrmxmx()

uint64_t constexpr_xxh3::rrmxmx ( uint64_t h,
uint64_t len )
inlineconstexprnoexcept

Definition at line 168 of file ConstexprXXH3.h.

◆ swap32()

uint32_t constexpr_xxh3::swap32 ( uint32_t x)
inlineconstexprnoexcept

Definition at line 71 of file ConstexprXXH3.h.

◆ swap64()

uint64_t constexpr_xxh3::swap64 ( uint64_t x)
inlineconstexprnoexcept

Definition at line 82 of file ConstexprXXH3.h.

◆ writeLE64()

void constexpr_xxh3::writeLE64 ( uint8_t * dst,
uint64_t v )
inlineconstexprnoexcept

Definition at line 98 of file ConstexprXXH3.h.

◆ XXH3_64bits_const() [1/2]

template<BytesType Bytes>
uint64_t constexpr_xxh3::XXH3_64bits_const ( const Bytes & input)
constevalnoexcept

Convenient interfaces.

Definition at line 339 of file ConstexprXXH3.h.

◆ XXH3_64bits_const() [2/2]

template<ByteType T>
uint64_t constexpr_xxh3::XXH3_64bits_const ( const T * input,
size_t len )
constevalnoexcept

Basic interfaces.

Definition at line 298 of file ConstexprXXH3.h.

◆ XXH3_64bits_internal()

template<typename T , typename S , typename HashLong >
uint64_t constexpr_xxh3::XXH3_64bits_internal ( const T * input,
size_t len,
uint64_t seed,
const S * secret,
size_t secretLen,
HashLong f_hashLong )
constexprnoexcept

Definition at line 233 of file ConstexprXXH3.h.

◆ XXH3_64bits_withSecret_const() [1/2]

template<BytesType Bytes, BytesType Secret>
uint64_t constexpr_xxh3::XXH3_64bits_withSecret_const ( const Bytes & input,
const Secret & secret )
constevalnoexcept

Definition at line 344 of file ConstexprXXH3.h.

◆ XXH3_64bits_withSecret_const() [2/2]

template<ByteType T, ByteType S>
uint64_t constexpr_xxh3::XXH3_64bits_withSecret_const ( const T * input,
size_t len,
const S * secret,
size_t secretSize )
constevalnoexcept

Definition at line 308 of file ConstexprXXH3.h.

◆ XXH3_64bits_withSeed_const() [1/2]

template<BytesType Bytes>
uint64_t constexpr_xxh3::XXH3_64bits_withSeed_const ( const Bytes & input,
uint64_t seed )
constevalnoexcept

Definition at line 351 of file ConstexprXXH3.h.

◆ XXH3_64bits_withSeed_const() [2/2]

template<ByteType T>
uint64_t constexpr_xxh3::XXH3_64bits_withSeed_const ( const T * input,
size_t len,
uint64_t seed )
constevalnoexcept

Definition at line 320 of file ConstexprXXH3.h.

◆ XXH3_avalanche()

uint64_t constexpr_xxh3::XXH3_avalanche ( uint64_t h)
inlineconstexprnoexcept

Definition at line 163 of file ConstexprXXH3.h.

◆ XXH64_avalanche()

uint64_t constexpr_xxh3::XXH64_avalanche ( uint64_t h)
inlineconstexprnoexcept

Definition at line 157 of file ConstexprXXH3.h.

Variable Documentation

◆ ACC_NB

size_t constexpr_xxh3::ACC_NB = STRIPE_LEN / sizeof(uint64_t)
inlineconstexpr

Definition at line 185 of file ConstexprXXH3.h.

◆ kSecret

uint8_t constexpr_xxh3::kSecret[SECRET_DEFAULT_SIZE]
inlineconstexpr
Initial value:
{
0xb8, 0xfe, 0x6c, 0x39, 0x23, 0xa4, 0x4b, 0xbe, 0x7c, 0x01, 0x81, 0x2c,
0xf7, 0x21, 0xad, 0x1c, 0xde, 0xd4, 0x6d, 0xe9, 0x83, 0x90, 0x97, 0xdb,
0x72, 0x40, 0xa4, 0xa4, 0xb7, 0xb3, 0x67, 0x1f, 0xcb, 0x79, 0xe6, 0x4e,
0xcc, 0xc0, 0xe5, 0x78, 0x82, 0x5a, 0xd0, 0x7d, 0xcc, 0xff, 0x72, 0x21,
0xb8, 0x08, 0x46, 0x74, 0xf7, 0x43, 0x24, 0x8e, 0xe0, 0x35, 0x90, 0xe6,
0x81, 0x3a, 0x26, 0x4c, 0x3c, 0x28, 0x52, 0xbb, 0x91, 0xc3, 0x00, 0xcb,
0x88, 0xd0, 0x65, 0x8b, 0x1b, 0x53, 0x2e, 0xa3, 0x71, 0x64, 0x48, 0x97,
0xa2, 0x0d, 0xf9, 0x4e, 0x38, 0x19, 0xef, 0x46, 0xa9, 0xde, 0xac, 0xd8,
0xa8, 0xfa, 0x76, 0x3f, 0xe3, 0x9c, 0x34, 0x3f, 0xf9, 0xdc, 0xbb, 0xc7,
0xc7, 0x0b, 0x4f, 0x1d, 0x8a, 0x51, 0xe0, 0x4b, 0xcd, 0xb4, 0x59, 0x31,
0xc8, 0x9f, 0x7e, 0xc9, 0xd9, 0x78, 0x73, 0x64, 0xea, 0xc5, 0xac, 0x83,
0x34, 0xd3, 0xeb, 0xc3, 0xc5, 0x81, 0xa0, 0xff, 0xfa, 0x13, 0x63, 0xeb,
0x17, 0x0d, 0xdd, 0x51, 0xb7, 0xf0, 0xda, 0x49, 0xd3, 0x16, 0x55, 0x26,
0x29, 0xd4, 0x68, 0x9e, 0x2b, 0x16, 0xbe, 0x58, 0x7d, 0x47, 0xa1, 0xfc,
0x8f, 0xf8, 0xb8, 0xd1, 0x7a, 0xd0, 0x31, 0xce, 0x45, 0xcb, 0x3a, 0x8f,
0x95, 0x16, 0x04, 0x28, 0xaf, 0xd7, 0xfb, 0xca, 0xbb, 0x4b, 0x40, 0x7e,
}

Definition at line 115 of file ConstexprXXH3.h.

◆ PRIME32_1

uint32_t constexpr_xxh3::PRIME32_1 = 0x9E3779B1U
inlineconstexpr

Definition at line 102 of file ConstexprXXH3.h.

◆ PRIME32_2

uint32_t constexpr_xxh3::PRIME32_2 = 0x85EBCA77U
inlineconstexpr

Definition at line 103 of file ConstexprXXH3.h.

◆ PRIME32_3

uint32_t constexpr_xxh3::PRIME32_3 = 0xC2B2AE3DU
inlineconstexpr

Definition at line 104 of file ConstexprXXH3.h.

◆ PRIME64_1

uint64_t constexpr_xxh3::PRIME64_1 = 0x9E3779B185EBCA87ULL
inlineconstexpr

Definition at line 106 of file ConstexprXXH3.h.

◆ PRIME64_2

uint64_t constexpr_xxh3::PRIME64_2 = 0xC2B2AE3D27D4EB4FULL
inlineconstexpr

Definition at line 107 of file ConstexprXXH3.h.

◆ PRIME64_3

uint64_t constexpr_xxh3::PRIME64_3 = 0x165667B19E3779F9ULL
inlineconstexpr

Definition at line 108 of file ConstexprXXH3.h.

◆ PRIME64_4

uint64_t constexpr_xxh3::PRIME64_4 = 0x85EBCA77C2B2AE63ULL
inlineconstexpr

Definition at line 109 of file ConstexprXXH3.h.

◆ PRIME64_5

uint64_t constexpr_xxh3::PRIME64_5 = 0x27D4EB2F165667C5ULL
inlineconstexpr

Definition at line 110 of file ConstexprXXH3.h.

◆ SECRET_CONSUME_RATE

size_t constexpr_xxh3::SECRET_CONSUME_RATE = 8
inlineconstexpr

Definition at line 184 of file ConstexprXXH3.h.

◆ SECRET_DEFAULT_SIZE

size_t constexpr_xxh3::SECRET_DEFAULT_SIZE = 192
inlineconstexpr

Definition at line 112 of file ConstexprXXH3.h.

◆ SECRET_SIZE_MIN

size_t constexpr_xxh3::SECRET_SIZE_MIN = 136
inlineconstexpr

Definition at line 113 of file ConstexprXXH3.h.

◆ STRIPE_LEN

size_t constexpr_xxh3::STRIPE_LEN = 64
inlineconstexpr

Definition at line 183 of file ConstexprXXH3.h.