| 1035 | } |
| 1036 | |
| 1037 | void 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 | |
| 1044 | bool Dflash2Drafter::context(const float* taps, int64_t n, int64_t pos0, std::string& err) { |
| 1045 | if (!context_wait(err)) return false; |