diff --git a/faiss/IndexScalarQuantizer.cpp b/faiss/IndexScalarQuantizer.cpp index 6b23315735..b7199df39d 100644 --- a/faiss/IndexScalarQuantizer.cpp +++ b/faiss/IndexScalarQuantizer.cpp @@ -210,12 +210,11 @@ void IndexIVFScalarQuantizer::add_core( const idx_t* coarse_idx) { FAISS_THROW_IF_NOT(is_trained); - size_t nadd = 0; std::unique_ptr squant(sq.select_quantizer()); DirectMapAdd dm_add(direct_map, n, xids); -#pragma omp parallel reduction(+ : nadd) +#pragma omp parallel { std::vector residual(d); std::vector one_code(code_size); @@ -240,7 +239,6 @@ void IndexIVFScalarQuantizer::add_core( size_t ofs = invlists->add_entry(list_no, id, one_code.data()); dm_add.add(i, list_no, ofs); - nadd++; } else if (rank == 0 && list_no == -1) { dm_add.add(i, -1, 0);