Files
faiss/demos/CMakeLists.txt
Matthijs Douze a73f22ee53 Demo for a diversity filter (#4765)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4765

 There are use cases where there is a group id associated to each vector id.

 We want no more than max_per_group results per group but of course we also want to keep the best results for each group.

 This diff demonstrates how to obtain this functionality, using a custom result handler.

Differential Revision: D91020690

fbshipit-source-id: 92669cf8396ad8b11faa87c4420b35a3db2de7f9
2026-02-02 11:16:50 -08:00

28 lines
1.1 KiB
CMake

# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
add_executable(demo_imi_flat EXCLUDE_FROM_ALL demo_imi_flat.cpp)
target_link_libraries(demo_imi_flat PRIVATE faiss)
add_executable(demo_imi_pq EXCLUDE_FROM_ALL demo_imi_pq.cpp)
target_link_libraries(demo_imi_pq PRIVATE faiss)
add_executable(demo_ivfpq_indexing EXCLUDE_FROM_ALL demo_ivfpq_indexing.cpp)
target_link_libraries(demo_ivfpq_indexing PRIVATE faiss)
add_executable(demo_nndescent EXCLUDE_FROM_ALL demo_nndescent.cpp)
target_link_libraries(demo_nndescent PRIVATE faiss)
add_executable(demo_sift1M EXCLUDE_FROM_ALL demo_sift1M.cpp)
target_link_libraries(demo_sift1M PRIVATE faiss)
add_executable(demo_weighted_kmeans EXCLUDE_FROM_ALL demo_weighted_kmeans.cpp)
target_link_libraries(demo_weighted_kmeans PRIVATE faiss)
add_executable(demo_residual_quantizer EXCLUDE_FROM_ALL demo_residual_quantizer.cpp)
target_link_libraries(demo_residual_quantizer PRIVATE faiss)
add_subdirectory(diversity_filter)