faiss 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/README.md +103 -3
  4. data/ext/faiss/ext.cpp +99 -32
  5. data/ext/faiss/extconf.rb +12 -2
  6. data/lib/faiss/ext.bundle +0 -0
  7. data/lib/faiss/index.rb +3 -3
  8. data/lib/faiss/index_binary.rb +3 -3
  9. data/lib/faiss/kmeans.rb +1 -1
  10. data/lib/faiss/pca_matrix.rb +2 -2
  11. data/lib/faiss/product_quantizer.rb +3 -3
  12. data/lib/faiss/version.rb +1 -1
  13. data/vendor/faiss/AutoTune.cpp +719 -0
  14. data/vendor/faiss/AutoTune.h +212 -0
  15. data/vendor/faiss/Clustering.cpp +261 -0
  16. data/vendor/faiss/Clustering.h +101 -0
  17. data/vendor/faiss/IVFlib.cpp +339 -0
  18. data/vendor/faiss/IVFlib.h +132 -0
  19. data/vendor/faiss/Index.cpp +171 -0
  20. data/vendor/faiss/Index.h +261 -0
  21. data/vendor/faiss/Index2Layer.cpp +437 -0
  22. data/vendor/faiss/Index2Layer.h +85 -0
  23. data/vendor/faiss/IndexBinary.cpp +77 -0
  24. data/vendor/faiss/IndexBinary.h +163 -0
  25. data/vendor/faiss/IndexBinaryFlat.cpp +83 -0
  26. data/vendor/faiss/IndexBinaryFlat.h +54 -0
  27. data/vendor/faiss/IndexBinaryFromFloat.cpp +78 -0
  28. data/vendor/faiss/IndexBinaryFromFloat.h +52 -0
  29. data/vendor/faiss/IndexBinaryHNSW.cpp +325 -0
  30. data/vendor/faiss/IndexBinaryHNSW.h +56 -0
  31. data/vendor/faiss/IndexBinaryIVF.cpp +671 -0
  32. data/vendor/faiss/IndexBinaryIVF.h +211 -0
  33. data/vendor/faiss/IndexFlat.cpp +508 -0
  34. data/vendor/faiss/IndexFlat.h +175 -0
  35. data/vendor/faiss/IndexHNSW.cpp +1090 -0
  36. data/vendor/faiss/IndexHNSW.h +170 -0
  37. data/vendor/faiss/IndexIVF.cpp +909 -0
  38. data/vendor/faiss/IndexIVF.h +353 -0
  39. data/vendor/faiss/IndexIVFFlat.cpp +502 -0
  40. data/vendor/faiss/IndexIVFFlat.h +118 -0
  41. data/vendor/faiss/IndexIVFPQ.cpp +1207 -0
  42. data/vendor/faiss/IndexIVFPQ.h +161 -0
  43. data/vendor/faiss/IndexIVFPQR.cpp +219 -0
  44. data/vendor/faiss/IndexIVFPQR.h +65 -0
  45. data/vendor/faiss/IndexIVFSpectralHash.cpp +331 -0
  46. data/vendor/faiss/IndexIVFSpectralHash.h +75 -0
  47. data/vendor/faiss/IndexLSH.cpp +225 -0
  48. data/vendor/faiss/IndexLSH.h +87 -0
  49. data/vendor/faiss/IndexLattice.cpp +143 -0
  50. data/vendor/faiss/IndexLattice.h +68 -0
  51. data/vendor/faiss/IndexPQ.cpp +1188 -0
  52. data/vendor/faiss/IndexPQ.h +199 -0
  53. data/vendor/faiss/IndexPreTransform.cpp +288 -0
  54. data/vendor/faiss/IndexPreTransform.h +91 -0
  55. data/vendor/faiss/IndexReplicas.cpp +123 -0
  56. data/vendor/faiss/IndexReplicas.h +76 -0
  57. data/vendor/faiss/IndexScalarQuantizer.cpp +317 -0
  58. data/vendor/faiss/IndexScalarQuantizer.h +127 -0
  59. data/vendor/faiss/IndexShards.cpp +317 -0
  60. data/vendor/faiss/IndexShards.h +100 -0
  61. data/vendor/faiss/InvertedLists.cpp +623 -0
  62. data/vendor/faiss/InvertedLists.h +334 -0
  63. data/vendor/faiss/LICENSE +21 -0
  64. data/vendor/faiss/MatrixStats.cpp +252 -0
  65. data/vendor/faiss/MatrixStats.h +62 -0
  66. data/vendor/faiss/MetaIndexes.cpp +351 -0
  67. data/vendor/faiss/MetaIndexes.h +126 -0
  68. data/vendor/faiss/OnDiskInvertedLists.cpp +674 -0
  69. data/vendor/faiss/OnDiskInvertedLists.h +127 -0
  70. data/vendor/faiss/VectorTransform.cpp +1157 -0
  71. data/vendor/faiss/VectorTransform.h +322 -0
  72. data/vendor/faiss/c_api/AutoTune_c.cpp +83 -0
  73. data/vendor/faiss/c_api/AutoTune_c.h +64 -0
  74. data/vendor/faiss/c_api/Clustering_c.cpp +139 -0
  75. data/vendor/faiss/c_api/Clustering_c.h +117 -0
  76. data/vendor/faiss/c_api/IndexFlat_c.cpp +140 -0
  77. data/vendor/faiss/c_api/IndexFlat_c.h +115 -0
  78. data/vendor/faiss/c_api/IndexIVFFlat_c.cpp +64 -0
  79. data/vendor/faiss/c_api/IndexIVFFlat_c.h +58 -0
  80. data/vendor/faiss/c_api/IndexIVF_c.cpp +92 -0
  81. data/vendor/faiss/c_api/IndexIVF_c.h +135 -0
  82. data/vendor/faiss/c_api/IndexLSH_c.cpp +37 -0
  83. data/vendor/faiss/c_api/IndexLSH_c.h +40 -0
  84. data/vendor/faiss/c_api/IndexShards_c.cpp +44 -0
  85. data/vendor/faiss/c_api/IndexShards_c.h +42 -0
  86. data/vendor/faiss/c_api/Index_c.cpp +105 -0
  87. data/vendor/faiss/c_api/Index_c.h +183 -0
  88. data/vendor/faiss/c_api/MetaIndexes_c.cpp +49 -0
  89. data/vendor/faiss/c_api/MetaIndexes_c.h +49 -0
  90. data/vendor/faiss/c_api/clone_index_c.cpp +23 -0
  91. data/vendor/faiss/c_api/clone_index_c.h +32 -0
  92. data/vendor/faiss/c_api/error_c.h +42 -0
  93. data/vendor/faiss/c_api/error_impl.cpp +27 -0
  94. data/vendor/faiss/c_api/error_impl.h +16 -0
  95. data/vendor/faiss/c_api/faiss_c.h +58 -0
  96. data/vendor/faiss/c_api/gpu/GpuAutoTune_c.cpp +96 -0
  97. data/vendor/faiss/c_api/gpu/GpuAutoTune_c.h +56 -0
  98. data/vendor/faiss/c_api/gpu/GpuClonerOptions_c.cpp +52 -0
  99. data/vendor/faiss/c_api/gpu/GpuClonerOptions_c.h +68 -0
  100. data/vendor/faiss/c_api/gpu/GpuIndex_c.cpp +17 -0
  101. data/vendor/faiss/c_api/gpu/GpuIndex_c.h +30 -0
  102. data/vendor/faiss/c_api/gpu/GpuIndicesOptions_c.h +38 -0
  103. data/vendor/faiss/c_api/gpu/GpuResources_c.cpp +86 -0
  104. data/vendor/faiss/c_api/gpu/GpuResources_c.h +66 -0
  105. data/vendor/faiss/c_api/gpu/StandardGpuResources_c.cpp +54 -0
  106. data/vendor/faiss/c_api/gpu/StandardGpuResources_c.h +53 -0
  107. data/vendor/faiss/c_api/gpu/macros_impl.h +42 -0
  108. data/vendor/faiss/c_api/impl/AuxIndexStructures_c.cpp +220 -0
  109. data/vendor/faiss/c_api/impl/AuxIndexStructures_c.h +149 -0
  110. data/vendor/faiss/c_api/index_factory_c.cpp +26 -0
  111. data/vendor/faiss/c_api/index_factory_c.h +30 -0
  112. data/vendor/faiss/c_api/index_io_c.cpp +42 -0
  113. data/vendor/faiss/c_api/index_io_c.h +50 -0
  114. data/vendor/faiss/c_api/macros_impl.h +110 -0
  115. data/vendor/faiss/clone_index.cpp +147 -0
  116. data/vendor/faiss/clone_index.h +38 -0
  117. data/vendor/faiss/demos/demo_imi_flat.cpp +151 -0
  118. data/vendor/faiss/demos/demo_imi_pq.cpp +199 -0
  119. data/vendor/faiss/demos/demo_ivfpq_indexing.cpp +146 -0
  120. data/vendor/faiss/demos/demo_sift1M.cpp +252 -0
  121. data/vendor/faiss/gpu/GpuAutoTune.cpp +95 -0
  122. data/vendor/faiss/gpu/GpuAutoTune.h +27 -0
  123. data/vendor/faiss/gpu/GpuCloner.cpp +403 -0
  124. data/vendor/faiss/gpu/GpuCloner.h +82 -0
  125. data/vendor/faiss/gpu/GpuClonerOptions.cpp +28 -0
  126. data/vendor/faiss/gpu/GpuClonerOptions.h +53 -0
  127. data/vendor/faiss/gpu/GpuDistance.h +52 -0
  128. data/vendor/faiss/gpu/GpuFaissAssert.h +29 -0
  129. data/vendor/faiss/gpu/GpuIndex.h +148 -0
  130. data/vendor/faiss/gpu/GpuIndexBinaryFlat.h +89 -0
  131. data/vendor/faiss/gpu/GpuIndexFlat.h +190 -0
  132. data/vendor/faiss/gpu/GpuIndexIVF.h +89 -0
  133. data/vendor/faiss/gpu/GpuIndexIVFFlat.h +85 -0
  134. data/vendor/faiss/gpu/GpuIndexIVFPQ.h +143 -0
  135. data/vendor/faiss/gpu/GpuIndexIVFScalarQuantizer.h +100 -0
  136. data/vendor/faiss/gpu/GpuIndicesOptions.h +30 -0
  137. data/vendor/faiss/gpu/GpuResources.cpp +52 -0
  138. data/vendor/faiss/gpu/GpuResources.h +73 -0
  139. data/vendor/faiss/gpu/StandardGpuResources.cpp +295 -0
  140. data/vendor/faiss/gpu/StandardGpuResources.h +114 -0
  141. data/vendor/faiss/gpu/impl/RemapIndices.cpp +43 -0
  142. data/vendor/faiss/gpu/impl/RemapIndices.h +24 -0
  143. data/vendor/faiss/gpu/perf/IndexWrapper-inl.h +71 -0
  144. data/vendor/faiss/gpu/perf/IndexWrapper.h +39 -0
  145. data/vendor/faiss/gpu/perf/PerfClustering.cpp +115 -0
  146. data/vendor/faiss/gpu/perf/PerfIVFPQAdd.cpp +139 -0
  147. data/vendor/faiss/gpu/perf/WriteIndex.cpp +102 -0
  148. data/vendor/faiss/gpu/test/TestGpuIndexBinaryFlat.cpp +130 -0
  149. data/vendor/faiss/gpu/test/TestGpuIndexFlat.cpp +371 -0
  150. data/vendor/faiss/gpu/test/TestGpuIndexIVFFlat.cpp +550 -0
  151. data/vendor/faiss/gpu/test/TestGpuIndexIVFPQ.cpp +450 -0
  152. data/vendor/faiss/gpu/test/TestGpuMemoryException.cpp +84 -0
  153. data/vendor/faiss/gpu/test/TestUtils.cpp +315 -0
  154. data/vendor/faiss/gpu/test/TestUtils.h +93 -0
  155. data/vendor/faiss/gpu/test/demo_ivfpq_indexing_gpu.cpp +159 -0
  156. data/vendor/faiss/gpu/utils/DeviceMemory.cpp +77 -0
  157. data/vendor/faiss/gpu/utils/DeviceMemory.h +71 -0
  158. data/vendor/faiss/gpu/utils/DeviceUtils.h +185 -0
  159. data/vendor/faiss/gpu/utils/MemorySpace.cpp +89 -0
  160. data/vendor/faiss/gpu/utils/MemorySpace.h +44 -0
  161. data/vendor/faiss/gpu/utils/StackDeviceMemory.cpp +239 -0
  162. data/vendor/faiss/gpu/utils/StackDeviceMemory.h +129 -0
  163. data/vendor/faiss/gpu/utils/StaticUtils.h +83 -0
  164. data/vendor/faiss/gpu/utils/Timer.cpp +60 -0
  165. data/vendor/faiss/gpu/utils/Timer.h +52 -0
  166. data/vendor/faiss/impl/AuxIndexStructures.cpp +305 -0
  167. data/vendor/faiss/impl/AuxIndexStructures.h +246 -0
  168. data/vendor/faiss/impl/FaissAssert.h +95 -0
  169. data/vendor/faiss/impl/FaissException.cpp +66 -0
  170. data/vendor/faiss/impl/FaissException.h +71 -0
  171. data/vendor/faiss/impl/HNSW.cpp +818 -0
  172. data/vendor/faiss/impl/HNSW.h +275 -0
  173. data/vendor/faiss/impl/PolysemousTraining.cpp +953 -0
  174. data/vendor/faiss/impl/PolysemousTraining.h +158 -0
  175. data/vendor/faiss/impl/ProductQuantizer.cpp +876 -0
  176. data/vendor/faiss/impl/ProductQuantizer.h +242 -0
  177. data/vendor/faiss/impl/ScalarQuantizer.cpp +1628 -0
  178. data/vendor/faiss/impl/ScalarQuantizer.h +120 -0
  179. data/vendor/faiss/impl/ThreadedIndex-inl.h +192 -0
  180. data/vendor/faiss/impl/ThreadedIndex.h +80 -0
  181. data/vendor/faiss/impl/index_read.cpp +793 -0
  182. data/vendor/faiss/impl/index_write.cpp +558 -0
  183. data/vendor/faiss/impl/io.cpp +142 -0
  184. data/vendor/faiss/impl/io.h +98 -0
  185. data/vendor/faiss/impl/lattice_Zn.cpp +712 -0
  186. data/vendor/faiss/impl/lattice_Zn.h +199 -0
  187. data/vendor/faiss/index_factory.cpp +392 -0
  188. data/vendor/faiss/index_factory.h +25 -0
  189. data/vendor/faiss/index_io.h +75 -0
  190. data/vendor/faiss/misc/test_blas.cpp +84 -0
  191. data/vendor/faiss/tests/test_binary_flat.cpp +64 -0
  192. data/vendor/faiss/tests/test_dealloc_invlists.cpp +183 -0
  193. data/vendor/faiss/tests/test_ivfpq_codec.cpp +67 -0
  194. data/vendor/faiss/tests/test_ivfpq_indexing.cpp +98 -0
  195. data/vendor/faiss/tests/test_lowlevel_ivf.cpp +566 -0
  196. data/vendor/faiss/tests/test_merge.cpp +258 -0
  197. data/vendor/faiss/tests/test_omp_threads.cpp +14 -0
  198. data/vendor/faiss/tests/test_ondisk_ivf.cpp +220 -0
  199. data/vendor/faiss/tests/test_pairs_decoding.cpp +189 -0
  200. data/vendor/faiss/tests/test_params_override.cpp +231 -0
  201. data/vendor/faiss/tests/test_pq_encoding.cpp +98 -0
  202. data/vendor/faiss/tests/test_sliding_ivf.cpp +240 -0
  203. data/vendor/faiss/tests/test_threaded_index.cpp +253 -0
  204. data/vendor/faiss/tests/test_transfer_invlists.cpp +159 -0
  205. data/vendor/faiss/tutorial/cpp/1-Flat.cpp +98 -0
  206. data/vendor/faiss/tutorial/cpp/2-IVFFlat.cpp +81 -0
  207. data/vendor/faiss/tutorial/cpp/3-IVFPQ.cpp +93 -0
  208. data/vendor/faiss/tutorial/cpp/4-GPU.cpp +119 -0
  209. data/vendor/faiss/tutorial/cpp/5-Multiple-GPUs.cpp +99 -0
  210. data/vendor/faiss/utils/Heap.cpp +122 -0
  211. data/vendor/faiss/utils/Heap.h +495 -0
  212. data/vendor/faiss/utils/WorkerThread.cpp +126 -0
  213. data/vendor/faiss/utils/WorkerThread.h +61 -0
  214. data/vendor/faiss/utils/distances.cpp +765 -0
  215. data/vendor/faiss/utils/distances.h +243 -0
  216. data/vendor/faiss/utils/distances_simd.cpp +809 -0
  217. data/vendor/faiss/utils/extra_distances.cpp +336 -0
  218. data/vendor/faiss/utils/extra_distances.h +54 -0
  219. data/vendor/faiss/utils/hamming-inl.h +472 -0
  220. data/vendor/faiss/utils/hamming.cpp +792 -0
  221. data/vendor/faiss/utils/hamming.h +220 -0
  222. data/vendor/faiss/utils/random.cpp +192 -0
  223. data/vendor/faiss/utils/random.h +60 -0
  224. data/vendor/faiss/utils/utils.cpp +783 -0
  225. data/vendor/faiss/utils/utils.h +181 -0
  226. metadata +216 -2
