Path: blob/main/sys/contrib/openzfs/include/cityhash.h
48255 views
// SPDX-License-Identifier: MIT1//2// Copyright (c) 2011 Google, Inc.3//4// Permission is hereby granted, free of charge, to any person obtaining a copy5// of this software and associated documentation files (the "Software"), to deal6// in the Software without restriction, including without limitation the rights7// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell8// copies of the Software, and to permit persons to whom the Software is9// furnished to do so, subject to the following conditions:10//11// The above copyright notice and this permission notice shall be included in12// all copies or substantial portions of the Software.13//14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE17// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,19// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN20// THE SOFTWARE.212223/*24* Copyright (c) 2017 by Delphix. All rights reserved.25*/2627#ifndef _SYS_CITYHASH_H28#define _SYS_CITYHASH_H extern __attribute__((visibility("default")))2930#include <sys/zfs_context.h>3132#ifdef __cplusplus33extern "C" {34#endif3536/*37* Define 1/2/3-argument specialized versions of cityhash4, which can reduce38* instruction count (especially multiplication) on some 32-bit arches.39*/40_SYS_CITYHASH_H uint64_t cityhash1(uint64_t);41_SYS_CITYHASH_H uint64_t cityhash2(uint64_t, uint64_t);42_SYS_CITYHASH_H uint64_t cityhash3(uint64_t, uint64_t, uint64_t);43_SYS_CITYHASH_H uint64_t cityhash4(uint64_t, uint64_t, uint64_t, uint64_t);4445#ifdef __cplusplus46}47#endif4849#endif /* _SYS_CITYHASH_H */505152