2024-10-23 00:46:48 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2019-11-19 18:36:44 +08:00
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// -*- c++ -*-
|
|
|
|
// I/O code for indexes
|
|
|
|
|
|
|
|
#ifndef FAISS_CLONE_INDEX_C_H
|
|
|
|
#define FAISS_CLONE_INDEX_C_H
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2024-03-29 17:37:19 +08:00
|
|
|
#include "IndexBinary_c.h"
|
2019-11-19 18:36:44 +08:00
|
|
|
#include "Index_c.h"
|
2021-02-25 20:44:50 +08:00
|
|
|
#include "faiss_c.h"
|
2019-11-19 18:36:44 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* cloning functions */
|
|
|
|
|
|
|
|
/** Clone an index. This is equivalent to `faiss::clone_index` */
|
2021-02-25 20:44:50 +08:00
|
|
|
int faiss_clone_index(const FaissIndex*, FaissIndex** p_out);
|
2019-11-19 18:36:44 +08:00
|
|
|
|
2024-03-29 17:37:19 +08:00
|
|
|
/** Clone a binary index. This is equivalent to `faiss::clone_index_binary` */
|
|
|
|
int faiss_clone_index_binary(const FaissIndexBinary*, FaissIndexBinary** p_out);
|
|
|
|
|
2019-11-19 18:36:44 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2021-02-25 20:44:50 +08:00
|
|
|
#endif
|