daily update on 20240206 by nitload youmu, token parser change to use regex generator
This commit is contained in:
+7
-12
@@ -1,9 +1,9 @@
|
||||
#include "ssc_intrinsic.h"
|
||||
#include "StgSharpC.h"
|
||||
|
||||
static inline uint32_t fmix32(uint32_t h);
|
||||
static inline uint32_t fmix32(uint32_t hash);
|
||||
|
||||
INTERNAL int SSCDECL city_hash_simplify(byte const *str, int const length)
|
||||
INTERNAL int SSCDECL city_hash_simplify_sse(byte const *str, int const length)
|
||||
{
|
||||
uint32_t hash = length, size = length << 1;
|
||||
byte *end = str + size, *ptr = str;
|
||||
@@ -37,15 +37,10 @@ INTERNAL int SSCDECL city_hash_simplify(byte const *str, int const length)
|
||||
hash = _mm_crc32_u8(hash,*ptr);
|
||||
}
|
||||
}
|
||||
hash ^= hash >> 16;
|
||||
hash *= 0x85ebca6b;
|
||||
hash ^= hash >> 13;
|
||||
hash *= 0xc2b2ae35;
|
||||
hash ^= hash >> 16;
|
||||
return fmix32(hash);
|
||||
}
|
||||
|
||||
INTERNAL inline uint32_t fmix32(uint32_t h)
|
||||
{
|
||||
h ^= h >> 16;
|
||||
h *= 0x85ebca6b;
|
||||
h ^= h >> 13;
|
||||
h *= 0xc2b2ae35;
|
||||
h ^= h >> 16;
|
||||
return h;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user