@@ -90,8 +90,8 @@ void wpX64Mur3Hasher128(WpU8Stream *bytes, void *hasher_io) {
|
||||
h1 += h2;
|
||||
h2 += h1;
|
||||
|
||||
io->out_hash1 = h1;
|
||||
io->out_hash2 = h2;
|
||||
io->hash[0] = h1;
|
||||
io->hash[1] = h2;
|
||||
}
|
||||
|
||||
wp_intern inline u64 fmix64(u64 k) {
|
||||
|
||||
@@ -19,14 +19,13 @@ BEGIN_C_LINKAGE
|
||||
#define WP_MUR3_HASHER_MAGIC ((u64)0x57504d4841534833)
|
||||
|
||||
typedef struct {
|
||||
u64 hash[2];
|
||||
u64 magic;
|
||||
u64 out_hash1;
|
||||
u64 out_hash2;
|
||||
u32 seed;
|
||||
} WpMur3HasherIO;
|
||||
|
||||
#ifdef WP_PLATFORM_CPP
|
||||
#define wpMur3HasherIO(SEED) (WpMur3HasherIO{WP_MUR3_HASHER_MAGIC, 0, 0, SEED})
|
||||
#define wpMur3HasherIO(SEED) (WpMur3HasherIO{{}, WP_MUR3_HASHER_MAGIC, SEED})
|
||||
#else
|
||||
#define wpMur3HasherIO(SEED) ((WpMur3HasherIO){ .magic = WP_MUR3_HASHER_MAGIC, .seed = SEED })
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user