5
5
* LICENSE file in the root directory of this source tree.
6
6
*/
7
7
8
+ #include < faiss/impl/index_read_utils.h>
8
9
#include < faiss/index_io.h>
9
10
10
11
#include < faiss/impl/io_macros.h>
@@ -61,7 +62,7 @@ namespace faiss {
61
62
* Read
62
63
**************************************************************/
63
64
64
- static void read_index_header (Index* idx, IOReader* f) {
65
+ void read_index_header (Index* idx, IOReader* f) {
65
66
READ1 (idx->d );
66
67
READ1 (idx->ntotal );
67
68
idx_t dummy;
@@ -230,7 +231,7 @@ InvertedLists* read_InvertedLists(IOReader* f, int io_flags) {
230
231
}
231
232
}
232
233
233
- static void read_InvertedLists (IndexIVF* ivf, IOReader* f, int io_flags) {
234
+ void read_InvertedLists (IndexIVF* ivf, IOReader* f, int io_flags) {
234
235
InvertedLists* ils = read_InvertedLists (f, io_flags);
235
236
if (ils) {
236
237
FAISS_THROW_IF_NOT (ils->nlist == ivf->nlist );
@@ -438,7 +439,7 @@ ProductQuantizer* read_ProductQuantizer(IOReader* reader) {
438
439
return pq;
439
440
}
440
441
441
- static void read_direct_map (DirectMap* dm, IOReader* f) {
442
+ void read_direct_map (DirectMap* dm, IOReader* f) {
442
443
char maintain_direct_map;
443
444
READ1 (maintain_direct_map);
444
445
dm->type = (DirectMap::Type)maintain_direct_map;
@@ -454,10 +455,10 @@ static void read_direct_map(DirectMap* dm, IOReader* f) {
454
455
}
455
456
}
456
457
457
- static void read_ivf_header (
458
+ void read_ivf_header (
458
459
IndexIVF* ivf,
459
460
IOReader* f,
460
- std::vector<std::vector<idx_t >>* ids = nullptr ) {
461
+ std::vector<std::vector<idx_t >>* ids) {
461
462
read_index_header (ivf, f);
462
463
READ1 (ivf->nlist );
463
464
READ1 (ivf->nprobe );
0 commit comments