We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90349f2 commit 5d8bf47Copy full SHA for 5d8bf47
faiss/utils/utils.cpp
@@ -28,6 +28,7 @@
28
#include <omp.h>
29
30
#include <algorithm>
31
+#include <type_traits>
32
#include <vector>
33
34
#include <faiss/impl/AuxIndexStructures.h>
@@ -447,7 +448,8 @@ uint64_t bvec_checksum(size_t n, const uint8_t* a) {
447
448
449
void bvecs_checksum(size_t n, size_t d, const uint8_t* a, uint64_t* cs) {
450
#pragma omp parallel for if (n > 1000)
- for (size_t i = 0; i < n; i++) {
451
+ for (std::make_signed<std::size_t>::type i_ = 0; static_cast<std::size_t>(i_) < n; i_++) {
452
+ const auto i = static_cast<std::size_t>(i_);
453
cs[i] = bvec_checksum(d, a + i * d);
454
}
455
0 commit comments