forked from twitter/pelikan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean-up hash functions and introduce MurmurHash3 (twitter#145)
* remove (mostly duplicate) cc_lookup3.[ch] * rename hash() and cc_hash.[ch] to indicate *lookup3 * bump version, introduce murmur3
- Loading branch information
1 parent
b1babb2
commit b164fcf
Showing
8 changed files
with
582 additions
and
547 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* ccommon - a cache common library. | ||
* Copyright (C) 2013 Twitter, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* The cc_murmur3.[ch] are adapated from the canonical implementation of | ||
* MurmurHash3 by Austin Appleby, released as part of SMHasher: | ||
* https://github.com/aappleby/smhasher | ||
* | ||
* Changes include renaming fuctions, removing MSVC-related code, adding "static" | ||
* keyword to local-scope functions according to C language spec (original code is | ||
* in C++), to better fit them into the scope and style of ccommon | ||
* | ||
* The actual implementation is untouched. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <stdint.h> | ||
|
||
|
||
void hash_murmur3_32 ( const void * key, int len, uint32_t seed, void * out ); | ||
|
||
void hash_murmur3_128_x86 ( const void * key, int len, uint32_t seed, void * out ); | ||
|
||
void hash_murmur3_128_x64 ( const void * key, int len, uint32_t seed, void * out ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
set(SOURCE | ||
${SOURCE} | ||
hash/cc_hash.c | ||
hash/cc_lookup3.c | ||
hash/cc_murmur3.c | ||
PARENT_SCOPE) |
Oops, something went wrong.