| 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 INDEXSHARDS_C_H |
| 11 |
#define INDEXSHARDS_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(IndexShards, Index) |
| 23 |
FAISS_DECLARE_DESTRUCTOR(IndexShards) |
| 24 |
|
| 25 |
FAISS_DECLARE_GETTER_SETTER(IndexShards, int, own_fields) |
| 26 |
FAISS_DECLARE_GETTER_SETTER(IndexShards, int, successive_ids) |
| 27 |
|
| 28 |
int faiss_IndexShards_new(FaissIndexShards** p_index, idx_t d); |
| 29 |
|
| 30 |
int faiss_IndexShards_new_with_options( |
| 31 |
FaissIndexShards** p_index, |
| 32 |
idx_t d, |
| 33 |
int threaded, |
| 34 |
int successive_ids); |
| 35 |
|
| 36 |
int faiss_IndexShards_add_shard(FaissIndexShards* index, FaissIndex* shard); |
| 37 |
|
| 38 |
int faiss_IndexShards_remove_shard(FaissIndexShards* index, FaissIndex* shard); |
| 39 |
|
| 40 |
FaissIndex* faiss_IndexShards_at(FaissIndexShards* index, int i); |
| 41 |
|
| 42 |
#ifdef __cplusplus |
| 43 |
} |
| 44 |
#endif |
| 45 |
#endif |