Skip to content

Commit 12f8fd7

Browse files
algoriddlefacebook-github-bot
authored andcommitted
fix Windows build - signed int OMP for MSVC (facebookresearch#3517)
Summary: Pull Request resolved: facebookresearch#3517 MSVC doesn't support unsigned int for OMP Reviewed By: kuarora, junjieqi, ramilbakhshyiev Differential Revision: D58591594 fbshipit-source-id: ac7d6b37a82f9543be3e0fe418f0f6b439751475
1 parent 024cc8a commit 12f8fd7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

faiss/IndexHNSW.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ void IndexHNSW::search_level_0(
468468
if (is_similarity_metric(this->metric_type)) {
469469
// we need to revert the negated distances
470470
#pragma omp parallel for
471-
for (size_t i = 0; i < k * n; i++) {
471+
for (int64_t i = 0; i < k * n; i++) {
472472
distances[i] = -distances[i];
473473
}
474474
}

0 commit comments

Comments
 (0)