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

Method CopyValues

cpp/src/arrow/util/hashing.h:493–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491 // Copy values starting from index `start` into `out_data`
492 template <typename Value>
493 void CopyValues(int32_t start, Value* out_data) const {
494 // So that both uint16_t and Float16 are allowed
495 static_assert(sizeof(Value) == sizeof(Scalar));
496 Scalar* out = reinterpret_cast<Scalar*>(out_data);
497 hash_table_.VisitEntries([=](const HashTableEntry* entry) {
498 int32_t index = entry->payload.memo_index - start;
499 if (index >= 0) {
500 out[index] = entry->payload.value;
501 }
502 });
503 // Zero-initialize the null entry
504 if (null_index_ != kKeyNotFound) {
505 int32_t index = null_index_ - start;
506 if (index >= 0) {
507 out[index] = Scalar{};
508 }
509 }
510 }
511
512 template <typename Value>
513 void CopyValues(Value* out_data) const {

Callers 4

TESTFunction · 0.45
WriteDictMethod · 0.45

Calls 2

CopyValuesFunction · 0.85
VisitEntriesMethod · 0.80

Tested by 1

TESTFunction · 0.36