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

Method HashInt

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

Source from the content-addressed store, hash-verified

313}
314
315void Hashing32::HashInt(bool combine_hashes, uint32_t num_keys, uint64_t key_length,
316 const uint8_t* keys, uint32_t* hashes) {
317 switch (key_length) {
318 case sizeof(uint8_t):
319 if (combine_hashes) {
320 HashIntImp<true, uint8_t>(num_keys, keys, hashes);
321 } else {
322 HashIntImp<false, uint8_t>(num_keys, keys, hashes);
323 }
324 break;
325 case sizeof(uint16_t):
326 if (combine_hashes) {
327 HashIntImp<true, uint16_t>(num_keys, reinterpret_cast<const uint16_t*>(keys),
328 hashes);
329 } else {
330 HashIntImp<false, uint16_t>(num_keys, reinterpret_cast<const uint16_t*>(keys),
331 hashes);
332 }
333 break;
334 case sizeof(uint32_t):
335 if (combine_hashes) {
336 HashIntImp<true, uint32_t>(num_keys, reinterpret_cast<const uint32_t*>(keys),
337 hashes);
338 } else {
339 HashIntImp<false, uint32_t>(num_keys, reinterpret_cast<const uint32_t*>(keys),
340 hashes);
341 }
342 break;
343 case sizeof(uint64_t):
344 if (combine_hashes) {
345 HashIntImp<true, uint64_t>(num_keys, reinterpret_cast<const uint64_t*>(keys),
346 hashes);
347 } else {
348 HashIntImp<false, uint64_t>(num_keys, reinterpret_cast<const uint64_t*>(keys),
349 hashes);
350 }
351 break;
352 default:
353 ARROW_DCHECK(false);
354 break;
355 }
356}
357
358void Hashing32::HashFixed(int64_t hardware_flags, bool combine_hashes, uint32_t num_keys,
359 uint64_t key_length, const uint8_t* keys, uint32_t* hashes,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected