Fix CQS signal readability-braces-around-statements in fbcode/faiss/benchs (#4449)

Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4449

Reviewed By: dtolnay

Differential Revision: D78795472

fbshipit-source-id: 227e3beb472f06f5c2897f7f4a7b6713ab06a4cb
This commit is contained in:
generatedunixname89002005287564
2025-07-23 16:47:30 -07:00
committed by Facebook GitHub Bot
parent 1ff5912ca0
commit 9595cbb1ca
3 changed files with 8 additions and 4 deletions
+2 -1
View File
@@ -52,8 +52,9 @@ static void bench(benchmark::State& state) {
size_t ndiff = 0;
for (size_t i = 0; i < codes.size(); i++) {
if (codes[i] != codes2[i])
if (codes[i] != codes2[i]) {
ndiff++;
}
}
state.counters["ndiff_for_idempotence"] = ndiff;
+2 -1
View File
@@ -295,8 +295,9 @@ static void verifyIndex2LevelDecoder(
1,
encodedData.data() + pointIdx * codeSize,
tempFaiss.data());
for (uint64_t j = 0; j < d; j++)
for (uint64_t j = 0; j < d; j++) {
outputFaiss[i * d + j] += weight * tempFaiss[j];
}
}
}
const double timeFaiss = swFaiss.elapsed();
+4 -2
View File
@@ -38,8 +38,9 @@ struct HammingComputerM8 {
int hamming(const uint8_t* b8) const {
const uint64_t* b = (uint64_t*)b8;
int accu = 0;
for (int i = 0; i < n; i++)
for (int i = 0; i < n; i++) {
accu += popcount64(a[i] ^ b[i]);
}
return accu;
}
@@ -67,8 +68,9 @@ struct HammingComputerM4 {
int hamming(const uint8_t* b8) const {
const uint32_t* b = (uint32_t*)b8;
int accu = 0;
for (int i = 0; i < n; i++)
for (int i = 0; i < n; i++) {
accu += popcount64(a[i] ^ b[i]);
}
return accu;
}