@@ -0,0 +1,181 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ // -*- c++ -*-
9
+
10
+ /*
11
+ * A few utilitary functions for similarity search:
12
+ * - optimized exhaustive distance and knn search functions
13
+ * - some functions reimplemented from torch for speed
14
+ */
15
+
16
+ #ifndef FAISS_utils_h
17
+ #define FAISS_utils_h
18
+
19
+ #include <stdint.h>
20
+
21
+ #include <faiss/utils/Heap.h>
22
+
23
+
24
+ namespace faiss {
25
+
26
+
27
+ /**************************************************
28
+ * Get some stats about the system
29
+ **************************************************/
30
+
31
+
32
+ /// ms elapsed since some arbitrary epoch
33
+ double getmillisecs ();
34
+
35
+ /// get current RSS usage in kB
36
+ size_t get_mem_usage_kb ();
37
+
38
+
39
+ uint64_t get_cycles ();
40
+
41
+ /***************************************************************************
42
+ * Misc matrix and vector manipulation functions
43
+ ***************************************************************************/
44
+
45
+
46
+ /** compute c := a + bf * b for a, b and c tables
47
+ *
48
+ * @param n size of the tables
49
+ * @param a size n
50
+ * @param b size n
51
+ * @param c restult table, size n
52
+ */
53
+ void fvec_madd (size_t n, const float *a,
54
+ float bf, const float *b, float *c);
55
+
56
+
57
+ /** same as fvec_madd, also return index of the min of the result table
58
+ * @return index of the min of table c
59
+ */
60
+ int fvec_madd_and_argmin (size_t n, const float *a,
61
+ float bf, const float *b, float *c);
62
+
63
+
64
+ /* perform a reflection (not an efficient implementation, just for test ) */
65
+ void reflection (const float * u, float * x, size_t n, size_t d, size_t nu);
66
+
67
+
68
+ /** For k-means: update stage.
69
+ *
70
+ * @param x training vectors, size n * d
71
+ * @param centroids centroid vectors, size k * d
72
+ * @param assign nearest centroid for each training vector, size n
73
+ * @param k_frozen do not update the k_frozen first centroids
74
+ * @return nb of spliting operations to fight empty clusters
75
+ */
76
+ int km_update_centroids (
77
+ const float * x,
78
+ float * centroids,
79
+ int64_t * assign,
80
+ size_t d, size_t k, size_t n,
81
+ size_t k_frozen);
82
+
83
+ /** compute the Q of the QR decomposition for m > n
84
+ * @param a size n * m: input matrix and output Q
85
+ */
86
+ void matrix_qr (int m, int n, float *a);
87
+
88
+ /** distances are supposed to be sorted. Sorts indices with same distance*/
89
+ void ranklist_handle_ties (int k, int64_t *idx, const float *dis);
90
+
91
+ /** count the number of comon elements between v1 and v2
92
+ * algorithm = sorting + bissection to avoid double-counting duplicates
93
+ */
94
+ size_t ranklist_intersection_size (size_t k1, const int64_t *v1,
95
+ size_t k2, const int64_t *v2);
96
+
97
+ /** merge a result table into another one
98
+ *
99
+ * @param I0, D0 first result table, size (n, k)
100
+ * @param I1, D1 second result table, size (n, k)
101
+ * @param keep_min if true, keep min values, otherwise keep max
102
+ * @param translation add this value to all I1's indexes
103
+ * @return nb of values that were taken from the second table
104
+ */
105
+ size_t merge_result_table_with (size_t n, size_t k,
106
+ int64_t *I0, float *D0,
107
+ const int64_t *I1, const float *D1,
108
+ bool keep_min = true,
109
+ int64_t translation = 0);
110
+
111
+
112
+ /// a balanced assignment has a IF of 1
113
+ double imbalance_factor (int n, int k, const int64_t *assign);
114
+
115
+ /// same, takes a histogram as input
116
+ double imbalance_factor (int k, const int *hist);
117
+
118
+
119
+ void fvec_argsort (size_t n, const float *vals,
120
+ size_t *perm);
121
+
122
+ void fvec_argsort_parallel (size_t n, const float *vals,
123
+ size_t *perm);
124
+
125
+
126
+ /// compute histogram on v
127
+ int ivec_hist (size_t n, const int * v, int vmax, int *hist);
128
+
129
+ /** Compute histogram of bits on a code array
130
+ *
131
+ * @param codes size(n, nbits / 8)
132
+ * @param hist size(nbits): nb of 1s in the array of codes
133
+ */
134
+ void bincode_hist(size_t n, size_t nbits, const uint8_t *codes, int *hist);
135
+
136
+
137
+ /// compute a checksum on a table.
138
+ size_t ivec_checksum (size_t n, const int *a);
139
+
140
+
141
+ /** random subsamples a set of vectors if there are too many of them
142
+ *
143
+ * @param d dimension of the vectors
144
+ * @param n on input: nb of input vectors, output: nb of output vectors
145
+ * @param nmax max nb of vectors to keep
146
+ * @param x input array, size *n-by-d
147
+ * @param seed random seed to use for sampling
148
+ * @return x or an array allocated with new [] with *n vectors
149
+ */
150
+ const float *fvecs_maybe_subsample (
151
+ size_t d, size_t *n, size_t nmax, const float *x,
152
+ bool verbose = false, int64_t seed = 1234);
153
+
154
+ /** Convert binary vector to +1/-1 valued float vector.
155
+ *
156
+ * @param d dimension of the vector (multiple of 8)
157
+ * @param x_in input binary vector (uint8_t table of size d / 8)
158
+ * @param x_out output float vector (float table of size d)
159
+ */
160
+ void binary_to_real(size_t d, const uint8_t *x_in, float *x_out);
161
+
162
+ /** Convert float vector to binary vector. Components > 0 are converted to 1,
163
+ * others to 0.
164
+ *
165
+ * @param d dimension of the vector (multiple of 8)
166
+ * @param x_in input float vector (float table of size d)
167
+ * @param x_out output binary vector (uint8_t table of size d / 8)
168
+ */
169
+ void real_to_binary(size_t d, const float *x_in, uint8_t *x_out);
170
+
171
+
172
+ /** A reasonable hashing function */
173
+ uint64_t hash_bytes (const uint8_t *bytes, int64_t n);
174
+
175
+ /** Whether OpenMP annotations were respected. */
176
+ bool check_openmp();
177
+
178
+ } // namspace faiss
179
+
180
+
181
+ #endif /* FAISS_utils_h */
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faiss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-08 00:00:00.000000000 Z
11
+ date: 2020-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rice
@@ -107,12 +107,226 @@ files:
107
107
  - ext/faiss/ext.cpp
