Update example_c.c (#2419)

Summary:
This line should be searching for xq, but the current line is searching the first 5 line in xb. It should be a bug.

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2419

Reviewed By: alexanderguzhva

Differential Revision: D39167612

Pulled By: mdouze

fbshipit-source-id: fc2534fa799dcbedae1af7881f5d70026b4de675
pull/2441/head
zeyuyun1 2022-08-31 05:44:25 -07:00 committed by Facebook GitHub Bot
parent 230a97f7cb
commit f07e82aa1a
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ int main() {
{ // search xq
idx_t* I = malloc(k * nq * sizeof(idx_t));
float* D = malloc(k * nq * sizeof(float));
FAISS_TRY(faiss_Index_search(index, 5, xb, k, D, I));
FAISS_TRY(faiss_Index_search(index, nq, xq, k, D, I));
printf("I=\n");
for (int i = 0; i < 5; i++) {
for (int j = 0; j < k; j++)