Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nit: fix variable types #3147

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion faiss/impl/pq4_fast_scan_search_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void accumulate_fixed_blocks(
ResultHandler& res,
const Scaler& scaler) {
constexpr int bbs = 32 * BB;
for (int64_t j0 = 0; j0 < nb; j0 += bbs) {
for (size_t j0 = 0; j0 < nb; j0 += bbs) {
FixedStorageHandler<NQ, 2 * BB> res2;
kernel_accumulate_block<NQ, BB>(nsq, codes, LUT, res2, scaler);
res.set_block_origin(0, j0);
Expand Down
6 changes: 3 additions & 3 deletions faiss/impl/pq4_fast_scan_search_qbs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ void accumulate_q_4step(
constexpr int Q4 = (QBS >> 12) & 15;
constexpr int SQ = Q1 + Q2 + Q3 + Q4;

for (int64_t j0 = 0; j0 < ntotal2; j0 += 32) {
for (size_t j0 = 0; j0 < ntotal2; j0 += 32) {
FixedStorageHandler<SQ, 2> res2;
const uint8_t* LUT = LUT0;
kernel_accumulate_block<Q1>(nsq, codes, LUT, res2, scaler);
Expand Down Expand Up @@ -156,7 +156,7 @@ void kernel_accumulate_block_loop(
const uint8_t* LUT,
ResultHandler& res,
const Scaler& scaler) {
for (int64_t j0 = 0; j0 < ntotal2; j0 += 32) {
for (size_t j0 = 0; j0 < ntotal2; j0 += 32) {
res.set_block_origin(0, j0);
kernel_accumulate_block<NQ, ResultHandler>(
nsq, codes + j0 * nsq / 2, LUT, res, scaler);
Expand Down Expand Up @@ -243,7 +243,7 @@ void pq4_accumulate_loop_qbs(

// default implementation where qbs is not known at compile time

for (int64_t j0 = 0; j0 < ntotal2; j0 += 32) {
for (size_t j0 = 0; j0 < ntotal2; j0 += 32) {
const uint8_t* LUT = LUT0;
int qi = qbs;
int i0 = 0;
Expand Down