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

Method HashIntImp

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

Source from the content-addressed store, hash-verified

299
300template <bool T_COMBINE_HASHES, typename T>
301void Hashing32::HashIntImp(uint32_t num_keys, const T* keys, uint32_t* hashes) {
302 constexpr uint64_t multiplier = 11400714785074694791ULL;
303 for (uint32_t ikey = 0; ikey < num_keys; ++ikey) {
304 uint64_t x = static_cast<uint64_t>(keys[ikey]);
305 uint32_t hash = static_cast<uint32_t>(BYTESWAP(x * multiplier));
306
307 if (T_COMBINE_HASHES) {
308 hashes[ikey] = CombineHashesImp(hashes[ikey], hash);
309 } else {
310 hashes[ikey] = hash;
311 }
312 }
313}
314
315void Hashing32::HashInt(bool combine_hashes, uint32_t num_keys, uint64_t key_length,
316 const uint8_t* keys, uint32_t* hashes) {

Callers

nothing calls this directly

Calls 1

CombineHashesImpFunction · 0.85

Tested by

no test coverage detected