Debian Codegraph @

c_api/IndexReplicas_c.h

raw
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
10 #ifndef INDEXREPLICAS_C_H
11 #define INDEXREPLICAS_C_H
12
13 #include "Index_c.h"
14 #include "faiss_c.h"
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 /** Index that concatenates the results from several sub-indexes
21 */
22 FAISS_DECLARE_CLASS_INHERITED(IndexReplicas, Index)
23 FAISS_DECLARE_DESTRUCTOR(IndexReplicas)
24
25 FAISS_DECLARE_GETTER_SETTER(IndexReplicas, int, own_fields)
26
27 int faiss_IndexReplicas_new(FaissIndexReplicas** p_index, idx_t d);
28
29 int faiss_IndexReplicas_new_with_options(
30 FaissIndexReplicas** p_index,
31 idx_t d,
32 int threaded);
33
34 int faiss_IndexReplicas_add_replica(
35 FaissIndexReplicas* index,
36 FaissIndex* replica);
37
38 int faiss_IndexReplicas_remove_replica(
39 FaissIndexReplicas* index,
40 FaissIndex* replica);
41
42 FaissIndex* faiss_IndexReplicas_at(FaissIndexReplicas* index, int i);
43
44 #ifdef __cplusplus
45 }
46 #endif
47 #endif