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

Method HashBitImp

cpp/src/arrow/compute/key_hash_internal.cc:277–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275
276template <bool T_COMBINE_HASHES>
277void Hashing32::HashBitImp(int64_t bit_offset, uint32_t num_keys, const uint8_t* keys,
278 uint32_t* hashes) {
279 for (uint32_t i = 0; i < num_keys; ++i) {
280 uint32_t bit = bit_util::GetBit(keys, bit_offset + i) ? 1 : 0;
281 uint32_t hash = PRIME32_1 * (1 - bit) + PRIME32_2 * bit;
282
283 if (T_COMBINE_HASHES) {
284 hashes[i] = CombineHashesImp(hashes[i], hash);
285 } else {
286 hashes[i] = hash;
287 }
288 }
289}
290
291void Hashing32::HashBit(bool combine_hashes, int64_t bit_offset, uint32_t num_keys,
292 const uint8_t* keys, uint32_t* hashes) {

Callers

nothing calls this directly

Calls 2

CombineHashesImpFunction · 0.85
GetBitFunction · 0.50

Tested by

no test coverage detected