| 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 FAISS_INDEX_PRETRANSFORM_C_H |
| 11 |
#define FAISS_INDEX_PRETRANSFORM_C_H |
| 12 |
|
| 13 |
#include "Index_c.h" |
| 14 |
#include "VectorTransform_c.h" |
| 15 |
#include "faiss_c.h" |
| 16 |
|
| 17 |
#ifdef __cplusplus |
| 18 |
extern "C" { |
| 19 |
#endif |
| 20 |
|
| 21 |
/** Index that applies a LinearTransform transform on vectors before |
| 22 |
* handing them over to a sub-index */ |
| 23 |
FAISS_DECLARE_CLASS_INHERITED(IndexPreTransform, Index) |
| 24 |
FAISS_DECLARE_DESTRUCTOR(IndexPreTransform) |
| 25 |
FAISS_DECLARE_INDEX_DOWNCAST(IndexPreTransform) |
| 26 |
|
| 27 |
FAISS_DECLARE_GETTER(IndexPreTransform, FaissIndex*, index) |
| 28 |
FAISS_DECLARE_GETTER_SETTER(IndexPreTransform, int, own_fields) |
| 29 |
|
| 30 |
int faiss_IndexPreTransform_new(FaissIndexPreTransform** p_index); |
| 31 |
|
| 32 |
int faiss_IndexPreTransform_new_with( |
| 33 |
FaissIndexPreTransform** p_index, |
| 34 |
FaissIndex* index); |
| 35 |
|
| 36 |
int faiss_IndexPreTransform_new_with_transform( |
| 37 |
FaissIndexPreTransform** p_index, |
| 38 |
FaissVectorTransform* ltrans, |
| 39 |
FaissIndex* index); |
| 40 |
|
| 41 |
int faiss_IndexPreTransform_prepend_transform( |
| 42 |
FaissIndexPreTransform* index, |
| 43 |
FaissVectorTransform* ltrans); |
| 44 |
|
| 45 |
#ifdef __cplusplus |
| 46 |
} |
| 47 |
#endif |
| 48 |
|
| 49 |
#endif |