Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

[NSE-943] Improve rowtocolumn operator #990

Merged
merged 13 commits into from
Jul 13, 2022
Prev Previous commit
Next Next commit
Add __AVX512BW__ Check
zhixingheyi-tian committed Jun 20, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 5a83d4563f32175b21e86393a070aa947a2d6311
Original file line number Diff line number Diff line change
@@ -331,6 +331,7 @@ arrow::Status CreateArrayData(std::shared_ptr<arrow::Schema> schema, int64_t num

auto dst_value_base = array_data + array_offset[position];
auto value_src_ptr = memory_address_ + offsets[position] + wordoffset;
#ifdef __AVX512BW__
if (ARROW_PREDICT_TRUE(support_avx512)) {
// write the variable value
uint32_t k;
@@ -341,7 +342,9 @@ arrow::Status CreateArrayData(std::shared_ptr<arrow::Schema> schema, int64_t num
auto mask = (1L << (length - k)) - 1;
__m256i v = _mm256_maskz_loadu_epi8(mask, value_src_ptr + k);
_mm256_mask_storeu_epi8(dst_value_base + k, mask, v);
} else {
} else
#endif
{
memcpy(dst_value_base, value_src_ptr, length);
}
}