|
#define | XXH_STATIC_LINKING_ONLY |
| Gives access to internal state declaration, required for static allocation.
|
|
#define | XXH_IMPLEMENTATION |
| Gives access to internal definitions.
|
|
#define | XXH_INLINE_ALL |
| Exposes the implementation and marks all functions as inline .
|
|
#define | XXH_PRIVATE_API |
| Exposes the implementation without marking functions as inline.
|
|
#define | XXH_NAMESPACE /* YOUR NAME HERE */ |
| Emulate a namespace by transparently prefixing all symbols.
|
|
#define | XXHASH_H_5627135585666179 1 |
|
#define | XXH_PUBLIC_API /* do nothing */ |
| Marks a global symbol.
|
|
#define | XXH_PUBLIC_API /* do nothing */ |
| Marks a global symbol.
|
|
#define | XXH_CONSTF /* disable */ |
|
#define | XXH_PUREF |
|
#define | XXH_MALLOCF |
|
#define | XXH_VERSION_MAJOR 0 |
|
#define | XXH_VERSION_MINOR 8 |
|
#define | XXH_VERSION_RELEASE 3 |
|
#define | XXH_VERSION_NUMBER (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE) |
| Version number, encoded as two digits each.
|
|
#define | XXH_SCALAR 0 |
| Possible values for XXH_VECTOR.
|
|
#define | XXH_SSE2 1 |
|
#define | XXH_AVX2 2 |
|
#define | XXH_AVX512 3 |
|
#define | XXH_NEON 4 |
|
#define | XXH_VSX 5 |
|
#define | XXH_SVE 6 |
|
#define | XXH_LSX 7 |
|
#define | XXH_LASX 8 |
|
#define | XXH3_SECRET_SIZE_MIN 136 |
|
#define | XXHASH_H_STATIC_13879238742 |
|
#define | XXH_ALIGN(n) |
|
#define | XXH_ALIGN_MEMBER(align, type) |
|
#define | XXH3_INTERNALBUFFER_SIZE 256 |
|
#define | XXH3_SECRET_DEFAULT_SIZE 192 |
| Default Secret's size.
|
|
#define | XXH3_INITSTATE(XXH3_state_ptr) |
| Initializes a stack-allocated XXH3_state_s .
|
|
#define | XXH3_MIDSIZE_MAX 240 |
| Maximum size of "short" key in bytes.
|
|
#define | XXH_IMPLEM_13a8737387 |
|
#define | XXH_NO_LONG_LONG |
| Define this to disable 64-bit code.
|
|
#define | XXH_FORCE_MEMORY_ACCESS 0 |
| Controls how unaligned memory is accessed.
|
|
#define | XXH_SIZE_OPT 0 |
| Controls how much xxHash optimizes for size.
|
|
#define | XXH_FORCE_ALIGN_CHECK 0 |
| If defined to non-zero, adds a special path for aligned inputs (XXH32() and XXH64() only).
|
|
#define | XXH_NO_INLINE_HINTS 0 |
| When non-zero, sets all functions to static .
|
|
#define | XXH3_INLINE_SECRET 0 |
| Determines whether to inline the XXH3 withSecret code.
|
|
#define | XXH32_ENDJMP 0 |
| Whether to use a jump for XXH32_finalize .
|
|
#define | XXH_OLD_NAMES |
|
#define | XXH_NO_STREAM |
| Disables the streaming API.
|
|
#define | XXH_FORCE_INLINE static |
|
#define | XXH_NO_INLINE static |
|
#define | XXH_STATIC static |
|
#define | XXH3_WITH_SECRET_INLINE XXH_NO_INLINE |
|
#define | XXH_RESTRICT /* disable */ |
|
#define | XXH_DEBUGLEVEL 0 |
| Sets the debugging level.
|
|
#define | XXH_ASSERT(c) |
|
#define | XXH_STATIC_ASSERT_WITH_MESSAGE(c, m) |
|
#define | XXH_STATIC_ASSERT(c) |
|
#define | XXH_COMPILER_GUARD(var) |
|
#define | XXH_COMPILER_GUARD_CLANG_NEON(var) |
|
#define | XXH_CPU_LITTLE_ENDIAN XXH_isLittleEndian() |
| Whether the target is little endian.
|
|
#define | XXH_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) |
|
#define | XXH_HAS_BUILTIN(x) |
|
#define | XXH_UNREACHABLE() |
|
#define | XXH_ASSUME(c) |
|
#define | XXH_rotl32(x, r) |
|
#define | XXH_rotl64(x, r) |
|
#define | XXH_PRIME32_1 0x9E3779B1U |
|
#define | XXH_PRIME32_2 0x85EBCA77U |
|
#define | XXH_PRIME32_3 0xC2B2AE3DU |
|
#define | XXH_PRIME32_4 0x27D4EB2FU |
|
#define | XXH_PRIME32_5 0x165667B1U |
|
#define | XXH_get32bits(p) |
|
#define | XXH_PROCESS1 |
|
#define | XXH_PROCESS4 |
|
#define | XXH_PRIME64_1 0x9E3779B185EBCA87ULL |
|
#define | XXH_PRIME64_2 0xC2B2AE3D27D4EB4FULL |
|
#define | XXH_PRIME64_3 0x165667B19E3779F9ULL |
|
#define | XXH_PRIME64_4 0x85EBCA77C2B2AE63ULL |
|
#define | XXH_PRIME64_5 0x27D4EB2F165667C5ULL |
|
#define | XXH_get64bits(p) |
|
#define | XXH_likely(x) |
|
#define | XXH_unlikely(x) |
|
#define | XXH_HAS_INCLUDE(x) |
|
#define | XXH_VECTOR XXH_SCALAR |
| Overrides the vectorization implementation chosen for XXH3.
|
|
#define | XXH_ACC_ALIGN 8 |
| Selects the minimum alignment for XXH3's accumulators.
|
|
#define | XXH_VECTOR XXH_SCALAR |
| Overrides the vectorization implementation chosen for XXH3.
|
|
#define | XXH_SEC_ALIGN XXH_ACC_ALIGN |
|
#define | XXH_ALIASING /* nothing */ |
|
#define | XXH3_NEON_LANES XXH_ACC_NB |
| Controls the NEON to scalar ratio for XXH3.
|
|
#define | XXH_VSX_BE 0 |
|
#define | ACCRND(acc, offset) |
|
#define | XXH_PREFETCH(ptr) |
|
#define | XXH_SECRET_DEFAULT_SIZE 192 /* minimum XXH3_SECRET_SIZE_MIN */ |
|
#define | XXH3_MIDSIZE_STARTOFFSET 3 |
|
#define | XXH3_MIDSIZE_LASTOFFSET 17 |
|
#define | XXH_STRIPE_LEN 64 |
|
#define | XXH_SECRET_CONSUME_RATE 8 /* nb of secret bytes consumed at each accumulation */ |
|
#define | XXH_ACC_NB (XXH_STRIPE_LEN / sizeof(xxh_u64)) |
|
#define | XXH_PREFETCH_DIST 512 |
|
#define | XXH3_ACCUMULATE_TEMPLATE(name) |
|
#define | XXH_TARGET_AVX512 /* disable attribute target */ |
| Like XXH_TARGET_SSE2, but for AVX512.
|
|
#define | XXH_TARGET_AVX2 /* disable attribute target */ |
| Like XXH_TARGET_SSE2, but for AVX2.
|
|
#define | XXH_TARGET_SSE2 /* disable attribute target */ |
| Allows a function to be compiled with SSE2 intrinsics.
|
|
#define | _LSX_SHUFFLE(z, y, x, w) |
|
#define | _LASX_SHUFFLE(z, y, x, w) |
|
#define | XXH3_accumulate_512 XXH3_accumulate_512_avx512 |
|
#define | XXH3_accumulate XXH3_accumulate_avx512 |
|
#define | XXH3_scrambleAcc XXH3_scrambleAcc_avx512 |
|
#define | XXH3_initCustomSecret XXH3_initCustomSecret_avx512 |
|
#define | XXH_SECRET_LASTACC_START 7 /* not aligned on 8, last secret is different from acc & scrambler */ |
|
#define | XXH_SECRET_MERGEACCS_START 11 |
|
#define | XXH3_INIT_ACC |
|
#define | XXH3_STREAM_USE_STACK 1 |
|
#define | XXH3_INTERNALBUFFER_STRIPES (XXH3_INTERNALBUFFER_SIZE / XXH_STRIPE_LEN) |
|
#define | XXH_MIN(x, y) |
|
|
typedef uint32_t | XXH32_hash_t |
| An unsigned 32-bit integer.
|
|
typedef struct XXH32_state_s | XXH32_state_t |
| The opaque state struct for the XXH32 streaming API.
|
|
typedef struct XXH64_state_s | XXH64_state_t |
| The opaque state struct for the XXH64 streaming API.
|
|
typedef struct XXH3_state_s | XXH3_state_t |
| The opaque state struct for the XXH3 streaming API.
|
|
typedef unsigned char | xxh_u8 |
|
typedef XXH32_hash_t | xxh_u32 |
|
typedef uint64x2_t xxh_aliasing_uint64x2_t | XXH_ALIASING |
|
typedef __vector unsigned long long | xxh_u64x2 |
|
typedef __vector unsigned char | xxh_u8x16 |
|
typedef __vector unsigned | xxh_u32x4 |
|
typedef long long | xxh_i64 |
|
typedef void(* | XXH3_f_accumulate) (xxh_u64 *restrict, const xxh_u8 *restrict, const xxh_u8 *restrict, size_t) |
|
typedef void(* | XXH3_f_scrambleAcc) (void *restrict, const void *) |
|
typedef void(* | XXH3_f_initCustomSecret) (void *restrict, xxh_u64) |
|
typedef XXH64_hash_t(* | XXH3_hashLong64_f) (const void *restrict, size_t, XXH64_hash_t, const xxh_u8 *restrict, size_t) |
|
typedef XXH128_hash_t(* | XXH3_hashLong128_f) (const void *restrict, size_t, XXH64_hash_t, const void *restrict, size_t) |
|
|
typedef uint64_t | XXH64_hash_t |
| An unsigned 64-bit integer.
|
|
|
unsigned | XXH_versionNumber (void) |
| Obtains the xxHash version.
|
|
XXH32_hash_t | XXH32 (const void *input, size_t length, XXH32_hash_t seed) |
| Calculates the 32-bit hash of input using xxHash32.
|
|
XXH32_state_t * | XXH32_createState (void) |
| Allocates an XXH32_state_t.
|
|
XXH_errorcode | XXH32_freeState (XXH32_state_t *statePtr) |
| Frees an XXH32_state_t.
|
|
void | XXH32_copyState (XXH32_state_t *dst_state, const XXH32_state_t *src_state) |
| Copies one XXH32_state_t to another.
|
|
XXH_errorcode | XXH32_reset (XXH32_state_t *statePtr, XXH32_hash_t seed) |
| Resets an XXH32_state_t to begin a new hash.
|
|
XXH_errorcode | XXH32_update (XXH32_state_t *statePtr, const void *input, size_t length) |
| Consumes a block of input to an XXH32_state_t.
|
|
XXH32_hash_t | XXH32_digest (const XXH32_state_t *statePtr) |
| Returns the calculated hash value from an XXH32_state_t.
|
|
void | XXH32_canonicalFromHash (XXH32_canonical_t *dst, XXH32_hash_t hash) |
| Converts an XXH32_hash_t to a big endian XXH32_canonical_t.
|
|
XXH32_hash_t | XXH32_hashFromCanonical (const XXH32_canonical_t *src) |
| Converts an XXH32_canonical_t to a native XXH32_hash_t.
|
|
XXH64_hash_t | XXH64 (const void *input, size_t length, XXH64_hash_t seed) |
| Calculates the 64-bit hash of input using xxHash64.
|
|
XXH64_state_t * | XXH64_createState (void) |
| Allocates an XXH64_state_t.
|
|
XXH_errorcode | XXH64_freeState (XXH64_state_t *statePtr) |
| Frees an XXH64_state_t.
|
|
void | XXH64_copyState (XXH64_state_t *dst_state, const XXH64_state_t *src_state) |
| Copies one XXH64_state_t to another.
|
|
XXH_errorcode | XXH64_reset (XXH64_state_t *statePtr, XXH64_hash_t seed) |
| Resets an XXH64_state_t to begin a new hash.
|
|
XXH_errorcode | XXH64_update (XXH64_state_t *statePtr, const void *input, size_t length) |
| Consumes a block of input to an XXH64_state_t.
|
|
XXH64_hash_t | XXH64_digest (const XXH64_state_t *statePtr) |
| Returns the calculated hash value from an XXH64_state_t.
|
|
void | XXH64_canonicalFromHash (XXH64_canonical_t *dst, XXH64_hash_t hash) |
| Converts an XXH64_hash_t to a big endian XXH64_canonical_t.
|
|
XXH64_hash_t | XXH64_hashFromCanonical (const XXH64_canonical_t *src) |
| Converts an XXH64_canonical_t to a native XXH64_hash_t.
|
|
XXH64_hash_t | XXH3_64bits (const void *input, size_t length) |
| Calculates 64-bit unseeded variant of XXH3 hash of input .
|
|
XXH64_hash_t | XXH3_64bits_withSeed (const void *input, size_t length, XXH64_hash_t seed) |
| Calculates 64-bit seeded variant of XXH3 hash of input .
|
|
XXH64_hash_t | XXH3_64bits_withSecret (const void *data, size_t len, const void *secret, size_t secretSize) |
| Calculates 64-bit variant of XXH3 with a custom "secret".
|
|
XXH3_state_t * | XXH3_createState (void) |
| Allocate an XXH3_state_t.
|
|
XXH_errorcode | XXH3_freeState (XXH3_state_t *statePtr) |
| Frees an XXH3_state_t.
|
|
void | XXH3_copyState (XXH3_state_t *dst_state, const XXH3_state_t *src_state) |
| Copies one XXH3_state_t to another.
|
|
XXH_errorcode | XXH3_64bits_reset (XXH3_state_t *statePtr) |
| Resets an XXH3_state_t to begin a new hash.
|
|
XXH_errorcode | XXH3_64bits_reset_withSeed (XXH3_state_t *statePtr, XXH64_hash_t seed) |
| Resets an XXH3_state_t with 64-bit seed to begin a new hash.
|
|
XXH_errorcode | XXH3_64bits_reset_withSecret (XXH3_state_t *statePtr, const void *secret, size_t secretSize) |
| Resets an XXH3_state_t with secret data to begin a new hash.
|
|
XXH_errorcode | XXH3_64bits_update (XXH3_state_t *statePtr, const void *input, size_t length) |
| Consumes a block of input to an XXH3_state_t.
|
|
XXH64_hash_t | XXH3_64bits_digest (const XXH3_state_t *statePtr) |
| Returns the calculated XXH3 64-bit hash value from an XXH3_state_t.
|
|
XXH128_hash_t | XXH3_128bits (const void *data, size_t len) |
| Calculates 128-bit unseeded variant of XXH3 of data .
|
|
XXH128_hash_t | XXH3_128bits_withSeed (const void *data, size_t len, XXH64_hash_t seed) |
| Calculates 128-bit seeded variant of XXH3 hash of data .
|
|
XXH128_hash_t | XXH3_128bits_withSecret (const void *data, size_t len, const void *secret, size_t secretSize) |
| Calculates 128-bit variant of XXH3 with a custom "secret".
|
|
XXH_errorcode | XXH3_128bits_reset (XXH3_state_t *statePtr) |
| Resets an XXH3_state_t to begin a new hash.
|
|
XXH_errorcode | XXH3_128bits_reset_withSeed (XXH3_state_t *statePtr, XXH64_hash_t seed) |
| Resets an XXH3_state_t with 64-bit seed to begin a new hash.
|
|
XXH_errorcode | XXH3_128bits_reset_withSecret (XXH3_state_t *statePtr, const void *secret, size_t secretSize) |
| Resets an XXH3_state_t with secret data to begin a new hash.
|
|
XXH_errorcode | XXH3_128bits_update (XXH3_state_t *statePtr, const void *input, size_t length) |
| Consumes a block of input to an XXH3_state_t.
|
|
XXH128_hash_t | XXH3_128bits_digest (const XXH3_state_t *statePtr) |
| Returns the calculated XXH3 128-bit hash value from an XXH3_state_t.
|
|
int | XXH128_isEqual (XXH128_hash_t h1, XXH128_hash_t h2) |
| Check equality of two XXH128_hash_t values.
|
|
int | XXH128_cmp (const void *h128_1, const void *h128_2) |
| Compares two XXH128_hash_t.
|
|
void | XXH128_canonicalFromHash (XXH128_canonical_t *dst, XXH128_hash_t hash) |
| Converts an XXH128_hash_t to a big endian XXH128_canonical_t.
|
|
XXH128_hash_t | XXH128_hashFromCanonical (const XXH128_canonical_t *src) |
| Converts an XXH128_canonical_t to a native XXH128_hash_t.
|
|
XXH128_hash_t | XXH128 (const void *data, size_t len, XXH64_hash_t seed) |
| Calculates the 128-bit hash of data using XXH3.
|
|
XXH_errorcode | XXH3_generateSecret (void *secretBuffer, size_t secretSize, const void *customSeed, size_t customSeedSize) |
| Derive a high-entropy secret from any user-defined content, named customSeed.
|
|
void | XXH3_generateSecret_fromSeed (void *secretBuffer, XXH64_hash_t seed) |
| Generate the same secret as the _withSeed() variants.
|
|
XXH64_hash_t | XXH3_64bits_withSecretandSeed (const void *data, size_t len, const void *secret, size_t secretSize, XXH64_hash_t seed) |
| Calculates 64/128-bit seeded variant of XXH3 hash of data .
|
|
XXH128_hash_t | XXH3_128bits_withSecretandSeed (const void *input, size_t length, const void *secret, size_t secretSize, XXH64_hash_t seed64) |
| Calculates 128-bit seeded variant of XXH3 hash of data .
|
|
XXH_errorcode | XXH3_64bits_reset_withSecretandSeed (XXH3_state_t *statePtr, const void *secret, size_t secretSize, XXH64_hash_t seed64) |
| Resets an XXH3_state_t with secret data to begin a new hash.
|
|
XXH_errorcode | XXH3_128bits_reset_withSecretandSeed (XXH3_state_t *statePtr, const void *secret, size_t secretSize, XXH64_hash_t seed64) |
| Resets an XXH3_state_t with secret data to begin a new hash.
|
|
XXH_STATIC xxh_u64 | XXH64_finalize (xxh_u64 hash, const xxh_u8 *ptr, size_t len, XXH_alignment align) |
|
| XXH_STATIC_ASSERT (XXH_STRIPE_LEN==sizeof(__m512i)) |
|
| for (i=0;i< XXH_STRIPE_LEN/sizeof(__m256i);i++) |
|
| XXH_ASSERT ((((size_t) acc) &(XXH_ACC_ALIGN-1))==0) |
|
| XXH_ASSERT (lane< XXH_ACC_NB) |
|
XXH3_WITH_SECRET_INLINE XXH64_hash_t | XXH3_hashLong_64b_withSecret (const void *restrict input, size_t len, XXH64_hash_t seed64, const xxh_u8 *restrict secret, size_t secretLen) |
|
XXH3_WITH_SECRET_INLINE XXH128_hash_t | XXH3_hashLong_128b_withSecret (const void *restrict input, size_t len, XXH64_hash_t seed64, const void *restrict secret, size_t secretLen) |
|
|
static XXH_TARGET_AVX512 const void *restrict | secret |
|
const __m512i | prime32 = _mm512_set1_epi32((int)XXH_PRIME32_1) |
|
__m512i const | acc_vec = *xacc |
|
__m512i const | shifted = _mm512_srli_epi64 (acc_vec, 47) |
|
__m512i const | key_vec = _mm512_loadu_si512 (secret) |
|
__m512i const | data_key = _mm512_ternarylogic_epi32(key_vec, acc_vec, shifted, 0x96 ) |
|
__m512i const | data_key_hi = _mm512_srli_epi64 (data_key, 32) |
|
__m512i const | prod_lo = _mm512_mul_epu32 (data_key, prime32) |
|
__m512i const | prod_hi = _mm512_mul_epu32 (data_key_hi, prime32) |
|
* | xacc = _mm512_add_epi64(prod_lo, _mm512_slli_epi64(prod_hi, 32)) |
|
const __m256i *const | xsecret = (const __m256i *) secret |
|
size_t | i |
|
uint32x2_t const | kPrimeLo = vdup_n_u32(XXH_PRIME32_1) |
|
uint32x4_t const | kPrimeHi = vreinterpretq_u32_u64(vdupq_n_u64((xxh_u64)XXH_PRIME32_1 << 32)) |
|
xxh_u64x2 const | v32 = { 32, 32 } |
|
xxh_u64x2 const | v47 = { 47, 47 } |
|
xxh_u32x4 const | prime = { XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1 } |
|
static void const *restrict size_t | lane |
|
xxh_u64 | acc64 = xacc[lane] |
|
typedef XXH64_hash_t | xxh_u64 |
|
xxHash prototypes and implementation