Path: blob/master/dep/xxhash/include/xxh_x86dispatch.h
4251 views
/*1* xxHash - XXH3 Dispatcher for x86-based targets2* Copyright (C) 2020 Yann Collet3*4* BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions are8* met:9*10* * Redistributions of source code must retain the above copyright11* notice, this list of conditions and the following disclaimer.12* * Redistributions in binary form must reproduce the above13* copyright notice, this list of conditions and the following disclaimer14* in the documentation and/or other materials provided with the15* distribution.16*17* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS18* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT19* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR20* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT21* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,22* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT23* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,24* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY25* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT26* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE27* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.28*29* You can contact the author at:30* - xxHash homepage: https://www.xxhash.com31* - xxHash source repository: https://github.com/Cyan4973/xxHash32*/3334#ifndef XXH_X86DISPATCH_H_1356368768435#define XXH_X86DISPATCH_H_135636876843637#include "xxhash.h" /* XXH64_hash_t, XXH3_state_t */3839#if defined (__cplusplus)40extern "C" {41#endif4243XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_dispatch(const void* input, size_t len);44XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSeed_dispatch(const void* input, size_t len, XXH64_hash_t seed);45XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSecret_dispatch(const void* input, size_t len, const void* secret, size_t secretLen);46XXH_PUBLIC_API XXH_errorcode XXH3_64bits_update_dispatch(XXH3_state_t* state, const void* input, size_t len);4748XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_dispatch(const void* input, size_t len);49XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSeed_dispatch(const void* input, size_t len, XXH64_hash_t seed);50XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSecret_dispatch(const void* input, size_t len, const void* secret, size_t secretLen);51XXH_PUBLIC_API XXH_errorcode XXH3_128bits_update_dispatch(XXH3_state_t* state, const void* input, size_t len);5253#if defined (__cplusplus)54}55#endif565758/* automatic replacement of XXH3 functions.59* can be disabled by setting XXH_DISPATCH_DISABLE_REPLACE */60#ifndef XXH_DISPATCH_DISABLE_REPLACE6162# undef XXH3_64bits63# define XXH3_64bits XXH3_64bits_dispatch64# undef XXH3_64bits_withSeed65# define XXH3_64bits_withSeed XXH3_64bits_withSeed_dispatch66# undef XXH3_64bits_withSecret67# define XXH3_64bits_withSecret XXH3_64bits_withSecret_dispatch68# undef XXH3_64bits_update69# define XXH3_64bits_update XXH3_64bits_update_dispatch7071# undef XXH12872# define XXH128 XXH3_128bits_withSeed_dispatch73# define XXH3_128bits XXH3_128bits_dispatch74# undef XXH3_128bits75# define XXH3_128bits XXH3_128bits_dispatch76# undef XXH3_128bits_withSeed77# define XXH3_128bits_withSeed XXH3_128bits_withSeed_dispatch78# undef XXH3_128bits_withSecret79# define XXH3_128bits_withSecret XXH3_128bits_withSecret_dispatch80# undef XXH3_128bits_update81# define XXH3_128bits_update XXH3_128bits_update_dispatch8283#endif /* XXH_DISPATCH_DISABLE_REPLACE */8485#endif /* XXH_X86DISPATCH_H_13563687684 */868788