mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Fix Codec T64 on s390x
This commit is contained in:
parent
d63a1fde05
commit
6cdb7b5a94
@ -307,7 +307,19 @@ void reverseTransposeBytes(const UInt64 * matrix, UInt32 col, T & value)
|
||||
template <typename T>
|
||||
void load(const char * src, T * buf, UInt32 tail = 64)
|
||||
{
|
||||
memcpy(buf, src, tail * sizeof(T));
|
||||
if constexpr (std::endian::native == std::endian::little)
|
||||
{
|
||||
memcpy(buf, src, tail * sizeof(T));
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Since the algorithm uses little-endian integers, data is loaded
|
||||
/// as little-endian types on big-endian machine(s390x, etc.)
|
||||
for (UInt32 i = 0; i < tail; i++)
|
||||
{
|
||||
buf[i] = unalignedLoadLE<T>(src + i * sizeof(T));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
Loading…
Reference in New Issue
Block a user