13 #ifndef FAISS_INDEX_IO_H
14 #define FAISS_INDEX_IO_H
21 struct VectorTransform;
23 struct ProductQuantizer;
25 void write_index (
const Index *idx, FILE *f);
26 void write_index (
const Index *idx,
const char *fname);
32 Index *
read_index (FILE * f,
bool try_mmap =
false);
33 Index *
read_index (
const char *fname,
bool try_mmap =
false);
37 void write_VectorTransform (
const VectorTransform *vt,
const char *fname);
38 VectorTransform *read_VectorTransform (
const char *fname);
40 ProductQuantizer * read_ProductQuantizer (
const char*fname);
41 void write_ProductQuantizer (
const ProductQuantizer*pq,
const char *fname);
46 Index *clone_index (
const Index *);
Index * read_index(FILE *f, bool try_mmap)