diff --git a/faiss/impl/residual_quantizer_encode_steps.cpp b/faiss/impl/residual_quantizer_encode_steps.cpp index 802262969a..c52988ab24 100644 --- a/faiss/impl/residual_quantizer_encode_steps.cpp +++ b/faiss/impl/residual_quantizer_encode_steps.cpp @@ -95,7 +95,7 @@ void accum_and_store_tab( for (size_t ij = 1; ij < M; ij++) { reg += cbs[ij][kk]; } - output[b * K + kk] = reg; + output[kk] = reg; } } @@ -152,7 +152,7 @@ void accum_and_add_tab( for (size_t ij = 1; ij < M; ij++) { reg += cbs[ij][kk]; } - output[b * K + kk] += reg; + output[kk] += reg; } }