Skip to content
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/invlists/DirectMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ size_t DirectMap::remove_ids(const IDSelector& sel, InvertedLists* invlists) {
last_id,
ScopedCodes(invlists, list_no, last).get());
// update hash entry for last element
hashtable[last_id] = list_no << 32 | offset;
hashtable[last_id] = lo_build(list_no, offset);
}
invlists->resize(list_no, last);
nremove++;
Expand Down
4 changes: 2 additions & 2 deletions faiss/invlists/OnDiskInvertedLists.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ void OnDiskInvertedLists::free_slot(size_t offset, size_t capacity) {
it++;
}

size_t inf = 1UL << 60;
size_t inf = ((size_t)1) << 60;

size_t end_prev = inf;
if (it != slots.begin()) {
Expand All @@ -533,7 +533,7 @@ void OnDiskInvertedLists::free_slot(size_t offset, size_t capacity) {
end_prev = prev->offset + prev->capacity;
}

size_t begin_next = 1L << 60;
size_t begin_next = ((size_t)1) << 60;
if (it != slots.end()) {
begin_next = it->offset;
}
Expand Down