| 1 |
/* |
| 2 |
* Copyright (c) Meta Platforms, Inc. and 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 |
// -*- c++ -*- |
| 9 |
// I/O code for indexes |
| 10 |
|
| 11 |
#ifndef FAISS_CLONE_INDEX_C_H |
| 12 |
#define FAISS_CLONE_INDEX_C_H |
| 13 |
|
| 14 |
#include <stdio.h> |
| 15 |
#include "IndexBinary_c.h" |
| 16 |
#include "Index_c.h" |
| 17 |
#include "faiss_c.h" |
| 18 |
|
| 19 |
#ifdef __cplusplus |
| 20 |
extern "C" { |
| 21 |
#endif |
| 22 |
|
| 23 |
/* cloning functions */ |
| 24 |
|
| 25 |
/** Clone an index. This is equivalent to `faiss::clone_index` */ |
| 26 |
int faiss_clone_index(const FaissIndex*, FaissIndex** p_out); |
| 27 |
|
| 28 |
/** Clone a binary index. This is equivalent to `faiss::clone_index_binary` */ |
| 29 |
int faiss_clone_index_binary(const FaissIndexBinary*, FaissIndexBinary** p_out); |
| 30 |
|
| 31 |
#ifdef __cplusplus |
| 32 |
} |
| 33 |
#endif |
| 34 |
#endif |