MCPcopy Create free account
hub / github.com/Niko1221/Strata / issue

Method issue

engine/src/kernels/ngram.cpp:639–664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639bool PleTable::issue(const uint32_t* rows16) {
640 std::lock_guard<std::recursive_mutex> lk(impl_->mu);
641 wait_prefetches();
642 std::memcpy(impl_->rows, rows16, sizeof impl_->rows);
643 if (impl_->mode == PleIo::Direct) {
644 if (impl_->pending) return false; // one token in flight per table
645 impl_->ticket = impl_->reader.issue(impl_->rows, PLE_N_HEADS, impl_->raw);
646 impl_->pending = true;
647 return true;
648 }
649#if defined(_WIN32)
650 if (impl_->data != nullptr && g_ple_prefetch) {
651 WIN32_MEMORY_RANGE_ENTRY ranges[PLE_N_HEADS];
652 ULONG_PTR n = 0;
653 for (int h = 0; h < PLE_N_HEADS; ++h) {
654 if (rows16[h] >= impl_->n_rows) continue;
655 ranges[n].VirtualAddress = (PVOID) (impl_->data + (size_t) rows16[h] * impl_->rb);
656 ranges[n].NumberOfBytes = impl_->rb;
657 ++n;
658 }
659 if (n > 0) (void) PrefetchVirtualMemory(GetCurrentProcess(), n, ranges, 0);
660 }
661#endif
662 impl_->pending = true;
663 return true;
664}
665
666bool PleTable::collect(float* out2560, std::string& err) {
667 std::lock_guard<std::recursive_mutex> lk(impl_->mu);

Callers 8

gatherMethod · 0.95
ple_issue_tokenFunction · 0.45
checkFunction · 0.45
prefetch_rowsMethod · 0.45
read_rowMethod · 0.45
gather_batchMethod · 0.45
gatherMethod · 0.45
issue_walkFunction · 0.45

Calls 1

memcpyFunction · 0.85

Tested by

no test coverage detected