mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-22 09:40:49 +00:00
Fallback for non x86 [#CLICKHOUSE-2]
This commit is contained in:
parent
cc4f896a9d
commit
af5875960f
2
contrib/capnproto
vendored
2
contrib/capnproto
vendored
@ -1 +1 @@
|
||||
Subproject commit 7173ab638fdf144032411dc69fb1082cd473e08f
|
||||
Subproject commit c949a18da5f041a36cc218c5c4b79c7705999b4f
|
2
contrib/librdkafka
vendored
2
contrib/librdkafka
vendored
@ -1 +1 @@
|
||||
Subproject commit 7478b5ef16aadd6543fe38bc6a2deb895c70da98
|
||||
Subproject commit c3d50eb613704fb9c8ab3bce95a88275cb5875b7
|
2
contrib/poco
vendored
2
contrib/poco
vendored
@ -1 +1 @@
|
||||
Subproject commit 3a2d0a833a22ef5e1164a9ada54e3253cb038904
|
||||
Subproject commit 81d4fdfcb887f89b0f7b1e9b503cbe63e6d8366b
|
2
contrib/zstd
vendored
2
contrib/zstd
vendored
@ -1 +1 @@
|
||||
Subproject commit 255597502c3a4ef150abc964e376d4202a8c2929
|
||||
Subproject commit f4340f46b2387bc8de7d5320c0b83bb1499933ad
|
@ -113,15 +113,15 @@ static inline size_t murmurMix(UInt64 x)
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
#if __x86_64__
|
||||
static inline size_t crc32Hash(UInt64 x)
|
||||
{
|
||||
UInt64 crc = -1ULL;
|
||||
#if __x86_64__
|
||||
asm("crc32q %[x], %[crc]\n" : [crc] "+r" (crc) : [x] "rm" (x));
|
||||
#endif
|
||||
return crc;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static inline size_t mulShift(UInt64 x)
|
||||
{
|
||||
@ -279,11 +279,6 @@ static inline void test(size_t n, const UInt64 * data, const char * name)
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
|
||||
#if !__x86_64__
|
||||
std::cerr << "Only for x86_64 arch" << std::endl;
|
||||
#endif
|
||||
|
||||
const size_t BUF_SIZE = 1024;
|
||||
|
||||
size_t n = (atoi(argv[1]) + (BUF_SIZE - 1)) / BUF_SIZE * BUF_SIZE;
|
||||
@ -321,7 +316,10 @@ int main(int argc, char ** argv)
|
||||
if (!method || method == 7) test<murmurMix> (n, &data[0], "6: murmur64 mixer");
|
||||
if (!method || method == 8) test<mulShift> (n, &data[0], "7: mulShift");
|
||||
if (!method || method == 9) test<tabulation>(n, &data[0], "8: tabulation");
|
||||
|
||||
#if __x86_64__
|
||||
if (!method || method == 10) test<crc32Hash> (n, &data[0], "9: crc32");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user