faiss 0.3.1 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +1 -1
- data/lib/faiss/version.rb +1 -1
- data/vendor/faiss/faiss/AutoTune.cpp +2 -2
- data/vendor/faiss/faiss/AutoTune.h +3 -3
- data/vendor/faiss/faiss/Clustering.cpp +37 -6
- data/vendor/faiss/faiss/Clustering.h +12 -3
- data/vendor/faiss/faiss/IVFlib.cpp +6 -3
- data/vendor/faiss/faiss/IVFlib.h +2 -2
- data/vendor/faiss/faiss/Index.cpp +6 -2
- data/vendor/faiss/faiss/Index.h +30 -8
- data/vendor/faiss/faiss/Index2Layer.cpp +2 -2
- data/vendor/faiss/faiss/Index2Layer.h +2 -2
- data/vendor/faiss/faiss/IndexAdditiveQuantizer.cpp +7 -7
- data/vendor/faiss/faiss/IndexAdditiveQuantizer.h +2 -2
- data/vendor/faiss/faiss/IndexAdditiveQuantizerFastScan.cpp +14 -16
- data/vendor/faiss/faiss/IndexAdditiveQuantizerFastScan.h +2 -2
- data/vendor/faiss/faiss/IndexBinary.cpp +13 -2
- data/vendor/faiss/faiss/IndexBinary.h +8 -2
- data/vendor/faiss/faiss/IndexBinaryFlat.cpp +2 -3
- data/vendor/faiss/faiss/IndexBinaryFlat.h +2 -2
- data/vendor/faiss/faiss/IndexBinaryFromFloat.cpp +2 -2
- data/vendor/faiss/faiss/IndexBinaryFromFloat.h +2 -2
- data/vendor/faiss/faiss/IndexBinaryHNSW.cpp +2 -7
- data/vendor/faiss/faiss/IndexBinaryHNSW.h +3 -3
- data/vendor/faiss/faiss/IndexBinaryHash.cpp +2 -3
- data/vendor/faiss/faiss/IndexBinaryHash.h +2 -2
- data/vendor/faiss/faiss/IndexBinaryIVF.cpp +3 -3
- data/vendor/faiss/faiss/IndexBinaryIVF.h +2 -2
- data/vendor/faiss/faiss/IndexFastScan.cpp +32 -18
- data/vendor/faiss/faiss/IndexFastScan.h +11 -2
- data/vendor/faiss/faiss/IndexFlat.cpp +13 -10
- data/vendor/faiss/faiss/IndexFlat.h +2 -2
- data/vendor/faiss/faiss/IndexFlatCodes.cpp +170 -7
- data/vendor/faiss/faiss/IndexFlatCodes.h +25 -5
- data/vendor/faiss/faiss/IndexHNSW.cpp +156 -96
- data/vendor/faiss/faiss/IndexHNSW.h +54 -5
- data/vendor/faiss/faiss/IndexIDMap.cpp +19 -3
- data/vendor/faiss/faiss/IndexIDMap.h +5 -2
- data/vendor/faiss/faiss/IndexIVF.cpp +5 -6
- data/vendor/faiss/faiss/IndexIVF.h +13 -4
- data/vendor/faiss/faiss/IndexIVFAdditiveQuantizer.cpp +21 -7
- data/vendor/faiss/faiss/IndexIVFAdditiveQuantizer.h +5 -2
- data/vendor/faiss/faiss/IndexIVFAdditiveQuantizerFastScan.cpp +3 -14
- data/vendor/faiss/faiss/IndexIVFAdditiveQuantizerFastScan.h +2 -4
- data/vendor/faiss/faiss/IndexIVFFastScan.cpp +201 -91
- data/vendor/faiss/faiss/IndexIVFFastScan.h +33 -9
- data/vendor/faiss/faiss/IndexIVFFlat.cpp +2 -2
- data/vendor/faiss/faiss/IndexIVFFlat.h +2 -2
- data/vendor/faiss/faiss/IndexIVFIndependentQuantizer.cpp +2 -2
- data/vendor/faiss/faiss/IndexIVFIndependentQuantizer.h +2 -2
- data/vendor/faiss/faiss/IndexIVFPQ.cpp +3 -6
- data/vendor/faiss/faiss/IndexIVFPQ.h +2 -2
- data/vendor/faiss/faiss/IndexIVFPQFastScan.cpp +7 -14
- data/vendor/faiss/faiss/IndexIVFPQFastScan.h +2 -4
- data/vendor/faiss/faiss/IndexIVFPQR.cpp +2 -2
- data/vendor/faiss/faiss/IndexIVFPQR.h +2 -2
- data/vendor/faiss/faiss/IndexIVFSpectralHash.cpp +2 -3
- data/vendor/faiss/faiss/IndexIVFSpectralHash.h +2 -2
- data/vendor/faiss/faiss/IndexLSH.cpp +2 -3
- data/vendor/faiss/faiss/IndexLSH.h +2 -2
- data/vendor/faiss/faiss/IndexLattice.cpp +3 -21
- data/vendor/faiss/faiss/IndexLattice.h +5 -24
- data/vendor/faiss/faiss/IndexNNDescent.cpp +2 -31
- data/vendor/faiss/faiss/IndexNNDescent.h +3 -3
- data/vendor/faiss/faiss/IndexNSG.cpp +2 -5
- data/vendor/faiss/faiss/IndexNSG.h +3 -3
- data/vendor/faiss/faiss/IndexNeuralNetCodec.cpp +56 -0
- data/vendor/faiss/faiss/IndexNeuralNetCodec.h +49 -0
- data/vendor/faiss/faiss/IndexPQ.cpp +26 -26
- data/vendor/faiss/faiss/IndexPQ.h +2 -2
- data/vendor/faiss/faiss/IndexPQFastScan.cpp +2 -5
- data/vendor/faiss/faiss/IndexPQFastScan.h +2 -11
- data/vendor/faiss/faiss/IndexPreTransform.cpp +2 -2
- data/vendor/faiss/faiss/IndexPreTransform.h +3 -3
- data/vendor/faiss/faiss/IndexRefine.cpp +46 -9
- data/vendor/faiss/faiss/IndexRefine.h +9 -2
- data/vendor/faiss/faiss/IndexReplicas.cpp +2 -2
- data/vendor/faiss/faiss/IndexReplicas.h +2 -2
- data/vendor/faiss/faiss/IndexRowwiseMinMax.cpp +2 -2
- data/vendor/faiss/faiss/IndexRowwiseMinMax.h +2 -2
- data/vendor/faiss/faiss/IndexScalarQuantizer.cpp +5 -4
- data/vendor/faiss/faiss/IndexScalarQuantizer.h +2 -2
- data/vendor/faiss/faiss/IndexShards.cpp +2 -2
- data/vendor/faiss/faiss/IndexShards.h +2 -2
- data/vendor/faiss/faiss/IndexShardsIVF.cpp +2 -2
- data/vendor/faiss/faiss/IndexShardsIVF.h +2 -2
- data/vendor/faiss/faiss/MatrixStats.cpp +2 -2
- data/vendor/faiss/faiss/MatrixStats.h +2 -2
- data/vendor/faiss/faiss/MetaIndexes.cpp +2 -3
- data/vendor/faiss/faiss/MetaIndexes.h +2 -2
- data/vendor/faiss/faiss/MetricType.h +9 -4
- data/vendor/faiss/faiss/VectorTransform.cpp +2 -2
- data/vendor/faiss/faiss/VectorTransform.h +2 -2
- data/vendor/faiss/faiss/clone_index.cpp +2 -2
- data/vendor/faiss/faiss/clone_index.h +2 -2
- data/vendor/faiss/faiss/cppcontrib/SaDecodeKernels.h +2 -2
- data/vendor/faiss/faiss/cppcontrib/detail/CoarseBitType.h +2 -2
- data/vendor/faiss/faiss/cppcontrib/detail/UintReader.h +97 -19
- data/vendor/faiss/faiss/cppcontrib/factory_tools.cpp +192 -0
- data/vendor/faiss/faiss/cppcontrib/factory_tools.h +29 -0
- data/vendor/faiss/faiss/cppcontrib/sa_decode/Level2-avx2-inl.h +2 -2
- data/vendor/faiss/faiss/cppcontrib/sa_decode/Level2-inl.h +85 -32
- data/vendor/faiss/faiss/cppcontrib/sa_decode/Level2-neon-inl.h +2 -2
- data/vendor/faiss/faiss/cppcontrib/sa_decode/MinMax-inl.h +2 -2
- data/vendor/faiss/faiss/cppcontrib/sa_decode/MinMaxFP16-inl.h +2 -2
- data/vendor/faiss/faiss/cppcontrib/sa_decode/PQ-avx2-inl.h +2 -2
- data/vendor/faiss/faiss/cppcontrib/sa_decode/PQ-inl.h +2 -2
- data/vendor/faiss/faiss/cppcontrib/sa_decode/PQ-neon-inl.h +2 -2
- data/vendor/faiss/faiss/gpu/GpuAutoTune.cpp +2 -5
- data/vendor/faiss/faiss/gpu/GpuAutoTune.h +2 -2
- data/vendor/faiss/faiss/gpu/GpuCloner.cpp +45 -13
- data/vendor/faiss/faiss/gpu/GpuCloner.h +2 -2
- data/vendor/faiss/faiss/gpu/GpuClonerOptions.h +12 -6
- data/vendor/faiss/faiss/gpu/GpuDistance.h +11 -7
- data/vendor/faiss/faiss/gpu/GpuFaissAssert.h +3 -3
- data/vendor/faiss/faiss/gpu/GpuIcmEncoder.h +2 -2
- data/vendor/faiss/faiss/gpu/GpuIndex.h +10 -15
- data/vendor/faiss/faiss/gpu/GpuIndexBinaryFlat.h +2 -2
- data/vendor/faiss/faiss/gpu/GpuIndexCagra.h +285 -0
- data/vendor/faiss/faiss/gpu/GpuIndexFlat.h +2 -2
- data/vendor/faiss/faiss/gpu/GpuIndexIVF.h +8 -2
- data/vendor/faiss/faiss/gpu/GpuIndexIVFFlat.h +4 -2
- data/vendor/faiss/faiss/gpu/GpuIndexIVFPQ.h +3 -3
- data/vendor/faiss/faiss/gpu/GpuIndexIVFScalarQuantizer.h +2 -2
- data/vendor/faiss/faiss/gpu/GpuIndicesOptions.h +2 -2
- data/vendor/faiss/faiss/gpu/GpuResources.cpp +7 -2
- data/vendor/faiss/faiss/gpu/GpuResources.h +11 -4
- data/vendor/faiss/faiss/gpu/StandardGpuResources.cpp +66 -11
- data/vendor/faiss/faiss/gpu/StandardGpuResources.h +15 -5
- data/vendor/faiss/faiss/gpu/impl/IndexUtils.h +2 -2
- data/vendor/faiss/faiss/gpu/impl/InterleavedCodes.cpp +28 -23
- data/vendor/faiss/faiss/gpu/impl/InterleavedCodes.h +2 -2
- data/vendor/faiss/faiss/gpu/impl/RemapIndices.cpp +2 -2
- data/vendor/faiss/faiss/gpu/impl/RemapIndices.h +2 -2
- data/vendor/faiss/faiss/gpu/perf/IndexWrapper-inl.h +2 -2
- data/vendor/faiss/faiss/gpu/perf/IndexWrapper.h +2 -2
- data/vendor/faiss/faiss/gpu/perf/PerfClustering.cpp +8 -2
- data/vendor/faiss/faiss/gpu/perf/PerfIVFPQAdd.cpp +2 -3
- data/vendor/faiss/faiss/gpu/perf/WriteIndex.cpp +2 -2
- data/vendor/faiss/faiss/gpu/test/TestCodePacking.cpp +10 -7
- data/vendor/faiss/faiss/gpu/test/TestGpuIndexBinaryFlat.cpp +2 -2
- data/vendor/faiss/faiss/gpu/test/TestGpuIndexFlat.cpp +54 -54
- data/vendor/faiss/faiss/gpu/test/TestGpuIndexIVFFlat.cpp +144 -77
- data/vendor/faiss/faiss/gpu/test/TestGpuIndexIVFPQ.cpp +51 -51
- data/vendor/faiss/faiss/gpu/test/TestGpuIndexIVFScalarQuantizer.cpp +2 -2
- data/vendor/faiss/faiss/gpu/test/TestGpuMemoryException.cpp +3 -3
- data/vendor/faiss/faiss/gpu/test/TestGpuResidualQuantizer.cpp +70 -0
- data/vendor/faiss/faiss/gpu/test/TestUtils.cpp +74 -4
- data/vendor/faiss/faiss/gpu/test/TestUtils.h +2 -2
- data/vendor/faiss/faiss/gpu/test/demo_ivfpq_indexing_gpu.cpp +3 -3
- data/vendor/faiss/faiss/gpu/utils/{RaftUtils.h → CuvsUtils.h} +12 -11
- data/vendor/faiss/faiss/gpu/utils/DeviceUtils.h +8 -2
- data/vendor/faiss/faiss/gpu/utils/StackDeviceMemory.cpp +2 -2
- data/vendor/faiss/faiss/gpu/utils/StackDeviceMemory.h +2 -2
- data/vendor/faiss/faiss/gpu/utils/StaticUtils.h +2 -2
- data/vendor/faiss/faiss/gpu/utils/Timer.cpp +6 -3
- data/vendor/faiss/faiss/gpu/utils/Timer.h +3 -3
- data/vendor/faiss/faiss/impl/AdditiveQuantizer.cpp +79 -11
- data/vendor/faiss/faiss/impl/AdditiveQuantizer.h +17 -5
- data/vendor/faiss/faiss/impl/AuxIndexStructures.cpp +27 -2
- data/vendor/faiss/faiss/impl/AuxIndexStructures.h +11 -3
- data/vendor/faiss/faiss/impl/CodePacker.cpp +2 -2
- data/vendor/faiss/faiss/impl/CodePacker.h +2 -2
- data/vendor/faiss/faiss/impl/DistanceComputer.h +48 -2
- data/vendor/faiss/faiss/impl/FaissAssert.h +6 -4
- data/vendor/faiss/faiss/impl/FaissException.cpp +2 -2
- data/vendor/faiss/faiss/impl/FaissException.h +2 -3
- data/vendor/faiss/faiss/impl/HNSW.cpp +378 -205
- data/vendor/faiss/faiss/impl/HNSW.h +55 -24
- data/vendor/faiss/faiss/impl/IDSelector.cpp +2 -2
- data/vendor/faiss/faiss/impl/IDSelector.h +2 -2
- data/vendor/faiss/faiss/impl/LocalSearchQuantizer.cpp +10 -10
- data/vendor/faiss/faiss/impl/LocalSearchQuantizer.h +2 -2
- data/vendor/faiss/faiss/impl/LookupTableScaler.h +36 -2
- data/vendor/faiss/faiss/impl/NNDescent.cpp +15 -10
- data/vendor/faiss/faiss/impl/NNDescent.h +2 -2
- data/vendor/faiss/faiss/impl/NSG.cpp +26 -49
- data/vendor/faiss/faiss/impl/NSG.h +20 -8
- data/vendor/faiss/faiss/impl/PolysemousTraining.cpp +2 -2
- data/vendor/faiss/faiss/impl/PolysemousTraining.h +2 -2
- data/vendor/faiss/faiss/impl/ProductAdditiveQuantizer.cpp +2 -4
- data/vendor/faiss/faiss/impl/ProductAdditiveQuantizer.h +2 -2
- data/vendor/faiss/faiss/impl/ProductQuantizer-inl.h +2 -2
- data/vendor/faiss/faiss/impl/ProductQuantizer.cpp +3 -2
- data/vendor/faiss/faiss/impl/ProductQuantizer.h +7 -3
- data/vendor/faiss/faiss/impl/Quantizer.h +2 -2
- data/vendor/faiss/faiss/impl/ResidualQuantizer.cpp +2 -36
- data/vendor/faiss/faiss/impl/ResidualQuantizer.h +3 -13
- data/vendor/faiss/faiss/impl/ResultHandler.h +153 -34
- data/vendor/faiss/faiss/impl/ScalarQuantizer.cpp +721 -104
- data/vendor/faiss/faiss/impl/ScalarQuantizer.h +5 -2
- data/vendor/faiss/faiss/impl/ThreadedIndex-inl.h +2 -2
- data/vendor/faiss/faiss/impl/ThreadedIndex.h +2 -2
- data/vendor/faiss/faiss/impl/code_distance/code_distance-avx2.h +7 -2
- data/vendor/faiss/faiss/impl/code_distance/code_distance-avx512.h +248 -0
- data/vendor/faiss/faiss/impl/code_distance/code_distance-generic.h +2 -2
- data/vendor/faiss/faiss/impl/code_distance/code_distance-sve.h +440 -0
- data/vendor/faiss/faiss/impl/code_distance/code_distance.h +55 -2
- data/vendor/faiss/faiss/impl/index_read.cpp +31 -20
- data/vendor/faiss/faiss/impl/index_read_utils.h +37 -0
- data/vendor/faiss/faiss/impl/index_write.cpp +30 -16
- data/vendor/faiss/faiss/impl/io.cpp +15 -7
- data/vendor/faiss/faiss/impl/io.h +6 -6
- data/vendor/faiss/faiss/impl/io_macros.h +8 -9
- data/vendor/faiss/faiss/impl/kmeans1d.cpp +2 -3
- data/vendor/faiss/faiss/impl/kmeans1d.h +2 -2
- data/vendor/faiss/faiss/impl/lattice_Zn.cpp +2 -3
- data/vendor/faiss/faiss/impl/lattice_Zn.h +2 -2
- data/vendor/faiss/faiss/impl/platform_macros.h +34 -2
- data/vendor/faiss/faiss/impl/pq4_fast_scan.cpp +13 -2
- data/vendor/faiss/faiss/impl/pq4_fast_scan.h +20 -2
- data/vendor/faiss/faiss/impl/pq4_fast_scan_search_1.cpp +3 -3
- data/vendor/faiss/faiss/impl/pq4_fast_scan_search_qbs.cpp +450 -3
- data/vendor/faiss/faiss/impl/residual_quantizer_encode_steps.cpp +8 -8
- data/vendor/faiss/faiss/impl/residual_quantizer_encode_steps.h +3 -3
- data/vendor/faiss/faiss/impl/simd_result_handlers.h +151 -67
- data/vendor/faiss/faiss/index_factory.cpp +51 -34
- data/vendor/faiss/faiss/index_factory.h +2 -2
- data/vendor/faiss/faiss/index_io.h +14 -7
- data/vendor/faiss/faiss/invlists/BlockInvertedLists.cpp +30 -10
- data/vendor/faiss/faiss/invlists/BlockInvertedLists.h +5 -2
- data/vendor/faiss/faiss/invlists/DirectMap.cpp +11 -3
- data/vendor/faiss/faiss/invlists/DirectMap.h +2 -2
- data/vendor/faiss/faiss/invlists/InvertedLists.cpp +57 -19
- data/vendor/faiss/faiss/invlists/InvertedLists.h +20 -11
- data/vendor/faiss/faiss/invlists/InvertedListsIOHook.cpp +2 -2
- data/vendor/faiss/faiss/invlists/InvertedListsIOHook.h +2 -2
- data/vendor/faiss/faiss/invlists/OnDiskInvertedLists.cpp +23 -9
- data/vendor/faiss/faiss/invlists/OnDiskInvertedLists.h +4 -3
- data/vendor/faiss/faiss/python/python_callbacks.cpp +5 -5
- data/vendor/faiss/faiss/python/python_callbacks.h +2 -2
- data/vendor/faiss/faiss/utils/AlignedTable.h +5 -3
- data/vendor/faiss/faiss/utils/Heap.cpp +2 -2
- data/vendor/faiss/faiss/utils/Heap.h +107 -2
- data/vendor/faiss/faiss/utils/NeuralNet.cpp +346 -0
- data/vendor/faiss/faiss/utils/NeuralNet.h +147 -0
- data/vendor/faiss/faiss/utils/WorkerThread.cpp +2 -2
- data/vendor/faiss/faiss/utils/WorkerThread.h +2 -2
- data/vendor/faiss/faiss/utils/approx_topk/approx_topk.h +2 -2
- data/vendor/faiss/faiss/utils/approx_topk/avx2-inl.h +2 -2
- data/vendor/faiss/faiss/utils/approx_topk/generic.h +2 -2
- data/vendor/faiss/faiss/utils/approx_topk/mode.h +2 -2
- data/vendor/faiss/faiss/utils/approx_topk_hamming/approx_topk_hamming.h +2 -2
- data/vendor/faiss/faiss/utils/bf16.h +36 -0
- data/vendor/faiss/faiss/utils/distances.cpp +249 -90
- data/vendor/faiss/faiss/utils/distances.h +8 -8
- data/vendor/faiss/faiss/utils/distances_fused/avx512.cpp +2 -2
- data/vendor/faiss/faiss/utils/distances_fused/avx512.h +2 -2
- data/vendor/faiss/faiss/utils/distances_fused/distances_fused.cpp +2 -2
- data/vendor/faiss/faiss/utils/distances_fused/distances_fused.h +2 -2
- data/vendor/faiss/faiss/utils/distances_fused/simdlib_based.cpp +2 -2
- data/vendor/faiss/faiss/utils/distances_fused/simdlib_based.h +2 -2
- data/vendor/faiss/faiss/utils/distances_simd.cpp +1543 -56
- data/vendor/faiss/faiss/utils/extra_distances-inl.h +72 -2
- data/vendor/faiss/faiss/utils/extra_distances.cpp +87 -140
- data/vendor/faiss/faiss/utils/extra_distances.h +5 -4
- data/vendor/faiss/faiss/utils/fp16-arm.h +2 -2
- data/vendor/faiss/faiss/utils/fp16-fp16c.h +2 -2
- data/vendor/faiss/faiss/utils/fp16-inl.h +2 -2
- data/vendor/faiss/faiss/utils/fp16.h +2 -2
- data/vendor/faiss/faiss/utils/hamming-inl.h +2 -2
- data/vendor/faiss/faiss/utils/hamming.cpp +3 -4
- data/vendor/faiss/faiss/utils/hamming.h +2 -2
- data/vendor/faiss/faiss/utils/hamming_distance/avx2-inl.h +2 -2
- data/vendor/faiss/faiss/utils/hamming_distance/avx512-inl.h +490 -0
- data/vendor/faiss/faiss/utils/hamming_distance/common.h +2 -2
- data/vendor/faiss/faiss/utils/hamming_distance/generic-inl.h +6 -3
- data/vendor/faiss/faiss/utils/hamming_distance/hamdis-inl.h +7 -3
- data/vendor/faiss/faiss/utils/hamming_distance/neon-inl.h +5 -5
- data/vendor/faiss/faiss/utils/ordered_key_value.h +2 -2
- data/vendor/faiss/faiss/utils/partitioning.cpp +2 -2
- data/vendor/faiss/faiss/utils/partitioning.h +2 -2
- data/vendor/faiss/faiss/utils/prefetch.h +2 -2
- data/vendor/faiss/faiss/utils/quantize_lut.cpp +2 -2
- data/vendor/faiss/faiss/utils/quantize_lut.h +2 -2
- data/vendor/faiss/faiss/utils/random.cpp +45 -2
- data/vendor/faiss/faiss/utils/random.h +27 -2
- data/vendor/faiss/faiss/utils/simdlib.h +12 -3
- data/vendor/faiss/faiss/utils/simdlib_avx2.h +2 -2
- data/vendor/faiss/faiss/utils/simdlib_avx512.h +296 -0
- data/vendor/faiss/faiss/utils/simdlib_emulated.h +2 -2
- data/vendor/faiss/faiss/utils/simdlib_neon.h +7 -4
- data/vendor/faiss/faiss/utils/simdlib_ppc64.h +1084 -0
- data/vendor/faiss/faiss/utils/sorting.cpp +2 -2
- data/vendor/faiss/faiss/utils/sorting.h +2 -2
- data/vendor/faiss/faiss/utils/transpose/transpose-avx2-inl.h +2 -2
- data/vendor/faiss/faiss/utils/transpose/transpose-avx512-inl.h +176 -0
- data/vendor/faiss/faiss/utils/utils.cpp +17 -10
- data/vendor/faiss/faiss/utils/utils.h +7 -3
- metadata +22 -11
- data/vendor/faiss/faiss/impl/code_distance/code_distance_avx512.h +0 -102
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae4ad57a987514417c76771a7318c454a505d108c60ee312eef12548c97bb21a
|
4
|
+
data.tar.gz: ccb724de6af1ea2b4e1a820ff28827cfdc881ca953ef9f0c03c2dcf3602567f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d936042d4e70c21abfa584b1154a23bf312e6f2418df963a1a076abd7f7b3179782c10aa5eefa8e3f95a0984594e7e1ebecb858ca3673dd28208a895a2c3252
|
7
|
+
data.tar.gz: 45588388c9d15510d57f3d0db66d2ff9868f59c5eddc49507d72e247b962f270e62b5a44a7b70d38c570b31af5cc604156ab71dd7477a0240baa089d73a709af
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
MIT License
|
2
2
|
|
3
3
|
Copyright (c) Facebook, Inc. and its affiliates.
|
4
|
-
Copyright (c) 2020-
|
4
|
+
Copyright (c) 2020-2025 Andrew Kane
|
5
5
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
of this software and associated documentation files (the "Software"), to deal
|
data/lib/faiss/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -86,7 +86,7 @@ struct OperatingPoint {
|
|
86
86
|
double perf; ///< performance measure (output of a Criterion)
|
87
87
|
double t; ///< corresponding execution time (ms)
|
88
88
|
std::string key; ///< key that identifies this op pt
|
89
|
-
int64_t cno; ///< integer
|
89
|
+
int64_t cno; ///< integer identifier
|
90
90
|
};
|
91
91
|
|
92
92
|
struct OperatingPoints {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -11,6 +11,7 @@
|
|
11
11
|
#include <faiss/VectorTransform.h>
|
12
12
|
#include <faiss/impl/AuxIndexStructures.h>
|
13
13
|
|
14
|
+
#include <chrono>
|
14
15
|
#include <cinttypes>
|
15
16
|
#include <cmath>
|
16
17
|
#include <cstdio>
|
@@ -74,6 +75,14 @@ void Clustering::train(
|
|
74
75
|
|
75
76
|
namespace {
|
76
77
|
|
78
|
+
uint64_t get_actual_rng_seed(const int seed) {
|
79
|
+
return (seed >= 0)
|
80
|
+
? seed
|
81
|
+
: static_cast<uint64_t>(std::chrono::high_resolution_clock::now()
|
82
|
+
.time_since_epoch()
|
83
|
+
.count());
|
84
|
+
}
|
85
|
+
|
77
86
|
idx_t subsample_training_set(
|
78
87
|
const Clustering& clus,
|
79
88
|
idx_t nx,
|
@@ -87,11 +96,30 @@ idx_t subsample_training_set(
|
|
87
96
|
clus.k * clus.max_points_per_centroid,
|
88
97
|
nx);
|
89
98
|
}
|
90
|
-
|
91
|
-
|
99
|
+
|
100
|
+
const uint64_t actual_seed = get_actual_rng_seed(clus.seed);
|
101
|
+
|
102
|
+
std::vector<int> perm;
|
103
|
+
if (clus.use_faster_subsampling) {
|
104
|
+
// use subsampling with splitmix64 rng
|
105
|
+
SplitMix64RandomGenerator rng(actual_seed);
|
106
|
+
|
107
|
+
const idx_t new_nx = clus.k * clus.max_points_per_centroid;
|
108
|
+
perm.resize(new_nx);
|
109
|
+
for (idx_t i = 0; i < new_nx; i++) {
|
110
|
+
perm[i] = rng.rand_int(nx);
|
111
|
+
}
|
112
|
+
} else {
|
113
|
+
// use subsampling with a default std rng
|
114
|
+
perm.resize(nx);
|
115
|
+
rand_perm(perm.data(), nx, actual_seed);
|
116
|
+
}
|
117
|
+
|
92
118
|
nx = clus.k * clus.max_points_per_centroid;
|
93
119
|
uint8_t* x_new = new uint8_t[nx * line_size];
|
94
120
|
*x_out = x_new;
|
121
|
+
|
122
|
+
// might be worth omp-ing as well
|
95
123
|
for (idx_t i = 0; i < nx; i++) {
|
96
124
|
memcpy(x_new + i * line_size, x + perm[i] * line_size, line_size);
|
97
125
|
}
|
@@ -280,7 +308,7 @@ void Clustering::train_encoded(
|
|
280
308
|
|
281
309
|
double t0 = getmillisecs();
|
282
310
|
|
283
|
-
if (!codec) {
|
311
|
+
if (!codec && check_input_data_for_NaNs) {
|
284
312
|
// Check for NaNs in input data. Normally it is the user's
|
285
313
|
// responsibility, but it may spare us some hard-to-debug
|
286
314
|
// reports.
|
@@ -383,6 +411,9 @@ void Clustering::train_encoded(
|
|
383
411
|
}
|
384
412
|
t0 = getmillisecs();
|
385
413
|
|
414
|
+
// initialize seed
|
415
|
+
const uint64_t actual_seed = get_actual_rng_seed(seed);
|
416
|
+
|
386
417
|
// temporary buffer to decode vectors during the optimization
|
387
418
|
std::vector<float> decode_buffer(codec ? d * decode_block_size : 0);
|
388
419
|
|
@@ -395,7 +426,7 @@ void Clustering::train_encoded(
|
|
395
426
|
centroids.resize(d * k);
|
396
427
|
std::vector<int> perm(nx);
|
397
428
|
|
398
|
-
rand_perm(perm.data(), nx,
|
429
|
+
rand_perm(perm.data(), nx, actual_seed + 1 + redo * 15486557L);
|
399
430
|
|
400
431
|
if (!codec) {
|
401
432
|
for (int i = n_input_centroids; i < k; i++) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -43,11 +43,20 @@ struct ClusteringParameters {
|
|
43
43
|
int min_points_per_centroid = 39;
|
44
44
|
/// to limit size of dataset, otherwise the training set is subsampled
|
45
45
|
int max_points_per_centroid = 256;
|
46
|
-
/// seed for the random number generator
|
46
|
+
/// seed for the random number generator.
|
47
|
+
/// negative values lead to seeding an internal rng with
|
48
|
+
/// std::high_resolution_clock.
|
47
49
|
int seed = 1234;
|
48
50
|
|
49
51
|
/// when the training set is encoded, batch size of the codec decoder
|
50
52
|
size_t decode_block_size = 32768;
|
53
|
+
|
54
|
+
/// whether to check for NaNs in an input data
|
55
|
+
bool check_input_data_for_NaNs = true;
|
56
|
+
|
57
|
+
/// Whether to use splitmix64-based random number generator for subsampling,
|
58
|
+
/// which is faster, but may pick duplicate points.
|
59
|
+
bool use_faster_subsampling = false;
|
51
60
|
};
|
52
61
|
|
53
62
|
struct ClusteringIterationStats {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -352,7 +352,10 @@ void search_with_parameters(
|
|
352
352
|
const IndexIVF* index_ivf = dynamic_cast<const IndexIVF*>(index);
|
353
353
|
FAISS_THROW_IF_NOT(index_ivf);
|
354
354
|
|
355
|
-
|
355
|
+
SearchParameters* quantizer_params =
|
356
|
+
(params) ? params->quantizer_params : nullptr;
|
357
|
+
index_ivf->quantizer->search(
|
358
|
+
n, x, params->nprobe, Dq.data(), Iq.data(), quantizer_params);
|
356
359
|
|
357
360
|
if (nb_dis_ptr) {
|
358
361
|
*nb_dis_ptr = count_ndis(index_ivf, n * params->nprobe, Iq.data());
|
data/vendor/faiss/faiss/IVFlib.h
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -134,6 +134,10 @@ void Index::sa_decode(idx_t, const uint8_t*, float*) const {
|
|
134
134
|
FAISS_THROW_MSG("standalone codec not implemented for this type of index");
|
135
135
|
}
|
136
136
|
|
137
|
+
void Index::add_sa_codes(idx_t, const uint8_t*, const idx_t*) {
|
138
|
+
FAISS_THROW_MSG("add_sa_codes not implemented for this type of index");
|
139
|
+
}
|
140
|
+
|
137
141
|
namespace {
|
138
142
|
|
139
143
|
// storage that explicitly reconstructs vectors before computing distances
|
data/vendor/faiss/faiss/Index.h
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -17,9 +17,21 @@
|
|
17
17
|
#include <typeinfo>
|
18
18
|
|
19
19
|
#define FAISS_VERSION_MAJOR 1
|
20
|
-
#define FAISS_VERSION_MINOR
|
20
|
+
#define FAISS_VERSION_MINOR 10
|
21
21
|
#define FAISS_VERSION_PATCH 0
|
22
22
|
|
23
|
+
// Macro to combine the version components into a single string
|
24
|
+
#ifndef FAISS_STRINGIFY
|
25
|
+
#define FAISS_STRINGIFY(ARG) #ARG
|
26
|
+
#endif
|
27
|
+
#ifndef FAISS_TOSTRING
|
28
|
+
#define FAISS_TOSTRING(ARG) FAISS_STRINGIFY(ARG)
|
29
|
+
#endif
|
30
|
+
#define VERSION_STRING \
|
31
|
+
FAISS_TOSTRING(FAISS_VERSION_MAJOR) \
|
32
|
+
"." FAISS_TOSTRING(FAISS_VERSION_MINOR) "." FAISS_TOSTRING( \
|
33
|
+
FAISS_VERSION_PATCH)
|
34
|
+
|
23
35
|
/**
|
24
36
|
* @namespace faiss
|
25
37
|
*
|
@@ -38,8 +50,8 @@
|
|
38
50
|
|
39
51
|
namespace faiss {
|
40
52
|
|
41
|
-
/// Forward declarations see impl/AuxIndexStructures.h, impl/IDSelector.h
|
42
|
-
/// impl/DistanceComputer.h
|
53
|
+
/// Forward declarations see impl/AuxIndexStructures.h, impl/IDSelector.h
|
54
|
+
/// and impl/DistanceComputer.h
|
43
55
|
struct IDSelector;
|
44
56
|
struct RangeSearchResult;
|
45
57
|
struct DistanceComputer;
|
@@ -56,7 +68,8 @@ struct SearchParameters {
|
|
56
68
|
virtual ~SearchParameters() {}
|
57
69
|
};
|
58
70
|
|
59
|
-
/** Abstract structure for an index, supports adding vectors and searching
|
71
|
+
/** Abstract structure for an index, supports adding vectors and searching
|
72
|
+
* them.
|
60
73
|
*
|
61
74
|
* All vectors provided at add or search time are 32-bit float arrays,
|
62
75
|
* although the internal representation may vary.
|
@@ -154,7 +167,8 @@ struct Index {
|
|
154
167
|
|
155
168
|
/** return the indexes of the k vectors closest to the query x.
|
156
169
|
*
|
157
|
-
* This function is identical as search but only return labels of
|
170
|
+
* This function is identical as search but only return labels of
|
171
|
+
* neighbors.
|
158
172
|
* @param n number of vectors
|
159
173
|
* @param x input vectors to search, size n * d
|
160
174
|
* @param labels output labels of the NNs, size n*k
|
@@ -179,7 +193,8 @@ struct Index {
|
|
179
193
|
*/
|
180
194
|
virtual void reconstruct(idx_t key, float* recons) const;
|
181
195
|
|
182
|
-
/** Reconstruct several stored vectors (or an approximation if lossy
|
196
|
+
/** Reconstruct several stored vectors (or an approximation if lossy
|
197
|
+
* coding)
|
183
198
|
*
|
184
199
|
* this function may not be defined for some indexes
|
185
200
|
* @param n number of vectors to reconstruct
|
@@ -292,6 +307,13 @@ struct Index {
|
|
292
307
|
* trained in the same way and have the same
|
293
308
|
* parameters). Otherwise throw. */
|
294
309
|
virtual void check_compatible_for_merge(const Index& otherIndex) const;
|
310
|
+
|
311
|
+
/** Add vectors that are computed with the standalone codec
|
312
|
+
*
|
313
|
+
* @param codes codes to add size n * sa_code_size()
|
314
|
+
* @param xids corresponding ids, size n
|
315
|
+
*/
|
316
|
+
virtual void add_sa_codes(idx_t n, const uint8_t* codes, const idx_t* xids);
|
295
317
|
};
|
296
318
|
|
297
319
|
} // namespace faiss
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -16,7 +16,6 @@
|
|
16
16
|
#include <faiss/impl/ResultHandler.h>
|
17
17
|
#include <faiss/utils/distances.h>
|
18
18
|
#include <faiss/utils/extra_distances.h>
|
19
|
-
#include <faiss/utils/utils.h>
|
20
19
|
|
21
20
|
namespace faiss {
|
22
21
|
|
@@ -273,6 +272,7 @@ void IndexAdditiveQuantizer::search(
|
|
273
272
|
DISPATCH(ST_norm_qint8)
|
274
273
|
DISPATCH(ST_norm_qint4)
|
275
274
|
DISPATCH(ST_norm_cqint4)
|
275
|
+
DISPATCH(ST_norm_from_LUT)
|
276
276
|
case AdditiveQuantizer::ST_norm_cqint8:
|
277
277
|
case AdditiveQuantizer::ST_norm_lsq2x4:
|
278
278
|
case AdditiveQuantizer::ST_norm_rq2x4:
|
@@ -527,7 +527,7 @@ void ResidualCoarseQuantizer::search(
|
|
527
527
|
float* distances,
|
528
528
|
idx_t* labels,
|
529
529
|
const SearchParameters* params_in) const {
|
530
|
-
float
|
530
|
+
float actual_beam_factor = this->beam_factor;
|
531
531
|
if (params_in) {
|
532
532
|
auto params =
|
533
533
|
dynamic_cast<const SearchParametersResidualCoarseQuantizer*>(
|
@@ -535,15 +535,15 @@ void ResidualCoarseQuantizer::search(
|
|
535
535
|
FAISS_THROW_IF_NOT_MSG(
|
536
536
|
params,
|
537
537
|
"need SearchParametersResidualCoarseQuantizer parameters");
|
538
|
-
|
538
|
+
actual_beam_factor = params->beam_factor;
|
539
539
|
}
|
540
540
|
|
541
|
-
if (
|
541
|
+
if (actual_beam_factor < 0) {
|
542
542
|
AdditiveCoarseQuantizer::search(n, x, k, distances, labels);
|
543
543
|
return;
|
544
544
|
}
|
545
545
|
|
546
|
-
int beam_size = int(k *
|
546
|
+
int beam_size = int(k * actual_beam_factor);
|
547
547
|
if (beam_size > ntotal) {
|
548
548
|
beam_size = ntotal;
|
549
549
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -8,11 +8,8 @@
|
|
8
8
|
#include <faiss/IndexAdditiveQuantizerFastScan.h>
|
9
9
|
|
10
10
|
#include <cassert>
|
11
|
-
#include <climits>
|
12
11
|
#include <memory>
|
13
12
|
|
14
|
-
#include <omp.h>
|
15
|
-
|
16
13
|
#include <faiss/impl/FaissAssert.h>
|
17
14
|
#include <faiss/impl/LocalSearchQuantizer.h>
|
18
15
|
#include <faiss/impl/LookupTableScaler.h>
|
@@ -35,30 +32,31 @@ IndexAdditiveQuantizerFastScan::IndexAdditiveQuantizerFastScan(
|
|
35
32
|
}
|
36
33
|
|
37
34
|
void IndexAdditiveQuantizerFastScan::init(
|
38
|
-
AdditiveQuantizer*
|
35
|
+
AdditiveQuantizer* aq_init,
|
39
36
|
MetricType metric,
|
40
37
|
int bbs) {
|
41
|
-
FAISS_THROW_IF_NOT(
|
42
|
-
FAISS_THROW_IF_NOT(!
|
43
|
-
FAISS_THROW_IF_NOT(
|
38
|
+
FAISS_THROW_IF_NOT(aq_init != nullptr);
|
39
|
+
FAISS_THROW_IF_NOT(!aq_init->nbits.empty());
|
40
|
+
FAISS_THROW_IF_NOT(aq_init->nbits[0] == 4);
|
44
41
|
if (metric == METRIC_INNER_PRODUCT) {
|
45
42
|
FAISS_THROW_IF_NOT_MSG(
|
46
|
-
|
43
|
+
aq_init->search_type == AdditiveQuantizer::ST_LUT_nonorm,
|
47
44
|
"Search type must be ST_LUT_nonorm for IP metric");
|
48
45
|
} else {
|
49
46
|
FAISS_THROW_IF_NOT_MSG(
|
50
|
-
|
51
|
-
|
47
|
+
aq_init->search_type == AdditiveQuantizer::ST_norm_lsq2x4 ||
|
48
|
+
aq_init->search_type ==
|
49
|
+
AdditiveQuantizer::ST_norm_rq2x4,
|
52
50
|
"Search type must be lsq2x4 or rq2x4 for L2 metric");
|
53
51
|
}
|
54
52
|
|
55
|
-
this->aq =
|
53
|
+
this->aq = aq_init;
|
56
54
|
if (metric == METRIC_L2) {
|
57
|
-
M =
|
55
|
+
M = aq_init->M + 2; // 2x4 bits AQ
|
58
56
|
} else {
|
59
|
-
M =
|
57
|
+
M = aq_init->M;
|
60
58
|
}
|
61
|
-
init_fastscan(
|
59
|
+
init_fastscan(aq_init->d, M, 4, metric, bbs);
|
62
60
|
|
63
61
|
max_train_points = 1024 * ksub * M;
|
64
62
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -103,4 +103,15 @@ void IndexBinary::check_compatible_for_merge(
|
|
103
103
|
FAISS_THROW_MSG("check_compatible_for_merge() not implemented");
|
104
104
|
}
|
105
105
|
|
106
|
+
size_t IndexBinary::sa_code_size() const {
|
107
|
+
return code_size;
|
108
|
+
}
|
109
|
+
|
110
|
+
void IndexBinary::add_sa_codes(
|
111
|
+
idx_t n,
|
112
|
+
const uint8_t* codes,
|
113
|
+
const idx_t* xids) {
|
114
|
+
add_with_ids(n, codes, xids);
|
115
|
+
}
|
116
|
+
|
106
117
|
} // namespace faiss
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -171,6 +171,12 @@ struct IndexBinary {
|
|
171
171
|
* parameters). Otherwise throw. */
|
172
172
|
virtual void check_compatible_for_merge(
|
173
173
|
const IndexBinary& otherIndex) const;
|
174
|
+
|
175
|
+
/** size of the produced codes in bytes */
|
176
|
+
virtual size_t sa_code_size() const;
|
177
|
+
|
178
|
+
/** Same as add_with_ids for IndexBinary. */
|
179
|
+
virtual void add_sa_codes(idx_t n, const uint8_t* codes, const idx_t* xids);
|
174
180
|
};
|
175
181
|
|
176
182
|
} // namespace faiss
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -14,7 +14,6 @@
|
|
14
14
|
#include <faiss/impl/IDSelector.h>
|
15
15
|
#include <faiss/utils/Heap.h>
|
16
16
|
#include <faiss/utils/hamming.h>
|
17
|
-
#include <faiss/utils/utils.h>
|
18
17
|
#include <cstring>
|
19
18
|
|
20
19
|
namespace faiss {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -15,11 +15,6 @@
|
|
15
15
|
#include <cstring>
|
16
16
|
#include <memory>
|
17
17
|
|
18
|
-
#include <queue>
|
19
|
-
#include <unordered_set>
|
20
|
-
|
21
|
-
#include <sys/stat.h>
|
22
|
-
#include <sys/types.h>
|
23
18
|
#include <cstdint>
|
24
19
|
|
25
20
|
#include <faiss/IndexBinaryFlat.h>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -21,7 +21,7 @@ namespace faiss {
|
|
21
21
|
struct IndexBinaryHNSW : IndexBinary {
|
22
22
|
typedef HNSW::storage_idx_t storage_idx_t;
|
23
23
|
|
24
|
-
// the link
|
24
|
+
// the link structure
|
25
25
|
HNSW hnsw;
|
26
26
|
|
27
27
|
// the sequential storage
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -19,7 +19,6 @@
|
|
19
19
|
|
20
20
|
#include <faiss/impl/AuxIndexStructures.h>
|
21
21
|
#include <faiss/impl/FaissAssert.h>
|
22
|
-
#include <faiss/impl/platform_macros.h>
|
23
22
|
|
24
23
|
namespace faiss {
|
25
24
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/*
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
@@ -456,7 +456,7 @@ void search_knn_hamming_heap(
|
|
456
456
|
}
|
457
457
|
|
458
458
|
} // parallel for
|
459
|
-
}
|
459
|
+
} // parallel
|
460
460
|
|
461
461
|
indexIVF_stats.nq += n;
|
462
462
|
indexIVF_stats.nlist += nlistv;
|