faiss/tests
Matthijs Douze c0052c1533 IndexFlatCodes: a single parent for all flat codecs (#2132)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2132

This diff adds the class IndexFlatCodes that becomes the parent of all "flat" encodings.
IndexPQ
IndexFlat
IndexAdditiveQuantizer
IndexScalarQuantizer
IndexLSH
Index2Layer

The other changes are:
- for IndexFlat, there is no vector<float> with the data anymore. It is replaced with a `get_xb()` function. This broke quite a few external codes, that this diff also attempts to fix.
- I/O functions needed to be adapted. This is done without changing the I/O format for any index.
- added a small contrib function to get the data from the IndexFlat
- the functionality has been made uniform, for example remove_ids and add are now in the parent class.

Eventually, we may support generic storage for flat indexes, similar to `InvertedLists`, eg to memmap the data, but this will again require a big change.

Reviewed By: wickedfoo

Differential Revision: D32646769

fbshipit-source-id: 04a1659173fd51b130ae45d345176b72183cae40
2021-12-07 01:31:07 -08:00
..
CMakeLists.txt Reduce mem usage + improve performance for sequential search imlementation 2021-10-05 15:54:04 -07:00
common_faiss_tests.py Add manifold check for size 0 (#1867) 2021-05-09 22:30:31 -07:00
test_autotune.py
test_binary_factory.py
test_binary_flat.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
test_binary_hashindex.py Add manifold check for size 0 (#1867) 2021-05-09 22:30:31 -07:00
test_binary_io.py
test_build_blocks.py IndexFlatCodes: a single parent for all flat codecs (#2132) 2021-12-07 01:31:07 -08:00
test_clustering.py Non-uniform quantization of vector norms (#2037) 2021-10-11 14:13:16 -07:00
test_contrib.py IndexFlatCodes: a single parent for all flat codecs (#2132) 2021-12-07 01:31:07 -08:00
test_dealloc_invlists.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
test_documentation.py Generate python docstrings from doxygen comments. (#1969) 2021-10-10 22:14:48 -07:00
test_doxygen_documentation.py Generate python docstrings from doxygen comments. (#1969) 2021-10-10 22:14:48 -07:00
test_extra_distances.py Add manifold check for size 0 (#1867) 2021-05-09 22:30:31 -07:00
test_factory.py three small fixes (#1972) 2021-07-01 16:08:45 -07:00
test_fast_scan.py Add ARM to CI (#1914) 2021-06-08 14:53:02 -07:00
test_fast_scan_ivf.py Fix training of complex quantizer (#2035) 2021-09-06 08:53:29 -07:00
test_index.py Fix unorder bug in NSG (#2086) 2021-11-22 11:41:01 -08:00
test_index_accuracy.py IndexFlatCodes: a single parent for all flat codecs (#2132) 2021-12-07 01:31:07 -08:00
test_index_binary.py Add manifold check for size 0 (#1867) 2021-05-09 22:30:31 -07:00
test_index_binary_from_float.py Fix inefficient float / binary conversion 2021-03-01 21:43:31 -08:00
test_index_composite.py IndexFlatCodes: a single parent for all flat codecs (#2132) 2021-12-07 01:31:07 -08:00
test_io.py IndexFlatCodes: a single parent for all flat codecs (#2132) 2021-12-07 01:31:07 -08:00
test_ivflib.py
test_ivfpq_codec.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
test_ivfpq_indexing.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
test_lowlevel_ivf.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
test_lsq.py Non-uniform quantization of vector norms (#2037) 2021-10-11 14:13:16 -07:00
test_mem_leak.cpp Reduce mem usage + improve performance for sequential search imlementation 2021-10-05 15:54:04 -07:00
test_merge.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
test_meta_index.py Add manifold check for size 0 (#1867) 2021-05-09 22:30:31 -07:00
test_omp_threads.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
test_omp_threads_py.py
test_ondisk_ivf.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
test_oom_exception.py Portable SWIG Vectors (#1742) 2021-04-02 07:11:47 -07:00
test_pairs_decoding.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
test_params_override.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
test_partition.py
test_pq_encoding.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
test_product_quantizer.py Use BLAS to compute sdc table (#1809) 2021-04-16 00:17:51 -07:00
test_referenced_objects.py
test_refine.py
test_residual_quantizer.py Non-uniform quantization of vector norms (#2037) 2021-10-11 14:13:16 -07:00
test_sliding_ivf.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
test_standalone_codec.py Implement LCC's RCQ + ITQ in Faiss (#2123) 2021-11-25 15:59:18 -08:00
test_threaded_index.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
test_transfer_invlists.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
torch_test_contrib.py