Commit 67bfbee 1 parent aed7b0e commit 67bfbee Copy full SHA for 67bfbee
File tree 5 files changed +46
-2
lines changed
5 files changed +46
-2
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ set(FAISS_C_SRC
30
30
index_io_c.cpp
31
31
impl/AuxIndexStructures_c.cpp
32
32
utils/distances_c.cpp
33
+ utils/utils_c.cpp
33
34
)
34
35
add_library (faiss_c ${FAISS_C_SRC} )
35
36
target_link_libraries (faiss_c PRIVATE faiss)
Original file line number Diff line number Diff line change
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
+ // Copyright 2004-present Facebook. All Rights Reserved.
9
+ // -*- c++ -*-
10
+
11
+ #include " utils_c.h"
12
+ #include < faiss/utils/index.h>
13
+
14
+ const char * get_version () {
15
+ return VERSION_STRING;
16
+ }
Original file line number Diff line number Diff line change
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
+ // Copyright 2004-present Facebook. All Rights Reserved.
9
+ // -*- c -*-
10
+
11
+ #ifndef FAISS_UTILS_C_H
12
+ #define FAISS_UTILS_C_H
13
+
14
+ #include <stdint.h>
15
+ #include <stdlib.h>
16
+
17
+ #ifdef __cplusplus
18
+ extern "C" {
19
+ #endif
20
+
21
+ const char * get_version ();
22
+
23
+ #ifdef __cplusplus
24
+ }
25
+ #endif
26
+
27
+ #endif
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ std::string get_compile_options() {
130
130
return options;
131
131
}
132
132
133
- std::string get_version () {
133
+ const char * get_version () {
134
134
return VERSION_STRING;
135
135
}
136
136
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ std::string get_compile_options();
38
38
**************************************************/
39
39
40
40
// Expose FAISS version as a string
41
- std::string get_version ();
41
+ const char * get_version ();
42
42
43
43
// / ms elapsed since some arbitrary epoch
44
44
double getmillisecs ();
You can’t perform that action at this time.
0 commit comments