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

Method note_rows

engine/src/core/dflash2.cpp:1037–1042  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1035}
1036
1037void Dflash2Drafter::note_rows(const int32_t* toks, int64_t n, int64_t pos0) {
1038 if (pos0 < 0) return;
1039 if ((int64_t) cur_.hist.size() > pos0) { cur_.hist.resize((size_t) pos0); if (log_on_) cur_.truncate(pos0); }
1040 if ((int64_t) cur_.hist.size() < pos0) return; // a gap: the history stops being a prefix, so it stays where it is (the next begin_request starts over)
1041 cur_.hist.insert(cur_.hist.end(), toks, toks + n);
1042}
1043
1044bool Dflash2Drafter::context(const float* taps, int64_t n, int64_t pos0, std::string& err) {
1045 if (!context_wait(err)) return false;

Callers 1

feedFunction · 0.45

Calls 5

sizeMethod · 0.45
resizeMethod · 0.45
truncateMethod · 0.45
insertMethod · 0.45
endMethod · 0.45

Tested by 1

feedFunction · 0.36