108
108
  - ext/faiss/extconf.rb
109
109
  - lib/faiss.rb
110
+ - lib/faiss/ext.bundle
110
111
  - lib/faiss/index.rb
111
112
  - lib/faiss/index_binary.rb
112
113
  - lib/faiss/kmeans.rb
113
114
  - lib/faiss/pca_matrix.rb
114
115
  - lib/faiss/product_quantizer.rb
115
116
  - lib/faiss/version.rb
117
+ - vendor/faiss/AutoTune.cpp
118
+ - vendor/faiss/AutoTune.h
119
+ - vendor/faiss/Clustering.cpp
120
+ - vendor/faiss/Clustering.h
121
+ - vendor/faiss/IVFlib.cpp
122
+ - vendor/faiss/IVFlib.h
123
+ - vendor/faiss/Index.cpp
124
+ - vendor/faiss/Index.h
125
+ - vendor/faiss/Index2Layer.cpp
126
+ - vendor/faiss/Index2Layer.h
127
+ - vendor/faiss/IndexBinary.cpp
128
+ - vendor/faiss/IndexBinary.h
129
+ - vendor/faiss/IndexBinaryFlat.cpp
130
+ - vendor/faiss/IndexBinaryFlat.h
131
+ - vendor/faiss/IndexBinaryFromFloat.cpp
132
+ - vendor/faiss/IndexBinaryFromFloat.h
133
+ - vendor/faiss/IndexBinaryHNSW.cpp
134
+ - vendor/faiss/IndexBinaryHNSW.h
135
+ - vendor/faiss/IndexBinaryIVF.cpp
136
+ - vendor/faiss/IndexBinaryIVF.h
137
+ - vendor/faiss/IndexFlat.cpp
138
+ - vendor/faiss/IndexFlat.h
139
+ - vendor/faiss/IndexHNSW.cpp
140
+ - vendor/faiss/IndexHNSW.h
141
+ - vendor/faiss/IndexIVF.cpp
142
+ - vendor/faiss/IndexIVF.h
143
+ - vendor/faiss/IndexIVFFlat.cpp
144
+ - vendor/faiss/IndexIVFFlat.h
145
+ - vendor/faiss/IndexIVFPQ.cpp
146
+ - vendor/faiss/IndexIVFPQ.h
147
+ - vendor/faiss/IndexIVFPQR.cpp
148
+ - vendor/faiss/IndexIVFPQR.h
149
+ - vendor/faiss/IndexIVFSpectralHash.cpp
150
+ - vendor/faiss/IndexIVFSpectralHash.h
151
+ - vendor/faiss/IndexLSH.cpp
152
+ - vendor/faiss/IndexLSH.h
153
+ - vendor/faiss/IndexLattice.cpp
154
+ - vendor/faiss/IndexLattice.h
155
+ - vendor/faiss/IndexPQ.cpp
156
+ - vendor/faiss/IndexPQ.h
157
+ - vendor/faiss/IndexPreTransform.cpp
158
+ - vendor/faiss/IndexPreTransform.h
159
+ - vendor/faiss/IndexReplicas.cpp
160
+ - vendor/faiss/IndexReplicas.h
161
+ - vendor/faiss/IndexScalarQuantizer.cpp
162
+ - vendor/faiss/IndexScalarQuantizer.h
163
+ - vendor/faiss/IndexShards.cpp
164
+ - vendor/faiss/IndexShards.h
165
+ - vendor/faiss/InvertedLists.cpp
166
+ - vendor/faiss/InvertedLists.h
167
+ - vendor/faiss/LICENSE
168
+ - vendor/faiss/MatrixStats.cpp
169
+ - vendor/faiss/MatrixStats.h
170
+ - vendor/faiss/MetaIndexes.cpp
171
+ - vendor/faiss/MetaIndexes.h
172
+ - vendor/faiss/OnDiskInvertedLists.cpp
173
+ - vendor/faiss/OnDiskInvertedLists.h
174
+ - vendor/faiss/VectorTransform.cpp
175
+ - vendor/faiss/VectorTransform.h
176
+ - vendor/faiss/c_api/AutoTune_c.cpp
177
+ - vendor/faiss/c_api/AutoTune_c.h
178
+ - vendor/faiss/c_api/Clustering_c.cpp
179
+ - vendor/faiss/c_api/Clustering_c.h
180
+ - vendor/faiss/c_api/IndexFlat_c.cpp
181
+ - vendor/faiss/c_api/IndexFlat_c.h
182
+ - vendor/faiss/c_api/IndexIVFFlat_c.cpp
183
+ - vendor/faiss/c_api/IndexIVFFlat_c.h
184
+ - vendor/faiss/c_api/IndexIVF_c.cpp
185
+ - vendor/faiss/c_api/IndexIVF_c.h
186
+ - vendor/faiss/c_api/IndexLSH_c.cpp
187
+ - vendor/faiss/c_api/IndexLSH_c.h
188
+ - vendor/faiss/c_api/IndexShards_c.cpp
189
+ - vendor/faiss/c_api/IndexShards_c.h
190
+ - vendor/faiss/c_api/Index_c.cpp
191
+ - vendor/faiss/c_api/Index_c.h
192
+ - vendor/faiss/c_api/MetaIndexes_c.cpp
193
+ - vendor/faiss/c_api/MetaIndexes_c.h
194
+ - vendor/faiss/c_api/clone_index_c.cpp
195
+ - vendor/faiss/c_api/clone_index_c.h
196
+ - vendor/faiss/c_api/error_c.h
197
+ - vendor/faiss/c_api/error_impl.cpp
198
+ - vendor/faiss/c_api/error_impl.h
199
+ - vendor/faiss/c_api/faiss_c.h
200
+ - vendor/faiss/c_api/gpu/GpuAutoTune_c.cpp
201
+ - vendor/faiss/c_api/gpu/GpuAutoTune_c.h
202
+ - vendor/faiss/c_api/gpu/GpuClonerOptions_c.cpp
203
+ - vendor/faiss/c_api/gpu/GpuClonerOptions_c.h
204
+ - vendor/faiss/c_api/gpu/GpuIndex_c.cpp
205
+ - vendor/faiss/c_api/gpu/GpuIndex_c.h
206
+ - vendor/faiss/c_api/gpu/GpuIndicesOptions_c.h
207
+ - vendor/faiss/c_api/gpu/GpuResources_c.cpp
208
+ - vendor/faiss/c_api/gpu/GpuResources_c.h
209
+ - vendor/faiss/c_api/gpu/StandardGpuResources_c.cpp
210
+ - vendor/faiss/c_api/gpu/StandardGpuResources_c.h
211
+ - vendor/faiss/c_api/gpu/macros_impl.h
212
+ - vendor/faiss/c_api/impl/AuxIndexStructures_c.cpp
213
+ - vendor/faiss/c_api/impl/AuxIndexStructures_c.h
214
+ - vendor/faiss/c_api/index_factory_c.cpp
215
+ - vendor/faiss/c_api/index_factory_c.h
216
+ - vendor/faiss/c_api/index_io_c.cpp
217
+ - vendor/faiss/c_api/index_io_c.h
218
+ - vendor/faiss/c_api/macros_impl.h
219
+ - vendor/faiss/clone_index.cpp
220
+ - vendor/faiss/clone_index.h
221
+ - vendor/faiss/demos/demo_imi_flat.cpp
222
+ - vendor/faiss/demos/demo_imi_pq.cpp
223
+ - vendor/faiss/demos/demo_ivfpq_indexing.cpp
224
+ - vendor/faiss/demos/demo_sift1M.cpp
225
+ - vendor/faiss/gpu/GpuAutoTune.cpp
226
+ - vendor/faiss/gpu/GpuAutoTune.h
227
+ - vendor/faiss/gpu/GpuCloner.cpp
228
+ - vendor/faiss/gpu/GpuCloner.h
229
+ - vendor/faiss/gpu/GpuClonerOptions.cpp
230
+ - vendor/faiss/gpu/GpuClonerOptions.h
231
+ - vendor/faiss/gpu/GpuDistance.h
232
+ - vendor/faiss/gpu/GpuFaissAssert.h
233
+ - vendor/faiss/gpu/GpuIndex.h
234
+ - vendor/faiss/gpu/GpuIndexBinaryFlat.h
235
+ - vendor/faiss/gpu/GpuIndexFlat.h
236
+ - vendor/faiss/gpu/GpuIndexIVF.h
237
+ - vendor/faiss/gpu/GpuIndexIVFFlat.h
238
+ - vendor/faiss/gpu/GpuIndexIVFPQ.h
239
+ - vendor/faiss/gpu/GpuIndexIVFScalarQuantizer.h
240
+ - vendor/faiss/gpu/GpuIndicesOptions.h
241
+ - vendor/faiss/gpu/GpuResources.cpp
242
+ - vendor/faiss/gpu/GpuResources.h
243
+ - vendor/faiss/gpu/StandardGpuResources.cpp
244
+ - vendor/faiss/gpu/StandardGpuResources.h
245
+ - vendor/faiss/gpu/impl/RemapIndices.cpp
246
+ - vendor/faiss/gpu/impl/RemapIndices.h
247
+ - vendor/faiss/gpu/perf/IndexWrapper-inl.h
248
+ - vendor/faiss/gpu/perf/IndexWrapper.h
249
+ - vendor/faiss/gpu/perf/PerfClustering.cpp
250
+ - vendor/faiss/gpu/perf/PerfIVFPQAdd.cpp
251
+ - vendor/faiss/gpu/perf/WriteIndex.cpp
252
+ - vendor/faiss/gpu/test/TestGpuIndexBinaryFlat.cpp
253
+ - vendor/faiss/gpu/test/TestGpuIndexFlat.cpp
254
+ - vendor/faiss/gpu/test/TestGpuIndexIVFFlat.cpp
255
+ - vendor/faiss/gpu/test/TestGpuIndexIVFPQ.cpp
256
+ - vendor/faiss/gpu/test/TestGpuMemoryException.cpp
257
+ - vendor/faiss/gpu/test/TestUtils.cpp
258
+ - vendor/faiss/gpu/test/TestUtils.h
259
+ - vendor/faiss/gpu/test/demo_ivfpq_indexing_gpu.cpp
260
+ - vendor/faiss/gpu/utils/DeviceMemory.cpp
261
+ - vendor/faiss/gpu/utils/DeviceMemory.h
262
+ - vendor/faiss/gpu/utils/DeviceUtils.h
263
+ - vendor/faiss/gpu/utils/MemorySpace.cpp
264
+ - vendor/faiss/gpu/utils/MemorySpace.h
265
+ - vendor/faiss/gpu/utils/StackDeviceMemory.cpp
266
+ - vendor/faiss/gpu/utils/StackDeviceMemory.h
267
+ - vendor/faiss/gpu/utils/StaticUtils.h
268
+ - vendor/faiss/gpu/utils/Timer.cpp
269
+ - vendor/faiss/gpu/utils/Timer.h
270
+ - vendor/faiss/impl/AuxIndexStructures.cpp
271
+ - vendor/faiss/impl/AuxIndexStructures.h
272
+ - vendor/faiss/impl/FaissAssert.h
273
+ - vendor/faiss/impl/FaissException.cpp
274
+ - vendor/faiss/impl/FaissException.h
275
+ - vendor/faiss/impl/HNSW.cpp
276
+ - vendor/faiss/impl/HNSW.h
277
+ - vendor/faiss/impl/PolysemousTraining.cpp
278
+ - vendor/faiss/impl/PolysemousTraining.h
279
+ - vendor/faiss/impl/ProductQuantizer.cpp
280
+ - vendor/faiss/impl/ProductQuantizer.h
281
+ - vendor/faiss/impl/ScalarQuantizer.cpp
282
+ - vendor/faiss/impl/ScalarQuantizer.h
283
+ - vendor/faiss/impl/ThreadedIndex-inl.h
284
+ - vendor/faiss/impl/ThreadedIndex.h
285
+ - vendor/faiss/impl/index_read.cpp
286
+ - vendor/faiss/impl/index_write.cpp
287
+ - vendor/faiss/impl/io.cpp
288
+ - vendor/faiss/impl/io.h
289
+ - vendor/faiss/impl/lattice_Zn.cpp
290
+ - vendor/faiss/impl/lattice_Zn.h
291
+ - vendor/faiss/index_factory.cpp
292
+ - vendor/faiss/index_factory.h
293
+ - vendor/faiss/index_io.h
294
+ - vendor/faiss/misc/test_blas.cpp
295
+ - vendor/faiss/tests/test_binary_flat.cpp
296
+ - vendor/faiss/tests/test_dealloc_invlists.cpp
297
+ - vendor/faiss/tests/test_ivfpq_codec.cpp
298
+ - vendor/faiss/tests/test_ivfpq_indexing.cpp
299
+ - vendor/faiss/tests/test_lowlevel_ivf.cpp
300
+ - vendor/faiss/tests/test_merge.cpp
301
+ - vendor/faiss/tests/test_omp_threads.cpp
302
+ - vendor/faiss/tests/test_ondisk_ivf.cpp
303
+ - vendor/faiss/tests/test_pairs_decoding.cpp
304
+ - vendor/faiss/tests/test_params_override.cpp
305
+ - vendor/faiss/tests/test_pq_encoding.cpp
306
+ - vendor/faiss/tests/test_sliding_ivf.cpp
307
+ - vendor/faiss/tests/test_threaded_index.cpp
308
+ - vendor/faiss/tests/test_transfer_invlists.cpp
309
+ - vendor/faiss/tutorial/cpp/1-Flat.cpp
310
+ - vendor/faiss/tutorial/cpp/2-IVFFlat.cpp
311
+ - vendor/faiss/tutorial/cpp/3-IVFPQ.cpp
312
+ - vendor/faiss/tutorial/cpp/4-GPU.cpp
313
+ - vendor/faiss/tutorial/cpp/5-Multiple-GPUs.cpp
314
+ - vendor/faiss/utils/Heap.cpp
315
+ - vendor/faiss/utils/Heap.h
316
+ - vendor/faiss/utils/WorkerThread.cpp
317
+ - vendor/faiss/utils/WorkerThread.h
318
+ - vendor/faiss/utils/distances.cpp
319
+ - vendor/faiss/utils/distances.h
320
+ - vendor/faiss/utils/distances_simd.cpp
321
+ - vendor/faiss/utils/extra_distances.cpp
322
+ - vendor/faiss/utils/extra_distances.h
323
+ - vendor/faiss/utils/hamming-inl.h
324
+ - vendor/faiss/utils/hamming.cpp
325
+ - vendor/faiss/utils/hamming.h
326
+ - vendor/faiss/utils/random.cpp
327
+ - vendor/faiss/utils/random.h
328
+ - vendor/faiss/utils/utils.cpp
329
+ - vendor/faiss/utils/utils.h
116
330
  homepage: https://github.com/ankane/faiss
117
331
  licenses:
118
332
  - MIT