From d009f6138a9c3f713dbeede6be780d05287eb2a6 Mon Sep 17 00:00:00 2001 From: Alexandr Guzhva Date: Tue, 17 Sep 2024 09:47:27 -0400 Subject: [PATCH] FIx a bug for a non-simdlib code of ResidualQuantizer Signed-off-by: Alexandr Guzhva --- faiss/impl/residual_quantizer_encode_steps.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/faiss/impl/residual_quantizer_encode_steps.cpp b/faiss/impl/residual_quantizer_encode_steps.cpp index 8db6f9e5f7..648ab731dd 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; } }