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

Method ProcessFullStripes

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

Source from the content-addressed store, hash-verified

43}
44
45inline void Hashing32::ProcessFullStripes(uint64_t num_stripes, const uint8_t* key,
46 uint32_t* out_acc1, uint32_t* out_acc2,
47 uint32_t* out_acc3, uint32_t* out_acc4) {
48 uint32_t acc1, acc2, acc3, acc4;
49 acc1 = static_cast<uint32_t>(
50 (static_cast<uint64_t>(PRIME32_1) + static_cast<uint64_t>(PRIME32_2)) & 0xffffffff);
51 acc2 = PRIME32_2;
52 acc3 = 0;
53 acc4 = static_cast<uint32_t>(-static_cast<int32_t>(PRIME32_1));
54
55 for (int64_t istripe = 0; istripe < static_cast<int64_t>(num_stripes) - 1; ++istripe) {
56 const uint8_t* stripe = key + istripe * 4 * sizeof(uint32_t);
57 uint32_t stripe1 = util::SafeLoadAs<const uint32_t>(stripe);
58 uint32_t stripe2 = util::SafeLoadAs<const uint32_t>(stripe + sizeof(uint32_t));
59 uint32_t stripe3 = util::SafeLoadAs<const uint32_t>(stripe + 2 * sizeof(uint32_t));
60 uint32_t stripe4 = util::SafeLoadAs<const uint32_t>(stripe + 3 * sizeof(uint32_t));
61 acc1 = Round(acc1, stripe1);
62 acc2 = Round(acc2, stripe2);
63 acc3 = Round(acc3, stripe3);
64 acc4 = Round(acc4, stripe4);
65 }
66
67 *out_acc1 = acc1;
68 *out_acc2 = acc2;
69 *out_acc3 = acc3;
70 *out_acc4 = acc4;
71}
72
73inline void Hashing32::ProcessLastStripe(uint32_t mask1, uint32_t mask2, uint32_t mask3,
74 uint32_t mask4, const uint8_t* last_stripe,

Callers

nothing calls this directly

Calls 1

RoundFunction · 0.70

Tested by

no test coverage detected