Skip to content

Commit 268bd27

Browse files
yfeldblumfacebook-github-bot
authored andcommitted
object code inspection functions for some hash functions
Reviewed By: dmm-fb Differential Revision: D77837561 fbshipit-source-id: 7622a84db8f8c9b905ed821a3f231fa8aa254a54
1 parent 764045e commit 268bd27

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

third-party/folly/src/folly/hash/test/HashBenchmark.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,36 @@
3333
#include <folly/lang/Keep.h>
3434
#include <folly/portability/GFlags.h>
3535

36+
extern "C" FOLLY_KEEP uint64_t
37+
check_folly_hash_128_to_64(uint64_t upper, uint64_t lower) {
38+
return folly::hash::hash_128_to_64(upper, lower);
39+
}
40+
41+
extern "C" FOLLY_KEEP uint64_t
42+
check_folly_commutative_hash_128_to_64(uint64_t upper, uint64_t lower) {
43+
return folly::hash::commutative_hash_128_to_64(upper, lower);
44+
}
45+
46+
extern "C" FOLLY_KEEP uint64_t check_folly_twang_mix64(uint64_t key) {
47+
return folly::hash::twang_mix64(key);
48+
}
49+
50+
extern "C" FOLLY_KEEP uint64_t check_folly_twang_unmix64(uint64_t key) {
51+
return folly::hash::twang_unmix64(key);
52+
}
53+
54+
extern "C" FOLLY_KEEP uint32_t check_folly_twang_32from64(uint64_t key) {
55+
return folly::hash::twang_32from64(key);
56+
}
57+
58+
extern "C" FOLLY_KEEP uint32_t check_folly_jenkins_rev_mix32(uint32_t key) {
59+
return folly::hash::jenkins_rev_mix32(key);
60+
}
61+
62+
extern "C" FOLLY_KEEP uint32_t check_folly_jenkins_rev_unmix32(uint32_t key) {
63+
return folly::hash::jenkins_rev_unmix32(key);
64+
}
65+
3666
extern "C" FOLLY_KEEP uint64_t
3767
check_folly_spooky_hash_v2_hash_32(void const* data, size_t size) {
3868
return folly::hash::SpookyHashV2::Hash32(data, size, 0);

0 commit comments

Comments
 (0)