mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
define a function call for zero filling
This commit is contained in:
parent
e8b3310319
commit
91b1dd6f78
@ -398,6 +398,14 @@ UInt32 CompressionCodecDeflateQpl::doCompressData(const char * source, UInt32 so
|
||||
return res;
|
||||
}
|
||||
|
||||
inline void touchBufferWithZeroFilling(char * buffer, UInt32 buffer_size)
|
||||
{
|
||||
for (char * p = buffer; p < buffer + buffer_size; p += ::getPageSize()/(sizeof(*p)))
|
||||
{
|
||||
*p = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void CompressionCodecDeflateQpl::doDecompressData(const char * source, UInt32 source_size, char * dest, UInt32 uncompressed_size) const
|
||||
{
|
||||
/// QPL library is using AVX-512 with some shuffle operations.
|
||||
@ -407,10 +415,7 @@ void CompressionCodecDeflateQpl::doDecompressData(const char * source, UInt32 so
|
||||
#endif
|
||||
/// Device IOTLB miss has big perf. impact for IAA accelerators.
|
||||
/// To avoid page fault, we need touch buffers related to accelerator in advance.
|
||||
for (char * p = dest; p < dest + uncompressed_size; p += ::getPageSize()/(sizeof(*p)))
|
||||
{
|
||||
*p = 0;
|
||||
}
|
||||
touchBufferWithZeroFilling(dest, uncompressed_size);
|
||||
|
||||
switch (getDecompressMode())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user