feat: support to pass in list size (#487)
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "diskann_context.h"
|
||||
#include <chrono>
|
||||
#include "diskann_params.h"
|
||||
#include "diskann_pq_table.h"
|
||||
#include "diskann_util.h"
|
||||
|
||||
@@ -93,6 +94,13 @@ DiskAnnContext::~DiskAnnContext() {
|
||||
}
|
||||
}
|
||||
|
||||
int DiskAnnContext::update(const ailego::Params ¶ms) {
|
||||
uint32_t list_size = list_size_;
|
||||
params.get(PARAM_DISKANN_SEARCHER_LIST_SIZE, &list_size);
|
||||
list_size_ = list_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int DiskAnnContext::update_context(ContextType type, const IndexMeta &meta,
|
||||
const IndexMetric::Pointer &measure,
|
||||
const DiskAnnEntity::Pointer &entity,
|
||||
|
||||
@@ -118,9 +118,7 @@ class DiskAnnContext : public IndexContext,
|
||||
}
|
||||
|
||||
//! Update the parameters of context
|
||||
virtual int update(const ailego::Params & /*params*/) override {
|
||||
return 0;
|
||||
}
|
||||
int update(const ailego::Params ¶ms) override;
|
||||
|
||||
inline DistCalculator &dist_calculator() {
|
||||
return dc_;
|
||||
|
||||
Reference in New Issue
Block a user