20
20
#define FAISS_VERSION_MINOR 8
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
50
39
51
namespace faiss {
40
52
41
- // / Forward declarations see impl/AuxIndexStructures.h, impl/IDSelector.h and
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 them.
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 neighbors.
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 coding)
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
0 commit comments