52#ifndef XXH_FORCE_MEMORY_ACCESS
53# if defined(__GNUC__) && ( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) )
54# define XXH_FORCE_MEMORY_ACCESS 2
55# elif (defined(__INTEL_COMPILER) && !defined(WIN32)) || \
56 (defined(__GNUC__) && ( defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) ))
57# define XXH_FORCE_MEMORY_ACCESS 1
76#ifndef XXH_FORCE_NATIVE_FORMAT
77# define XXH_FORCE_NATIVE_FORMAT 0
86#ifndef XXH_FORCE_ALIGN_CHECK
87# if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
88# define XXH_FORCE_ALIGN_CHECK 0
90# define XXH_FORCE_ALIGN_CHECK 1
113#define XXH_ALLOC_TAG 0x32485858
149#ifndef XXH_STATIC_LINKING_ONLY
150# define XXH_STATIC_LINKING_ONLY
158#if defined (__GNUC__) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
159# define INLINE_KEYWORD inline
161# define INLINE_KEYWORD
165# define FORCE_INLINE_ATTR __attribute__((always_inline))
166#elif defined(_MSC_VER)
167# define FORCE_INLINE_ATTR __forceinline
169# define FORCE_INLINE_ATTR
172#define FORCE_INLINE_TEMPLATE static INLINE_KEYWORD FORCE_INLINE_ATTR
176# pragma warning(disable : 4127)
185# if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) ) )
194 typedef unsigned short U16;
197 typedef unsigned long long U64;
202#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2))
208#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1))
243#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
247# define XXH_rotl32(x,r) _rotl(x,r)
248# define XXH_rotl64(x,r) _rotl64(x,r)
250# define XXH_rotl32(x,r) ((x << r) | (x >> (32 - r)))
251# define XXH_rotl64(x,r) ((x << r) | (x >> (64 - r)))
255# define XXH_swap32 _byteswap_ulong
256# define XXH_swap64 _byteswap_uint64
257#elif GCC_VERSION >= 403
258# define XXH_swap32 __builtin_bswap32
259# define XXH_swap64 __builtin_bswap64
263 return ((
x << 24) & 0xff000000 ) |
264 ((
x << 8) & 0x00ff0000 ) |
265 ((
x >> 8) & 0x0000ff00 ) |
266 ((
x >> 24) & 0x000000ff );
270 return ((
x << 56) & 0xff00000000000000ULL) |
271 ((
x << 40) & 0x00ff000000000000ULL) |
272 ((
x << 24) & 0x0000ff0000000000ULL) |
273 ((
x << 8) & 0x000000ff00000000ULL) |
274 ((
x >> 8) & 0x00000000ff000000ULL) |
275 ((
x >> 24) & 0x0000000000ff0000ULL) |
276 ((
x >> 40) & 0x000000000000ff00ULL) |
277 ((
x >> 56) & 0x00000000000000ffULL);
288#ifndef XXH_CPU_LITTLE_ENDIAN
290# define XXH_CPU_LITTLE_ENDIAN (*(const char*)(&g_one))
339#define XXH_STATIC_ASSERT(c) { enum { XXH_static_assert = 1/(int)(!!(c)) }; }
365 memcpy(dstState, srcState,
sizeof(*dstState));
370 memcpy(dstState, srcState,
sizeof(*dstState));
391#define XXH_get32bits(p) XXH_readLE32_align(p, endian, align)
393#ifdef XXH_ACCEPT_NULL_INPUT_POINTER
396 bEnd=
p=(
const BYTE*)(
size_t)16;
447 XXH32_CREATESTATE_STATIC(
state);
455 if ((((
size_t)
input) & 3) == 0) {
491#define XXH_get64bits(p) XXH_readLE64_align(p, endian, align)
493#ifdef XXH_ACCEPT_NULL_INPUT_POINTER
496 bEnd=
p=(
const BYTE*)(
size_t)32;
559 XXH64_CREATESTATE_STATIC(
state);
567 if ((((
size_t)
input) & 7)==0) {
640#ifdef XXH_ACCEPT_NULL_INPUT_POINTER
653 if (
state->memsize) {
717 h32 +=
state->total_len_32;
760#ifdef XXH_ACCEPT_NULL_INPUT_POINTER
772 if (
state->memsize) {
828 if (
state->total_len >= 32) {
unsigned short int uint16_t
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
while(CdLookupNextInitialFileDirent(IrpContext, Fcb, FileContext))
int align(int length, int align)
#define ExAllocatePoolWithTag(hernya, size, tag)
GLint GLint GLint GLint GLint x
GLfloat GLfloat GLfloat GLfloat v3
GLenum GLenum GLenum input
GLfloat GLfloat GLfloat v2
GLuint GLenum GLsizei GLsizei GLint GLint GLboolean packed
#define memcpy(s1, s2, n)
static unsigned(__cdecl *hash_bstr)(bstr_t s)
XXH_PUBLIC_API unsigned int XXH32_digest(const XXH32_state_t *state_in)
static void * XXH_malloc(size_t s)
FORCE_INLINE_TEMPLATE U64 XXH_readLE64(const void *ptr, XXH_endianess endian)
static U64 XXH_read64(const void *memPtr)
XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t *src)
FORCE_INLINE_TEMPLATE XXH_errorcode XXH64_update_endian(XXH64_state_t *state, const void *input, size_t len, XXH_endianess endian)
static const U64 PRIME64_5
XXH_PUBLIC_API unsigned int XXH32(const void *input, size_t len, unsigned int seed)
XXH_PUBLIC_API XXH_errorcode XXH64_update(XXH64_state_t *state_in, const void *input, size_t len)
FORCE_INLINE_TEMPLATE U32 XXH_readLE32(const void *ptr, XXH_endianess endian)
static U64 XXH64_mergeRound(U64 acc, U64 val)
#define XXH_STATIC_ASSERT(c)
static const U32 PRIME32_5
#define XXH_CPU_LITTLE_ENDIAN
static const U64 PRIME64_2
FORCE_INLINE_TEMPLATE XXH_errorcode XXH32_update_endian(XXH32_state_t *state, const void *input, size_t len, XXH_endianess endian)
XXH_PUBLIC_API XXH32_state_t * XXH32_createState(void)
static U32 XXH32_round(U32 seed, U32 input)
static const U32 PRIME32_1
static const U64 PRIME64_4
FORCE_INLINE_TEMPLATE U32 XXH_readLE32_align(const void *ptr, XXH_endianess endian, XXH_alignment align)
static U64 XXH_swap64(U64 x)
XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t *statePtr, unsigned int seed)
FORCE_INLINE_TEMPLATE U32 XXH32_digest_endian(const XXH32_state_t *state, XXH_endianess endian)
static void XXH_free(void *p)
static U32 XXH_swap32(U32 x)
static const U64 PRIME64_1
XXH_PUBLIC_API XXH64_state_t * XXH64_createState(void)
static const U32 PRIME32_2
XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH64_state_t *statePtr, unsigned long long seed)
static U64 XXH_readBE64(const void *ptr)
FORCE_INLINE_TEMPLATE U64 XXH_readLE64_align(const void *ptr, XXH_endianess endian, XXH_alignment align)
static const U64 PRIME64_3
FORCE_INLINE_TEMPLATE U64 XXH64_digest_endian(const XXH64_state_t *state, XXH_endianess endian)
static const U32 PRIME32_3
static void * XXH_memcpy(void *dest, const void *src, size_t size)
XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t *restrict dstState, const XXH32_state_t *restrict srcState)
XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t *statePtr)
#define FORCE_INLINE_TEMPLATE
XXH_PUBLIC_API unsigned long long XXH64(const void *input, size_t len, unsigned long long seed)
FORCE_INLINE_TEMPLATE U32 XXH32_endian_align(const void *input, size_t len, U32 seed, XXH_endianess endian, XXH_alignment align)
static const U32 PRIME32_4
static U32 XXH_read32(const void *memPtr)
XXH_PUBLIC_API void XXH64_copyState(XXH64_state_t *restrict dstState, const XXH64_state_t *restrict srcState)
XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t *src)
XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t *dst, XXH32_hash_t hash)
static U64 XXH64_round(U64 acc, U64 input)
XXH_PUBLIC_API unsigned long long XXH64_digest(const XXH64_state_t *state_in)
XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t *statePtr)
static U32 XXH_readBE32(const void *ptr)
XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH64_canonical_t *dst, XXH64_hash_t hash)
#define XXH_FORCE_ALIGN_CHECK
XXH_PUBLIC_API unsigned XXH_versionNumber(void)
XXH_PUBLIC_API XXH_errorcode XXH32_update(XXH32_state_t *state_in, const void *input, size_t len)
FORCE_INLINE_TEMPLATE U64 XXH64_endian_align(const void *input, size_t len, U64 seed, XXH_endianess endian, XXH_alignment align)
#define XXH_FORCE_NATIVE_FORMAT
struct XXH32_state_s XXH32_state_t
struct XXH64_state_s XXH64_state_t
unsigned long long XXH64_hash_t
unsigned int XXH32_hash_t
#define XXH_VERSION_NUMBER