add from giga-device, new branch added

This commit is contained in:
Nitload Youmu
2025-08-21 20:44:30 +08:00
parent 43bbc06bbb
commit fb9398e8be
135 changed files with 1505 additions and 1107 deletions
+3 -3
View File
@@ -15,7 +15,7 @@ INTERNAL int SN_DECL city_hash_simplify_sse(byte const *str, int const length)
for (; ptr < end; ptr += 4) {
hash = _mm_crc32_u32(hash, *(uint32_t *)ptr);
}
for (; ptr < end; ptr++) {
for (; ptr < end; ptr++) {
hash = _mm_crc32_u16(hash, *ptr);
}
} else {
@@ -30,10 +30,10 @@ INTERNAL int SN_DECL city_hash_simplify_sse(byte const *str, int const length)
hash = _mm_crc32_u8(hash, hash64);
hash = _mm_crc32_u8(hash, hash64 >> 32);
for (; ptr < last_32; ptr += 4) {
hash = _mm_crc32_u32(hash, *(uint32_t *)ptr);
hash = _mm_crc32_u32(hash,*(uint32_t *)ptr);
}
for (; ptr < end; ptr += 2) {
hash = _mm_crc32_u8(hash, *ptr);
hash = _mm_crc32_u8(hash,*ptr);
}
}
hash ^= hash >> 16;