summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-09-17 12:14:10 +0200
committerTyge Løvset <[email protected]>2020-09-17 12:14:10 +0200
commit92edcbf8da88b1e59c7724f2875e9e9df3383cb1 (patch)
treec97a08a2202305ceae34ee2c3c661e1a4bcd7129 /examples
parent01426f1e82b60d319c3319391b43d84a8e613970 (diff)
downloadSTC-modified-92edcbf8da88b1e59c7724f2875e9e9df3383cb1.tar.gz
STC-modified-92edcbf8da88b1e59c7724f2875e9e9df3383cb1.zip
Fixed default hash16 and hash32.
Diffstat (limited to 'examples')
-rw-r--r--examples/benchmark.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/benchmark.c b/examples/benchmark.c
index 969cf3cc..7b0e1fa5 100644
--- a/examples/benchmark.c
+++ b/examples/benchmark.c
@@ -18,11 +18,11 @@ template<typename C> inline void destroy_me(C& c) { C().swap(c); }
// Visual Studio: compile with -TP to force C++: cl -TP -EHsc -O2 benchmark.c
static inline uint32_t fibonacci_hash(const void* data, size_t len) {
- return ((*(const uint64_t *) data) * 11400714819323198485llu) >> 24;
+ return (uint32_t) (((*(const uint64_t *) data) * 11400714819323198485llu) >> 24);
}
// cmap and khash template expansion
-typedef_cmap(ii, int64_t, int64_t, c_default_destroy, c_default_equals, fibonacci_hash);
+typedef_cmap(ii, int64_t, int64_t, c_default_destroy, c_default_equals, fibonacci_hash); // c_default_hash16);
KHASH_MAP_INIT_INT64(ii, int64_t)