This commit is contained in:
Raúl Marín 2024-11-18 20:03:35 +01:00
parent 47bed13b42
commit 445a5e9c9e

View File

@ -994,14 +994,19 @@ ColumnPtr ColumnVector<T>::createWithOffsets(const IColumn::Offsets & offsets, c
return res; return res;
} }
DECLARE_DEFAULT_CODE(template <typename Container, typename Type> void vectorIndexImpl( DECLARE_DEFAULT_CODE(
const Container & data, const PaddedPODArray<Type> & indexes, size_t limit, Container & res_data) { template <typename Container, typename Type> void vectorIndexImpl(
const Container & data, const PaddedPODArray<Type> & indexes, size_t limit, Container & res_data)
{
for (size_t i = 0; i < limit; ++i) for (size_t i = 0; i < limit; ++i)
res_data[i] = data[indexes[i]]; res_data[i] = data[indexes[i]];
}); }
);
DECLARE_AVX512VBMI_SPECIFIC_CODE(template <typename Container, typename Type> void vectorIndexImpl( DECLARE_AVX512VBMI_SPECIFIC_CODE(
const Container & data, const PaddedPODArray<Type> & indexes, size_t limit, Container & res_data) { template <typename Container, typename Type>
void vectorIndexImpl(const Container & data, const PaddedPODArray<Type> & indexes, size_t limit, Container & res_data)
{
static constexpr UInt64 MASK64 = 0xffffffffffffffff; static constexpr UInt64 MASK64 = 0xffffffffffffffff;
const size_t limit64 = limit & ~63; const size_t limit64 = limit & ~63;
size_t pos = 0; size_t pos = 0;
@ -1107,7 +1112,8 @@ DECLARE_AVX512VBMI_SPECIFIC_CODE(template <typename Container, typename Type> vo
_mm512_mask_storeu_epi8(res_pos + pos, tail_mask, out); _mm512_mask_storeu_epi8(res_pos + pos, tail_mask, out);
} }
} }
}); }
);
template <typename T> template <typename T>
template <typename Type> template <typename Type>