| 147 | // Like xsimd::zip_hi, but zip groups of kNumBytes at once. |
| 148 | template <typename Arch, int kNumBytes> |
| 149 | auto zip_hi_n(const xsimd::batch<int8_t, Arch>& a, |
| 150 | const xsimd::batch<int8_t, Arch>& b) -> xsimd::batch<int8_t, Arch> { |
| 151 | using simd_batch = xsimd::batch<int8_t, Arch>; |
| 152 | using arrow::internal::SizedInt; |
| 153 | // For signed arithmetic |
| 154 | constexpr int kBatchSize = static_cast<int>(simd_batch::size); |
| 155 | |
| 156 | if constexpr (kNumBytes == kBatchSize) { |
| 157 | return b; |
| 158 | } else if constexpr (kNumBytes <= 8) { |
| 159 | return xsimd::bitwise_cast<int8_t>( |
| 160 | xsimd::zip_hi(xsimd::bitwise_cast<SizedInt<kNumBytes>>(a), |
| 161 | xsimd::bitwise_cast<SizedInt<kNumBytes>>(b))); |
| 162 | } else if constexpr (kNumBytes == 16 && kBatchSize == 32) { |
| 163 | // No data type for 128 bits |
| 164 | // This could be made generic by simply computing the shuffle permute constant |
| 165 | return xsimd::bitwise_cast<int8_t>( |
| 166 | xsimd::shuffle(xsimd::bitwise_cast<int64_t>(a), xsimd::bitwise_cast<int64_t>(b), |
| 167 | xsimd::batch_constant<uint64_t, Arch, 2, 3, 6, 7>{})); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | template <typename Arch, int kNumStreams> |
| 172 | void ByteStreamSplitEncodeSimd(const uint8_t* raw_values, int width, |
nothing calls this directly
no outgoing calls
no test coverage detected