mirror of
https://github.com/facebookresearch/faiss.git
synced 2025-06-03 21:54:02 +08:00
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2483 This diff changes the following: 1. all search functions now take a `SearchParameters` argument that overrides the internal search parameters 2. the default implementation for most classes throws when the params argument is non-nullptr / non-None 3. the IndexIVF and IndexHNSW classes have functioning SearchPArameters 4. the SearchParameters includes an IDSelector that can search only in a subset of the index based on a defined subset of ids There is also some refactoring: the IDSelector was moved to its own .h/.cpp and python/__init__.py is spit in parts. The diff is quite bulky because the search function prototypes need to be changed in all index classes. Things to fix in subsequent diffs: - support SearchParameters for more index types (Flat variants) - better sub-object ownership for SearchParams (with std::unique_ptr?) - special handling of IDSelectorRange to make it faster Reviewed By: alexanderguzhva Differential Revision: D39852589 fbshipit-source-id: 4988bdb5b9bee1207cd327d3f80bf5e0e2467fe1
12 lines
341 B
CMake
12 lines
341 B
CMake
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under the BSD-style license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
|
|
|
|
add_executable(bench_ivf_selector EXCLUDE_FROM_ALL bench_ivf_selector.cpp)
|
|
target_link_libraries(bench_ivf_selector PRIVATE faiss)
|
|
|