HDK
|
Go to the source code of this file.
Classes | |
struct | XXH32_canonical_t |
struct | XXH64_canonical_t |
Typedefs | |
typedef unsigned int | XXH32_hash_t |
typedef struct XXH32_state_s | XXH32_state_t |
typedef unsigned long long | XXH64_hash_t |
typedef struct XXH64_state_s | XXH64_state_t |
Enumerations | |
enum | XXH_errorcode { XXH_OK =0, XXH_ERROR } |
#define XXH32 XXH_NAME2(XXH_NAMESPACE, XXH32) |
Definition at line 146 of file UT_XXHash.h.
#define XXH32_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH32_canonicalFromHash) |
Definition at line 153 of file UT_XXHash.h.
#define XXH32_copyState XXH_NAME2(XXH_NAMESPACE, XXH32_copyState) |
Definition at line 152 of file UT_XXHash.h.
#define XXH32_createState XXH_NAME2(XXH_NAMESPACE, XXH32_createState) |
Definition at line 147 of file UT_XXHash.h.
#define XXH32_digest XXH_NAME2(XXH_NAMESPACE, XXH32_digest) |
Definition at line 151 of file UT_XXHash.h.
#define XXH32_freeState XXH_NAME2(XXH_NAMESPACE, XXH32_freeState) |
Definition at line 148 of file UT_XXHash.h.
#define XXH32_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH32_hashFromCanonical) |
Definition at line 154 of file UT_XXHash.h.
#define XXH32_reset XXH_NAME2(XXH_NAMESPACE, XXH32_reset) |
Definition at line 149 of file UT_XXHash.h.
#define XXH32_update XXH_NAME2(XXH_NAMESPACE, XXH32_update) |
Definition at line 150 of file UT_XXHash.h.
#define XXH64 XXH_NAME2(XXH_NAMESPACE, XXH64) |
Definition at line 155 of file UT_XXHash.h.
#define XXH64_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH64_canonicalFromHash) |
Definition at line 162 of file UT_XXHash.h.
#define XXH64_copyState XXH_NAME2(XXH_NAMESPACE, XXH64_copyState) |
Definition at line 161 of file UT_XXHash.h.
#define XXH64_createState XXH_NAME2(XXH_NAMESPACE, XXH64_createState) |
Definition at line 156 of file UT_XXHash.h.
#define XXH64_digest XXH_NAME2(XXH_NAMESPACE, XXH64_digest) |
Definition at line 160 of file UT_XXHash.h.
#define XXH64_freeState XXH_NAME2(XXH_NAMESPACE, XXH64_freeState) |
Definition at line 157 of file UT_XXHash.h.
#define XXH64_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH64_hashFromCanonical) |
Definition at line 163 of file UT_XXHash.h.
#define XXH64_reset XXH_NAME2(XXH_NAMESPACE, XXH64_reset) |
Definition at line 158 of file UT_XXHash.h.
#define XXH64_update XXH_NAME2(XXH_NAMESPACE, XXH64_update) |
Definition at line 159 of file UT_XXHash.h.
#define XXH_CAT | ( | A, | |
B | |||
) | A##B |
Definition at line 143 of file UT_XXHash.h.
#define XXH_NAME2 | ( | A, | |
B | |||
) | XXH_CAT(A,B) |
Definition at line 144 of file UT_XXHash.h.
#define XXH_NAMESPACE UT_ |
Definition at line 140 of file UT_XXHash.h.
#define XXH_PUBLIC_API /* do nothing */ |
XXH_INLINE_ALL (and XXH_PRIVATE_API) This build macro includes xxhash functions in static
mode in order to inline them, and remove their symbol from the public list. Inlining offers great performance improvement on small keys, and dramatic ones when length is expressed as a compile-time constant. See https://fastcompression.blogspot.com/2018/03/xxhash-for-small-keys-impressive-power.html . Methodology : #define XXH_INLINE_ALL #include "xxhash.h" xxhash.c
is automatically included. It's not useful to compile and link it as a separate object.
XXH_NAMESPACE, aka Namespace Emulation :
If you want to include and expose xxHash functions from within your own library, but also want to avoid symbol collisions with other libraries which may also include xxHash,
you can use XXH_NAMESPACE, to automatically prefix any public symbol from xxhash library with the value of XXH_NAMESPACE (therefore, avoid NULL and numeric values).
Note that no change is required within the calling program as long as it includes xxhash.h
: regular symbol name will be automatically translated by this header.
Definition at line 139 of file UT_XXHash.h.
#define XXH_PUBLIC_API UT_API |
XXH_INLINE_ALL (and XXH_PRIVATE_API) This build macro includes xxhash functions in static
mode in order to inline them, and remove their symbol from the public list. Inlining offers great performance improvement on small keys, and dramatic ones when length is expressed as a compile-time constant. See https://fastcompression.blogspot.com/2018/03/xxhash-for-small-keys-impressive-power.html . Methodology : #define XXH_INLINE_ALL #include "xxhash.h" xxhash.c
is automatically included. It's not useful to compile and link it as a separate object.
XXH_NAMESPACE, aka Namespace Emulation :
If you want to include and expose xxHash functions from within your own library, but also want to avoid symbol collisions with other libraries which may also include xxHash,
you can use XXH_NAMESPACE, to automatically prefix any public symbol from xxhash library with the value of XXH_NAMESPACE (therefore, avoid NULL and numeric values).
Note that no change is required within the calling program as long as it includes xxhash.h
: regular symbol name will be automatically translated by this header.
Definition at line 139 of file UT_XXHash.h.
#define XXH_VERSION_MAJOR 0 |
Definition at line 170 of file UT_XXHash.h.
#define XXH_VERSION_MINOR 7 |
Definition at line 171 of file UT_XXHash.h.
#define XXH_VERSION_NUMBER (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE) |
Definition at line 173 of file UT_XXHash.h.
#define XXH_VERSION_RELEASE 1 |
Definition at line 172 of file UT_XXHash.h.
#define XXH_versionNumber XXH_NAME2(XXH_NAMESPACE, XXH_versionNumber) |
Definition at line 145 of file UT_XXHash.h.
typedef unsigned int XXH32_hash_t |
Definition at line 186 of file UT_XXHash.h.
typedef struct XXH32_state_s XXH32_state_t |
Definition at line 197 of file UT_XXHash.h.
typedef unsigned long long XXH64_hash_t |
Definition at line 250 of file UT_XXHash.h.
typedef struct XXH64_state_s XXH64_state_t |
Definition at line 261 of file UT_XXHash.h.
enum XXH_errorcode |
Enumerator | |
---|---|
XXH_OK | |
XXH_ERROR |
Definition at line 81 of file UT_XXHash.h.
XXH_PUBLIC_API XXH32_hash_t XXH32 | ( | const void * | input, |
size_t | length, | ||
unsigned int | seed | ||
) |
XXH32() : Calculate the 32-bit hash of sequence "length" bytes stored at memory address "input". The memory between input & input+length must be valid (allocated and read-accessible). "seed" can be used to alter the result predictably. Speed on Core 2 Duo @ 3 GHz (single thread, SMHasher benchmark) : 5.4 GB/s
XXH_PUBLIC_API void XXH32_canonicalFromHash | ( | XXH32_canonical_t * | dst, |
XXH32_hash_t | hash | ||
) |
XXH_PUBLIC_API void XXH32_copyState | ( | XXH32_state_t * | dst_state, |
const XXH32_state_t * | src_state | ||
) |
XXH_PUBLIC_API XXH32_state_t* XXH32_createState | ( | void | ) |
XXH_PUBLIC_API XXH32_hash_t XXH32_digest | ( | const XXH32_state_t * | statePtr | ) |
XXH_PUBLIC_API XXH_errorcode XXH32_freeState | ( | XXH32_state_t * | statePtr | ) |
XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical | ( | const XXH32_canonical_t * | src | ) |
XXH_PUBLIC_API XXH_errorcode XXH32_reset | ( | XXH32_state_t * | statePtr, |
unsigned int | seed | ||
) |
XXH_PUBLIC_API XXH_errorcode XXH32_update | ( | XXH32_state_t * | statePtr, |
const void * | input, | ||
size_t | length | ||
) |
XXH_PUBLIC_API XXH64_hash_t XXH64 | ( | const void * | input, |
size_t | length, | ||
unsigned long long | seed | ||
) |
XXH64() : Calculate the 64-bit hash of sequence of length "len" stored at memory address "input". "seed" can be used to alter the result predictably. This function runs faster on 64-bit systems, but slower on 32-bit systems (see benchmark).
XXH_PUBLIC_API void XXH64_canonicalFromHash | ( | XXH64_canonical_t * | dst, |
XXH64_hash_t | hash | ||
) |
XXH_PUBLIC_API void XXH64_copyState | ( | XXH64_state_t * | dst_state, |
const XXH64_state_t * | src_state | ||
) |
XXH_PUBLIC_API XXH64_state_t* XXH64_createState | ( | void | ) |
XXH_PUBLIC_API XXH64_hash_t XXH64_digest | ( | const XXH64_state_t * | statePtr | ) |
XXH_PUBLIC_API XXH_errorcode XXH64_freeState | ( | XXH64_state_t * | statePtr | ) |
XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical | ( | const XXH64_canonical_t * | src | ) |
XXH_PUBLIC_API XXH_errorcode XXH64_reset | ( | XXH64_state_t * | statePtr, |
unsigned long long | seed | ||
) |
XXH_PUBLIC_API XXH_errorcode XXH64_update | ( | XXH64_state_t * | statePtr, |
const void * | input, | ||
size_t | length | ||
) |
XXH_PUBLIC_API unsigned XXH_versionNumber | ( | void | ) |