diff --git a/apps/build_memory_index.cpp b/apps/build_memory_index.cpp index 544e42dee..43034119f 100644 --- a/apps/build_memory_index.cpp +++ b/apps/build_memory_index.cpp @@ -25,7 +25,7 @@ namespace po = boost::program_options; int main(int argc, char **argv) { std::string data_type, dist_fn, data_path, index_path_prefix, label_file, universal_label, label_type; - uint32_t num_threads, R, L, Lf, build_PQ_bytes; + uint32_t num_threads, R, L, Lf, build_PQ_bytes, reduce_prune; float alpha; bool use_pq_build, use_opq; @@ -70,6 +70,9 @@ int main(int argc, char **argv) program_options_utils::FILTERED_LBUILD); optional_configs.add_options()("label_type", po::value(&label_type)->default_value("uint"), program_options_utils::LABEL_TYPE_DESCRIPTION); + optional_configs.add_options()("reduce_prune", po::value(&reduce_prune)->default_value(0),"reduce_prune"); + + std::cout<<"reduce_prune: "<::occlude_list(const uint32_t location, std::vector maxc) pool.resize(maxc); - if (reduce_pool){ - //diskann::cout<<"Reducing pool size from "< 0) - pool.resize(new_pool_size); - } + std::vector &occlude_factor = scratch->occlude_factor(); // occlude_list can be called with the same scratch more than once by // search_for_point_and_add_link through inter_insert. @@ -1081,7 +1077,8 @@ void Index::occlude_list(const uint32_t location, std::vector void Index reduced_pruned_list = pruned_list; - _graph_store->set_neighbours(node, pruned_list); + bool reduce_prune = true; + if (reduce_prune){ + //std::cout<<"reduce prune"<set_neighbours(node, reduced_pruned_list); assert(_graph_store->get_neighbours((location_t)node).size() <= _indexingRange); }