mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 10:31:57 +00:00
Fixed trailing whitespaces issue
This commit is contained in:
parent
3be83a26d0
commit
8f349907fb
@ -235,7 +235,7 @@ ColumnPtr ColumnFixedString::filter(const IColumn::Filter & filt, ssize_t result
|
|||||||
* Based on the assumption that often pieces of consecutive values
|
* Based on the assumption that often pieces of consecutive values
|
||||||
* completely pass or do not pass the filter.
|
* completely pass or do not pass the filter.
|
||||||
* Therefore, we will optimistically check the parts of `SIMD_BYTES` values.
|
* Therefore, we will optimistically check the parts of `SIMD_BYTES` values.
|
||||||
*/
|
*/
|
||||||
#if defined(__AVX512F__) && defined(__AVX512BW__)
|
#if defined(__AVX512F__) && defined(__AVX512BW__)
|
||||||
static constexpr size_t SIMD_BYTES = 64;
|
static constexpr size_t SIMD_BYTES = 64;
|
||||||
const __m512i zero64 = _mm512_setzero_epi32();
|
const __m512i zero64 = _mm512_setzero_epi32();
|
||||||
@ -271,13 +271,13 @@ ColumnPtr ColumnFixedString::filter(const IColumn::Filter & filt, ssize_t result
|
|||||||
}
|
}
|
||||||
#elif defined(__AVX2__)
|
#elif defined(__AVX2__)
|
||||||
static constexpr size_t SIMD_BYTES = 32;
|
static constexpr size_t SIMD_BYTES = 32;
|
||||||
const __m256i zero32 = _mm256_setzero_si256();
|
const __m256i zero32 = _mm256_setzero_si256();
|
||||||
const UInt8 * filt_end_avx2 = filt_pos + col_size / SIMD_BYTES * SIMD_BYTES;
|
const UInt8 * filt_end_avx2 = filt_pos + col_size / SIMD_BYTES * SIMD_BYTES;
|
||||||
const size_t chars_per_simd_elements = SIMD_BYTES * n;
|
const size_t chars_per_simd_elements = SIMD_BYTES * n;
|
||||||
|
|
||||||
while (filt_pos < filt_end_avx2)
|
while (filt_pos < filt_end_avx2)
|
||||||
{
|
{
|
||||||
uint32_t mask = _mm256_movemask_epi8(_mm256_cmpgt_epi8(_mm256_loadu_si256(reinterpret_cast<const __m256i *>(filt_pos)), zero32));
|
uint32_t mask = _mm256_movemask_epi8(_mm256_cmpgt_epi8(_mm256_loadu_si256(reinterpret_cast<const __m256i *>(filt_pos)), zero32));
|
||||||
|
|
||||||
if (0xFFFFFFFF == mask)
|
if (0xFFFFFFFF == mask)
|
||||||
{
|
{
|
||||||
@ -296,7 +296,7 @@ ColumnPtr ColumnFixedString::filter(const IColumn::Filter & filt, ssize_t result
|
|||||||
mask = _blsr_u32(mask);
|
mask = _blsr_u32(mask);
|
||||||
#else
|
#else
|
||||||
mask = mask & (mask-1);
|
mask = mask & (mask-1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data_pos += chars_per_simd_elements;
|
data_pos += chars_per_simd_elements;
|
||||||
|
@ -348,12 +348,12 @@ ColumnPtr ColumnVector<T>::filter(const IColumn::Filter & filt, ssize_t result_s
|
|||||||
|
|
||||||
#elif defined(__AVX2__)
|
#elif defined(__AVX2__)
|
||||||
static constexpr size_t SIMD_BYTES = 32;
|
static constexpr size_t SIMD_BYTES = 32;
|
||||||
const __m256i zero32 = _mm256_setzero_si256();
|
const __m256i zero32 = _mm256_setzero_si256();
|
||||||
const UInt8 * filt_end_avx2 = filt_pos + size / SIMD_BYTES * SIMD_BYTES;
|
const UInt8 * filt_end_avx2 = filt_pos + size / SIMD_BYTES * SIMD_BYTES;
|
||||||
|
|
||||||
while (filt_pos < filt_end_avx2)
|
while (filt_pos < filt_end_avx2)
|
||||||
{
|
{
|
||||||
UInt32 mask = _mm256_movemask_epi8(_mm256_cmpgt_epi8(_mm256_loadu_si256(reinterpret_cast<const __m256i *>(filt_pos)), zero32));
|
UInt32 mask = _mm256_movemask_epi8(_mm256_cmpgt_epi8(_mm256_loadu_si256(reinterpret_cast<const __m256i *>(filt_pos)), zero32));
|
||||||
|
|
||||||
if (0xFFFFFFFF == mask)
|
if (0xFFFFFFFF == mask)
|
||||||
{
|
{
|
||||||
@ -369,7 +369,7 @@ ColumnPtr ColumnVector<T>::filter(const IColumn::Filter & filt, ssize_t result_s
|
|||||||
mask = _blsr_u32(mask);
|
mask = _blsr_u32(mask);
|
||||||
#else
|
#else
|
||||||
mask = mask & (mask-1);
|
mask = mask & (mask-1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ namespace
|
|||||||
while (filt_pos < filt_end_aligned)
|
while (filt_pos < filt_end_aligned)
|
||||||
{
|
{
|
||||||
uint64_t mask = _mm512_cmp_epi8_mask(_mm512_loadu_si512(reinterpret_cast<const __m512i *>(filt_pos)), zero_vec, _MM_CMPINT_GT);
|
uint64_t mask = _mm512_cmp_epi8_mask(_mm512_loadu_si512(reinterpret_cast<const __m512i *>(filt_pos)), zero_vec, _MM_CMPINT_GT);
|
||||||
|
|
||||||
if (mask == 0xffffffffffffffff)
|
if (mask == 0xffffffffffffffff)
|
||||||
{
|
{
|
||||||
/// SIMD_BYTES consecutive rows pass the filter
|
/// SIMD_BYTES consecutive rows pass the filter
|
||||||
@ -350,7 +350,7 @@ namespace
|
|||||||
|
|
||||||
filt_pos += SIMD_BYTES;
|
filt_pos += SIMD_BYTES;
|
||||||
offsets_pos += SIMD_BYTES;
|
offsets_pos += SIMD_BYTES;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while (filt_pos < filt_end)
|
while (filt_pos < filt_end)
|
||||||
|
Loading…
Reference in New Issue
Block a user