[enhance] buffer storage (#83)

This commit is contained in:
ZeFeng Yin
2026-03-19 15:24:46 +08:00
committed by GitHub
parent d4ffbf06af
commit 432de52c5f
19 changed files with 5377 additions and 339 deletions
@@ -190,10 +190,18 @@ class FlatStreamerContext : public IndexStreamer::Context {
group_topk_heaps_.clear();
}
void reset() override {}
void reset() override {
for (auto &it : results_) {
it.clear();
}
for (auto &it : group_results_) {
it.clear();
}
}
//! Reset the context
void reset(const FlatStreamer<BATCH_SIZE> *owner) {
this->reset();
magic_ = owner->magic();
feature_size_ = owner->meta().element_size();