diff options
-rw-r--r-- | MurmurHash3.cpp | 4 | ||||
-rw-r--r-- | SpeedTest.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/MurmurHash3.cpp b/MurmurHash3.cpp index 5fcbe94..1fec6a0 100644 --- a/MurmurHash3.cpp +++ b/MurmurHash3.cpp @@ -14,6 +14,10 @@ #if defined(_MSC_VER)
+typedef unsigned char uint8_t;
+typedef unsigned long uint32_t;
+typedef unsigned __int64 uint64_t;
+
#define FORCE_INLINE __forceinline
#include <stdlib.h>
diff --git a/SpeedTest.cpp b/SpeedTest.cpp index b586102..211b1e9 100644 --- a/SpeedTest.cpp +++ b/SpeedTest.cpp @@ -169,11 +169,11 @@ double SpeedTest ( pfHash hash, uint32_t seed, const int trials, const int block {
Rand r(seed);
- uint8_t * buf = new uint8_t[blocksize + 64];
+ uint8_t * buf = new uint8_t[blocksize + 512];
uint64_t t1 = reinterpret_cast<uint64_t>(buf);
- t1 = (t1 + 15) & 0xFFFFFFFFFFFFFFF0;
+ t1 = (t1 + 255) & 0xFFFFFFFFFFFFFF00;
t1 += align;
uint8_t * block = reinterpret_cast<uint8_t*>(t1);
|