|
|
|
|
Impressum xxhash.h
Sprache: C
|
|
/*
* xxHash - Extremely Fast Hash algorithm
* Header File
* Copyright (C) 2012-2023 Yann Collet
*
* BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You can contact the author at:
* - xxHash homepage: https://www.xxhash.com
* - xxHash source repository: https://github.com/Cyan4973/xxHash
*/
/*!
* @mainpage xxHash
*
* xxHash is an extremely fast non-cryptographic hash algorithm, working at RAM speed
* limits.
*
* It is proposed in four flavors, in three families:
* 1. @ref XXH32_family
* - Classic 32-bit hash function. Simple, compact, and runs on almost all
* 32-bit and 64-bit systems.
* 2. @ref XXH64_family
* - Classic 64-bit adaptation of XXH32. Just as simple, and runs well on most
* 64-bit systems (but _not_ 32-bit systems).
* 3. @ref XXH3_family
* - Modern 64-bit and 128-bit hash function family which features improved
* strength and performance across the board, especially on smaller data.
* It benefits greatly from SIMD and 64-bit without requiring it.
*
* Benchmarks
* ---
* The reference system uses an Intel i7-9700K CPU, and runs Ubuntu x64 20.04.
* The open source benchmark program is compiled with clang v10.0 using -O3 flag.
*
* | Hash Name | ISA ext | Width | Large Data Speed | Small Data Velocity |
* | -------------------- | ------- | ----: | ---------------: | ------------------: |
* | XXH3_64bits() | @b AVX2 | 64 | 59.4 GB/s | 133.1 |
* | MeowHash | AES-NI | 128 | 58.2 GB/s | 52.5 |
* | XXH3_128bits() | @b AVX2 | 128 | 57.9 GB/s | 118.1 |
* | CLHash | PCLMUL | 64 | 37.1 GB/s | 58.1 |
* | XXH3_64bits() | @b SSE2 | 64 | 31.5 GB/s | 133.1 |
* | XXH3_128bits() | @b SSE2 | 128 | 29.6 GB/s | 118.1 |
* | RAM sequential read | | N/A | 28.0 GB/s | N/A |
* | ahash | AES-NI | 64 | 22.5 GB/s | 107.2 |
* | City64 | | 64 | 22.0 GB/s | 76.6 |
* | T1ha2 | | 64 | 22.0 GB/s | 99.0 |
* | City128 | | 128 | 21.7 GB/s | 57.7 |
* | FarmHash | AES-NI | 64 | 21.3 GB/s | 71.9 |
* | XXH64() | | 64 | 19.4 GB/s | 71.0 |
* | SpookyHash | | 64 | 19.3 GB/s | 53.2 |
* | Mum | | 64 | 18.0 GB/s | 67.0 |
* | CRC32C | SSE4.2 | 32 | 13.0 GB/s | 57.9 |
* | XXH32() | | 32 | 9.7 GB/s | 71.9 |
* | City32 | | 32 | 9.1 GB/s | 66.0 |
* | Blake3* | @b AVX2 | 256 | 4.4 GB/s | 8.1 |
* | Murmur3 | | 32 | 3.9 GB/s | 56.1 |
* | SipHash* | | 64 | 3.0 GB/s | 43.2 |
* | Blake3* | @b SSE2 | 256 | 2.4 GB/s | 8.1 |
* | HighwayHash | | 64 | 1.4 GB/s | 6.0 |
* | FNV64 | | 64 | 1.2 GB/s | 62.7 |
* | Blake2* | | 256 | 1.1 GB/s | 5.1 |
* | SHA1* | | 160 | 0.8 GB/s | 5.6 |
* | MD5* | | 128 | 0.6 GB/s | 7.8 |
* @note
* - Hashes which require a specific ISA extension are noted. SSE2 is also noted,
* even though it is mandatory on x64.
* - Hashes with an asterisk are cryptographic. Note that MD5 is non-cryptographic
* by modern standards.
* - Small data velocity is a rough average of algorithm's efficiency for small
* data. For more accurate information, see the wiki.
* - More benchmarks and strength tests are found on the wiki:
* https://github.com/Cyan4973/xxHash/wiki
*
* Usage
* ------
* All xxHash variants use a similar API. Changing the algorithm is a trivial
* substitution.
*
* @pre
* For functions which take an input and length parameter, the following
* requirements are assumed:
* - The range from [`input`, `input + length`) is valid, readable memory.
* - The only exception is if the `length` is `0`, `input` may be `NULL`.
* - For C++, the objects must have the *TriviallyCopyable* property, as the
* functions access bytes directly as if it was an array of `unsigned char`.
*
* @anchor single_shot_example
* **Single Shot**
*
* These functions are stateless functions which hash a contiguous block of memory,
* immediately returning the result. They are the easiest and usually the fastest
* option.
*
* XXH32(), XXH64(), XXH3_64bits(), XXH3_128bits()
*
* @code{.c}
* #include <string.h>
* #include "xxhash.h"
*
* // Example for a function which hashes a null terminated string with XXH32().
* XXH32_hash_t hash_string(const char* string, XXH32_hash_t seed)
* {
* // NULL pointers are only valid if the length is zero
* size_t length = (string == NULL) ? 0 : strlen(string);
* return XXH32(string, length, seed);
* }
* @endcode
*
*
* @anchor streaming_example
* **Streaming**
*
* These groups of functions allow incremental hashing of unknown size, even
* more than what would fit in a size_t.
*
* XXH32_reset(), XXH64_reset(), XXH3_64bits_reset(), XXH3_128bits_reset()
*
* @code{.c}
* #include <stdio.h>
* #include <assert.h>
* #include "xxhash.h"
* // Example for a function which hashes a FILE incrementally with XXH3_64bits().
* XXH64_hash_t hashFile(FILE* f)
* {
* // Allocate a state struct. Do not just use malloc() or new.
* XXH3_state_t* state = XXH3_createState();
* assert(state != NULL && "Out of memory!");
* // Reset the state to start a new hashing session.
* XXH3_64bits_reset(state);
* char buffer[4096];
* size_t count;
* // Read the file in chunks
* while ((count = fread(buffer, 1, sizeof(buffer), f)) != 0) {
* // Run update() as many times as necessary to process the data
* XXH3_64bits_update(state, buffer, count);
* }
* // Retrieve the finalized hash. This will not change the state.
* XXH64_hash_t result = XXH3_64bits_digest(state);
* // Free the state. Do not use free().
* XXH3_freeState(state);
* return result;
* }
* @endcode
*
* Streaming functions generate the xxHash value from an incremental input.
* This method is slower than single-call functions, due to state management.
* For small inputs, prefer `XXH32()` and `XXH64()`, which are better optimized.
*
* An XXH state must first be allocated using `XXH*_createState()`.
*
* Start a new hash by initializing the state with a seed using `XXH*_reset()`.
*
* Then, feed the hash state by calling `XXH*_update()` as many times as necessary.
*
* The function returns an error code, with 0 meaning OK, and any other value
* meaning there is an error.
*
* Finally, a hash value can be produced anytime, by using `XXH*_digest()`.
* This function returns the nn-bits hash as an int or long long.
*
* It's still possible to continue inserting input into the hash state after a
* digest, and generate new hash values later on by invoking `XXH*_digest()`.
*
* When done, release the state using `XXH*_freeState()`.
*
*
* @anchor canonical_representation_example
* **Canonical Representation**
*
* The default return values from XXH functions are unsigned 32, 64 and 128 bit
* integers.
* This the simplest and fastest format for further post-processing.
*
* However, this leaves open the question of what is the order on the byte level,
* since little and big endian conventions will store the same number differently.
*
* The canonical representation settles this issue by mandating big-endian
* convention, the same convention as human-readable numbers (large digits first).
*
* When writing hash values to storage, sending them over a network, or printing
* them, it's highly recommended to use the canonical representation to ensure
* portability across a wider range of systems, present and future.
*
* The following functions allow transformation of hash values to and from
* canonical format.
*
* XXH32_canonicalFromHash(), XXH32_hashFromCanonical(),
* XXH64_canonicalFromHash(), XXH64_hashFromCanonical(),
* XXH128_canonicalFromHash(), XXH128_hashFromCanonical(),
*
* @code{.c}
* #include <stdio.h>
* #include "xxhash.h"
*
* // Example for a function which prints XXH32_hash_t in human readable format
* void printXxh32(XXH32_hash_t hash)
* {
* XXH32_canonical_t cano;
* XXH32_canonicalFromHash(&cano, hash);
* size_t i;
* for(i = 0; i < sizeof(cano.digest); ++i) {
* printf("%02x", cano.digest[i]);
* }
* printf("\n");
* }
*
* // Example for a function which converts XXH32_canonical_t to XXH32_hash_t
* XXH32_hash_t convertCanonicalToXxh32(XXH32_canonical_t cano)
* {
* XXH32_hash_t hash = XXH32_hashFromCanonical(&cano);
* return hash;
* }
* @endcode
*
*
* @file xxhash.h
* xxHash prototypes and implementation
*/
#if defined (__cplusplus)
extern "C" {
#endif
/* ****************************
* INLINE mode
******************************/
/*!
* @defgroup public Public API
* Contains details on the public xxHash functions.
* @{
*/
#ifdef XXH_DOXYGEN
/*!
* @brief Gives access to internal state declaration, required for static allocation.
*
* Incompatible with dynamic linking, due to risks of ABI changes.
*
* Usage:
* @code{.c}
* #define XXH_STATIC_LINKING_ONLY
* #include "xxhash.h"
* @endcode
*/
# define XXH_STATIC_LINKING_ONLY
/* Do not undef XXH_STATIC_LINKING_ONLY for Doxygen */
/*!
* @brief Gives access to internal definitions.
*
* Usage:
* @code{.c}
* #define XXH_STATIC_LINKING_ONLY
* #define XXH_IMPLEMENTATION
* #include "xxhash.h"
* @endcode
*/
# define XXH_IMPLEMENTATION
/* Do not undef XXH_IMPLEMENTATION for Doxygen */
/*!
* @brief Exposes the implementation and marks all functions as `inline`.
*
* Use these build macros to inline xxhash into the target unit.
* Inlining improves performance on small inputs, especially when the length is
* expressed as a compile-time constant:
*
* https://fastcompression.blogspot.com/2018/03/xxhash-for-small-keys-impressive-power.html
*
* It also keeps xxHash symbols private to the unit, so they are not exported.
*
* Usage:
* @code{.c}
* #define XXH_INLINE_ALL
* #include "xxhash.h"
* @endcode
* Do not compile and link xxhash.o as a separate object, as it is not useful.
*/
# define XXH_INLINE_ALL
# undef XXH_INLINE_ALL
/*!
* @brief Exposes the implementation without marking functions as inline.
*/
# define XXH_PRIVATE_API
# undef XXH_PRIVATE_API
/*!
* @brief Emulate a namespace by transparently prefixing all symbols.
*
* 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 @ref XXH_NAMESPACE to automatically prefix
* any public symbol from xxhash library with the value of @ref XXH_NAMESPACE
* (therefore, avoid empty or numeric values).
*
* Note that no change is required within the calling program as long as it
* includes `xxhash.h`: Regular symbol names will be automatically translated
* by this header.
*/
# define XXH_NAMESPACE /* YOUR NAME HERE */
# undef XXH_NAMESPACE
#endif
#if ( defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API)) \
&& ! defined(XXH_INLINE_ALL_31684351384)
/* this section should be traversed only once */
# define XXH_INLINE_ALL_31684351384
/* give access to the advanced API, required to compile implementations */
# undef XXH_STATIC_LINKING_ONLY /* avoid macro redef */
# define XXH_STATIC_LINKING_ONLY
/* make all functions private */
# undef XXH_PUBLIC_API
# if defined(__GNUC__)
# define XXH_PUBLIC_API static __ inline __attribute__((__unused__))
# elif defined (__cplusplus) || ( defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
# define XXH_PUBLIC_API static inline
# elif defined(_MSC_VER)
# define XXH_PUBLIC_API static __ inline
# else
/* note: this version may generate warnings for unused static functions */
# define XXH_PUBLIC_API static
# endif
/*
* This part deals with the special case where a unit wants to inline xxHash,
* but "xxhash.h" has previously been included without XXH_INLINE_ALL,
* such as part of some previously included *.h header file.
* Without further action, the new include would just be ignored,
* and functions would effectively _not_ be inlined (silent failure).
* The following macros solve this situation by prefixing all inlined names,
* avoiding naming collision with previous inclusions.
*/
/* Before that, we unconditionally #undef all symbols,
* in case they were already defined with XXH_NAMESPACE.
* They will then be redefined for XXH_INLINE_ALL
*/
# undef XXH_versionNumber
/* XXH32 */
# undef XXH32
# undef XXH32_createState
# undef XXH32_freeState
# undef XXH32_reset
# undef XXH32_update
# undef XXH32_digest
# undef XXH32_copyState
# undef XXH32_canonicalFromHash
# undef XXH32_hashFromCanonical
/* XXH64 */
# undef XXH64
# undef XXH64_createState
# undef XXH64_freeState
# undef XXH64_reset
# undef XXH64_update
# undef XXH64_digest
# undef XXH64_copyState
# undef XXH64_canonicalFromHash
# undef XXH64_hashFromCanonical
/* XXH3_64bits */
# undef XXH3_64bits
# undef XXH3_64bits_withSecret
# undef XXH3_64bits_withSeed
# undef XXH3_64bits_withSecretandSeed
# undef XXH3_createState
# undef XXH3_freeState
# undef XXH3_copyState
# undef XXH3_64bits_reset
# undef XXH3_64bits_reset_withSeed
# undef XXH3_64bits_reset_withSecret
# undef XXH3_64bits_update
# undef XXH3_64bits_digest
# undef XXH3_generateSecret
/* XXH3_128bits */
# undef XXH128
# undef XXH3_128bits
# undef XXH3_128bits_withSeed
# undef XXH3_128bits_withSecret
# undef XXH3_128bits_reset
# undef XXH3_128bits_reset_withSeed
# undef XXH3_128bits_reset_withSecret
# undef XXH3_128bits_reset_withSecretandSeed
# undef XXH3_128bits_update
# undef XXH3_128bits_digest
# undef XXH128_isEqual
# undef XXH128_cmp
# undef XXH128_canonicalFromHash
# undef XXH128_hashFromCanonical
/* Finally, free the namespace itself */
# undef XXH_NAMESPACE
/* employ the namespace for XXH_INLINE_ALL */
# define XXH_NAMESPACE XXH_INLINE_
/*
* Some identifiers (enums, type names) are not symbols,
* but they must nonetheless be renamed to avoid redeclaration.
* Alternative solution: do not redeclare them.
* However, this requires some #ifdefs, and has a more dispersed impact.
* Meanwhile, renaming can be achieved in a single place.
*/
# define XXH_IPREF(Id) XXH_NAMESPACE ## Id
# define XXH_OK XXH_IPREF(XXH_OK)
# define XXH_ERROR XXH_IPREF(XXH_ERROR)
# define XXH_errorcode XXH_IPREF(XXH_errorcode)
# define XXH32_canonical_t XXH_IPREF(XXH32_canonical_t)
# define XXH64_canonical_t XXH_IPREF(XXH64_canonical_t)
# define XXH128_canonical_t XXH_IPREF(XXH128_canonical_t)
# define XXH32_state_s XXH_IPREF(XXH32_state_s)
# define XXH32_state_t XXH_IPREF(XXH32_state_t)
# define XXH64_state_s XXH_IPREF(XXH64_state_s)
# define XXH64_state_t XXH_IPREF(XXH64_state_t)
# define XXH3_state_s XXH_IPREF(XXH3_state_s)
# define XXH3_state_t XXH_IPREF(XXH3_state_t)
# define XXH128_hash_t XXH_IPREF(XXH128_hash_t)
/* Ensure the header is parsed again, even if it was previously included */
# undef XXHASH_H_5627135585666179
# undef XXHASH_H_STATIC_13879238742
#endif /* XXH_INLINE_ALL || XXH_PRIVATE_API */
/* ****************************************************************
* Stable API
*****************************************************************/
#ifndef XXHASH_H_5627135585666179
#define XXHASH_H_5627135585666179 1
/*! @brief Marks a global symbol. */
#if ! defined(XXH_INLINE_ALL) && ! defined(XXH_PRIVATE_API)
# if defined(_WIN32) && defined(_MSC_VER) && ( defined(XXH_IMPORT) || defined(XXH_EXPORT))
# ifdef XXH_EXPORT
# define XXH_PUBLIC_API __declspec(dllexport)
# elif XXH_IMPORT
# define XXH_PUBLIC_API __declspec(dllimport)
# endif
# else
# define XXH_PUBLIC_API /* do nothing */
# endif
#endif
#ifdef XXH_NAMESPACE
# define XXH_CAT(A,B) A ##B
# define XXH_NAME2(A,B) XXH_CAT(A,B)
# define XXH_versionNumber XXH_NAME2(XXH_NAMESPACE, XXH_versionNumber)
/* XXH32 */
# define XXH32 XXH_NAME2(XXH_NAMESPACE, XXH32)
# define XXH32_createState XXH_NAME2(XXH_NAMESPACE, XXH32_createState)
# define XXH32_freeState XXH_NAME2(XXH_NAMESPACE, XXH32_freeState)
# define XXH32_reset XXH_NAME2(XXH_NAMESPACE, XXH32_reset)
# define XXH32_update XXH_NAME2(XXH_NAMESPACE, XXH32_update)
# define XXH32_digest XXH_NAME2(XXH_NAMESPACE, XXH32_digest)
# define XXH32_copyState XXH_NAME2(XXH_NAMESPACE, XXH32_copyState)
# define XXH32_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH32_canonicalFromHash)
# define XXH32_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH32_hashFromCanonical)
/* XXH64 */
# define XXH64 XXH_NAME2(XXH_NAMESPACE, XXH64)
# define XXH64_createState XXH_NAME2(XXH_NAMESPACE, XXH64_createState)
# define XXH64_freeState XXH_NAME2(XXH_NAMESPACE, XXH64_freeState)
# define XXH64_reset XXH_NAME2(XXH_NAMESPACE, XXH64_reset)
# define XXH64_update XXH_NAME2(XXH_NAMESPACE, XXH64_update)
# define XXH64_digest XXH_NAME2(XXH_NAMESPACE, XXH64_digest)
# define XXH64_copyState XXH_NAME2(XXH_NAMESPACE, XXH64_copyState)
# define XXH64_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH64_canonicalFromHash)
# define XXH64_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH64_hashFromCanonical)
/* XXH3_64bits */
# define XXH3_64bits XXH_NAME2(XXH_NAMESPACE, XXH3_64bits)
# define XXH3_64bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSecret)
# define XXH3_64bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSeed)
# define XXH3_64bits_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSecr etandSeed)
# define XXH3_createState XXH_NAME2(XXH_NAMESPACE, XXH3_createState)
# define XXH3_freeState XXH_NAME2(XXH_NAMESPACE, XXH3_freeState)
# define XXH3_copyState XXH_NAME2(XXH_NAMESPACE, XXH3_copyState)
# define XXH3_64bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset)
# define XXH3_64bits_reset_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSeed)
# define XXH3_64bits_reset_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSecret)
# define XXH3_64bits_reset_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSecretandSeed)
# define XXH3_64bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_update)
# define XXH3_64bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_digest)
# define XXH3_generateSecret XXH_NAME2(XXH_NAMESPACE, XXH3_generateSecret)
# define XXH3_generateSecret_fromSeed XXH_NAME2(XXH_NAMESPACE, XXH3_generateSecret_fromSeed)
/* XXH3_128bits */
# define XXH128 XXH_NAME2(XXH_NAMESPACE, XXH128)
# define XXH3_128bits XXH_NAME2(XXH_NAMESPACE, XXH3_128bits)
# define XXH3_128bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSeed)
# define XXH3_128bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSecret)
# define XXH3_128bits_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSecretandSeed)
# define XXH3_128bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset)
# define XXH3_128bits_reset_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSeed)
# define XXH3_128bits_reset_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSecret)
# define XXH3_128bits_reset_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSecretandSeed)
# define XXH3_128bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_update)
# define XXH3_128bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_digest)
# define XXH128_isEqual XXH_NAME2(XXH_NAMESPACE, XXH128_isEqual)
# define XXH128_cmp XXH_NAME2(XXH_NAMESPACE, XXH128_cmp)
# define XXH128_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH128_canonicalFromHash)
# define XXH128_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH128_hashFromCanonical)
#endif
/* *************************************
* Compiler specifics
***************************************/
/* specific declaration modes for Windows */
#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API)
# if defined(_WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))
# ifdef XXH_EXPORT
# define XXH_PUBLIC_API __declspec(dllexport)
# elif XXH_IMPORT
# define XXH_PUBLIC_API __declspec(dllimport)
# endif
# else
# define XXH_PUBLIC_API /* do nothing */
# endif
#endif
#if defined (__GNUC__)
# define XXH_CONSTF __attribute__((__const__))
# define XXH_PUREF __attribute__((__pure__))
# define XXH_MALLOCF __attribute__((__malloc__))
#else
# define XXH_CONSTF /* disable */
# define XXH_PUREF
# define XXH_MALLOCF
#endif
/* *************************************
* Version
***************************************/
#define XXH_VERSION_MAJOR 0
#define XXH_VERSION_MINOR 8
#define XXH_VERSION_RELEASE 3
/*! @brief Version number, encoded as two digits each */
#define XXH_VERSION_NUMBER (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE)
/*!
* @brief Obtains the xxHash version.
*
* This is mostly useful when xxHash is compiled as a shared library,
* since the returned value comes from the library, as opposed to header file.
*
* @return @ref XXH_VERSION_NUMBER of the invoked library.
*/
XXH_PUBLIC_API XXH_CONSTF unsigned XXH_versionNumber (void);
/* ****************************
* Common basic types
******************************/
#include <stddef.h> /* size_t */
/*!
* @brief Exit code for the streaming API.
*/
typedef enum {
XXH_OK = 0, /*!< OK */
XXH_ERROR /*!< Error */
} XXH_errorcode;
/*-**********************************************************************
* 32-bit hash
************************************************************************/
#if defined(XXH_DOXYGEN) /* Don't show <stdint.h> include */
/*!
* @brief An unsigned 32-bit integer.
*
* Not necessarily defined to `uint32_t` but functionally equivalent.
*/
typedef uint32_t XXH32_hash_t;
#elif !defined (__VMS) \
&& (defined (__cplusplus) \
|| (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) )
# ifdef _AIX
# include <inttypes.h>
# else
# include <stdint.h>
# endif
typedef uint32_t XXH32_hash_t;
#else
# include <limits.h>
# if UINT_MAX == 0xFFFFFFFFUL
typedef unsigned int XXH32_hash_t;
# elif ULONG_MAX == 0xFFFFFFFFUL
typedef unsigned long XXH32_hash_t;
# else
# error "unsupported platform: need a 32-bit type"
# endif
#endif
/*!
* @}
*
* @defgroup XXH32_family XXH32 family
* @ingroup public
* Contains functions used in the classic 32-bit xxHash algorithm.
*
* @note
* XXH32 is useful for older platforms, with no or poor 64-bit performance.
* Note that the @ref XXH3_family provides competitive speed for both 32-bit
* and 64-bit systems, and offers true 64/128 bit hash results.
*
* @see @ref XXH64_family, @ref XXH3_family : Other xxHash families
* @see @ref XXH32_impl for implementation details
* @{
*/
/*!
* @brief Calculates the 32-bit hash of @p input using xxHash32.
*
* @param input The block of data to be hashed, at least @p length bytes in size.
* @param length The length of @p input, in bytes.
* @param seed The 32-bit seed to alter the hash's output predictably.
*
* @pre
* The memory between @p input and @p input + @p length must be valid,
* readable, contiguous memory. However, if @p length is `0`, @p input may be
* `NULL`. In C++, this also must be *TriviallyCopyable*.
*
* @return The calculated 32-bit xxHash32 value.
*
* @see @ref single_shot_example "Single Shot Example" for an example.
*/
XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32 (const void* input, size_t length, XXH32_hash_t seed);
#ifndef XXH_NO_STREAM
/*!
* @typedef struct XXH32_state_s XXH32_state_t
* @brief The opaque state struct for the XXH32 streaming API.
*
* @see XXH32_state_s for details.
* @see @ref streaming_example "Streaming Example"
*/
typedef struct XXH32_state_s XXH32_state_t;
/*!
* @brief Allocates an @ref XXH32_state_t.
*
* @return An allocated pointer of @ref XXH32_state_t on success.
* @ *
*
* @note Must be freed with XXH32_freeState().
*
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 50
*/
XXH_PUBLIC_APIXXH_MALLOCF XXH32_state_t*XXH32_createState()
/*!
java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
*
f XXH32_createState)java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
*
* @return @ref XXH_OK.
*
mustallocated )
*-32bit function.Simple java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 76
*see@ "Examplejava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
*
*/
XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr);
/*!
XXH32_state_t anotherjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
*
* @param dst_state The state to copy to.
*@aram The copy
* @pre
* @p dst_state and @p src_state must not be `NULL` java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 2
*/
XXH_PUBLIC_API void(XXH32_state_t*dst_state,const XXH32_state_t*src_state)
/*!
*Resets refXXH32_state_t to begin a new hash.
*
* @param statePtr The state struct to reset.
* @param seed The 32-bit seed to alter the hash result predictably.
*
* @pre
* @p statePtr must not be `NULL`.
*
* @return @ref XXH_OK on success.
*@return r java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 37
*
* @note This function resets and seeds a state. Call it before @ref XXH32_update().
*
* @see @ref streaming_example "Streaming Example"
*/
XXH_PUBLIC_API XXH32_reset(*XXH32_hash_tseed;
/*!
* @brief Consumes a block of @p input to an @ref XXH32_state_t.
*
*@paramstatePtr state to update.
* @param input The block of data to be hashed, at least @p length bytes in size.
* @param length The length of @p input, in bytes.
*
* @pre
* @p statePtr must not be `*| )| |64 . / 0 |
* @pre
* The memory between @p input and @p input + @p length must be valid,
* readable, contiguous memory. However, if @p length is `0`, @p input may be
* `NULL`. In C++, this also must be *TriviallyCopyable*.
*
* @return @ref XXH_OK on success.
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 37
*
* @note Call this to incrementally consume blocks of data.
*
* @see @ref streaming_example "Streaming Example"
*/
XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* statePtr, const void* input, size_t length);
/*!
* @brief Returns the calculated hash value from an @ref XXH32_state_t.
*
The state calculatet from
*
* @pre
* @p statePtr must not be `NULL`.
*
* @return The calculated 32-bit xxHash32 value from that state | 0 / .
*
* @note
* Calling XXH32_digest() will not affect @p statePtr, so you can update,
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 30
*
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 50
*/
XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_digest (const XXH32_state_t* statePtr);
#endif /* !XXH_NO_STREAM */ --
/******* Canonical representation *******/
/*!
b bigendian)representationof@refXXH32_hash_t.
*/
unsigned char digest[4]; /*!< Hash bytes, big endian */
} XXH32_canonical_t;
/*!
*b a ref java.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 79
*
* @param dst The @ref XXH32_canonical_t pointer to be stored to.
* @param hash The @ref XXH32_hash_t to be converted.
*
* @pre
* the .They the easiest and usually the fastest
*
* @see @java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 2
*/
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 87
/*!
* java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 2
more than what would fit
*
* @pre
* @p src must not be `NULL`.
*
* @return The converted hash.
*
* @see @* // Reset a hashingjava.lang.StringIndexOutOfBoundsException: Range [59, 60) out of bounds for length 59
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src);
/*! @cond Doxygen ignores this part */
#ifdef __has_attribute
# define * Streaming functionsgeneratethe .
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
(0
#endif
/*! @endcond */
/*! @cond Doxygen ignores this part */
/*
* C23 __STDC_VERSION__ number hasn't been specified yet. For now
* leave as `201711L` (C17 + 1).
* TODO: Update to correct value when its been specified.
*/
# java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 26
/*! @endcond */value producedanytime, using`XH*digest(`
/*! @cond Doxygen ignores this part */
/* C-language Attributes are added in C23. */
if_ _java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 95
# define XXH_HAS_C_ATTRIBUTE(x) __has_c_attribute(x)
#else
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 33
#endif
/*! @endcond */
/*! @cond Doxygen ignores this part */
#if defined(__cplusplus) && defined(__has_cpp_attribute)
# define * However, this of whatthejava.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 81
#else
# define XXH_HAS_CPP_ATTRIBUTE(x) 0
/*! @endcond */
/*! @cond Doxygen ignores this part */
/*
* Define XXH_FALLTHROUGH macro for annotating switch case with the 'fallthrough' attribute
* introduced in CPP17 and C23.
* CPP17 : https://en.cppreference.com/w/cpp/language/attributes/fallthrough
* C23 : https://en.cppreference.com/w/c/language/attributes/fallthrough
*/
#if XXH_HAS_C_ATTRIBUTE(fallthrough) || XXH_HAS_CPP_ATTRIBUTE*java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 56
# *@code.
elifXXH_HAS_ATTRIBUTE_fallthrough__java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
# define XXH_FALLTHROUGH __attribute__ ((__java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 39
#else
# define XXH_FALLTHROUGH /* fallthrough */
#endif
/*! @endcond */
/*! @cond Doxygen ignores this part */
/*
* Define XXH_NOESCAPE for annotated java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 6
*
* As of writing this, onlyjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
*/
#if XXH_HAS_ATTRIBUTE(noescape)
# define XXH_NOESCAPE __attribute__((__noescape__))
#else
# define XXH_NOESCAPE
#endif
/*! @endcond */
/*!
* @}
* @ingroup public
* @{
*/
#ifndef XXH_NO_LONG_LONG
/*-**********************************************************************
64-bit hash
************************************************************************/
#if defined(XXH_DOXYGEN) /* don't include <stdint.h> */
/*!
* @brief An /*!
*
* Not necessarily defined to `uint64_t` but functionally equivalent.
*/
typedef uint64_t *code{}
#elif ! *#include "xhash."
&& (defined (__cplusplus) \
|| (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) )
# ifdef _AIX defineXXH_STATIC_LINKING_ONLY
# java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 3
# else
# include <stdint.h>
# endif
typedef uint64_t XXH64_hash_t;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
# include <limits.h>
# if defined( *expressed acompile-time :
P64ABIsaysis long*
typedef unsigned long XXH64_hash_t;
# else
*
typedef unsigned long long XXH64_hash_t;
# endif
#endif
/*!
* @}
*
*defgroupfamily
* @ingroup public
* @{
used in - .
*
* @note
* XXH3 wanttoi_expose_ fromwithinown
* and offers true 64/128 bit hash results.
* It provides better speed for systems with vector processing capabilities.
*/
/*!
*briefthe bithash pusing
*
ofdatato hashed java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 81
* @param length ejava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
* @param seed The 64-bit /* give access to the advanced, *
# defined_java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
* java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 40
* The memory between @p input and @p input + @p length must/
* readable, contiguous memory. However, if @p length is `0`, @p input may be
* `NULL`. In C++, this also must be *TriviallyCopyable*.
*
* @return The calculated 64-bit xxHash64 value.
*
* @see @ref single_shot_example "Single Shot
*/
XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64(XXH_NOESCAPE const void XXH32_freeState
/******* Streaming *******/
#ifndef XXH_NO_STREAM
/*!
state forXXH64 .
* @# undefXXH64
@ref streaming_example" Examplejava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
*/
XXH64_state_sXXH64_state_t;
/*!
*u
* @return An allocated pointer of * @return An 128
rnN`.
* @note Must be freed with XXH64_freeState().
*
* @see @ref streaming_example Some identifiers(,type not symbols,
*/
XXH_PUBLIC_API java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 75
/*!
*@java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
#defineXXH64_state_s XXH_IPREF(XXH64_state_s)
*
*
* @return @ref XXH_OK.
@statePtrmustbewith)
*
*s ref" Examplejava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
*/
XXH_PUBLIC_APIjava.lang.StringIndexOutOfBoundsException: Range [29, 26) out of bounds for length 45
/*!
* @# defineXXH_NAME2java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 47
* @param dst_state The state java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 67
* @param src_state The state to copy from.
* @pre
* @p dst_state and @p src_state must not # define XXH64_copyState XXH_NAME2(XXH_NAMESPjava.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 67
*/
XXH_PUBLIC_API void XXH64_copyState(#defineXXH3_createState XXH_NAME2XXXH3_createState
/*!
* @brief Resets an @ref XXH64_state_t to begin #define XXH_NAME2X,XXH3_64bits_reset_withSecretandSeedjava.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107
*
* @param statePtr The state struct to reset. * @param XXH128
* @param seed The 64-bit seed to alter the java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 73
* #java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 65
* @p statePtr must not be `NULL`.
*
* @return @ref XXH_OK
*@java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
*
* @note java.lang.StringIndexOutOfBoundsException: Range [45, 26) out of bounds for length 45
*
* @# defin
*/
/*!
* @brief Consumes a block of @p input to an @ref java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 37
*java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 60
param statePtr The state struct to update.
* @param input The block of data to be hashed, at **************/
*
*
****************************/
* @p statePtr must not be `NULL`.
*@ p bejava.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 72
*readable, contiguousmemory. pis `0` pbe
* `NULL`. In C
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 40
* @return @ref XXH_OK on success.
* @return @ref
*
thisto java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 59
*
* @see @ref streaming_example "Streaming * Note that the @ref XXH3_family provides compespeedfor both32bit
*/
XXH_PUBLIC_API XXH_errorcode XXH64_update (java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 3
/*!
* @brief Returns the calculated hash value from an @ref XXH64_state_t.
*
**readable plength
*
* @pre
* *java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
ijava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 21
rThecalculated 64bit java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 64
*
* @java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3
@Allocates n@ java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 42
* digest, and update again.
*
* @see @ref streaming_example "Streaming Example"
*/
XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64_digest (*p A anjava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 94
#endif /* !XXH_NO_STREAM */
/******* Canonical representation *******/
/*!
* @`NULL` and must .
*/
typedef java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 2
/*!
* r failurejava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
*
**
* @param hash The @ref java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
*
p
* @p dst must not java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 2
*
"RepresentationExample"
*/
XXH64_canonicalFromHashXXH_NOESCAPE XXH64_canonical_t* dst, XXH64_hash_t hash);
/*!
* @brief Converts an @ref XXH64_canonical_t to a native @ref XXH64_hash_t.
*
* @param src The @ref XXH64_canonical_t to convert.
*
* @pre
* @p src must not be `NULL`.
*
* @return The converted hash.
*
* @see @ref canonical_representation_example "Canonical Representation n
*/
XXH_PUBLIC_API digest .
#ifndef XXH_NO_XXH3
/*!
* @}
* **********/******* Canonical representation *******/
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 36
* @ingroup public
* @{
*
* XXH3 is a *
* - Improved speed for both small and large inputs
* - True 64-bit and 128-bit outputs
* - SIMD acceleration
*-32-viability
*
* Speed analysis methodology is
*
* https://fastcompression.blogspot.com/2019/03/presenting-xxh3.html
*
* Compared to XXH64, expect XXH3 to run approximately*p be`java.lang.StringIndexOutOfBoundsException: Range [31, 32) out of bounds for length 31
* ~2x faster on large inputs and >3x faster on small ones,
* exact java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 31
* XXH3's speed benefits greatly from SIMD and 64-bit arithmetic,
* but does not require it.
* Most 32-bit and 64-bit targets that can run java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 38
* at competitive speeds, even without vector support. Further details are
implementation.
*
*has ,but alsoincludes accelerated
* implementations for many common * implementations for many common platforms
* - AVX512
* - AVX2
* - SSE2
* - ARM :
* - WebAssembly SIMD128
* - POWER8 VSX
* - s390x elifjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 40
* This can be controlled via/*
* selects the best version according to predefined macros. For the x86 family, an
* automatic runtime dispatcher is included separately in @ref xxh_x86dispatch.c.
*
* XXH3 implementation is portable:
* it has a generic C90 formulation that can be compiled on any platform,
* all implementations generate exactly the same hash value on all platforms.
* Starting from v0.8.0, it's also labelled "stable", meaning that
* any future version will also generate the same hash value.
*
* XXH3 offers 2 variants, _64bits and _128bits.
*
* When only 64 bits are needed, prefer invoking the _64bits variant, as it
* reduces the amount of mixing, resulting in faster speed on small inputs.
* It's also generally simpler to manipulate a scalar return type than a struct.
*
* The API supports one-shot hashing, streaming mode, and custom secrets.
*/
/*!
* @ingroup tuning
* @brief Possible values for @ref XXH_VECTOR.
* Unless set explicitly, determined automatically.
*/#lse
# define XXH_SCALAR 0 /*!< Portable java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 6
# define# define
# define XXH_AVX2 2 /*!< AVX2 for Haswell and/-***********************************************
# define XXH_AVX512 3 /*!< AVX512 for Skylake and Icelake */
# define XXH_NEON 4 /*!< NEON for most ARMv7-A, all AArch64, and WASM SIMD128 */
# define XXH_VSX 5 /*!< VSX and ZVector for POWER8/z13 #*****************************************/
# define XXH_SVE 6 /*!< SVE for java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 24
# define XXH_LSX 7 /*!< LSX (128-bit SIMD) for LoongArch64 */
/*-**********************************************************************
* XXH3 64-bit variant
******************************************************************endif
/*!
* @brief Calculates64-it unseeded ofXXH3 @java.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 70
*
* @param input The block of data to be hashed, at least @p length bytes in java.lang.StringIndexOutOfBoundsException: Range [0, 81) out of bounds for length 2
* @param length The length of
*
p
* The memory between @p input and @p input + @p length must be valid,
*readable memory @ lengthis `,@ may
be*.
*
* @return The calculated 64-bit XXH3 hash value.
*
* @note
* This is equivalent to @ref XXH3_64bits_withSeed() with a seed of `0`, however
* it may have slightly better performance due to constant propagation of the
* defaults.
*
* @see
* XXH3_64bits_withSeed(), XXH3_64bits_withSecret(): other seeding variants
* @see @ref single_shot_example "Single Shot Example" for an example.
*/
XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits(XXH_NOESCAPE const void* input, size_t length);
/*!
* @brief Calculates 64-bit seeded variant of XXH3 hash of @p input.
*
* @param input The block of data to be hashed, at least @p length bytes in size.
* @param length The length of @p input, in bytes.
* @param seed The 64-bit seed to alter the hash result predictably.
*
* @pre
* The memory between @p input and @p input + @p length must be valid,
* readable, contiguous memory. However, if @p length is `0`, @p input may be
* `NULL`. In C++, this also must be *TriviallyCopyable*.
*
* @return The calculated 64-bit XXH3 hash value.
*
* @note
* seed == 0 produces the same results as @ref XXH3_64bits().
*
* This variant generates a custom secret on the fly based on default secret
* altered using the @p seed value.
*
*operation java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 77
*
* @see @ref single_shot_example "Single Shot Example" for an example.
*/
XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_withSeed(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t java.lang.StringIndexOutOfBoundsException: Index 122 out of bounds for length 2
/*!
* The bare minimum size for a custom java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 2
*
* @see
*XXH3_64bits_withSecret(,XXH3_64bits_reset_withSecret
* XXH3_128bits_withSecret(), XXH3_128bits_reset_withSecret().
/
#define XXH3_SECRET_SIZE_MIN 136
/*!
*@rief Calculates64--bit variantof XXH3with a custom "ecret".
*
param data The block of data to hashed, at least @p len bytes in size.
* @param len The length of @p data, in bytes.
* @param secret The secret data.
es.
*
* @return The calculated 64-bit XXH3 hash value.
*
* @pre
* The memory between @p data and @p data + @p len must be valid,
* readable, contiguous memory. However, if @p length is `0`, @p data may be
* `NULL`.+ mustbe Tjava.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 59
*
* It's possible to provide any blob of bytes as a "secret" to generate the hash.
* This makes it more difficult for an external actor to prepare an intentional collision.
* The main condition is that @p secretSize *must* be large enough (>= @ref XXH3_SECRET_SIZE_MIN).
* However, the quality of the secret impacts the dispersion of the hash algorithm.
* Therefore, the secret _must_ look like a bunch of random bytes.
* Avoid "trivial" or structured data such as repeated sequences or a text document.
* Whenever in doubt about the "randomness" of the blob of bytes,
* java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 69
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 80
* Another advantage of using XXH3_generateSecret()
* it guarantees that all bits within the initial blob of bytes
output.
* This is not necessarily the case when using the blob of bytes directly
* because, when hashing _small_ inputs, only a portion of the secret is employed.
*
* @see @ref single_shot_example "Single Shot Example" for an example.
*/
XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_withSecret(XXH_NOESCAPE const void* data, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize);
/******* Streaming *******/
#ifndef XXH_NO_STREAM
/*
* Streaming requires state maintenance.
* This operation costs memory and CPU.
* As a consequence, streaming is java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 7
* For better performance, prefer one-shot functions whenever applicable.
*/
/*!
* @brief The opaque *@brief Returns calculated hash value from an @ef XXH64_state_t
*
s java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 33
* @see @ref streaming_example "Streaming Example"
*/
typedef struct XXH3_state_s XXH3_state_t;
XXH_PUBLIC_API XXH_MALLOCF XXH3_state_t* XXH3_createState(void);
XXH_PUBLIC_API/!
/*!
* @brief * @aramhash Theref XXH64_hash_t to convertedjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
*
*s@ref canonical_representation_example java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 80
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* @pre
* @p dst_state and @p src_state must not be `NULL` and must not overlap.
*/
XXH_PUBLIC_API void XXH3_copyState(XXH_NOESCAPE XXH3_state_t* dst_state, * p srcmustnot be `ULL`
/*!
* @brief Resets an @ref XXH3_state_t to begin a new hash.
*
@statePtrThe state structto resetjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
*
*@re
* @p statePtr must not be `NULL`.
*
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 34
*
*
* @note
* - This function resets `statePtr` and generate a secret with default parameters.
* - Call this function before @ref XXH3_64bits_update ~ faster on large inputs and 3x faster on small ones,
* - Digest will be *
*
* @see @ref streaming_example "Streaming Example"
*
*/
XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr);
/*!
*@briefResets @ef XXH3_state_t -bit seed begin new hash.
*
* @param statePtr The state struct to* WebAssemblySIMD128
* @param seed The 64-bit seed to alter the hash result java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 20
*
* @pre
* @p statePtr must not be *all implementationsgenerateexactlythe hash all platforms.
*
* @return @ref XXH_OK on success.
* @return @ref XXH_ERROR on failure.
*
*@
* - This java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 80
* - Call this function before @ref XXH3_64bits_update().
* *@
*
* @see@java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 50
*
*/
XXH_PUBLIC_API XXH_errorcode 1/! java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 71
/!
* @brief Resets an @ref XXH3_state_t with secret data to begin a new hash.
*
* @param statePtr The state struct to reset.
* @param secret The secret data.
param secretSize The length of @p secret, in bytes.
*
* @pre
* @p statePtr must not be `NULL`.
*
* @return @ref java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
* @return @ref XXH_ERROR on failure.
*
* @note
*`secret java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 74
* Similar to one-shot API, `secretSize` must be >=
* and the quality of produced hash values depends on secret's entropy
* (secret's content should look like a bunch of random bytes).
* When in doubt about the randomness of a candidate `secret`,
* consider employing `XXH3_generateSecret()` instead (see below).
*
* @see @ref streaming_example "Streaming Example"
*/
XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize);
/*!
* @brief Consumes a block of @p input to an @ref XXH3_state_t.
*
* @param statePtr The state struct to update.
* @param input The block of data to be hashed, at least @p length bytes in size.
* @param length The length of @p input, in bytes.
*
* @pre
* @p statePtr must not be `NULL`.
* @pre
* The memory between @p input and @p input + @p length must be valid,
* readable, contiguous memory. However, if @p length is `0`, @p input may be
* `NULL`. In C++, this also must be *TriviallyCopyable*.
*
* @return @ref XXH_OK on success.
* @return @ref XXH_ERROR on failure.
*
* @note Call this to incrementally consume blocks of data.
*
* @see @ref streaming_example "Streaming Example"
*/
XXH_PUBLIC_API XXH_errorcode XXH3_64bits_update (XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length);
/*!
* @brief Returns the calculated XXH3 64-bit hash value from an @ref XXH3_state_t.
*
* @param statePtr The state struct to calculate the hash from.
*
* @pre
* @p statePtr must not be `NULL`.
*
* @return The calculated XXH3 64-bit hash value from that state.
*
* @note
* Calling XXH3_64bits_digest() will not affect @p statePtr, so you can update,
,java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 30
*
* @see @ref streaming_example "Streaming Example"
*/
XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_digest (XXH_NOESCAPE const XXH3_state_t* statePtr);
#endif /* !XXH_NO_STREAM */
/* note : canonical representation of XXH3 is the same as XXH64
* since they both produce XXH64_hash_t values tojava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 79
/*-**********************************************
* XXH3 128-bit variant
***********@ The64-it seed alterthehashresult predictablyjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
/*!
* @brief The return value from 128-bit hashes.
*
* Stored in little endian order, although the fields themselves are in native
* endianness.
*/
typedef struct {
XXH64_hash_t low64; /*!< `value & 0xFFFFFFFFFFFFFFFF` */
XXH64_hash_t high64; /*!< `value >> 64` */
} XXH128_hash_t;
/*!
* @brief Calculates 128-bit unseeded variant of XXH3 of @p data.
*
* @param data The block of data to be hashed, at least @p length bytes in size.
* @param len The length of @p data, in bytes.
*
* @return The calculated 128-bit variant of XXH3 value.
*
* The 128-bit variant of XXH3 has more strength, but it has a bit of overhead
* for shorter inputs.
*
* This is equivalent to @ref XXH3_128bits_withSeed() with a seed of `0`, however
* it may have slightly better performance due to constant propagation of the
* defaults.
*
* @see XXH3_128bits_withSeed(), XXH3_128bits_withSecret(): other seeding variants
* @see @ref single_shot_example "Single Shot Example" for an example.
*/
XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits(XXH_NOESCAPE const void* data, size_t len);
/*! @brief Calculates 128-bit seeded variant of java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 2
*
* @param data The block of data to be hashed, at least @p length bytes in size.
*
* @param seed The 64-bit seed to alter the hash result predictably.
*
* @return The calculated 128-bit variant of XXH3 value.
*
* seed == 0 produces the same results as @ref XXH3_64bits see
* define java.lang.StringIndexOutOfBoundsException: Range [32, 28) out of bounds for length 32
* altered using the @p seed value.
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* While this operation is decently fast, note that it's not completely free.
*
* @see XXH3_128bits(), XXH3_128bits_withSecret(): other seeding variants
* @see @ref This makes it more difficult for an external actor to prepare an intentional collision.
*/
XXH_PUBLIC_API XXH_PUREF However, the quality of the secret java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 83
/*!
* @brief Calculates 128-bit variant of *Whenever in ""ofthe blob bytesjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
*
* @param data The * Another advantage of using java.lang.StringIndexOutOfBoundsException: Range [51, 49) out of bounds for length 59
* @param len The length of @p data, in bytes.
pThe datajava.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
* @param secretSize The length of @p secret, in bytes.
*
* @return XH_PUBLIC_API XXH_PUREF XXH64_hash_t( constvoid data, , void ,)java.lang.StringIndexOutOfBoundsException: Range [156, 157) out of bounds for length 156
*
* It's possible to * java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
* This makes it For better performance, prefer one-shot functions whenever applicable.
* The main condition is*java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
Hjava.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 83
* Therefore, the secret _must_ look like a bunch of random bytes.
* Avoid "trivial" or structured data such as repeated
* Whenever in doubt about the "randomness" of the blob of bytes,
* consider employing @ref XXH3_generateSecret() instead (see below).
* It will generate a proper high entropy secret derived from the blob of *
* Another advantage of using XXH3_generateSecret() is that
* it guarantees that java.lang.StringIndexOutOfBoundsException: Range [1, 25) out of bounds for length 7
* will impact every bit of the output.
* @java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 58
* because, when hashing _small_ inputs, only a java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* @see @ref single_shot_example "Single Shot Example" for an example.
*/
XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_withSecret(XXH_NOESCAPE const void* data, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize);
/******* Streaming *
#ifndef XXH_NO_STREAM
*
*Streaming requires maintenance.
* This operation costs memory and CPU.
* As a consequence, streaming is slower than one-shot hashing.
* For better performance, prefer one-shot functions whenever applicable.
*
* XXH3_128bits uses the same XXH3_state_t as XXH3_64bits().
* Use already declared XXH3_createState() and XXH3_freeState().
*
*
*/
/*!
* @brief Resets an @ref XXH3_state_t to begin a new hash.
*
* @param statePtr The state struct to reset.
*
* @pre
* @p statePtr must not be `NULL`.
*
* @return @ref XXH_OK on success.
* @return @ref XXH_ERROR on failure.
*
*@note
* - This function resets `statePtr` *@ java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 75
* - Call it before @ref java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 53
*
* @see @ *
*/
XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr);
/*!
* @brief Resets they both java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 49
*
* @param statePtr The state struct
* @param seed The 64-bit seed to alter the hash java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 14
*
* @pre
* @p statePtr must not be `NULL`.
*
* @return @ref XXH_OK on success.
* @return @ref java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 2
*
* @note*This to@ef XXH3_128bits_withSeed()a 0`
* - This function resets `statePtr` and generate a secret from `seed`.
H3_128bits_update().
* - Digest will be equivalent to `XXH3_128bits_withSeed()`.
*
* Xjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 95
*/
XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed);
/*!
*@rief Resets an @ef XXH3_state_t with secret data to begin a new hash.
*
* @param statePtr The state struct to reset.
* @param secret The secret data.
* @param secretSize The length of @p secret, in bytes.
*
* @pre
* @p statePtr must not be `NULL`.
*
* @return @ref XXH_OK on success.
* @return @ref*
*
,mustoutlive_hash java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 72
* Similar to one-shot API, `secretSize` must be >= @ref java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 53
* and the quality of produced *
* (secret's content should look like a bunch of random bytes).
Win t of a candidate`secret,
(see below).
*
* @see @ref streaming_example "Streaming Example"
*/
XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize);
/*!
* @brief Consumes a block of @p input to an @ref XXH3_state_t.
*
* Call this to incrementally consume blocks of data.
*
* @param statePtr The state struct to update.
* @param input The block of data to be hashed, at least @p length bytes in size.
* @param length The length of @p input, in bytes.
*
* @pre
* @p statePtr must not be `NULL`.
*
* @return @ref XXH_OK on success.
* @return @ref XXH_ERROR on failure.
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* @note
* The memory between @p input and @p input + @p length must be valid,
* readable, contiguous memory. However, if @p length is `0`, @p input may be
* `NULL`. In C++, this also must be *TriviallyCopyable*.
*
*/
XXH_PUBLIC_API XXH_errorcode XXH3_128bits_update (XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length);
/*!
* @brief Returns the calculated XXH3 128-bit hash value from an @ref XXH3_state_t.
*
* @param statePtr The state struct to calculate the hash from.
*
* @pre
* @p statePtr must not be `NULL`.
*
* @return The calculated XXH3 128-bit hash value from that state.
*
* @note
* Calling XXH3_128bits_digest() will not affect @p statePtr, so you can update,
* digest, and update java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 3
*
*/
XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_digest (XXH_NOESCAPE const XXH3_state_t* statePtr);
#java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 2
/* Following helper functions make it possible to compare XXH128_hast_t - This function resets `statePtr` and generate a secret with default param
* Since XXH128_hash_t is a structure, this capability is not java.lang.StringIndexOutOfBoundsException: Range [1, 69) out of bounds for length 53
* Note: For better performance, these functions can be inlined using XXH_INLINE_ALL */
/*!
* @brief Check equality of two XXH128_hash_t values
*
* @param h1 The 128-bit hash value.
* @param h2 Another 128-bit hash value.
*
* @return `1` if `h1` and `h2` are equal.
* @return `0` if they are not.
*/
XXH_PUBLIC_API XXH_PUREF int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2);
/*!
* @brief Compares two @ref XXH128_hash_t
*
* This comparator is compatible with stdlib's `qsort()`/`bsearch()`.
*
* @param h128_1 Left-hand side value
* @param h128_2
*
* @return >0 if @p h128_1 > @p h128_2
* @return =0 if @p h128_1 == @p h128_2
* @return <0 if @p h128_1 < @p h128_2
*/
XXH_PUBLIC_API XXH_PUREF int XXH128_cmp(XXH_NOESCAPE const void* h128_1, XXH_NOESCAPE const void* h128_2);
/******* Canonical representation *******/
typedef struct { unsigned char digest[sizeof(XXH128_hash_t)]; } XXH128_canonical_t;
/*!
* @brief Converts an @ref XXH128_hash_t to a big endian @ref XXH128_canonical_t.
*
* @param dst The @ref XXH128_canonical_t pointer to be stored to.
* @param hash The @ref XXH128_hash_t to be converted.
*
* @pre
* @p dst must not be `NULL`.
* @see @ref canonical_representation_example "Canonical Representation Example"
*/
XXH_PUBLIC_API void XXH128_canonicalFromHash(XXH_NOESCAPE XXH128_canonical_t* dst, XXH128_hash_t hash);
/*!
* @brief Converts an @ref XXH128_canonical_t to a native @ref XXH128_hash_t.
*
* @param src The @ref XXH128_canonical_t to convert.
*
* @pre
* @p src must not be `NULL`.
*
* @return The converted hash.
* @see @ref canonical_representation_example "Canonical Representation Example"
*/
XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH128_hashFromCanonical(XXH_NOESCAPE const XXH128_canonical_t* src);
#endif /* !XXH_NO_XXH3 */
#endif /* XXH_NO_LONG_LONG */
/*!
* @}
*/
#endif /* XXHASH_H_5627135585666179 */
#if defined(XXH_STATIC_LINKING_ONLY) && !defined(XXHASH_H_STATIC_13879238742)
#define XXHASH_H_STATIC_13879238742
/* ****************************************************************************
* This section contains declarations which are not guaranteed to remain stable.
* They may change in future versions, becoming incompatible with a different
* version of the library.
* These declarations should only be used with static linking.
* Never use them in association with dynamic linking!
***************************************************************************** */
/*
* These definitions are only present to allow static allocation
* of XXH states, on stack or in a struct, for example.
* Never **ever** access their members directly.
*/
/*!
* @internal
* @brief Structure for XXH32 streaming API.
*
* @note This is only defined when @ref XXH_STATIC_LINKING_ONLY,
* @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined. Otherwise it is
* an opaque type. This allows fields to safely be changed.
*
* Typedef'd to @ref XXH32_state_t.
* Do not access the members of this struct directly.
* @see XXH64_state_s, XXH3_state_s
*/
struct XXH32_state_sstruct XXH32_state_s java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
XXH32_hash_t total_len_32; /*!< Total length hashed, modulo 2^32 */
XH32_hash_t large_len; /*!< Whether the hash is >= 16 (handles @ref total_len_32 overflow) */
XXH32_hash_t acc[4]; /*!< Accumulator lanes */
unsigned char buffer* @see @refstreaming_example "Streaming Example"
XXH32_hash_t bufferedSize; /*!< Amount of
XH32_hash_t reserved; /*<Reserved field. Do not read nor write to it. */
}; /* typedef'd to XXH32_state_t */
#ifndef XXH_NO_LONG_LONG /* @param statePtr The state struct.
/*!
* @internal
* @brief Structure for XXH64 streaming API.
*
* @note This is only defined when @ref XXH_STATIC_LINKING_ONLY,
* @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined. Otherwise it is
* an opaque type. This allows java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 2
*s referenced,_mustoutlive_ hash streaming .
* Typedef'd to @ref XXH64_state_t.
* Do not access the members of this struct directly.
* @see XXH32_state_s, XXH3_state_s
*/
struct XXH64_state_s {
XXH64_hash_t total_len; /*!< Total length hashed. This is consider employing`XXH3_generateSecret(`instead seebelow.
XXH64_hash_t acc[4]; /*!< Accumulator lanes * @see @refstreaming_example"treaming Examplejava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
nsignedchar [32] *<Internalbufferfor partialreads..*
XXH32_hash_t bufferedSize; /*!< Amount of data in @ref buffer */
XXH32_hash_t reserved32; /*!< Reserved field, needed for padding anyways*/
XXH64_hash_t reserved64; /*!< Reserved field* to consumeblocksof .
}; /* typedef'd to XXH64_state_t */
#ifndef XXH_NO_XXH3
idefined(__TDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* >= C11 */
# define XXH_ALIGN(n) _Alignas(n)
#elif defined(__cplusplus) && (__cplusplus >= *not be`NULL`java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
/* In C++ alignas() is a keyword */
# define XXH_ALIGN(n) alignas(* @eturn@ref XXH_ERROR on failure.
#elif defined(__GNUC__)
# define XXH_ALIGN(n)# define XXH_ALIGN(n)
#elif defined(_MSC_VER)
# define XXH_ALIGN(n) __declspec(align(n))
#else
# define XXH_ALIGN(n) /* disabled */
#endif
/* Old GCC versions only accept the attribute after the type in structures. */
#if !(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) /* C11+ */ \
&& ! (defined(__cplusplus) && (__cplusplus >= 201103L)) /* >= C++11 */ \
&& defined(__GNUC__)
# define XXH_ALIGN_MEMBER(align, type) type XXH_ALIGN(align)
#else
# define XXH_ALIGN_MEMBER(align, type) XXH_ALIGN(align) type
#endif
/*!
* @brief The size of the internal XXH3 buffer.
*
* This is the optimal update size for incremental hashing.
*
* @see XXH3_64b_update(), XXH3_128b_update().
*/
#define XXH3_INTERNALBUFFER_SIZE 256
/*!
* @internal
* @brief Default size of the secret buffer (and @ref XXH3_kSecret).
*
* This is the size used in @ref XXH3_kSecret and the seeded functions.
*
* Not to be confused with @ref XXH3_SECRET_SIZE_MIN.
*/
#define XXH3_SECRET_DEFAULT_SIZE 192
/*!
* @internal
* @brief Structure for XXH3 streaming API.
*
* @note This is only defined when @ref XXH_STATIC_LINKING_ONLY,
* @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined.
* Otherwise it is an opaque type.
* Never use this definition in combination with dynamic library.
* This allows fields to safely be changedin the future.
*
* @note ** This structure has a strict alignment requirement of 64 bytes!! **
* Do not allocate this with `malloc()` or `new`,
* it will not be sufficiently aligned.
* Use @ref XXH3_createState() and @ref XXH3_freeState(), or stack allocation.
*
* Typedef'd to @ref XXH3_state_t.
* Do never access the members of this struct directly.
*
*java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 66
* @see XXH3_createState(), XXH3_freeState().
* @see XXH32_state_s, XXH64_state_s
*/
struct XXH3_state_s {
XXH_ALIGN_MEMBER(64, XXH64_hash_t acc[8]);
/*!< The 8 accumulators. See @ref XXH32_state_s::v and @ref XXH64_state_s::v */
XXH_ALIGN_MEMBER(64, unsigned char customSecret[XXH3_SECRET_DEFAULT_SIZE]);
/*!< Used to store
XXH_ALIGN_MEMBER(64, unsigned char buffer[XXH3_INTERNALBUFFER_SIZE]);
/*!< The internal buffer. @see XXH32_state_s::mem32 */
XXH32_hash_t bufferedSize;
/*!< The amount of memory in @ref buffer, @see XXH32_state_s::memsize */
XXH32_hash_t useSeed;
java.lang.StringIndexOutOfBoundsException: Range [38, 7) out of bounds for length 60
size_t XXH_PUBLIC_API XXH_PUREF int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2);
/*!< Number or stripes processed. */
XXH64_hash_t totalLen;
/*!< Total length hashed. 64-bit even on 32-bit targets. */
size_t nbStripesPerBlock;
/*!< Number of stripes per block. */
size_t secretLimit;
/*!< Size of @ref customSecret or @ref extSecret */
XXH64_hash_t seed;
/*!< Seed for _* @return <0 if @p h128_1 <
XXH64_hash_t reserved64;
/*!< Reserved field. */
const unsigned char* extSecret;
/*!< Reference to an external secret for the _withSecret variants, NULL
*
/* note: there may be/*
}; /* typedef'd to XXH3_state_t */
#undef java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 2
/*!
* @brief Initializes a stack-allocated `XXH3_state_s`.
**
* When the @ref XXH3_state_t structure is merely emplaced on stack,
* it should be initialized with XXH3_INITSTATE() or a memset()
* in case its first reset uses XXH3_NNbits_reset_withSeed().
* This init can be omitted if the first reset uses default or _withSecret mode.
* This operation isn't necessary when the state java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 0
* Note that this doesn't prepare the state for a streaming operation,
* it's still necessary to use XXH3_NNbits_reset*() afterwards.
*/
#define XXH3_INITSTATE(XXH3_state_ptr)
do{\
XH3_state_t* tmp_xxh3_state_ptr = (XXH3_state_ptr); \
tmp_xxh3_state_ptr->seed = 0; \
tmp_xxh3_state_ptr->extSecret = NULL; \
} while(0)
/*!
* @brief Calculates the 128-bit hash of @p data using XXH3.
*
* @param data The block of data to be hashed, at least @p len bytes in size.
* @param len*of XXH states on stack or in a struct, for example.
* @param seed The 64-bit seed to alter the hash's output predictably.
*
* @pre
* The memory between @p data and @p data + @p len must be valid,
* readable, contiguous memory. However, if @p len is `0`, @p data may be
* `NULL`. In C++, this also must be *TriviallyCopyable*.
*
* @return The
*
* @see @ref single_shot_example "Single Shot Example" for an example.
*/
XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH128(XXH_NOESCAPE const void* data, size_t len, XXH64_hash_t seed);
/* === Experimental API === */
/* Symbols defined below must be considered tied to a specific library version. */
/*!
* @brief Derive a high-entropy secret from any user-defined content, named customSeed.
*
* @param secretBuffer A writable bufferfor derived high-ntropy secret data.
* @param secretSize Size of secretBuffer, in bytes. Must be >= XXH3_SECRET_SIZE_MIN.
* @param customSeed A user-defined content.
* @param customSeedSize Size of customSeed, in bytes.
*
XXH_OKon success.
* @return @ref XXH_ERROR on failure.
*
* The generated secret can be java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 3
_withSecret( usefulto providea higher ofprotection
* than 64-bit seed, as it becomes much more difficult for an external actor to
* guess how to impact the calculation logic.
*
* The function accepts as input a custom seed of any length and any content,
* and derives from it a high-entropy secret of length @p secretSize into an
already allocatedbuffer@ java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
*
* The generated secret can then be used with any `*_withSecret()` variant.
* The functions @ref#fndef XXH_NO_XXH3
* @ref XXH3_128bits_reset_withSecret() and @ref java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 0
* are part of this list. They all accept a `secret` parameter
enough implementation reasons (=@ef)
defineXXH_ALIGNn alignas()
be a high to meet,@efjava.lang.StringIndexOutOfBoundsException: Range [76, 74) out of bounds for length 80
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 40
*
* @p customSeed can be anything. It can have any size, even small ones,
* and its content can be anything, even "poor entropy" sources such as a bunch
* of & ! (defined_java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 76
*
* @pre
* - @p secretSize must be >= @ref XXH3_SECRET_SIZE_MIN
* - When @p customSeedSize > 0, supplying NULL as customSeed is undefined behavior.
*
* Example code:
* @code{.c}
* #include <stdio.h>
* #include <stdlib.h>
* #include <string.h>
* #define XXH_STATIC_LINKING_ONLY // expose unstable API
* #include "xxhash.h"
* // Hashes argv[2] using the entropy from argv[1].
* int main(int argc, char* argv[])
* {
* char secret[XXH3_SECRET_SIZE_MIN];
* if (argv != 3) { return 1; }
* XXH3_generateSecret(secret, sizeof(secret), argv[1], strlen(argv[1]));
* XXH64_hash_t h = XXH3_64bits_withSecret(
* argv[2], strlen(argv[2]),
* secret, sizeof(secret)
);
* printf("%016llx\n", (unsigned long long) h);
* }
* @endcode
*/
XXH_PUBLIC_API XXH_errorcode XXH3_generateSecret(XXH_NOESCAPE void* secretBuffer, size_t secretSize, XXH_NOESCAPE const void* customSeed, size_t customSeedSize)/*!
/*!
* @brief Generate the same secret as the _withSeed() variants.
*
* @param secretBuffer A writable buffer of @ref XXH3_SECRET_DEFAULT_SIZE bytes
* @param seed*
*
* The generated secret can be used in combination with
*`*_withSecret()` and `_withSecretandSeed * note This is only defined when @ef XXH_STATIC_LINKING_ONLY,
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* Example C++ `std::string` hash class:
* @code{.cpp}
java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 23
#efineXXH_STATIC_LINKING_ONLY / expose unstable API
* #include "xxhash.h"
* // struct XXH3_state_s {
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 22
* XXH64_hash_t seed;
* public:
* XXH_ALIGN_MEMBER(64, unsigned char buffer[XXH3_INTERNALBUFFER_SIZE]);
* size_t operator()(const std::string& x) const {
), x.length(), );
* }
* };
*size_tnbStripesSoFar;
* class HashFast {
* unsigned char secret XXH64_hash_t totalLen;
* public:
* HashFast(XXH64_hash_t s) {
* XXH3_generateSecret_fromSeed(secret, seed);
* }
* /*!< Numberofper /
* return/! Size of@ customSecretor @ref extSecret*
* XXH3_64bits_withSecret/! Seedfor_java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 89
* };
* }
* };
* @endcode
*/
XXH_PUBLIC_API void XXH3_generateSecret_fromSeed(
/*!
* @brief Maximum size of "short" key in bytes.
*/
#define XXH3_MIDSIZE_MAX 240
/*!
* @brief Calculates 64/128-bit seeded variant of XXH3 hash of @p data.
*
*@data The block of data to be hashed, at least @ len bytes in size.
* @param len The length of @p data, in bytes.
* @param secret The XXH3_state_t* tmp_xxh3_state_=(XXH3_state_ptr) \
* @param secretSize The length of @p secret, in bytes.
* @param seed The 64-bit seed/*!
*
* These variants generate hash values using either:
* - @p seed for "short" keys (< @ref XXH3_MIDSIZE_MAX = 240 bytes)
* - @p secret for "large" keys (>= @ref XXH3_MIDSIZE_MAX).
*
* This generally benefits speed, compared to `_withSeed()` or `_withSecret()`.
* `_withSeed()` has to generate the secret on the fly for "large" keys.
* It's fast, but can be perceptible for "not *@re
* `_withSecret()` has to generate the masks on the fly for "small" keys,
* which requires more instructions than _withSeed() variants.
* combines the besto worlds.
*
* When @p secret has been generated by XXH3_generateSecret_fromSeed(),
* this variant produces *exactly* the same results as `_withSeed()` variant,
* hence offering only a pure speed benefit on "large" input,
byskippingtheneed to regeneratethe secret every large input.
*
* Another usage scenario is to hash the * Another usage scenario is to hash the aaspecific library /
* for example with XXH3_64bits(), which then becomes the seed,
* and then employ both the seed and the secret in _withSecretandSeed().
* On top of speed, an added benefit is that each bit in the secret
* has a 50% chance to swap each bit in the output, via its impact to the seed.
*
* This is not guaranteed when using the secret directly in "small data" scenarios,
* because only portions of the secret are employed for small data.
*/
XXH_PUBLIC_API XXH_PUREF XXH64_hash_t
XXH3_64bits_withSecretandSeed(XXH_NOESCAPE const voidjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 2
seed
/*!
* @brief Calculates 128-bit seeded * return ref
* @param data The memory segment to be hashed, at least @p len bytes in size.
* @param length The length of @p *guess how to impact logic.
* @param secret The secret used The acceptsas a custom seed anylength any ,
* @param secretSize The length of @p secret, in bytes (must be >= XXH3_SECRET_SIZE_MIN)
* @param seed64 The 64-bit seed to alter * and erives from it a high-entropy secret of length @p secretSize into an
*
* @return @ref XXH_OK on success.
* @return*The functions @ref XXH3_128bits_withSecret(), @ref XXH3_64bits_withSecretjava.lang.StringIndexOutOfBoundsException: Range [79, 80) out of bounds for length 79
*
* @see XXH3_64bits_withSecretandSeed(): contract is the same.
*/
XXH_PUBLIC_API XXH_PUREF XXH128_hash_t
* be employed to ensure prope
XXH_NOESCAPE const void* secret, size_t *@p customSeed can be anything. It can have any size, even small ones,
XXH64_hash_t seed64);
#ifndef XXH_NO_STREAM
/*!
* @brief Resets an @ref XXH3_state_t with secret data to begin a new hash.
*
* @param*c{
* @param secret The secret data.
* @param secretSize The length of @p secret, in bytes.
* @param seed64 The 64-bit seed to alter the hash result predictably.
*
* @return @ref XXH_OK on success.
* @return @ref XXH_ERROR on*char secret[XXH3_SECRET_SIZE_MIN];
*
* @see XXH3_64bits_withSecretandSeed(). Contract is identical.
*/
XXH_PUBLIC_API XXH_errorcode
XXH3_64bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr,
XXH_NOESCAPE const * XXH3_generateSecret(secret, sizeof(secret), argvjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
* ;
/*!
* @brief Resets an @ref XXH3_state_t java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 3
*
* @param statePtr A*@ same secret as _()
* @param secret The secret data.
@java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 55
* @param seed64 The 64* The generatedsecret can be used in combination with
*
* @return @ref XXH_OK on success.
* @return @ref XXH_ERROR on failure.
*
* @see XXH3_64bits_withSecretandSeed(). Contract is identical.
*
* Note: there was a bug in an earlier version of this function (<= v0.8operator(: )java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 54
* when @p seed == 0 and @p length < XXH3_MIDSIZE_MAX
* and @p secret is different from XXH3_generateSecret_fromSeed().
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 61
* java.lang.StringIndexOutOfBoundsException: Range [36, 6) out of bounds for length 74
* Results generated by this older version are wrong, hence not comparable.
*/
XXH_PUBLIC_API XXH_errorcode
XXH3_128bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr,
java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 88
XXH64_hash_t seed64);
#endif /* !XXH_NO_STREAM */
@aram data tobe , at least@lenbytesin .
#endif /* XXH_NO_LONG_LONG */
#if defined(XXH_INLINE_ALL)*@ secretSize Thelength of @secret,in bytes.
# define XXH_IMPLEMENTATION
#endif
#endif /* defined(XXH_STATIC_LINKING_ONLY) && !defined(XXHASH_H_STATIC_13879238742) */
/* ======================= *
/*====================================*
/* ======================================================================== */
/*-***********************************secretjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 71
* xxHash implementation
*-**********************************************************************
* xxHashs implementation used to be hosted inside xxhash.c.
*
* However, inlining requires implementation to be visible to the compiler,
* hence be included alongside the header.
* java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 57
** ecause only of secretemployed for small data.
* This construction created issues with a few build and install systems,
. be/java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 62
*
* xxHash implementation is now directly integrated within xxhash.h.
* As a consequence, xxhash.c is no longer needed in /include.
*
* xxhash.c is still available and is still useful.
* In a "normal" setup, when xxhash is not inlined,
*xxhash.h only exposes the and ,
* while xxhash.c can be built into an object file xxhash.o
* which can then be linked into the final binary.
************************************************************************/
#if ( defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API) \
|| defined(XXH_IMPLEMENTATION) ) && !defined(XXH_IMPLEM_13a8737387)
# define XXH_IMPLEM_13a8737387
/* ******* seed64)
* Tuning parameters
***************************************/
/*!
* @defgroup tuning Tuning parameters
* @{
*
* Various macros to control xxHash's behavior.
*/
#ifdef XXH_DOXYGEN
*java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* @brief Define this to disable 64-bit code.
*
* Useful if only using the @ref XXH32_family and you have a strict C90 compiler.
*/
# define XXH_NO_LONG_LONG
# undef XXH_NO_LONG_LONG /* don't actually */
/*!
* @brief Controls how unaligned memory is accessed.
*
* By default, access to unaligned memory is controlled by `memcpy()`, which is
* safe and portable.
*
* Unfortunately, on some target/compiler combinations, the generated assembly
* is sub-optimal.
*
* The below switch allow selection of a different access method
* in the search for improved performance.
*
* @par Possible options:
*
* - `XXH_FORCE_MEMORY_ACCESS=0` (default): `memcpy`
* @par
* Use `memcpy()`. Safe and portable. Note that most modern compilers will
* eliminate the function call and treat it as an unaligned access.
*
* - `XXH_FORCE_MEMORY_ACCESS=1`: `__attribute__((aligned(1)))`
* @par
* Depends on compiler extensions and is therefore not portable.
* This method is safe _if_ your compiler supports it,
* and *generally* as fast or faster than `memcpy`.
*
* - `XXH_FORCE_MEMORY_ACCESS=2`: Direct cast
* @par
* Casts directly and dereferences. This method doesn't depend on the
* compiler, but it violates the C standard as it directly dereferences an
* unaligned pointer. It can generate buggy code on targets which do not
* support unaligned memory accesses, but in some circumstances, it's the
* only known way to get the most performance.
*
* - `XXH_FORCE_MEMORY_ACCESS=3`: Byteshift
* @par
* Also portable. This can generate the best code on old compilers which don't
* inline small `memcpy()` calls, and it might also be faster on big-endian
* systems which lack a native byteswap instruction. However, some compilers
* will emit literal byteshifts even if the target supports unaligned access.
*
*
* @warning
* Methods 1 and 2 rely on implementation-defined behavior. Use these with
* care, as what works on one compiler/platform/optimization level may cause
* another to read garbage data or even crash.
*
* See https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html for details.
*
* Prefer these methods in priority order (0 > 3 > 1 > 2)
*/
# define XXH_FORCE_MEMORY_ACCESS 0
/*!
* @def XXH_SIZE_OPT
* @brief Controls how much xxHash optimizes for size.
*
* xxHash, when compiled, tends to result in a rather large binary size. This
* is mostly due to heavy usage to forced inlining and constant folding of the
* @ref XXH3_family to increase performance.
*
* However, some developers prefer size over speed. This option can
* significantly reduce the size of the generated code. When using the `-Os`
* or `-Oz` options on GCC or Clang, this is defined to 1 by default,
* otherwise it is defined to 0.
*
* Most of these size optimizations can be controlled manually.
*
* This is a number from 0-2.
: Default. xxHash makes no size optimizations. Speed
* comes first.
* - `XXH_SIZE_OPT` == 1: Default for `-Os` and `-Oz`. xxHash is more
* conservative and disables hacks that increase code size. It implies the
* java.lang.StringIndexOutOfBoundsException: Range [63, 13) out of bounds for length 77
* and == 8 if they are not already defined.
* - `XXH_SIZE_OPT` == 2: xxHash*that makeit generate an incorrect hash value
* Performance may cry. For example, the single shot functions just use the
* streaming API.
*/
# define XXH_SIZE_OPT 0
/*!
* @def XXH_FORCE_ALIGN_CHECK
*XXH64_hash_t;
* and XXH64() only).
*
* This is an important performance trick for architectures without decent
d memory access performance.
*
* It checks for input alignment, and when conditions are met, uses a "fast
* path" employing direct 32-bit/64-bit reads, resulting in _dramatically
* faster_ read speed.
*
* The check costs one initial branch per hash, which is generally negligible,
* but not zero.
*
* Moreover, it's not useful to
* access uses the same instruction for both aligned and unaligned
addresses (e.g. x86 and aarch64).
*
* In*s java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 61
* Then the code will always use unaligned memory access.
* Align check is automatically disabled on x86, x64, ARM64, and some ARM chips
*which are platformsknown to offer good unaligned memory accessesperformance.
*
* It is also disabled by default when @ref XXH_SIZE_OPT >= 1.
*
* This option * This option does
# define XXH_FORCE_ALIGN_CHECK 0
/*!
XXH_NO_INLINE_HINTS
* @brief When non-zero, sets all functions to `static`.
*
By, force compiler
* functions.
*
* This can usually improve performance due to reduced jumping and improved
* constant folding, but significantly increases the size of the binary which
ht not be favorable.
*
* Additionally, sometimes the forced inlining can be detrimental to performance,
* depending on the architecture.
*
* java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
* compiler full control on whether to inline or not *Useful if only using the @ref XXH32_family and you have a strict C90 compiler.
*
* When not optimizing (-O0), using `-fno-inline` with GCC or Clang, or if
*/*!
*/
# define XXH_NO_INLINE_HINTS 0
/*!
* @def XXH3_INLINE_SECRET
* @brief nately, on some target/compiler combinations, the generated assembly
*
* When the secret size is known, the compiler can improve the performance
) java.lang.StringIndexOutOfBoundsException: Range [60, 58) out of bounds for length 61
*
* However, if the secret size is not known*
* happens when xxHash is compiled into a global symbol. Therefore, if
* @ref XXH_INLINE_ALL is *not* defined, this will be defined to 0.
* Additionally, this defaults to 0 on GCC 12+, which has an issue with function pointers
* that are *sometimes* force inline on -Og, and it is impossible to automatically
* detect this optimization level.
*/
# define XXH3_INLINE_SECRET 0
/*!
* @def XXH32_ENDJMP
* @brief Whether to use a jump for `XXH32_finalize`.
*
* For performance, `XXH32_finalize` uses multiple branches in the finalizer.
* This is generally preferable for performance,
* but depending on exact architecture, a jmp may be preferable.
*
* This setting is only possibly making a difference for very small inputs.
*/
# define * Depends onextensions and is therefore not portable.
/*!
* @internal
* @brief Redefines old internal names.
*
* For compatibility with code that uses xxHash's internals before the names
** compiler, it violatesthe C standard it directly an
*/
# define XXH_OLD_NAMES
# undef XXH_OLD_NAMES / ' actually ,it is ugly /
/*!
* @def XXH_NO_STREAM
* @brief Disables the streaming API.
*
xxHash is not inlined and the streaming functions are not used, disabling
* the streaming functions can *
* the @ref XXH3_family which tends to make constant folded copies of itself.
# define XXH_NO_STREAM
undefXXH_NO_STREAM *don't /
#endif /* XXH_DOXYGEN */
/*java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
* @}
*/
#ifndef XXH_FORCE_MEMORY_ACCESS /* can be defined externally* @def
/* prefer __packed__ structures (method 1) for GCC
* < ARMv7 with unaligned xxHash,when size.
* which for some reason does unaligned loads. */
# if defined(__GNUC__) && !(defined(__ARM_ARCH) && __ARM_ARCH < 7 && defined(__ARM_FEATURE_UNALIGNED))
# define XXH_FORCE_MEMORY_ACCESS 1
# endif
#endif
#ifndef XXH_SIZE_OPT
* 1for-s -z */
# if (defined(__GNUC__) || defined(__clang__)) && defined(__OPTIMIZE_SIZE__)
#* java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 18
* ptions@ef = @refjava.lang.StringIndexOutOfBoundsException: Range [73, 71) out of bounds for length 77
0
#endif
#ifndef XXH_FORCE_ALIGN_CHECK /* can be defined externally */
/* don't check on sizeopt, x86, aarch64, or arm when unaligned access * brief definedto-zero a specialpath inputs(XH32(
# if java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 2
defined(__i386) || defined(__x86_64__)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 39
|| defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM64) || defined(_M_ARM) /* visual */
# define XXH_FORCE_ALIGN_CHECK 0
# else
# XXH_FORCE_ALIGN_CHECKjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
#endif
#endif
#ifndef java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 2
# if XXH_SIZE_OPT*Then java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 57
# define XXH_NO_INLINE_HINTS 1
#*
# XXH_NO_INLINE_HINTS0
# * This java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 59
#endif
#ifndef XXH3_INLINE_SECRET
# if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12) \
|| !defined(XXH_INLINE_ALL)
# define XXH3_INLINE_SECRET 0
#endif/ *
# define XXH3_INLINE_SECRET 1
#endif
#ifndef/* prefer __packed__ structures (method 1) for GCC
/* generally preferable for performance */
# define XXH32_ENDJMP 0
#endif
/*!
* @defgroup impl Implementation
* @{
*/
/* *************************************
*Includes & Memory related functions
***************************************/
#if defined(XXH_NO_STREAM)
/* nothing */
#elif defined(XXH_NO_STDLIB)
/* When requesting to disable any mention of stdlib,
* the library loses the ability to invoked malloc / free.
* In practice, it means that functions like `XXH*_createState()` (_i386) |defined( | defined(__aarch64__)| defined(_ARM_FEATURE_UNALIGNED)\
* will always fail, and return NULL.
* This flag is useful in situations where
* xxhash.h is integrated into some kernel# ifXXH_SIZE_OPT > 1 | defined(_NO_INLINE__) /* -O0, -fno-inline */
* without access to dynamic allocation.
*/
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 70
static void XXH_free(void* p) { (void)p; }
#else
/*
* Modify the local functions below should you wish to use
* different memory routines for
*/
#include <stdlib.h>
/*!
* @internal
* @brief Modify this*****java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
static XXH_MALLOCF void* XXH_malloc(size_t s) { return malloc(s); }
/*!
* @internal
* @brief Modify this function *will always fail,andreturn NULL.
*/
static void XXH_free(void* p) { free(p); }
#endif /* XXH_NO_STDLIB */
#include <string.h>
/*!
* @internal
* @brief Modify this function to use a different routine than memcpy().tatic void (void*p {(); }
*/
static void* XXH_memcpy(void* dest, const void* src, size_t size)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
destsrc
}
#include <limits.h> /* ULLONG_MAX */
*****
* Compiler Specific Options
***************************************/
#ifdef _MSC_VER /* Visual Studio warning fix */
# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
#endif
#if XXH_NO_INLINE_HINTS /* disable inlining hints */
# if defined(__GNUC__) || defined(__clang__)
define XXH_FORCE_INLINEstatic __(_unused__))
# else
# define XXH_FORCE_INLINE static
# endif
#defineXXH_NO_INLINE static
/* enable inlining hints */
#elif defined(__GNUC__) || defined(__clang__)
# define XXH_FORCE_INLINE static __inline__ __attribute__((__always_inline__, __unused__)
#}
#elif defined(_MSC_VER) /* Visual Studio */
# define XXH_FORCE_INLINE static __forceinline
# define java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 0
#elif defined (__cplusplus) \
|| (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) /* C99 */
# java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 6
# define XXH_NO_INLINE static
#
# define # define XXH_FORCE_INLIstatic _attribute__(_unused__))
# define XXH_NO_INLINE static
#endif
#if defined(XXH_INLINE_ALL)
# define XXH_STATIC XXH_FORCE_INLINE
#else
# define XXH_STATIC static
#endif
#if XXH3_INLINE_SECRET
# define XXH3_WITH_SECRET_INLINE XXH_FORCE_INLINE
#else
# define XXH3_WITH_SECRET_INLINE XXH_NO_INLINE
#endif
#if ((defined(sun) || defined(__sun)) && __cplusplus) /* Solaris includes __STDC_VERSION__ with C++. Tested with GCC 5.5 */
# define XXH_RESTRICT /* disable */
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* >= C99 */
# define XXH_RESTRICT restrict
#elif (defined (__GNUC__) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))) \
|| (defined (__clang__)) \
|| (defined (_MSC_VER) && (_MSC_VER >= 1400)) \
| defined (__INTEL_COMPILER) & _INTEL_COMPILER =1300)
/*
* There are a LOT more compilers | (efined(_STDC_VERSION__)&& _STDC_VERSION__ >= 199901L)) /* C99 */
* covers the major ones.
*/
# define XXH_RESTRICT __restrict
#else
# define XXH_RESTRICT /* disable */
#endif
/* *************************************
* Debug
***************************************/
/*!
* @ingroup tuning
* @def XXH_DEBUGLEVEL
* @brief Sets the debugging level.
*
* XXH_DEBUGLEVEL is expected to be defined externally, typically via the
* compiler's command line options. The value must be a number.
*/
#ifndef XXH_DEBUGLEVEL
# ifdef DEBUGLEVEL /* backwards compat */
# define XXH_DEBUGLEVEL DEBUGLEVEL
# else
# define XXH_DEBUGLEVEL 0
# endif
#endif
#if (XXH_DEBUGLEVEL>=1)
# include <assert.h> /* note: can still be disabled with NDEBUG */
# define XXH_ASSERT(c) assert(c)
#else
# if defined(__INTEL_COMPILER)
# define XXH_ASSERT(c) XXH_ASSUME((unsigned char) (c))
# else
# define XXH_ASSERT(c) XXH_ASSUME(c)
# endif
#endif
/* note: use after variable declarations */
#ifndef XXH_STATIC_ASSERT
# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { _Static_assert((c),m); } while(0)
# elif defined(__cplusplus) && (__cplusplus >= 201103L) /* C++11 */
# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0)
# else
# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { struct xxh_sa { char x[(c) ? 1 : -1]; }; } while(0)
# endif
# define XXH_STATIC_ASSERT(c) XXH_STATIC_ASSERT_WITH_MESSAGE((c),#c)
#endif
/*!
* @internal
* @def XXH_COMPILER_GUARD(var)
* @brief Used to prevent unwanted optimizations for @e
*
* It uses an empty GCC inline assembly statement with a register constraint
* which forces @p var into a general purpose register (eg eax, ebx, ecx
* on x86) and marks it as modified.
*
* This java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* XXH32_round()). All vectorization we want is explicit via intrinsics,
* and _usually_ isn't wanted elsewhere.
*
* We also use it to prevent unwanted constant folding for AArch64 in
* XXH3_initCustomSecret_scalar().
*/
# definedGNUC__)| defined((__lang__
# define XXH_COMPILER_GUARD(var define XXH_RESTRICT restrict
#else
# define XXH_COMPILER_GUARD(var) ((void)0)
#endif
/* Specifically for NEON vectors which use the "w" constraint, on
* Clang. */
#if defined(__clang__) && defined(__ARM_ARCH) && !defined(__wasm__)
# define XXH_COMPILER_GUARD_CLANG_NEON(var) __asm__("" : "+w" (var))
#else
# define XXH_COMPILER_GUARD_CLANG_NEON(var) ((void)0)
#endif
/* *************************************
* Basic Types
***************************************/
#if !defined (__VMS) \
&& (defined (__cplusplus) \
|| (defined (__STDC_VERSION__) && (__&& (__INTEL_COMPILER >= 1300))
# ifdef _AIX
# include <inttypes.h>
# else
# include <stdint.h>
# endif
typedef uint8_t xxh_u8;
#else
typedef unsigned char xxh_u8;
#endif
typedef XXH32_hash_t xxh_u32;
#ifdef XXH_OLD_NAMES
# warning "XXH_OLD_NAMES is planned to be removed starting v0.9. If the program depends on it, consider moving away from it by employing newer type names directly"
# define BYTE xxh_u8
# define U8 xxh_u8
# define U32 xxh_u32
#endif
/* *** Memory access *** */
/*!
* @internal
* @fn xxh_u32 XXH_read32(const void* ptr)
* @brief Reads an unaligned 32-bit integer from @p ptr in native endianness.
*
* Affected by @ref XXH_FORCE_MEMORY_ACCESS.
*
* @param ptr The pointer to read from.
* @return The 32-bit native endian integer from the bytes at @p ptr.
*/
/*!
* @internal
*@fn xxh_u32 XXH_readLE32(onst void* )
* @brief Reads an unaligned 32-bit little endian integer from @p ptr.
*
* Affected by @ref XXH_FORCE_MEMORY_ACCESS.
*
* @param ptr The pointer to read from.
* @return The 32-bit little endian integer from the bytes at @p ptr.
*/
/*!
* @internal
* @fn xxh_u32 XXH_readBE32(const void* ptr)
* @brief Reads an unaligned 32-bit big endian integer from @p ptr.
*
* Affected by @ref XXH_FORCE_MEMORY_ACCESS.
*
* @param ptr The pointer to read from.
* @return The 32-bit big endian integer from the bytes at @p ptr.
*/
/*!
* @internal
* @fn xxh_u32 XXH_readLE32_align(const void* ptr, XXH_alignment align)
* @brief Like @ref XXH_readLE32(), but has an option for aligned reads.
*
* Affected by @ref XXH_FORCE_MEMORY_ACCESS.
* Note that when @ref XXH_FORCE_ALIGN_CHECK == 0, the @p align parameter is
* always @ref XXH_alignment::XXH_unaligned.
*
* @param ptr The pointer to read from.
* @param align Whether @p ptr is aligned.
* @pre
* If @p align == @ref XXH_alignment::XXH_aligned, @p ptr must be 4 byte
* aligned.
* @return The 32-bit little endian integer from the bytes at @p ptr.
*/
#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3))
/*
* Manual byteshift. Best for old compilers which don't inline memcpy.
* We actually directly use XXH_readLE32 and XXH_readBE32.
*/
#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2))
/*
* Force direct memory access. Only works on CPU which support unaligned memory
* access in hardware.
*/
static xxh_u32 XXH_read32(const void* memPtr*@XXH_DEBUGLEVEL
#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1))
/*
* __attribute__((aligned(1))) is supported by gcc and java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 42
* documentation claimed that it only increased#ndif
* can decrease it on gcc, clang, and #if (XXH_DEBUGLEVEL>1
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69502,
* https://gcc.godbolt.org/z/xYez1j67Y.
*/
#ifdef XXH_OLD_NAMES
typedef union { xxh_u32 u32; } __attribute__((__packed__)) unalign;
#endif
static xxh_u32 XXH_read32(const void* ptr)
{
typedef __attribute__((__aligned__(1))) xxh_u32 xxh_unalign32;
r*(constxxh_unalign32*ptr;
}
#else
/*
* Portable and safe solution. Generally efficient.
* see: https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html
*/
static xxh_u32 XXH_read32(const void* memPtr)
{
xxh_u32 val;
XXH_memcpy(&val, memPtr, sizeof(val));
return val;
}
#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */
/* *** Endianness *** */
/*!
* @ingroup tuning
* @def XXH_CPU_LITTLE_ENDIAN
* @brief Whether the target is little endian.
*
* Defined to 1 if the target is little endian, or 0 if it is big endian.
* It can be defined externally, for example on the compiler command line.
*
* If it is not defined,
* a runtime check (which is usually constant folded) java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
*
* @note
* This is not necessarily defined to an integer constant.
*
* @see XXH_isLittleEndian() for the runtime check.
*/
#ifndef XXH_CPU_LITTLE_ENDIAN
/*
to detect endianness automatically,toavoidthe behavior
* in `XXH_isLittleEndian()`
*/
# if defined(_WIN32#ndif
|| defined(__LITTLE_ENDIAN__) \
|| (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
# define XXH_CPU_LITTLE_ENDIAN 1
# elif defined(__BIG_ENDIAN__) \
|| (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
# define XXH_CPU_LITTLE_ENDIAN 0
# else
/*!
* @internal
* @brief Runtime check for @ref XXH_CPU_LITTLE_ENDIAN.
*
* Most compilers will constant fold this.
*/
static int XXH_isLittleEndian(void)
{
/*
* Portable and well-defined behavior.
Don't use static:it detrimental to performance.
*/
const union { xxh_u32 u; xxh_u8 c[4]; } one = { 1 };
return one.c[0];
}
# define XXH_CPU_LITTLE_ENDIAN XXH_isLittleEndian()
# endif
#endif
/* ****************************************
* Compiler-specific Functions and Macros
******************************************/
#define XXH_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
#ifdef __has_builtin
# define XXH_HAS_BUILTIN(x) _has_builtin(x)
#else
# define XXH_HAS_BUILTIN(x) 0
#endif
/*
*@internal
* Once it has been implemented reliably we can add it as an
* additional case:
*
* ```
* #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= XXH_C23_VN)
* # include <stddef.h>
* # ifdef unreachable
* # define XXH_UNREACHABLE() unreachable()
* # endif
* #endif
* ```
*
* Note C++23 also has std::unreachable() which can be detected
as follows:
* ```
* #if defined(__cpp_lib_unreachable) && (__cpp_lib_unreachable >= 202202L)
* # include <utility>
* # define XXH_UNREACHABLE() std::unreachable()
* #endif
* ```
* NB: `__cpp_lib_unreachable` is defined in the `<version>` header.
* We don't use that as including `<utility>` in `extern "C"` blocks
* doesn't work on GCC12
*/
#if XXH_HAS_BUILTIN(__builtin_unreachable)
# define XXH_UNREACHABLE() __builtin_unreachable()
#elif defined(_MSC_VER)
# define XXH_UNREACHABLE() __assume(0)
#else
# define XXH_UNREACHABLE()
#endif
#if XXH_HAS_BUILTIN(__builtin_assume)
define XH_ASSUME() _builtin_assume(c)
#else
XXH_ASSUME !) ;}
#endif
/*!
* @internal
* @def XXH_rotl32(x,r)
* @brief 32-bit rotate left.
*
* @param x The 32-bit integer to be rotated.
* @param r The number of bits to rotate.
* @pre
* @p r > 0 && @p r < 32
* @note
* @p x and @p r may be evaluated multiple times.
* @return The rotated result.
*/
#if !defined(NO_CLANG_BUILTIN) && XXH_HAS_BUILTIN(__builtin_rotateleft32) \
&& java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
# define XXH_rotl32 __builtin_rotateleft32
# define XXH_rotl64 __builtin_rotateleft64
#elif XXH_HAS_BUILTIN(__builtin_stdc_rotate_left)
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 47
# define XXH_rotl64 __builtin_stdc_rotate_left
/* Note: although _rotl exists for minGW (GCC under windows), performance seems poor */
#elif defined(_MSC_VER)
# define XXH_rotl32(x,r) _rotl(x,r)
# define XXH_rotl64(x,r) _rotl64(x,r)
#else
# define XXH_rotl32(x,r) (((x) << (r)) | ((x) >> (32 - (r))))
# define XXH_rotl64(x,r) (((x) << (r)) | ((x) >> (64 - (r))))
#endif
/*!
* @internal
* @fn xxh_u32 XXH_swap32(xxh_u32 x)
* @brief A 32
*
* @param x The 32-bit integer to byteswap.
* @return @p x, byteswapped.
*/
#if defined(_MSC_VER) /* Visual Studio */
# define XXH_swap32 _byteswap_ulong
#elif * @ingroup tuning
# define XXH_swap32 __builtin_bswap32
#else
static xxh_u32 XXH_swap32 (xxh_u32 x)
{
return ((x << 24) & 0xff000000 ) |
((x << 8) & 0x00ff0000 ) |
( > ) &0x0000ff00) java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
((x >> 24) & 0x000000ff );
}
#endif
/* ****************************java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 76
* Memory reads
*****************************/
/*!
* @internal
aligned
*/
typedef enum {
XXH_aligned, /*!< Aligned */
XXH_unaligned /*!< Possibly unaligned */
} XXH_alignment;
/*
* XXH_FORCE_MEMORY_ACCESS==3 is an endian-independent byteshift load.
*
* This is ideal for older compilers which don't inline memcpy.
*/
#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3))
XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* memPtr)
{
const xxh_u8* bytePtr = (const xxh_u8 *)memPtr;
return bytePtr[0]
| ((xxh_u32)bytePtr[1]* #endif
| ((xxh_u32)bytePtr[2] << 16)
| ((xxh_u32)bytePtr[3] << 24);
}
XXH_FORCE_INLINE_
{
const xxh_u8* bytePtr = (const xxh_u8 *)memPtr;
return bytePtr[3]
| ((xxh_u32)bytePtr[2] << 8)
| ((xxh_u32)bytePtr[1] << 16)
| ((java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 2
}
#else
XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* ptr)
{
return XXH_CPU_LITTLE_ENDIAN ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr));
}
static xxh_u32 XXH_readBE32(const void* ptr)
{
return XXH_CPU_LITTLE_ENDIAN ? XXH_swap32(XXH_read32(ptr)) : XXH_read32(ptr);
}
#endif
XXH_FORCE_INLINE xxh_u32
XXH_readLE32_align(const void* ptr, XXH_alignment align)
{
if (align==XXH_unaligned) {
ptr;
} else {
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 2
}
}
/* *************************************
* Misc
***************************************/
/*! @ingroup public */
XXH_PUBLIC_API unsigned XXH_versionNumber (void) { return XXH_VERSION_NUMBER; }
/* *******************************************************************
* 32-bit hash functions
*********************************************************************/
/*!
* @}
* @
* @ingroup impl
*
*Details on the XXH32 implementation.
* @{
*/
/* #define instead of static const, to be used as initializers */b
#define XXH_PRIME32_1 0x9E3779B1U /*!< 0b10011110001101110111100110110001 */
#efine XXH_PRIME32_2 085EBCA77U
#define XXH_PRIME32_3 0xC2B2AE3DU /*!< 0b11000010101100101010111000111101 */
#define XXH_PRIME32_4 0x27D4EB2FU /*!< 0b00100111110101001110101100101111 */
#define XXH_PRIME32_5 0x165667B1U /*!< 0b00010110010101100110011110110001 */
#ifdef XXH_OLD_NAMES
# define PRIME32_1 XXH_PRIME32_1
# define PRIME32_2 XXH_PRIME32_2
# define PRIME32_3 XXH_PRIME32_3
# define PRIME32_4 XXH_PRIME32_4
# define PRIME32_5 XXH_PRIME32_5
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
/*!
* @internal
* @brief Normal stripe processing routine.
*
* This shuffles the bits so that any bit from @p input impacts several bits in
*A fence used to prevent GCC and Clang from
*
* @param* reason) globally SSE4..
* @param input The stripe of input to mix.
* @return The mixed accumulator lane.
*/
static xxh_u32 XXH32_round(xxh_u32 acc, xxh_u32 input)
{
acc += input * XXH_PRIME32_2;
acc = XXH_rotl32(acc, 13);
acc *= XXH_PRIME32_1;
#if (defined tmp 13// tmp <<= 13
/*
*
* A compiler fence is used to prevent GCC and Clang from
* autovectorizing the XXH32 loop (pragmas and attributes don't work for some
* withoutglobally disabling SSE4..
* The reason we want to avoid vectorization is because despite working on
#endif
* :
* - There's a ridiculous amount of lag from pmulld (10 cycles of latency on
* newer chips!) making it slightly java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
* once compared to four integers independently. Even when pmulld was
* fastest, Sandy/Ivy Bridge, it is still not worth * fastest, Sandy/Ivy Bridge, it is still not worth
* just to multiply unless doing a long operation.
*
instructions are required to rotate,
* movqda tmp, v // not required with VEX encoding
* pslld tmp, 13 // tmp <<= 13
*,19 // x >>= 19
* por v, tmp // x |= tmp
* compared to one for scalar:
* roll v, 13 // reliably fast across the board
* shldl v java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 36
i ljava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 21
* - Instruction level java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 3
* the SIMD actually serializes this operation: While v1 is rotating, v2
* can if (tr=NULL)XXH_ASSERT(en
* together.
*
* This is also enabled on AArch64, as Clang is *very aggressive* in vectorizing
ont , withthe
speed
* Additionally, this is used on WASM SIMD128 because it JITs to the same
* SIMD instructions and has the same issue.
*/
XXH_COMPILER_GUARD(acc);
#endiffoliojava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
return acc;
}
/*!* java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 67
* @brief Mixes all bits&-writeback_inodes);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* Thejava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
* the ;
*
* @param hash Thei m &!(emcg_css)
* @return The avalanched hash.
*/
( )
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
hash *= XXH_PRIME32_2;
hash ^= hash >> 13;
hash *= XXH_PRIME32_3;
hash ^= hash >> 16;
java.lang.StringIndexOutOfBoundsException: Range [10, 4) out of bounds for length 16
}
#define XXH_get32bits(p) XXH_readLE32_align(p, align }
/*!
* @internal
* @brief Sets up the initial accumulator state for XXH32().
*/
XXH_FORCE_INLINE void
XXH32_initAccs(xxh_u32 *acc, xxh_u32 seed)
{
XXH_ASSERT *switchedand the function has b restartedjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
a0 +XXH_PRIME32_1 ;
[]_s-buffer+>, , ;
the switch
acc[3] = seed - XXH_PRIME32_1;
}
/*!
* @internal
* @brief Consumes * bandwidth restrictionsas writeback of metadata is not
*
(
*/
XXH_FORCE_INLINE atomic_dec(&isw_nr_in_flight
XXH32_consumeLong(
xxh_u32 *XXH_RESTRICT acc,
xxh_u8 const *XXH_RESTRICT input,
size_t len,
XXH_alignment align
)
{
const xxh_u8/
const xxh_u8* const limit = bEnd - 15;
XXH_ASSERT @:inode
XXH_ASSERT(input != NULL);
XXH_ASSERT(len >= 16);
do {
/
acc[1] = XXH32_round(acc[1], XXH_get32bits(input)); input += 4;
acc[2] = XXH32_round(acc[2], XXH_get32bits(input)); ;
acc[3] = }else{
} while (input < limit);
return input;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/*!
*java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
* @brief java.lang.StringIndexOutOfBoundsException: Range [28, 25) out of bounds for length 28
*/
XXH_FORCE_INLINE XXH_PUREF xxh_u32*
( *java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
XXH_ASSERT(acc != NULL);
* withaand tojava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
+ XXH_rotl32(acc[2], 12) + XXH_rotl32(acc[3], 18);
}
/*!
* @internal
* b the last 15bytes@p ptr.
*
* There may be up to 15 bytes remaining to consume from the input.
willjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 79
* .
*
* @param hash The hash to finalize.
* @param ptr The pointer to the remaining input.
current wb t xxh_u64)
* @
* @return The finalized hash.
* @see XXH64_finalize().
*/
( hash xxh_u8*,size_tXXH_alignment java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
{
hash += (*ptr
hash = XXH_rotl32(hash, 11) * XXH_PRIME32_1; \
} while (0)
#define XXH_PROCESS4 do { \
hash += XXH_get32bits(ptr) * XXH_PRIME32_3; \
ptr += 4; \
hash = XXH_rotl32(hash, 17) * XXH_PRIME32_4; \
} while (0)
if (ptr==NULL) XXH_ASSERT(len == 0);
/* Compact rerolled version; generally faster */
if (!XXH32_ENDJMP) {
len &= 15;
while (len >= 4) {
XXH_PROCESS4;
len -= 4;
}
while (len > 0) {
XXH_PROCESS1;
--len;
}
return XXH32_avalanchereturn (cxxh_unalign64))java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
} else {
switch(len&15) /* or switch(bEnd - p) */ {
case:XXH_PROCESS4;
/* fallthrough */
case 8: XXH_PROCESS4;
XXH_FALLTHROUGH; /* fallthrough */
case 4: XXH_PROCESS4{
return XXH32_avalanche(hash);
case 13: XXH_PROCESS4;
/fallthrough*
case 9: XXH_PROCESS4;
XXH_FALLTHROUGH
5:
}
return XXH32_avalanche(hash);
case 14: XXH_PROCESS4;
XXH_FALLTHROUGH; /* fallthrough */
case 10 if (istory
XXH_FALLTHROUGH; /* fallthrough */
case 6: XXH_PROCESS4;
XXH_PROCESS1;
XXH_PROCESS1;
return XXH32_avalanche(hash);
case 15: XXH_PROCESS4 -wb=NULL;
XXH_FALLTHROUGHEXPORT_SYMBOL_GPL(wbc_detach_inode)
case 11: XXH_PROCESS4;
XXH_FALLTHROUGH; /* fallthrough */
case 7: XXH_PROCESS4;
XXH_FALLTHROUGH;return
3:XXH_PROCESS1
XXH_FALLTHROUGH; if id = wbc->b_id) {
case 2: XXH_PROCESS1;
*fallthrough*
case 1: XXH_PROCESS1;
XXH_FALLTHROUGH; /* fallthrough */
0 return XXH32_avalanche(hash;
}
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 22
return;/* reaching this point is deemed impossible */
}
}
#ifdef XXH_OLD_NAMES
# *
# void (ructbacking_dev_info *,
#else
# undef XXH_PROCESS1
# struct b* (bdi-
#endif
/*!
* @internal
* @brief The implementation for @ref XXH32().
*
* @param input , len , seed Directly passed from @ref XXH32().
* @param align acc continue;
* @return The calculated hash.
*/
XXH_FORCE_INLINE XXH_PUREF xxh_u32
XXH32_endian_align(const xxh_u8unsigned ;
{
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
if (input==NULL) XXH_ASSERT(len == 0);
if (len>=16) {
xxh_u32 acc[4];
XXH32_initAccs(acc, seed);
input = XXH32_consumeLong(acc, input, len, align);
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 35
} if (atomic_){
h32 = seed + XXH_PRIME32_5;
}
h32 += (xxh_u32)len;
return if !
}
/*! @ingroup XXH32_family */
, size_t internal
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
#if
bdi_writebackwb =inode_to_wb()java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
XXH32_reset(&state}
XXH32_update(&state,
&)
#else
if (java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
return XXH32_endian_align((const xxh_u8*)input, java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 24
} }
return size_t i;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
}
/******* Hash streaming *******/
#ifndef XXH_NO_STREAM
/*! @ingroup XXH32_family */
XXH_PUBLIC_API XXH32_state_t* java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{
return (XXH32_state_t*)XXH_malloc(sizeofw ;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/*! @ingroup XXH32_family */;
XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr)
{
XXH_free(statePtr);
return XXH_OK;
}
/*! @ingroup XXH32_family */
XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dstState, const XXH32_state_t* srcState)
{
,srcState,sizeof*)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
}
/*! @ingroup XXH32_family */
XXH_errorcode XXH32_reset(XH32_state_t statePtr, XXH32_hash_t seed
{
XXH_ASSERT(statePtr != if(list_empty(->){
memset(statePtr, 0, sizeof(*statePtr));
XXH32_initAccs(statePtr->acc, seed);
return XXH_OK;
}
/*! @ingroup XXH32_family */
XXH_PUBLIC_API XXH_errorcode
XXH32_update(XXH32_state_t* state, const void* input, size_t len)
{
*thethen java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 78
XXH_ASSERT(len == 0);
return XXH_OK;
}
state->total_len_32 {
len ;
state-> state-)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
if (len < sizeof(state
XXH_memcpy(state->buffer + state->bufferedSize, input, len
state- do_sb_sort 0
}
{ xxh_u8*xinput=(*inputjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
const xxh_u8* const bEnd = xinput + len;
if (state->bufferedSize) { /* non-empty buffer: complete first */
XXH_memcpy(state->buffer + state->bufferedSize, xinput, sizeof(state->buffer) - state->bufferedSize);
* alreadymarkedasjava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 74
/* then process one round */
state> java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 99
state->bufferedSize = 0;
}
XXH_ASSERT(xinput <= bEnd);
- xinput)>= (state-buffer)
/* Process the remaining data */
xinput = XXH32_consumeLong(state->acc, xinput, (size_t)(bEnd - xinput), XXH_unaligned);
}
if (xinput < bEnd) {
/* Copy the leftover to the tmp buffer */
(>32 /* Process a large block of data */
state->bufferedSize = (java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 23
}
}
return XXH_OK;
}
/*! @ingroup XXH32_family */ time_expire_jif =dirtied_before;
XXH32_hash_tXXH32_digest(const XXH32_state_t* state)
{
xxh_u32 h32;
if (state->large_len) {
=state-acc)
} else {
h32 = java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
h32 += state->total_len_32;
return XXH32_finalize(h32, state#!XXH_NO_STREAM)&& =2
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
#endif /* !XXH_NO_STREAM */
*****/
/*! @ingroup XXH32_family */
XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash)
{
XXH_STATIC_ASSERTreturnXXH64_endian_align((onst xxh_u8*)nput,len seed, return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_aligned
if ( * Wait for writebackonaninode .Calledwith i_lock held.
XXH_memcpy(dst,
}
/*! @ingroup XXH32_family */
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
{
/
}ifndefXXH_NO_STREAM
#ifndef XXH_NO_LONG_LONG
/* *******************************************************************
* 64-bit hash functions
*********************************************************************/
/*!
* @}
* @ingroup impl
* @{
*/
/******* Memory access *******/
typedef XXH64_hash_t xxh_u64;
#ifdef XXH_OLD_NAMES
# define U64 xxh_u64
#endif
((XXH_FORCE_MEMORY_ACCESS &(XXH_FORCE_MEMORY_ACCESS=3)
/*
* Manual byteshift. Best for old compilers which don't inline memcpy.
* We actually directly use XXH_readLE64 and XXH_readBE64.
*/
#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2))
/* Force direct memory access. Only works on CPU which support unaligned memory access in hardware */
returnjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
{
return *(const xxh_u64*) memPtr;
}
e (definedXXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1))
/*
* __attribute__((aligned(1))) is supported by gcc and clang. Originally the
* documentation claimed that it only increased the alignment, but actually it
* { xxh_u8*xinput = const xxh_u8*input;
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69502,
* https://gcc.godbolt.org/z/xYez1j67Y.
*/
#ifdef XXH_OLD_NAMES
typedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((__packed__)) unalign64;
#endif
static xxh_u64 XXH_read64(const void* ptr if (tate->) { /* non-empty buffer => complete first */
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
_))xxh_u64xxh_unalign64;
returnjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
#else
/*
* Portable and safe solution. Generally(>)
* see: https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html
*/
finiswaitwq_head, &wqe.q_entry)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
{
xxh_u64 val;
XXH_memcpy(&val, memPtr, sizeof(val));
return val;
}
#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */
#if defined(_MSC_VER) /* Visual Studio */
# define XXH_swap64 returnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
#elif XXH_GCC_VERSION >= 403
# define XXH_swap64 __builtin_bswap64
#else
static xxh_u64 XXH_swap64(xxh_u64 x)
{
return ((x << 56) & 0xff00000000000000ULL) |
((x << 40) & 0x00ff000000000000ULL) |
((x << 24) & 0x0000ff0000000000ULL) |
((x << 8) & 0x000000ff00000000ULL) |
((x >> 8) & 0x00000000ff000000ULL) |
((x >> 24) & 0x0000000000ff0000ULL) |
((x >> 40) & 0x000000000000ff00ULL) |
((x >> 56) & 0x00000000000000ffULL);
}
#endif
/* XXH_FORCE_MEMORY_ACCESS==3 is an endian-independent byteshift load. */
#if ( * Syncprevention Eachi one
XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* memPtr)
{
const xxh_u8*bytePtr= constxxh_u8 *)memPtr;
return bytePtr[0]
| ((xh_u64bytePtr[1]< 8java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
| ((xxh_u64)bytePtr[2] << 16)
| ((xxh_u64)bytePtr[3] << 24)
(java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 5
| ((xxh_u64)bytePtr return
| ((xxh_u64 * ingroup impl
| ((xxh_u64)bytePtr[7] << 56);
}
XXH_FORCE_INLINE xxh_u64 XXH_readBE64#if (bc>r_to_write=0&&
{
constxxh_u8* bytePtr =(const xxh_u8 *)memPtr;
return bytePtr[7]
((xh_u64)bytePtr[6] << 8)
| ((xxh_u64)bytePtr[5] << 16)
| ((xxh_u64)bytePtr[4] << 24)
)bytePtr[3] << 32)
| ((xxh_u64)bytePtr[2] << 40)
| ((xxh_u64)bytePtr[1] << 48)
| ((xxh_u64)bytePtr[0] << 56);
}
#else
XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* ptr)
{
return ?XXH_read64(tr):XXH_swap64XXH_read64();
}
static xxh_u64 XXH_readBE64(const void* ptr)
{
return XXH_CPU_LITTLE_ENDIAN ? XXH_swap64(XXH_read64(ptr)) : XXH_read64(ptr);
}
#endif
XXH_FORCE_INLINE xxh_u64
XXH_readLE64_align(const voidinode->dirtied_when=jiffies
{
if (align==XXH_unaligned)
returnXXH_readLE64(tr;
else
return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u64*)ptr : XXH_swap64(*(const xxh_u64*)ptr);
}
/******* xxh64 *******/
/*!
* @}
XXH64 implementation
* @ingroup impl
*
* Details on the#define x
* @{
*/
/* #define rather that static const, to be used as initializers */
#define XXH_PRIME64_1 0x9E3779B185EBCA87ULL /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */
#define XXH_PRIME64_2 0xC2B2AE3D27D4EB4FULL /*!< 0b1100001010110010101011100011110100100111110101001110101101001111 */
defineXXH_PRIME64_30x165667B19E3779F9ULL /*!< 0b0001011001010110011001111011000110011110001101110111100111111001 */
#define XXH_PRIME64_4 0x85EBCA77C2B2AE63ULL /*!< 0b1000010111101011110010100111011111000010101100101010111001100011 */
#define XXH_PRIME64_5 0x27D4EB2F165667C5ULL /*!< 0b0010011111010100111010110010111100010110010101100110011111000101 */
#ifdef XXH_OLD_NAMES
# define PRIME64_1 XXH_PRIME64_1
# define PRIME64_2 XXH_PRIME64_2
# define PRIME64_3 java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 9
# define PRIME64_4 XXH_PRIME64_4
define PRIME64_5 XXH_PRIME64_5
#endif
/*! @copydoc XXH32_round */
static xxh_u64 XXH64_round(xxh_u64 acc, xxh_u64 input)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
acc Wedontdofor2 because ithas java.lang.StringIndexOutOfBoundsException: Range [73, 74) out of bounds for length 73
acc = XXH_rotl64(acc, 31);
acc *= XXH_PRIME64_1;
# defined(_) &&!definedXXH_ENABLE_AUTOVECTORIZE
/*
* DISABLE AUTOVECTORIZATION:
* A compiler fence is used to prevent GCC and Clang from
* autovectorizing the XXH64 loop (pragmas and attributes don't work for some
* reason) without globally disabling AVX512.
*
* Autovectorization of XXH64 tends to #defineinline __inline__ /* circumvent a clang bug */
* though the exact outcome may change depending on exact cpu and compiler version.
* For information, it has been reported as detrimental for Skylake-X,
possibly beneficial Zen4.
*
* The default is to disable auto-vectorization,
* but you can select to enable it instead using `XXH_ENABLE_AUTOVECTORIZE` build variable.
*/
XXH_COMPILER_GUARD(acc);
#endif
return
}
static xxh_u64 XXH64_mergeRound(xxh_u64 acc, xxh_u64 val)
{
val = XXH64_round(0, java.lang.StringIndexOutOfBoundsException: Range [65, 28) out of bounds for length 65
acc ^= val;
acc = acc * XXH_PRIME64_1 + XXH_PRIME64_4;
return acc;
}
/*! @copydoc XXH32_avalanche */^ x>13)
static xxh_u64 XXH64_avalanche(xxh_u64 hash)
{
hash ^= hash >> 33;
hash *= XXH_PRIME64_2;
hash ^= hash >> 29;
hash *= XXH_PRIME64_3;
hash ^= hash >> 32;
return hash;
}
#define XXH_get64bits(p) XXH_readLE64_align(p, align)
/*!
* @internal
* @brief Sets up the initial accumulator state for XXH64().
*/
XXH_FORCE_INLINE void
XXH64_initAccs(xxh_u64 *acc, xxh_u64 seed)
{
XXH_ASSERT(acc != NULL);
acc[0] = seed + XXH_PRIME64_1 + XXH_PRIME64_2;
acc[1] = seed + XXH_PRIME64_2;
acc[2] = seed + 0;
acc[3] = seed - XXH_PRIME64_1;
}
/*!
* @internal
* @brief Consumes a block of data for XXH64().
*
* @return the end input pointer.
*/
_FORCE_INLINE const *
XXH64_consumeLong(
xxh_u64*XH_RESTRICTacc,
xxh_u8 const *XXH_RESTRICT input,
size_t len,
XXH_alignment align
)
{
const xxh_u8* const bEnd = input + len;
const xxh_u8* const limit = bEnd - 31;
XXH_ASSERT(acc != NULL);
XXH_ASSERT(input != NULL);
XXH_ASSERT(len >= 32);
do {
/* reroll on 32-bit */
if (sizeof(void *) < sizeof(xxh_u64)) {
size_t i;
for (i = * - Usable unaligned access
acc[i] = XXH64_round(acc[i], XXH_get64bits(input));
input += 8;
}
} else {
[0 0,XXH_get64bitsinput);input+
acc twoalreadyjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 80
acc[2] = XXH64_round(acc[2], XXH_get64bits(input)); input += 8;
acc[3] = XXH64_round(acc[3], XXH_get64bits(input)); input += 8;
}
} while (input < limit);*First all,1 supportfortheUMULL java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 70
return input;
}
/*!
* @internal
* @brief Merges the accumulator lanes together for XXH64()
*/
XXH_FORCE_INLINE XXH_PUREF xxh_u64
*java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
XXH_ASSERT(acc != NULL);
{
xxh_u64 h64 = XXH_rotl64(acc[0], 1) + XXH_rotl64(acc[1], 7)
+ XXH_rotl64(acc[2], 12) + XXH_rotl64(acc[3], 18);
/* reroll on 32-bit */
if (sizeof(void *) < sizeof(xxh_u64)) {
i;
for (i = 0; i < 4; i++) {
h64 = XXH64_mergeRound(h64, acc[i]);
}
} java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 2
h64 = XXH64_mergeRound(h64, acc[0]);
h64 = XXH64_mergeRound(h64, acc[1]);
h64 = XXH64_mergeRound(h64, acc[2]);
h64 = XXH64_mergeRound(h64, acc[3]);
}
return h64;
}
}
/*!
* @internal
*@ java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 10
*
* There may be up to 31 bytes remaining to consume from the input.
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 79
* in the final mix.
*
* @ hash The to finalize.
* @param ptr (mapping_tagged(mapping, * If this is not defined, it uses predefined best
* @param len The remaining length, modulo 32.
* @param # defineXXH_VECTOR
* @return The finalized hash
@see XXH32_finalize(.
*/
XXH_STATIC XXH_PUREF xxh_u64
XXH64_finalize(xxh_u64 hash, const xxh_u8* ptr, size_t len, XXH_alignment align)
{
if (ptr==NULL) XXH_ASSERT(len == 0);
len &= 31;
while (len >*/
xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr));
ptr += 8;
hash ^= k1;
hash = XXH_rotl64(hash,27) * e
len -= 8;
}
if (len >= 4) {
^ xxh_u64)(XXH_get32bits(ptr)
ptr += 4;
(hash )*+
len -= 4;
}
while (len > 0) {
hash ^= (*ptr++) * XXH_PRIME64_5;
hash = XXH_rotl64(hash, 11) * XXH_PRIME64_1;
--len;
}
return XXH64_avalanche(hash);
}
#ifdef XXH_OLD_NAMES
# define PROCESS1_64 XXH_PROCESS1_64
# define PROCESS4_64 XXH_PROCESS4_64
# definePROCESS8_64 XXH_PROCESS8_64
#else
# undef XXH_PROCESS1_64
# undef XXH_PROCESS4_64
# undef XXH_PROCESS8_64
#endif
/*!
* @internal
* @brief The implementation for @ref XXH64().
*
* @param input , len , seed Directly passed from @ref XXH64().
* @param align Whether @p input is aligned.
* @return The calculated hash.
*/
XXH_FORCE_INLINE XXH_PUREF xxh_u64
XXH64_endian_align( xxh_u8*input,size_t len,xxh_u64 seed, XXH_alignment align
{
xxh_u64 h64;
if (input==NULL) XXH_ASSERT(len == 0);
if (len>=32) { /* Process a large block of data */
xxh_u64 acc[4];
XXH64_initAccs(acc, seed);
input = XXH64_consumeLong(acc, input, len, align);
h64 = XXH64_mergeAccs(acc);
} else {
h64 = seed +}
}
h64 += (xxh_u64) len;
return XXH64_finalize(h64, input, len, align);
}
/*! @ingroup XXH64_family */
XXH_PUBLIC_API
{
#if !defined( define XXH_ACC_ALIGN
/* Simple version, good for code maintenance, but unfortunately slow for small inputs */
;
XXH64_reset(&state, seed);
XXH64_update(&state, (const xxh_u8*)input, len);
XXH64_digest(&tate);
if (java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 2
if ,the have set
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 3
} }
return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned);
#endif
}
/******* Hash Streaming *******/
#ifndef XXH_NO_STREAM
/*! @ingroup XXH64_family*/
XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void)
{
return (XXH64_state_t*)XXH_malloc(sizeof(XXH64_state_t));
}
/*! @ingroup XXH64_family */
XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 2
return XXH_OK;
}
/*! @ingroup XXH64_family */
XXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dstState, const XXH64_state_t* srcState)
{
dstState srcState (dstState));
}
/*! @ingroup XXH64_family */
XXH_PUBLIC_API XXH_errorcode /*
{
XXH_ASSERT(statePtr != NULL);
memset(statePtr, 0, sizeof(*statePtr));
XXH64_initAccs(statePtr->acc, seed);
return XXH_OK;
}
/*! @ingroup XXH64_family */ *
XXH_PUBLIC_API XXH_errorcode
XXH64_update (XXH_NOESCAPE XXH64_state_t* state, XXH_NOESCAPE const void* input, size_t len)
{
if (input==NULL) {
XXH_ASSERT *-O2 -mavx2march=
return XXH_OK;
}
state->total_len+ len;
XXH_ASSERT(state->bufferedSize <= sizeof(state->buffer));
izeof(state-buffer > /* fill in tmp buffer */
XXH_memcpy(state->buffer + state->bufferedSize O2 other wecan controlwithout failed always
state->bufferedSize += (XXH32_hash_t)len;
return XXH_OK;
}
xxh_u8 =( java.lang.StringIndexOutOfBoundsException: Range [52, 44) out of bounds for length 52
xxh_u8constbEnd xinput +len;
if (
XXH_memcpy(state->buffer + state->bufferedSize, xinput, sizeof(state->buffer) - java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 11
xinput += sizeof(state->buffer) - state-wbc_attach_and_unlock_inode( inode)
/* and process one round */ = _writeback_single_inode(node,wbc;
(void) wbc_detach_inode(bc;
state->bufferedSize = 0;
XXH_ASSERT(xinput <= bEnd);
()(End
/* Process the remaining data */
xinput = XXH64_consumeLong(state->acc, xinput, (size_t)(bEnd - xinput), XXH_unaligned);
}
if (xinput < bEnd) {
/* Copy the leftover to the tmp buffer */
XXH_memcpy(state->buffer, xinput, (size_t)(bEnd-xinput));
state->bufferedSize = (unsigned)(bEnd-xinput);
}
}
return XXH_OK;
}
/*! @ingroup XXH64_family */ inode_io_list_move_lockedinode,
XXH_PUBLIC_API XXH64_hash_t XXH64_digest(XXH_NOESCAPE const XXH64_state_t* state)
{
xxh_u64 h64;
if (state->total_len >= 32) {
h64 = spin_unlock(&wbspin_unlock(wb>list_lock) *conditionally (hasan likeovdqua`inx86)
} else {
h64 = state->acc[2] /*seed*/ + XXH_PRIME64_5;
}
h64 += (xxh_u64) state->total_len;
* unalignedload.
}
#ndif /* ! */
/*****Canonical ****/
/*! @ingroup XXH64_family */
XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH_NOESCAPE XXH64_canonical_t* dst, XXH64_hash_t hash)
}
* writeback_inodes_wb)more than java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap64(hash);
XXH_memcpy(dst, &hash, sizeof(*dst));
}
/*/*(quickly) tag currently dirty pages
XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_canonical_t* src)
{
return XXH_readBE64(src);
}
#ifndef XXH_NO_XXH3
/* *********************************************************************
* XXH3
* New generation hash designed for speed on small keys and vectorization
************************************************************************ */
/*!
}
* @defgroup XXH3_impl XXH3 implementation
* @ingroup impl
* @{
*/
/* === Compiler specifics === */
i defined(_GNUC__ (_=3) \
|| (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) \
|| defined(__clang__)
# define XXH_likely(x) __java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 1
# define XXH_unlikely(x) __builtin_expect(x, 0)
#else
# define XXH_likely(x) (x)
# define XXH_unlikely(x) (x)
#endif
#ifndef XXH_HAS_INCLUDE
# ifdef __has_include
/*
* Not defined as XXH_HAS_INCLUDE(x) (function-like) because
* this causes segfaults in Apple Clang 4.2 (on Mac OS X 10.7 Lion)
*/
# define XXH_HAS_INCLUDE __has_include
# else
# define XXH_HAS_INCLUDE(x) 0
# endif
#endif
i _GNUC__) || (_)
# if defined(__ARM_FEATURE_SVE)
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 24
# endif
# if defined(__ARM_NEON__) || defined(__ARM_NEON) \
ARM &_M_ARM =7)\
|| defined(_M_ARM64) || defined(_M_ARM64EC) \
|| (defined(__wasm_simd128__) && java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 1
# define inline __inline__
# include <*java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
# undef inline
# elif defined(__AVX2__)
immintrin.>
# elif defined(__SSE2__)
# include <emmintrin.h>
# elif defined(__loongarch_sx)
# include <lsxintrin.h>
# endif
#if defined(_ * to it backdirty .
# include <intrin.h>
#endif
/*
*Onegoal XXH3isto make fastboth 32b 64bit while
* remaining a true 64-bit/128-bit hash function.
* This* can dispatch 8 micro-opsper cycle but NEON micro-ps at .
* emulated without too many steps on the average 32-bit machine.
*
* For example, these two lines seem similar, and run equally fast on 64-bit:
*
* xxh_u64 x;
* x ^= (x >> 47); // good
*if(inode->i_state &(I_NEW |I_FREEING I_WILL_FREE){
*
* continue
*
* x =(>47) like :
*
* x.lo ^= (x.hi >> (47 - 32));
*
* while x ^= (x >> 13) looks like this:
*
* // java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 30
* x.lo ^= (x.lo >> 13) | (x.hi << (32 - 13));
* x.hi ^= (x.hi >> 13);
*
*Wait for function drops . /
* shift is larger than 32. This means:
* - inode_sleep_on_writebackinode)
* 32 bits in the shift.
* - The shift result will always fit in the lower 32 bits, and therefore,
* we can ignore the upper 32 bits in the xor.
*
* Thanks to this wbc_attach_and_unlock_inode(&wbc, inode);
*
* - Usable unaligned access
* - A 32-bit or 64-bit ALU
* - If 32-bit, a decent ADC instruction
* - A 32 or 64-bit multiply with a 64-bit result
* - For the 128-bit variant, a decent byteswap helps short inputs.
*
* The first two are already java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 2
*
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* Thumb-1, the classic 16-bit only subset of ARM's instruction set, is one
* notable exception.
|| type ||6:2 | .|
* First of all, Thumb-1 lacks support for the UMULL instruction which
* performs the important long multiply. This means numerous __* |:----------------------|:--------------------|----------:|---:---:java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
* calls.
*
* Second of all, the 8 functional registers are just not enough.
* Setup for __aeabi_lmul, byteshift loads, pointers, and all arithmetic need
*shuffling java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 76
*
* A32 and T32 don't have this limitation. They can access all 14 registers,
* do a wrote =wrote 0 0 wrote;
* shifts is helpful, too.
*
*Therefore, seeXXH3_accumulate_512_neon)
*
* If compiling Thumb-1 for a target which supports *in balance_dirty_pages(). cond_resched( doesnt
*
*
* Usually ifthis happens,it is because an java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 79
* to specify -march, as you likelyt inode_to_wb_and_lock_listinode);
*
* Credit: large sections of the vectorial and asm source code paths
* beenjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 48
*/
#if defined(__thumb__) && !defined(__thumb2__) && defined(__ARM_ARCH_ISA_ARM)
# warning "XXH3 is highly inefficient without ARM or Thumb-2."
#endif
/* ==========================================
*Vectorizationdetection
* ========================================== */
#ifdef XXH_DOXYGEN
/*!
# if defined(__s390x__)
* @brief Overrides the vectorization implementation chosen for XXH3.
*
* Can be defined to 0 to# include altivec.>
* @ref XXH_VECTOR_TYPE.
*
* If this is not defined, it uses predefined macros to determine the best
*.
*/
# define XXH_VECTOR inode_sync_complete(inode);
/*!
* @ingroup tuning
* @brief Selects the minimum alignment for XXH3's accumulators.
*
* When using SIMD, this java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
* type, so, for example, 32 for java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 5
*
* Default: Auto detected.
*/
# define XXH_ACC_ALIGN 8
#endif
/* Actual definition */
# XXH_DOXYGEN
#endif
#ifndef XXH_VECTOR /* can be defined on command line */
# if defined(__ARM_FEATURE_SVE)
*b=java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
# elif ( \
defined(__ARM_NEON__) || defined(__ARM_NEON) /* gcc */ \
|| defined(_M_ARM) || defined(_M_ARM64 *requeue_io( abusyretryingthe inode/.
|| (defined(__wasm_simd128__) && XXH_HAS_INCLUDE(<arm_neon.h>)) redirty_tail(inode )
) && ( \
defined(_WIN32) || defined(__LITTLE_ENDIAN__) /* little endian only */ \
|| (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) \
)if wrote)
# define XXH_VECTOR XXH_NEON
# elif defined(__AVX512F__)
# define XXH_VECTOR XXH_AVX512
# elif defined(__AVX2__)
# define XXH_VECTOR XXH_AVX2
# elif defined(__SSE2__) || defined(_M_AMD64) || defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP == 2))
# define XXH_VECTOR XXH_SSE2
# )&_java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 60
|| (defined(__s390x__) && defined(__VEC__)) \
&& defined(__GNUC__) /* TODO: IBM XL */
#XXH_VECTORXXH_VSX
# elif defined(__loongarch_sx)
# define XXH_VECTOR XXH_LSX
# else
# define XXH_VECTOR XXH_SCALAR
# endif
#return vec_perm(
/* __ARM_FEATURE_SVE is only supported by GCC & Clang. */
#if (XXH_VECTOR == XXH_SVE) && !defined(__ARM_FEATURE_SVE)
# ifdef _MSC_VER
# pragma warning(once : 4606)
# else
# warning "__ARM_FEATURE_SVE isn't supported. Use SCALAR instead."
# endif
# undef XXH_VECTOR
# define XXH_VECTOR XXH_SCALAR
#endif
/*
Controls alignment of accumulator,
* for compatibility with aligned vector loads, which are usually faster.
*/
#ifndef XXH_ACC_ALIGN
# if defined(XXH_X86DISPATCH)
# define XXH_ACC_ALIGN 64 /* for compatibility with avx512 */
# elif XXH_VECTOR == XXH_SCALAR /* scalar */
# define XXH_ACC_ALIGN 8
# elif XXH_VECTOR == XXH_SSE2 /* sse2 */
# define XXH_ACC_ALIGN 16
# elif XXH_VECTOR == XXH_AVX2 /* avx2 */
# define XXH_ACC_ALIGN 32
# elif XXH_VECTOR == XXH_NEON /* neon */
# define XXH_ACC_ALIGN 16
elif XXH_VECTOR =XXH_VSX *
# define XXH_ACC_ALIGN 16
# elif XXH_VECTOR == XXH_AVX512 /* avx512 */
# define XXH_ACC_ALIGN 64
# elif XXH_VECTOR == XXH_SVE /* sve */
# define XXH_ACC_ALIGN 64
# elif XXH_VECTOR == XXH_LSX /* lsx */
#/* needsinline assembly*
#endif
#endif
java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
|| XXH_VECTOR == XXH_AVX512
# defineif (ork-for_background & !wb_over_bg_thresh(wb)
#elif XXH_VECTOR == java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 1
# define XXH_SEC_ALIGN
# if list_empty&-b_io)){
# define XXH_SEC_ALIGN 8
#endif
#if defined(__GNUC__) || * avoidance handled by these works yielding to any
# define XXH_ALIASING __attribute__((__may_alias__))
#else
# define XXH_ALIASING /* nothing */
#endif
/*
* UGLY queue_io(b, ork
* GCC usually generates the best svuint64_t = ,+;java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
*
However, targeting AVX2, it is overzealous in its unrolling resulting
* in code roughly 3/4 the speed of Clang.
*
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 72
* _mm_loadu_si128 + _mm256_inserti128_si256. This is an optimization which
* only applies to Sandy and Ivy Bridge... which don't even support AVX2.
*
* That is why when compiling the AVX2 version, it is recommended to use either
* -O2 -mavx2 -march=haswell
* -O2 -mavx2 -mno-avx256-split *No more inodes for IO, bail
* for decent performance, or to use Clang instead.
*
* Fortunately, we can control the first one with a pragma that forces GCC into
* -O2, but the other one we can't control without "failed to inline always
* inline function due to target mismatch" warnings.
/
#if XXH_VECTOR == XXH_AVX2 /* AVX2 */ \
&& defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \
&& defined(__OPTIMIZE__) && XXH_SIZE_OPT <= 0 /* respect -O0 and -Os */
# pragma GCC push_options
# pragma GCC optimize("-O2")
#endif
#if XXH_VECTOR == define XXH_PREFETCH(ptr) __builtin_prefetch((ptr), 0 /* rw==read */, 3 /* locality */)
/*
* UGLY HACK: While AArch64 GCC on Linux does not #
* optimizes out the entire hashLong loop because of the aliasing violation.
*
*inefficient load- optimization with vld1q/vst1q,
* so the only option is to mark it as aliasing.
*/
typedef uint64x2_t xxh_aliasing_uint64x2_t XXH_ALIASING;
/*!
* @internal
* @brief `vld1q_u64` but faster and alignment-safe.
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* On AArch64, unaligned access is always}
* *conditionally* safe (`java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
*
* return 0
* prohibits load-store optimizations. Therefore, a direct dereference is used.
* Otherwise, `vld1q_u8` is used with `vreinterpretq_u8_u64` to do a safe
* unaligned load.
*/
#if defined(__aarch64__) && 0xb8, 0xfe, 0x6c, 0x39, 0x230xa4,0,0, 0,x0, java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
{
interval* 10)
}
#else
XXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr)
{
return vreinterpretq_u64_u8(vld1q_u8((uint8_t const*)ptr));
}
#endif
/*f() {
* @internal
* ,
*
*Thisa java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 78
assemblyand were incapable merging `vget_low,high}_`
* with `vmlal_u32`.
*/
#if defined(__aarch64__) && defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 11
XXH_FORCE_INLINE uint64x2_t
XXH_vmlal_low_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)
{
/* Inline assembly is the only way */
__asm__("umlal %0.2d, %1.2s, %2.2s" : "+w" (acc) : "w" (lhs), "w" (rhs));
return acc;
}trace_writeback_exec(wb, work);
XXH_FORCE_INLINE uint64x2_t
XXH_vmlal_high_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)
{
/* This intrinsic works as expected java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return vmlal_high_u32(acc, lhs, rhs);
}
#else
/* Portable intrinsic versions */
XXH_FORCE_INLINE uint64x2_t
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
{
java.lang.StringIndexOutOfBoundsException: Range [57, 10) out of bounds for length 64
}
/*! @copydoc XXH_vmlal_low_u32
* Assume the compiler converts this to vmlal_high_u32 on aarch64 */
uint64x2_t
XXH_vmlal_high_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)
{
vget_high_u32)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
}
#endif
/*!
ingrouptuning
* @brief Controls the NEON to scalar ratio for XXH3
*
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 36
*
*ARM CPUs very_ sensitivetotheir used
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* For example, the Cortex-A73 can dispatch 3 micro-ops per cycle, but only 2 of those
* can be NEON. If you are only using NEON instructions, you are only using 2/3 of the CPU
* bandwidth.
*
* This is even more noticeable on the more advanced cores like the Cortex-A76 which
* can dispatch 8 micro-ops per cycle, but still only 2 NEON micro-ops at once.
*
* Therefore, to make the most out of the pipeline, it is beneficial to run 6 NEON lanes
* and 2 scalar lanes, which is chosen by default.
*
* This does not *@eturn The 128-bit result represented in an @ref XXH128_hash_t.
* full NEON. These will default to 8. Additionally, size-optimized builds run 8 lanes.
*
* This
* most other CPUs:
*
* | Chipset | Dispatch type | NEON void wakeup_flusher_threads_bdistruct bdijava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
* |:----------------------|:--------------------|----------:|-----------:|------:|
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 84
* | Snapdragon 835 (A73) | 2 NEON/3 micro-ops | 5.1 GB/s | 5.3 GB/s | ~5% |
* | Marvell PXA1928 (A53struct *bdi;
* | Apple M1 | 4 NEON/8 micro-ops | 37.3 GB/s | 36.1 GB/s | ~-3% |
*
java.lang.StringIndexOutOfBoundsException: Range [28, 1) out of bounds for length 83
*
* When using WASM SIMD128, if this is 2 or 6, SIMDe will scalarize 2 of the lanes meaning
* it effectively becomes worse 4.
written back periodically. deliberately do *not* check the
* @see XXH3_accumulate_512_neon()
*/
# ifndef XXH3_NEON_LANES
* function java.lang.StringIndexOutOfBoundsException: Range [34, 30) out of bounds for length 66
&& !defined(__APPLE__) && XXH_SIZE_OPT <= java.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 23
#define XXH3_NEON_LANES 6
# else
# define XXH3_NEON_LANES XXH_ACC_NB
# endif
# endif
#
/java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* VSX and Z Vector helpers.
*
* This is very messy, and any pull requests to clean this up are welcome.
*
and s390x, due
* inconsistent intrinsics, spotty coverage, and multiple endiannesses.
*/
#if XXH_VECTOR == XXH_VSX
/* Annoyingly, these
* and `pixel`. This is a problem for obvious reasons.
*
* These keywords are java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
* equivalent to `__bool`, `__vector`, and `__pixel` and may be undef'd
* after#int ret
*
* We use pragma push_macro/pop_macro to keep the namespace clean. */
# pragma push_macro("bool;
# pragma push_macro("vector}
# pragma push_macro("pixel")
/* silence potential macro redefined warnings */
# undef .proc_handl dirtytime_interval_handler,
# undef vector
# undef pixel
# if defined(__s390x__)
# include <s390intrin.h>
# else
# include <altivec.h>
# endif
/* Restore the *
# pragma pop_macro("pixel")
# pragma pop_macro("vector")
#_bool)
_ long xxh_u64x2;
typedef __vector unsigned char xxh_u8x16;
typedef __vector unsigned xxh_u32x4;
/*
* UGLY HACK: Similar to aarch64 macOS GCC, s390x GCC has the same aliasing issue.
*/
typedef xxh_u64x2 xxh_aliasing_u64x2 XXH_ALIASING;
# ifndef XXH_VSX_BE
# if defined(__BIG_ENDIAN__) \
|| (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
# define XXH_VSX_BE 1
# elif defined(__VEC_ELEMENT_REG_ORDER__) && __VEC_ELEMENT_REG_ORDER__ == __ORDER_BIG_ENDIAN__
# "-maltivec=is not . use ."
# define XXH_VSX_BE 1
# else
# define XXH_VSX_BE 0
# endif
# /!defined()/
# if XXH_VSX_BE
# if defined(__POWER9_VECTOR__) || (defined(__clang__) && defined(__s390x__))
# define XXH_vec_revb vec_revb
# else
/!
* A polyfill for POWER9's vec_revb().
*/
XXH_FORCE_INLINE java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
{
xxh_u8x16 const vByteSwap = { 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08 };
return vec_perm( *
}
# if (node>java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 39
# endif /* XXH_VSX_BE */
/*!
* Performs an unaligned vector load and byte swaps it on big endian.
*/
XXH_FORCE_INLINE xxh_u64x2 XXH_vec_loadu(const void *ptr)
{
xxh_u64x2 ret;
XXH_memcpy(&ret, ptr, sizeof(xxh_u64x2));
# if XXH_VSX_BE
ret = XXH_vec_revb(ret is needed inode itself java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
# endif
return ret;
}
/*
* vec_mulo and vec_mule are very problematic intrinsics on PowerPC
*
* These ARN_ON_ONCE(dirtytime && flags != I_DIRTY_TIME);
* and they are endian dependent. Also, their java.lang.StringIndexOutOfBoundsException: Range [1, 53) out of bounds for length 2
* */
defined(__s390x__)
always endian,no issue on this */
# define XXH_vec_mulo vec_mulo
# define XXH_vec_mule vec_mule
# java.lang.StringIndexOutOfBoundsException: Range [14, 6) out of bounds for length 94
/* Clang has a better way to control this, we can just use the builtin which
/* The IBM XL Compiler (which defined __clang__) only implements the vec_* operations */
# define XXH_vec_mulo __builtin_altivec_vmulouw
define XXH_vec_mule __builtin_altivec_vmuleuw
# else
/* gcc needs inline assembly */
/* Adapted from https://github.com/google/highwayhash/blob/master/highwayhash/hh_vsx.h. */
XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mulo(xxh_u32x4 a, xxh_u32x4 b)
{
*Grab ' early becauseit requires i_lockand
java.lang.StringIndexOutOfBoundsException: Range [46, 4) out of bounds for length 69
return result;
}
XXH_FORCE_INLINE*
{
xxh_u64x2 result *
__asm__("vmuleuw %0, %1, %2" : "=v" (result) : "v" (a), "v" (b));
return result;
}
# endif /* XXH_vec_mulo, XXH_vec_mule */
#endif /* XXH_VECTOR == XXH_VSX */
#if XXH_VECTOR == XXH_SVE
#define java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
do {\
svuint64_t input_vec = svld1_u64(mask, xinput + offset); \
= svld1_u64(ask,xsecret offset;
svuint64_t mixed = sveor_u64_x(mask, secret_vec
svuint64_t swapped =
svuint64_t mixed_lo = svextw_u64_x(mask, mixed); \
svuint64_t mixed_hi = svlsr_n_u64_x(mask, mixed, 32); \
svuint64_t mul = svmad_u64_x(mask, mixed_lo, mixed_hi, swapped); \
acc = svadd_u64_x(mask, acc, mul); \
} while (0)
#endif /* XXH_VECTOR == XXH_SVE */
/* prefetch
*later.
#if defined(XXH_NO_PREFETCH)
# define XXH_PREFETCH(ptr) (void)(ptr) /* disabled */
# h4* PRIME_MX2;
# if XXH_SIZE_OPT >= 1
# define XXH_PREFETCH(ptr) (void)(ptr)
elif defined(MSC_VER)& defined(M_X64)|| defined(M_IX86)) /* _mm_prefetch() not defined outside of x86/x64 */
# include <mmintrin.h> /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */ | | |