Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[faiss v1.7.1] Added high-level IVFFlatIndex impl #17

Merged
merged 7 commits into from
Jun 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 34 additions & 7 deletions faiss-sys/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,18 +694,39 @@ extern "C" {
index: *mut FaissIndexFlat1D,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FaissIndexIVFFlat_H {
_unused: [u8; 0],
}
pub type FaissIndexIVFFlat = FaissIndexIVFFlat_H;
pub type FaissIndexIVFFlat = FaissIndex_H;
extern "C" {
pub fn faiss_IndexIVFFlat_free(obj: *mut FaissIndexIVFFlat);
}
extern "C" {
pub fn faiss_IndexIVFFlat_cast(arg1: *mut FaissIndex) -> *mut FaissIndexIVFFlat;
}
extern "C" {
pub fn faiss_IndexIVFFlat_nprobe(arg1: *const FaissIndexIVFFlat) -> usize;
}
extern "C" {
pub fn faiss_IndexIVFFlat_nlist(arg1: *const FaissIndexIVFFlat) -> usize;
}
extern "C" {
pub fn faiss_IndexIVFFlat_set_nprobe(arg1: *mut FaissIndexIVFFlat, arg2: usize);
}
extern "C" {
pub fn faiss_IndexIVFFlat_quantizer(arg1: *const FaissIndexIVFFlat) -> *mut FaissIndex;
}
extern "C" {
pub fn faiss_IndexIVFFlat_quantizer_trains_alone(
arg1: *const FaissIndexIVFFlat,
) -> ::std::os::raw::c_char;
}
extern "C" {
pub fn faiss_IndexIVFFlat_own_fields(arg1: *const FaissIndexIVFFlat) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn faiss_IndexIVFFlat_set_own_fields(
arg1: *mut FaissIndexIVFFlat,
arg2: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = " Inverted file with stored vectors. Here the inverted file"]
#[doc = " pre-selects the vectors to be searched, but they are not otherwise"]
Expand Down Expand Up @@ -766,6 +787,9 @@ extern "C" {
extern "C" {
pub fn faiss_IndexIVF_nprobe(arg1: *const FaissIndexIVF) -> usize;
}
extern "C" {
pub fn faiss_IndexIVF_set_nprobe(arg1: *mut FaissIndexIVF, arg2: usize);
}
extern "C" {
pub fn faiss_IndexIVF_quantizer(arg1: *const FaissIndexIVF) -> *mut FaissIndex;
}
Expand All @@ -777,6 +801,9 @@ extern "C" {
extern "C" {
pub fn faiss_IndexIVF_own_fields(arg1: *const FaissIndexIVF) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn faiss_IndexIVF_set_own_fields(arg1: *mut FaissIndexIVF, arg2: ::std::os::raw::c_int);
}
extern "C" {
#[doc = " moves the entries from another dataset to self. On output,"]
#[doc = " other is empty. add_id is added to all moved ids (for"]
Expand Down Expand Up @@ -834,7 +861,7 @@ extern "C" {
pub fn faiss_IndexIVF_get_list_size(index: *const FaissIndexIVF, list_no: usize) -> usize;
}
extern "C" {
#[doc = " intialize a direct map"]
#[doc = " initialize a direct map"]
#[doc = ""]
#[doc = " @param new_maintain_direct_map if true, create a direct map,"]
#[doc = " else clear it"]
Expand Down
Loading