2 Commits

Author SHA1 Message Date
Junjie Qi
db251e2778 Adding missing includes which are necessary for building (#3609)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3609

The current version of Faiss cannot be built due to missing #includes on a test file tests/test_ivf_index.cpp. This is better described in issue #3532.

https://github.com/facebookresearch/faiss/pull/3533

Reviewed By: ramilbakhshyiev

Differential Revision: D59314273

fbshipit-source-id: 6ec8bfa973760d0a44bc94ae751b4fc55c4784ef
2024-07-03 10:58:40 -07:00
Xiaozhong Pan
ebb5f8401b add a context parameter to InvertedLists and InvertedListsIterator (#3247)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3247

add a context parameter to be passed to InvertedLists and InvertedListsIterator.
- add a context field in `SearchParametersIVF`, the context will be passed to `InvertedLists::get_iterator`. The user can create `InvertedListsIterator` with the context object
- add a context parameter in `IndexIVF::add_core` method. the context will be passed to `InvertedLists::add_entry`.

The user can use the context object to pass storage handlers, store error codes from storage layer, logging information, etc.

Reviewed By: mdouze

Differential Revision: D53113911

fbshipit-source-id: ff31d247d3dc949d0bb50bcaffc3142efd027089
2024-02-09 09:14:38 -08:00