Skip to content

Commit

Permalink
fix Windows build - signed int OMP for MSVC (#3517)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #3517

MSVC doesn't support unsigned int for OMP

Reviewed By: kuarora, junjieqi, ramilbakhshyiev

Differential Revision: D58591594

fbshipit-source-id: ac7d6b37a82f9543be3e0fe418f0f6b439751475
  • Loading branch information
algoriddle authored and facebook-github-bot committed Jun 14, 2024
1 parent 44d21ee commit e65a910
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion faiss/IndexHNSW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}
Expand Down

0 comments on commit e65a910

Please sign in to comment.