From 7c2d8905a3a3baeb96bacded357bdc553ea93657 Mon Sep 17 00:00:00 2001 From: Gergely Szilvasy Date: Fri, 14 Jun 2024 09:49:49 -0700 Subject: [PATCH] fix Windows build - signed int OMP for MSVC Summary: MSVC doesn't support unsigned int for OMP Reviewed By: junjieqi Differential Revision: D58591594 --- faiss/IndexHNSW.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faiss/IndexHNSW.cpp b/faiss/IndexHNSW.cpp index fd80b87df7..8e5c654f04 100644 --- a/faiss/IndexHNSW.cpp +++ b/faiss/IndexHNSW.cpp @@ -468,7 +468,7 @@ void IndexHNSW::search_level_0( if (is_similarity_metric(this->metric_type)) { // we need to revert the negated distances #pragma omp parallel for - for (size_t i = 0; i < k * n; i++) { + for (int64_t i = 0; i < k * n; i++) { distances[i] = -distances[i]; } }