MCPcopy Create free account
hub / github.com/apache/arrow / bytes_to_bits_avx2

Function bytes_to_bits_avx2

cpp/src/arrow/compute/util_avx2.cc:187–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187void bytes_to_bits_avx2(const int num_bits, const uint8_t* bytes, uint8_t* bits) {
188 constexpr int unroll = 32;
189 // Processing 32 bits at a time
190 for (int i = 0; i < num_bits / unroll; ++i) {
191 reinterpret_cast<uint32_t*>(bits)[i] = _mm256_movemask_epi8(
192 _mm256_loadu_si256(reinterpret_cast<const __m256i*>(bytes) + i));
193 }
194}
195
196bool are_all_bytes_zero_avx2(const uint8_t* bytes, uint32_t num_bytes) {
197 __m256i result_or = _mm256_setzero_si256();

Callers 1

bytes_to_bitsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected