Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions faiss/impl/residual_quantizer_encode_steps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,6 @@ void refine_beam_mp(
std::unique_ptr<Index> assign_index;
if (rq.assign_index_factory) {
assign_index.reset((*rq.assign_index_factory)(rq.d));
} else {
assign_index.reset(new IndexFlatL2(rq.d));
}

// main loop
Expand Down Expand Up @@ -701,7 +699,9 @@ void refine_beam_mp(
assign_index.get(),
rq.approx_topk_mode);

assign_index->reset();
if (assign_index != nullptr) {
assign_index->reset();
}

std::swap(codes_ptr, new_codes_ptr);
std::swap(residuals_ptr, new_residuals_ptr);
Expand Down