14 #ifndef FAISS_INDEX_IO_H
15 #define FAISS_INDEX_IO_H
22 struct VectorTransform;
24 struct ProductQuantizer;
26 void write_index (
const Index *idx, FILE *f);
27 void write_index (
const Index *idx,
const char *fname);
33 Index *
read_index (FILE * f,
bool try_mmap =
false);
34 Index *
read_index (
const char *fname,
bool try_mmap =
false);
38 void write_VectorTransform (
const VectorTransform *vt,
const char *fname);
39 VectorTransform *read_VectorTransform (
const char *fname);
41 ProductQuantizer * read_ProductQuantizer (
const char*fname);
42 void write_ProductQuantizer (
const ProductQuantizer*pq,
const char *fname);
47 Index *clone_index (
const Index *);
Index * read_index(FILE *f, bool try_mmap)