Skip to content

Commit 7ebd133

Browse files
LKLLLLLLLLLLfacebook-github-bot
authored andcommitted
Fix openMP index bug (#4348)
Summary: Fix issue #4340 Change openMP index from size_t to int, to satisfy openMP requirement. Pull Request resolved: #4348 Reviewed By: mnorris11 Differential Revision: D74885943 Pulled By: ramilbakhshyiev fbshipit-source-id: 4b4999b8e7a1741f5d75bcc4f39c4231be4d0978
1 parent feb467a commit 7ebd133

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

faiss/utils/distances_fused/simdlib_based.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ void exhaustive_L2sqr_fused_cmax(
260260
const size_t nx_p = (nx / NX_POINTS_PER_LOOP) * NX_POINTS_PER_LOOP;
261261
// the main loop.
262262
#pragma omp parallel for schedule(dynamic)
263-
for (size_t i = 0; i < nx_p; i += NX_POINTS_PER_LOOP) {
263+
for (int64_t i = 0; i < nx_p; i += NX_POINTS_PER_LOOP) {
264264
kernel<DIM, NX_POINTS_PER_LOOP, NY_POINTS_PER_LOOP>(
265265
x, y, y_transposed.data(), ny, res, y_norms, i);
266266
}

0 commit comments

Comments
 (0)