Commit Graph

1 Commits (f8217045dc11f2fd8358e1f47864524fb290ae1d)

Author SHA1 Message Date
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