Skip to main content

faiss_next_sys/bindings/v1_14/
linux_x86_64.rs

1/* automatically generated by rust-bindgen 0.70.1 */
2
3pub type faiss_idx_t = i64;
4pub type idx_t = faiss_idx_t;
5#[repr(i32)]
6#[non_exhaustive]
7#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
8pub enum FaissErrorCode {
9    OK = 0,
10    UNKNOWN_EXCEPT = -1,
11    FAISS_EXCEPT = -2,
12    STD_EXCEPT = -4,
13}
14extern "C" {
15    pub fn faiss_get_last_error() -> *const ::std::os::raw::c_char;
16}
17#[repr(C)]
18#[derive(Debug, Copy, Clone)]
19pub struct FaissRangeSearchResult_H {
20    _unused: [u8; 0],
21}
22pub type FaissRangeSearchResult = FaissRangeSearchResult_H;
23#[repr(C)]
24#[derive(Debug, Copy, Clone)]
25pub struct FaissIDSelector_H {
26    _unused: [u8; 0],
27}
28pub type FaissIDSelector = FaissIDSelector_H;
29#[repr(u32)]
30#[non_exhaustive]
31#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
32pub enum FaissMetricType {
33    METRIC_INNER_PRODUCT = 0,
34    METRIC_L2 = 1,
35    METRIC_L1 = 2,
36    METRIC_Linf = 3,
37    METRIC_Lp = 4,
38    METRIC_Canberra = 20,
39    METRIC_BrayCurtis = 21,
40    METRIC_JensenShannon = 22,
41}
42#[repr(C)]
43#[derive(Debug, Copy, Clone)]
44pub struct FaissSearchParameters_H {
45    _unused: [u8; 0],
46}
47pub type FaissSearchParameters = FaissSearchParameters_H;
48extern "C" {
49    pub fn faiss_SearchParameters_free(obj: *mut FaissSearchParameters);
50}
51extern "C" {
52    pub fn faiss_SearchParameters_new(
53        p_sp: *mut *mut FaissSearchParameters,
54        sel: *mut FaissIDSelector,
55    ) -> ::std::os::raw::c_int;
56}
57#[repr(C)]
58#[derive(Debug, Copy, Clone)]
59pub struct FaissIndex_H {
60    _unused: [u8; 0],
61}
62pub type FaissIndex = FaissIndex_H;
63extern "C" {
64    pub fn faiss_Index_free(obj: *mut FaissIndex);
65}
66extern "C" {
67    pub fn faiss_Index_d(arg1: *const FaissIndex) -> ::std::os::raw::c_int;
68}
69extern "C" {
70    pub fn faiss_Index_is_trained(arg1: *const FaissIndex) -> ::std::os::raw::c_int;
71}
72extern "C" {
73    pub fn faiss_Index_ntotal(arg1: *const FaissIndex) -> idx_t;
74}
75extern "C" {
76    pub fn faiss_Index_metric_type(arg1: *const FaissIndex) -> FaissMetricType;
77}
78extern "C" {
79    pub fn faiss_Index_verbose(arg1: *const FaissIndex) -> ::std::os::raw::c_int;
80}
81extern "C" {
82    pub fn faiss_Index_set_verbose(arg1: *mut FaissIndex, arg2: ::std::os::raw::c_int);
83}
84extern "C" {
85    pub fn faiss_Index_train(
86        index: *mut FaissIndex,
87        n: idx_t,
88        x: *const f32,
89    ) -> ::std::os::raw::c_int;
90}
91extern "C" {
92    pub fn faiss_Index_add(
93        index: *mut FaissIndex,
94        n: idx_t,
95        x: *const f32,
96    ) -> ::std::os::raw::c_int;
97}
98extern "C" {
99    pub fn faiss_Index_add_with_ids(
100        index: *mut FaissIndex,
101        n: idx_t,
102        x: *const f32,
103        xids: *const idx_t,
104    ) -> ::std::os::raw::c_int;
105}
106extern "C" {
107    pub fn faiss_Index_search(
108        index: *const FaissIndex,
109        n: idx_t,
110        x: *const f32,
111        k: idx_t,
112        distances: *mut f32,
113        labels: *mut idx_t,
114    ) -> ::std::os::raw::c_int;
115}
116extern "C" {
117    pub fn faiss_Index_search_with_params(
118        index: *const FaissIndex,
119        n: idx_t,
120        x: *const f32,
121        k: idx_t,
122        params: *const FaissSearchParameters,
123        distances: *mut f32,
124        labels: *mut idx_t,
125    ) -> ::std::os::raw::c_int;
126}
127extern "C" {
128    pub fn faiss_Index_range_search(
129        index: *const FaissIndex,
130        n: idx_t,
131        x: *const f32,
132        radius: f32,
133        result: *mut FaissRangeSearchResult,
134    ) -> ::std::os::raw::c_int;
135}
136extern "C" {
137    pub fn faiss_Index_assign(
138        index: *mut FaissIndex,
139        n: idx_t,
140        x: *const f32,
141        labels: *mut idx_t,
142        k: idx_t,
143    ) -> ::std::os::raw::c_int;
144}
145extern "C" {
146    pub fn faiss_Index_reset(index: *mut FaissIndex) -> ::std::os::raw::c_int;
147}
148extern "C" {
149    pub fn faiss_Index_remove_ids(
150        index: *mut FaissIndex,
151        sel: *const FaissIDSelector,
152        n_removed: *mut usize,
153    ) -> ::std::os::raw::c_int;
154}
155extern "C" {
156    pub fn faiss_Index_reconstruct(
157        index: *const FaissIndex,
158        key: idx_t,
159        recons: *mut f32,
160    ) -> ::std::os::raw::c_int;
161}
162extern "C" {
163    pub fn faiss_Index_reconstruct_n(
164        index: *const FaissIndex,
165        i0: idx_t,
166        ni: idx_t,
167        recons: *mut f32,
168    ) -> ::std::os::raw::c_int;
169}
170extern "C" {
171    pub fn faiss_Index_compute_residual(
172        index: *const FaissIndex,
173        x: *const f32,
174        residual: *mut f32,
175        key: idx_t,
176    ) -> ::std::os::raw::c_int;
177}
178extern "C" {
179    pub fn faiss_Index_compute_residual_n(
180        index: *const FaissIndex,
181        n: idx_t,
182        x: *const f32,
183        residuals: *mut f32,
184        keys: *const idx_t,
185    ) -> ::std::os::raw::c_int;
186}
187extern "C" {
188    pub fn faiss_Index_sa_code_size(
189        index: *const FaissIndex,
190        size: *mut usize,
191    ) -> ::std::os::raw::c_int;
192}
193extern "C" {
194    pub fn faiss_Index_sa_encode(
195        index: *const FaissIndex,
196        n: idx_t,
197        x: *const f32,
198        bytes: *mut u8,
199    ) -> ::std::os::raw::c_int;
200}
201extern "C" {
202    pub fn faiss_Index_sa_decode(
203        index: *const FaissIndex,
204        n: idx_t,
205        bytes: *const u8,
206        x: *mut f32,
207    ) -> ::std::os::raw::c_int;
208}
209pub type FaissIndexFlat = FaissIndex_H;
210extern "C" {
211    pub fn faiss_IndexFlat_new(p_index: *mut *mut FaissIndexFlat) -> ::std::os::raw::c_int;
212}
213extern "C" {
214    pub fn faiss_IndexFlat_new_with(
215        p_index: *mut *mut FaissIndexFlat,
216        d: idx_t,
217        metric: FaissMetricType,
218    ) -> ::std::os::raw::c_int;
219}
220extern "C" {
221    pub fn faiss_IndexFlat_xb(index: *mut FaissIndexFlat, p_xb: *mut *mut f32, p_size: *mut usize);
222}
223extern "C" {
224    pub fn faiss_IndexFlat_cast(arg1: *mut FaissIndex) -> *mut FaissIndexFlat;
225}
226extern "C" {
227    pub fn faiss_IndexFlat_free(obj: *mut FaissIndexFlat);
228}
229extern "C" {
230    pub fn faiss_IndexFlat_compute_distance_subset(
231        index: *mut FaissIndex,
232        n: idx_t,
233        x: *const f32,
234        k: idx_t,
235        distances: *mut f32,
236        labels: *const idx_t,
237    ) -> ::std::os::raw::c_int;
238}
239pub type FaissIndexFlatIP = FaissIndex_H;
240extern "C" {
241    pub fn faiss_IndexFlatIP_cast(arg1: *mut FaissIndex) -> *mut FaissIndexFlatIP;
242}
243extern "C" {
244    pub fn faiss_IndexFlatIP_free(obj: *mut FaissIndexFlatIP);
245}
246extern "C" {
247    pub fn faiss_IndexFlatIP_new(p_index: *mut *mut FaissIndexFlatIP) -> ::std::os::raw::c_int;
248}
249extern "C" {
250    pub fn faiss_IndexFlatIP_new_with(
251        p_index: *mut *mut FaissIndexFlatIP,
252        d: idx_t,
253    ) -> ::std::os::raw::c_int;
254}
255pub type FaissIndexFlatL2 = FaissIndex_H;
256extern "C" {
257    pub fn faiss_IndexFlatL2_cast(arg1: *mut FaissIndex) -> *mut FaissIndexFlatL2;
258}
259extern "C" {
260    pub fn faiss_IndexFlatL2_free(obj: *mut FaissIndexFlatL2);
261}
262extern "C" {
263    pub fn faiss_IndexFlatL2_new(p_index: *mut *mut FaissIndexFlatL2) -> ::std::os::raw::c_int;
264}
265extern "C" {
266    pub fn faiss_IndexFlatL2_new_with(
267        p_index: *mut *mut FaissIndexFlatL2,
268        d: idx_t,
269    ) -> ::std::os::raw::c_int;
270}
271pub type FaissIndexRefineFlat = FaissIndex_H;
272extern "C" {
273    pub fn faiss_IndexRefineFlat_new(
274        p_index: *mut *mut FaissIndexRefineFlat,
275        base_index: *mut FaissIndex,
276    ) -> ::std::os::raw::c_int;
277}
278extern "C" {
279    pub fn faiss_IndexRefineFlat_free(obj: *mut FaissIndexRefineFlat);
280}
281extern "C" {
282    pub fn faiss_IndexRefineFlat_cast(arg1: *mut FaissIndex) -> *mut FaissIndexRefineFlat;
283}
284extern "C" {
285    pub fn faiss_IndexRefineFlat_own_fields(
286        arg1: *const FaissIndexRefineFlat,
287    ) -> ::std::os::raw::c_int;
288}
289extern "C" {
290    pub fn faiss_IndexRefineFlat_set_own_fields(
291        arg1: *mut FaissIndexRefineFlat,
292        arg2: ::std::os::raw::c_int,
293    );
294}
295extern "C" {
296    pub fn faiss_IndexRefineFlat_k_factor(arg1: *const FaissIndexRefineFlat) -> f32;
297}
298extern "C" {
299    pub fn faiss_IndexRefineFlat_set_k_factor(arg1: *mut FaissIndexRefineFlat, arg2: f32);
300}
301pub type FaissIndexFlat1D = FaissIndex_H;
302extern "C" {
303    pub fn faiss_IndexFlat1D_cast(arg1: *mut FaissIndex) -> *mut FaissIndexFlat1D;
304}
305extern "C" {
306    pub fn faiss_IndexFlat1D_free(obj: *mut FaissIndexFlat1D);
307}
308extern "C" {
309    pub fn faiss_IndexFlat1D_new(p_index: *mut *mut FaissIndexFlat1D) -> ::std::os::raw::c_int;
310}
311extern "C" {
312    pub fn faiss_IndexFlat1D_new_with(
313        p_index: *mut *mut FaissIndexFlat1D,
314        continuous_update: ::std::os::raw::c_int,
315    ) -> ::std::os::raw::c_int;
316}
317extern "C" {
318    pub fn faiss_IndexFlat1D_update_permutation(
319        index: *mut FaissIndexFlat1D,
320    ) -> ::std::os::raw::c_int;
321}
322#[repr(C)]
323#[derive(Debug, Default, Copy, Clone)]
324pub struct FaissClusteringParameters {
325    pub niter: ::std::os::raw::c_int,
326    pub nredo: ::std::os::raw::c_int,
327    pub verbose: ::std::os::raw::c_int,
328    pub spherical: ::std::os::raw::c_int,
329    pub int_centroids: ::std::os::raw::c_int,
330    pub update_index: ::std::os::raw::c_int,
331    pub frozen_centroids: ::std::os::raw::c_int,
332    pub min_points_per_centroid: ::std::os::raw::c_int,
333    pub max_points_per_centroid: ::std::os::raw::c_int,
334    pub seed: ::std::os::raw::c_int,
335    pub decode_block_size: usize,
336}
337extern "C" {
338    pub fn faiss_ClusteringParameters_init(params: *mut FaissClusteringParameters);
339}
340#[repr(C)]
341#[derive(Debug, Copy, Clone)]
342pub struct FaissClustering_H {
343    _unused: [u8; 0],
344}
345pub type FaissClustering = FaissClustering_H;
346extern "C" {
347    pub fn faiss_Clustering_niter(arg1: *const FaissClustering) -> ::std::os::raw::c_int;
348}
349extern "C" {
350    pub fn faiss_Clustering_nredo(arg1: *const FaissClustering) -> ::std::os::raw::c_int;
351}
352extern "C" {
353    pub fn faiss_Clustering_verbose(arg1: *const FaissClustering) -> ::std::os::raw::c_int;
354}
355extern "C" {
356    pub fn faiss_Clustering_spherical(arg1: *const FaissClustering) -> ::std::os::raw::c_int;
357}
358extern "C" {
359    pub fn faiss_Clustering_int_centroids(arg1: *const FaissClustering) -> ::std::os::raw::c_int;
360}
361extern "C" {
362    pub fn faiss_Clustering_update_index(arg1: *const FaissClustering) -> ::std::os::raw::c_int;
363}
364extern "C" {
365    pub fn faiss_Clustering_frozen_centroids(arg1: *const FaissClustering)
366        -> ::std::os::raw::c_int;
367}
368extern "C" {
369    pub fn faiss_Clustering_min_points_per_centroid(
370        arg1: *const FaissClustering,
371    ) -> ::std::os::raw::c_int;
372}
373extern "C" {
374    pub fn faiss_Clustering_max_points_per_centroid(
375        arg1: *const FaissClustering,
376    ) -> ::std::os::raw::c_int;
377}
378extern "C" {
379    pub fn faiss_Clustering_seed(arg1: *const FaissClustering) -> ::std::os::raw::c_int;
380}
381extern "C" {
382    pub fn faiss_Clustering_decode_block_size(arg1: *const FaissClustering) -> usize;
383}
384extern "C" {
385    pub fn faiss_Clustering_d(arg1: *const FaissClustering) -> usize;
386}
387extern "C" {
388    pub fn faiss_Clustering_k(arg1: *const FaissClustering) -> usize;
389}
390#[repr(C)]
391#[derive(Debug, Copy, Clone)]
392pub struct FaissClusteringIterationStats_H {
393    _unused: [u8; 0],
394}
395pub type FaissClusteringIterationStats = FaissClusteringIterationStats_H;
396extern "C" {
397    pub fn faiss_ClusteringIterationStats_obj(arg1: *const FaissClusteringIterationStats) -> f32;
398}
399extern "C" {
400    pub fn faiss_ClusteringIterationStats_time(arg1: *const FaissClusteringIterationStats) -> f64;
401}
402extern "C" {
403    pub fn faiss_ClusteringIterationStats_time_search(
404        arg1: *const FaissClusteringIterationStats,
405    ) -> f64;
406}
407extern "C" {
408    pub fn faiss_ClusteringIterationStats_imbalance_factor(
409        arg1: *const FaissClusteringIterationStats,
410    ) -> f64;
411}
412extern "C" {
413    pub fn faiss_ClusteringIterationStats_nsplit(
414        arg1: *const FaissClusteringIterationStats,
415    ) -> ::std::os::raw::c_int;
416}
417extern "C" {
418    pub fn faiss_Clustering_centroids(
419        clustering: *mut FaissClustering,
420        centroids: *mut *mut f32,
421        size: *mut usize,
422    );
423}
424extern "C" {
425    pub fn faiss_Clustering_iteration_stats(
426        clustering: *mut FaissClustering,
427        iteration_stats: *mut *mut FaissClusteringIterationStats,
428        size: *mut usize,
429    );
430}
431extern "C" {
432    pub fn faiss_Clustering_new(
433        p_clustering: *mut *mut FaissClustering,
434        d: ::std::os::raw::c_int,
435        k: ::std::os::raw::c_int,
436    ) -> ::std::os::raw::c_int;
437}
438extern "C" {
439    pub fn faiss_Clustering_new_with_params(
440        p_clustering: *mut *mut FaissClustering,
441        d: ::std::os::raw::c_int,
442        k: ::std::os::raw::c_int,
443        cp: *const FaissClusteringParameters,
444    ) -> ::std::os::raw::c_int;
445}
446extern "C" {
447    pub fn faiss_Clustering_train(
448        clustering: *mut FaissClustering,
449        n: idx_t,
450        x: *const f32,
451        index: *mut FaissIndex,
452    ) -> ::std::os::raw::c_int;
453}
454extern "C" {
455    pub fn faiss_Clustering_free(clustering: *mut FaissClustering);
456}
457extern "C" {
458    pub fn faiss_kmeans_clustering(
459        d: usize,
460        n: usize,
461        k: usize,
462        x: *const f32,
463        centroids: *mut f32,
464        q_error: *mut f32,
465    ) -> ::std::os::raw::c_int;
466}
467extern "C" {
468    pub fn faiss_RangeSearchResult_nq(arg1: *const FaissRangeSearchResult) -> usize;
469}
470extern "C" {
471    pub fn faiss_RangeSearchResult_new(
472        p_rsr: *mut *mut FaissRangeSearchResult,
473        nq: idx_t,
474    ) -> ::std::os::raw::c_int;
475}
476extern "C" {
477    pub fn faiss_RangeSearchResult_new_with(
478        p_rsr: *mut *mut FaissRangeSearchResult,
479        nq: idx_t,
480        alloc_lims: ::std::os::raw::c_int,
481    ) -> ::std::os::raw::c_int;
482}
483extern "C" {
484    pub fn faiss_RangeSearchResult_do_allocation(
485        rsr: *mut FaissRangeSearchResult,
486    ) -> ::std::os::raw::c_int;
487}
488extern "C" {
489    pub fn faiss_RangeSearchResult_free(obj: *mut FaissRangeSearchResult);
490}
491extern "C" {
492    pub fn faiss_RangeSearchResult_buffer_size(arg1: *const FaissRangeSearchResult) -> usize;
493}
494extern "C" {
495    pub fn faiss_RangeSearchResult_lims(rsr: *mut FaissRangeSearchResult, lims: *mut *mut usize);
496}
497extern "C" {
498    pub fn faiss_RangeSearchResult_labels(
499        rsr: *mut FaissRangeSearchResult,
500        labels: *mut *mut idx_t,
501        distances: *mut *mut f32,
502    );
503}
504extern "C" {
505    pub fn faiss_IDSelector_free(obj: *mut FaissIDSelector);
506}
507extern "C" {
508    pub fn faiss_IDSelector_is_member(
509        sel: *const FaissIDSelector,
510        id: idx_t,
511    ) -> ::std::os::raw::c_int;
512}
513#[repr(C)]
514#[derive(Debug, Copy, Clone)]
515pub struct FaissIDSelectorRange_H {
516    _unused: [u8; 0],
517}
518pub type FaissIDSelectorRange = FaissIDSelectorRange_H;
519extern "C" {
520    pub fn faiss_IDSelectorRange_free(obj: *mut FaissIDSelectorRange);
521}
522extern "C" {
523    pub fn faiss_IDSelectorRange_imin(arg1: *const FaissIDSelectorRange) -> idx_t;
524}
525extern "C" {
526    pub fn faiss_IDSelectorRange_imax(arg1: *const FaissIDSelectorRange) -> idx_t;
527}
528extern "C" {
529    pub fn faiss_IDSelectorRange_new(
530        p_sel: *mut *mut FaissIDSelectorRange,
531        imin: idx_t,
532        imax: idx_t,
533    ) -> ::std::os::raw::c_int;
534}
535#[repr(C)]
536#[derive(Debug, Copy, Clone)]
537pub struct FaissIDSelectorBatch_H {
538    _unused: [u8; 0],
539}
540pub type FaissIDSelectorBatch = FaissIDSelectorBatch_H;
541extern "C" {
542    pub fn faiss_IDSelectorBatch_nbits(arg1: *const FaissIDSelectorBatch) -> ::std::os::raw::c_int;
543}
544extern "C" {
545    pub fn faiss_IDSelectorBatch_mask(arg1: *const FaissIDSelectorBatch) -> idx_t;
546}
547extern "C" {
548    pub fn faiss_IDSelectorBatch_new(
549        p_sel: *mut *mut FaissIDSelectorBatch,
550        n: usize,
551        indices: *const idx_t,
552    ) -> ::std::os::raw::c_int;
553}
554#[repr(C)]
555#[derive(Debug, Copy, Clone)]
556pub struct FaissIDSelectorBitmap_H {
557    _unused: [u8; 0],
558}
559pub type FaissIDSelectorBitmap = FaissIDSelectorBitmap_H;
560extern "C" {
561    pub fn faiss_IDSelectorBitmap_free(obj: *mut FaissIDSelectorBitmap);
562}
563extern "C" {
564    pub fn faiss_IDSelectorBitmap_n(arg1: *const FaissIDSelectorBitmap) -> usize;
565}
566extern "C" {
567    pub fn faiss_IDSelectorBitmap_bitmap(arg1: *const FaissIDSelectorBitmap) -> *const u8;
568}
569extern "C" {
570    pub fn faiss_IDSelectorBitmap_new(
571        p_sel: *mut *mut FaissIDSelectorBitmap,
572        n: usize,
573        bitmap: *const u8,
574    ) -> ::std::os::raw::c_int;
575}
576#[repr(C)]
577#[derive(Debug, Copy, Clone)]
578pub struct FaissIDSelectorNot_H {
579    _unused: [u8; 0],
580}
581pub type FaissIDSelectorNot = FaissIDSelectorNot_H;
582extern "C" {
583    pub fn faiss_IDSelectorNot_new(
584        p_sel: *mut *mut FaissIDSelectorNot,
585        sel: *const FaissIDSelector,
586    ) -> ::std::os::raw::c_int;
587}
588#[repr(C)]
589#[derive(Debug, Copy, Clone)]
590pub struct FaissIDSelectorAnd_H {
591    _unused: [u8; 0],
592}
593pub type FaissIDSelectorAnd = FaissIDSelectorAnd_H;
594extern "C" {
595    pub fn faiss_IDSelectorAnd_new(
596        p_sel: *mut *mut FaissIDSelectorAnd,
597        lhs_sel: *const FaissIDSelector,
598        rhs_sel: *const FaissIDSelector,
599    ) -> ::std::os::raw::c_int;
600}
601#[repr(C)]
602#[derive(Debug, Copy, Clone)]
603pub struct FaissIDSelectorOr_H {
604    _unused: [u8; 0],
605}
606pub type FaissIDSelectorOr = FaissIDSelectorOr_H;
607extern "C" {
608    pub fn faiss_IDSelectorOr_new(
609        p_sel: *mut *mut FaissIDSelectorOr,
610        lhs_sel: *const FaissIDSelector,
611        rhs_sel: *const FaissIDSelector,
612    ) -> ::std::os::raw::c_int;
613}
614#[repr(C)]
615#[derive(Debug, Copy, Clone)]
616pub struct FaissIDSelectorXOr_H {
617    _unused: [u8; 0],
618}
619pub type FaissIDSelectorXOr = FaissIDSelectorXOr_H;
620extern "C" {
621    pub fn faiss_IDSelectorXOr_new(
622        p_sel: *mut *mut FaissIDSelectorXOr,
623        lhs_sel: *const FaissIDSelector,
624        rhs_sel: *const FaissIDSelector,
625    ) -> ::std::os::raw::c_int;
626}
627#[repr(C)]
628#[derive(Debug, Copy, Clone)]
629pub struct FaissBufferList_H {
630    _unused: [u8; 0],
631}
632pub type FaissBufferList = FaissBufferList_H;
633extern "C" {
634    pub fn faiss_BufferList_free(obj: *mut FaissBufferList);
635}
636extern "C" {
637    pub fn faiss_BufferList_buffer_size(arg1: *const FaissBufferList) -> usize;
638}
639extern "C" {
640    pub fn faiss_BufferList_wp(arg1: *const FaissBufferList) -> usize;
641}
642#[repr(C)]
643#[derive(Debug, Copy, Clone)]
644pub struct FaissBuffer {
645    pub ids: *mut idx_t,
646    pub dis: *mut f32,
647}
648impl Default for FaissBuffer {
649    fn default() -> Self {
650        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
651        unsafe {
652            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
653            s.assume_init()
654        }
655    }
656}
657extern "C" {
658    pub fn faiss_BufferList_append_buffer(bl: *mut FaissBufferList) -> ::std::os::raw::c_int;
659}
660extern "C" {
661    pub fn faiss_BufferList_new(
662        p_bl: *mut *mut FaissBufferList,
663        buffer_size: usize,
664    ) -> ::std::os::raw::c_int;
665}
666extern "C" {
667    pub fn faiss_BufferList_add(
668        bl: *mut FaissBufferList,
669        id: idx_t,
670        dis: f32,
671    ) -> ::std::os::raw::c_int;
672}
673extern "C" {
674    pub fn faiss_BufferList_copy_range(
675        bl: *mut FaissBufferList,
676        ofs: usize,
677        n: usize,
678        dest_ids: *mut idx_t,
679        dest_dis: *mut f32,
680    ) -> ::std::os::raw::c_int;
681}
682#[repr(C)]
683#[derive(Debug, Copy, Clone)]
684pub struct FaissRangeSearchPartialResult_H {
685    _unused: [u8; 0],
686}
687pub type FaissRangeSearchPartialResult = FaissRangeSearchPartialResult_H;
688#[repr(C)]
689#[derive(Debug, Copy, Clone)]
690pub struct FaissRangeQueryResult_H {
691    _unused: [u8; 0],
692}
693pub type FaissRangeQueryResult = FaissRangeQueryResult_H;
694extern "C" {
695    pub fn faiss_RangeQueryResult_qno(arg1: *const FaissRangeQueryResult) -> idx_t;
696}
697extern "C" {
698    pub fn faiss_RangeQueryResult_nres(arg1: *const FaissRangeQueryResult) -> usize;
699}
700extern "C" {
701    pub fn faiss_RangeQueryResult_pres(
702        arg1: *const FaissRangeQueryResult,
703    ) -> *mut FaissRangeSearchPartialResult;
704}
705extern "C" {
706    pub fn faiss_RangeQueryResult_add(
707        qr: *mut FaissRangeQueryResult,
708        dis: f32,
709        id: idx_t,
710    ) -> ::std::os::raw::c_int;
711}
712extern "C" {
713    pub fn faiss_RangeSearchPartialResult_res(
714        arg1: *const FaissRangeSearchPartialResult,
715    ) -> *mut FaissRangeSearchResult;
716}
717extern "C" {
718    pub fn faiss_RangeSearchPartialResult_new(
719        p_res: *mut *mut FaissRangeSearchPartialResult,
720        res_in: *mut FaissRangeSearchResult,
721    ) -> ::std::os::raw::c_int;
722}
723extern "C" {
724    pub fn faiss_RangeSearchPartialResult_finalize(
725        res: *mut FaissRangeSearchPartialResult,
726    ) -> ::std::os::raw::c_int;
727}
728extern "C" {
729    pub fn faiss_RangeSearchPartialResult_set_lims(
730        res: *mut FaissRangeSearchPartialResult,
731    ) -> ::std::os::raw::c_int;
732}
733extern "C" {
734    pub fn faiss_RangeSearchPartialResult_new_result(
735        res: *mut FaissRangeSearchPartialResult,
736        qno: idx_t,
737        qr: *mut *mut FaissRangeQueryResult,
738    ) -> ::std::os::raw::c_int;
739}
740#[repr(C)]
741#[derive(Debug, Copy, Clone)]
742pub struct FaissDistanceComputer_H {
743    _unused: [u8; 0],
744}
745pub type FaissDistanceComputer = FaissDistanceComputer_H;
746extern "C" {
747    pub fn faiss_DistanceComputer_set_query(
748        dc: *mut FaissDistanceComputer,
749        x: *const f32,
750    ) -> ::std::os::raw::c_int;
751}
752extern "C" {
753    pub fn faiss_DistanceComputer_vector_to_query_dis(
754        dc: *mut FaissDistanceComputer,
755        i: idx_t,
756        qd: *mut f32,
757    ) -> ::std::os::raw::c_int;
758}
759extern "C" {
760    pub fn faiss_DistanceComputer_symmetric_dis(
761        dc: *mut FaissDistanceComputer,
762        i: idx_t,
763        j: idx_t,
764        vd: *mut f32,
765    ) -> ::std::os::raw::c_int;
766}
767extern "C" {
768    pub fn faiss_DistanceComputer_free(obj: *mut FaissDistanceComputer);
769}
770pub type FaissSearchParametersIVF = FaissSearchParameters_H;
771extern "C" {
772    pub fn faiss_SearchParametersIVF_free(obj: *mut FaissSearchParametersIVF);
773}
774extern "C" {
775    pub fn faiss_SearchParametersIVF_cast(
776        arg1: *mut FaissSearchParameters,
777    ) -> *mut FaissSearchParametersIVF;
778}
779extern "C" {
780    pub fn faiss_SearchParametersIVF_new(
781        p_sp: *mut *mut FaissSearchParametersIVF,
782    ) -> ::std::os::raw::c_int;
783}
784extern "C" {
785    pub fn faiss_SearchParametersIVF_new_with(
786        p_sp: *mut *mut FaissSearchParametersIVF,
787        sel: *mut FaissIDSelector,
788        nprobe: usize,
789        max_codes: usize,
790    ) -> ::std::os::raw::c_int;
791}
792extern "C" {
793    pub fn faiss_SearchParametersIVF_sel(
794        arg1: *const FaissSearchParametersIVF,
795    ) -> *const FaissIDSelector;
796}
797extern "C" {
798    pub fn faiss_SearchParametersIVF_nprobe(arg1: *const FaissSearchParametersIVF) -> usize;
799}
800extern "C" {
801    pub fn faiss_SearchParametersIVF_set_nprobe(arg1: *mut FaissSearchParametersIVF, arg2: usize);
802}
803extern "C" {
804    pub fn faiss_SearchParametersIVF_max_codes(arg1: *const FaissSearchParametersIVF) -> usize;
805}
806extern "C" {
807    pub fn faiss_SearchParametersIVF_set_max_codes(
808        arg1: *mut FaissSearchParametersIVF,
809        arg2: usize,
810    );
811}
812pub type FaissIndexIVF = FaissIndex_H;
813extern "C" {
814    pub fn faiss_IndexIVF_free(obj: *mut FaissIndexIVF);
815}
816extern "C" {
817    pub fn faiss_IndexIVF_cast(arg1: *mut FaissIndex) -> *mut FaissIndexIVF;
818}
819extern "C" {
820    pub fn faiss_IndexIVF_nlist(arg1: *const FaissIndexIVF) -> usize;
821}
822extern "C" {
823    pub fn faiss_IndexIVF_nprobe(arg1: *const FaissIndexIVF) -> usize;
824}
825extern "C" {
826    pub fn faiss_IndexIVF_set_nprobe(arg1: *mut FaissIndexIVF, arg2: usize);
827}
828extern "C" {
829    pub fn faiss_IndexIVF_quantizer(arg1: *const FaissIndexIVF) -> *mut FaissIndex;
830}
831extern "C" {
832    pub fn faiss_IndexIVF_quantizer_trains_alone(
833        arg1: *const FaissIndexIVF,
834    ) -> ::std::os::raw::c_char;
835}
836extern "C" {
837    pub fn faiss_IndexIVF_own_fields(arg1: *const FaissIndexIVF) -> ::std::os::raw::c_int;
838}
839extern "C" {
840    pub fn faiss_IndexIVF_set_own_fields(arg1: *mut FaissIndexIVF, arg2: ::std::os::raw::c_int);
841}
842extern "C" {
843    pub fn faiss_IndexIVF_merge_from(
844        index: *mut FaissIndexIVF,
845        other: *mut FaissIndexIVF,
846        add_id: idx_t,
847    ) -> ::std::os::raw::c_int;
848}
849extern "C" {
850    pub fn faiss_IndexIVF_copy_subset_to(
851        index: *const FaissIndexIVF,
852        other: *mut FaissIndexIVF,
853        subset_type: ::std::os::raw::c_int,
854        a1: idx_t,
855        a2: idx_t,
856    ) -> ::std::os::raw::c_int;
857}
858extern "C" {
859    pub fn faiss_IndexIVF_search_preassigned(
860        index: *const FaissIndexIVF,
861        n: idx_t,
862        x: *const f32,
863        k: idx_t,
864        assign: *const idx_t,
865        centroid_dis: *const f32,
866        distances: *mut f32,
867        labels: *mut idx_t,
868        store_pairs: ::std::os::raw::c_int,
869    ) -> ::std::os::raw::c_int;
870}
871extern "C" {
872    pub fn faiss_IndexIVF_get_list_size(index: *const FaissIndexIVF, list_no: usize) -> usize;
873}
874extern "C" {
875    pub fn faiss_IndexIVF_make_direct_map(
876        index: *mut FaissIndexIVF,
877        new_maintain_direct_map: ::std::os::raw::c_int,
878    ) -> ::std::os::raw::c_int;
879}
880extern "C" {
881    pub fn faiss_IndexIVF_imbalance_factor(index: *const FaissIndexIVF) -> f64;
882}
883extern "C" {
884    pub fn faiss_IndexIVF_print_stats(index: *const FaissIndexIVF);
885}
886extern "C" {
887    pub fn faiss_IndexIVF_invlists_get_ids(
888        index: *const FaissIndexIVF,
889        list_no: usize,
890        invlist: *mut idx_t,
891    );
892}
893extern "C" {
894    pub fn faiss_IndexIVF_train_encoder(
895        index: *mut FaissIndexIVF,
896        n: idx_t,
897        x: *const f32,
898        assign: *const idx_t,
899    ) -> ::std::os::raw::c_int;
900}
901#[repr(C)]
902#[derive(Debug, Default, Copy, Clone)]
903pub struct FaissIndexIVFStats {
904    pub nq: usize,
905    pub nlist: usize,
906    pub ndis: usize,
907    pub nheap_updates: usize,
908    pub quantization_time: f64,
909    pub search_time: f64,
910}
911extern "C" {
912    pub fn faiss_IndexIVFStats_reset(stats: *mut FaissIndexIVFStats);
913}
914extern "C" {
915    pub fn faiss_get_indexIVF_stats() -> *mut FaissIndexIVFStats;
916}
917pub type FaissIndexIVFFlat = FaissIndex_H;
918extern "C" {
919    pub fn faiss_IndexIVFFlat_free(obj: *mut FaissIndexIVFFlat);
920}
921extern "C" {
922    pub fn faiss_IndexIVFFlat_cast(arg1: *mut FaissIndex) -> *mut FaissIndexIVFFlat;
923}
924extern "C" {
925    pub fn faiss_IndexIVFFlat_nlist(arg1: *const FaissIndexIVFFlat) -> usize;
926}
927extern "C" {
928    pub fn faiss_IndexIVFFlat_nprobe(arg1: *const FaissIndexIVFFlat) -> usize;
929}
930extern "C" {
931    pub fn faiss_IndexIVFFlat_set_nprobe(arg1: *mut FaissIndexIVFFlat, arg2: usize);
932}
933extern "C" {
934    pub fn faiss_IndexIVFFlat_quantizer(arg1: *const FaissIndexIVFFlat) -> *mut FaissIndex;
935}
936extern "C" {
937    pub fn faiss_IndexIVFFlat_quantizer_trains_alone(
938        arg1: *const FaissIndexIVFFlat,
939    ) -> ::std::os::raw::c_char;
940}
941extern "C" {
942    pub fn faiss_IndexIVFFlat_own_fields(arg1: *const FaissIndexIVFFlat) -> ::std::os::raw::c_int;
943}
944extern "C" {
945    pub fn faiss_IndexIVFFlat_set_own_fields(
946        arg1: *mut FaissIndexIVFFlat,
947        arg2: ::std::os::raw::c_int,
948    );
949}
950extern "C" {
951    pub fn faiss_IndexIVFFlat_new(p_index: *mut *mut FaissIndexIVFFlat) -> ::std::os::raw::c_int;
952}
953extern "C" {
954    pub fn faiss_IndexIVFFlat_new_with(
955        p_index: *mut *mut FaissIndexIVFFlat,
956        quantizer: *mut FaissIndex,
957        d: usize,
958        nlist: usize,
959    ) -> ::std::os::raw::c_int;
960}
961extern "C" {
962    pub fn faiss_IndexIVFFlat_new_with_metric(
963        p_index: *mut *mut FaissIndexIVFFlat,
964        quantizer: *mut FaissIndex,
965        d: usize,
966        nlist: usize,
967        metric: FaissMetricType,
968    ) -> ::std::os::raw::c_int;
969}
970extern "C" {
971    pub fn faiss_IndexIVFFlat_add_core(
972        index: *mut FaissIndexIVFFlat,
973        n: idx_t,
974        x: *const f32,
975        xids: *const idx_t,
976        precomputed_idx: *const i64,
977    ) -> ::std::os::raw::c_int;
978}
979extern "C" {
980    pub fn faiss_IndexIVFFlat_update_vectors(
981        index: *mut FaissIndexIVFFlat,
982        nv: ::std::os::raw::c_int,
983        idx: *mut idx_t,
984        v: *const f32,
985    ) -> ::std::os::raw::c_int;
986}
987pub type FaissIndexLSH = FaissIndex_H;
988extern "C" {
989    pub fn faiss_IndexLSH_free(obj: *mut FaissIndexLSH);
990}
991extern "C" {
992    pub fn faiss_IndexLSH_cast(arg1: *mut FaissIndex) -> *mut FaissIndexLSH;
993}
994extern "C" {
995    pub fn faiss_IndexLSH_nbits(arg1: *const FaissIndexLSH) -> ::std::os::raw::c_int;
996}
997extern "C" {
998    pub fn faiss_IndexLSH_code_size(arg1: *const FaissIndexLSH) -> ::std::os::raw::c_int;
999}
1000extern "C" {
1001    pub fn faiss_IndexLSH_rotate_data(arg1: *const FaissIndexLSH) -> ::std::os::raw::c_int;
1002}
1003extern "C" {
1004    pub fn faiss_IndexLSH_train_thresholds(arg1: *const FaissIndexLSH) -> ::std::os::raw::c_int;
1005}
1006extern "C" {
1007    pub fn faiss_IndexLSH_new(
1008        p_index: *mut *mut FaissIndexLSH,
1009        d: idx_t,
1010        nbits: ::std::os::raw::c_int,
1011    ) -> ::std::os::raw::c_int;
1012}
1013extern "C" {
1014    pub fn faiss_IndexLSH_new_with_options(
1015        p_index: *mut *mut FaissIndexLSH,
1016        d: idx_t,
1017        nbits: ::std::os::raw::c_int,
1018        rotate_data: ::std::os::raw::c_int,
1019        train_thresholds: ::std::os::raw::c_int,
1020    ) -> ::std::os::raw::c_int;
1021}
1022#[repr(C)]
1023#[derive(Debug, Copy, Clone)]
1024pub struct FaissIndexBinary_H {
1025    _unused: [u8; 0],
1026}
1027pub type FaissIndexBinary = FaissIndexBinary_H;
1028extern "C" {
1029    pub fn faiss_IndexBinary_free(obj: *mut FaissIndexBinary);
1030}
1031extern "C" {
1032    pub fn faiss_IndexBinary_d(arg1: *const FaissIndexBinary) -> ::std::os::raw::c_int;
1033}
1034extern "C" {
1035    pub fn faiss_IndexBinary_is_trained(arg1: *const FaissIndexBinary) -> ::std::os::raw::c_int;
1036}
1037extern "C" {
1038    pub fn faiss_IndexBinary_ntotal(arg1: *const FaissIndexBinary) -> idx_t;
1039}
1040extern "C" {
1041    pub fn faiss_IndexBinary_metric_type(arg1: *const FaissIndexBinary) -> FaissMetricType;
1042}
1043extern "C" {
1044    pub fn faiss_IndexBinary_verbose(arg1: *const FaissIndexBinary) -> ::std::os::raw::c_int;
1045}
1046extern "C" {
1047    pub fn faiss_IndexBinary_set_verbose(arg1: *mut FaissIndexBinary, arg2: ::std::os::raw::c_int);
1048}
1049extern "C" {
1050    pub fn faiss_IndexBinary_train(
1051        index: *mut FaissIndexBinary,
1052        n: idx_t,
1053        x: *const u8,
1054    ) -> ::std::os::raw::c_int;
1055}
1056extern "C" {
1057    pub fn faiss_IndexBinary_add(
1058        index: *mut FaissIndexBinary,
1059        n: idx_t,
1060        x: *const u8,
1061    ) -> ::std::os::raw::c_int;
1062}
1063extern "C" {
1064    pub fn faiss_IndexBinary_add_with_ids(
1065        index: *mut FaissIndexBinary,
1066        n: idx_t,
1067        x: *const u8,
1068        xids: *const idx_t,
1069    ) -> ::std::os::raw::c_int;
1070}
1071extern "C" {
1072    pub fn faiss_IndexBinary_search(
1073        index: *const FaissIndexBinary,
1074        n: idx_t,
1075        x: *const u8,
1076        k: idx_t,
1077        distances: *mut i32,
1078        labels: *mut idx_t,
1079    ) -> ::std::os::raw::c_int;
1080}
1081extern "C" {
1082    pub fn faiss_IndexBinary_search_with_params(
1083        index: *const FaissIndexBinary,
1084        n: idx_t,
1085        x: *const u8,
1086        k: idx_t,
1087        params: *const FaissSearchParameters,
1088        distances: *mut i32,
1089        labels: *mut idx_t,
1090    ) -> ::std::os::raw::c_int;
1091}
1092extern "C" {
1093    pub fn faiss_IndexBinary_range_search(
1094        index: *const FaissIndexBinary,
1095        n: idx_t,
1096        x: *const u8,
1097        radius: ::std::os::raw::c_int,
1098        result: *mut FaissRangeSearchResult,
1099    ) -> ::std::os::raw::c_int;
1100}
1101extern "C" {
1102    pub fn faiss_IndexBinary_assign(
1103        index: *mut FaissIndexBinary,
1104        n: idx_t,
1105        x: *const u8,
1106        labels: *mut idx_t,
1107        k: idx_t,
1108    ) -> ::std::os::raw::c_int;
1109}
1110extern "C" {
1111    pub fn faiss_IndexBinary_reset(index: *mut FaissIndexBinary) -> ::std::os::raw::c_int;
1112}
1113extern "C" {
1114    pub fn faiss_IndexBinary_remove_ids(
1115        index: *mut FaissIndexBinary,
1116        sel: *const FaissIDSelector,
1117        n_removed: *mut usize,
1118    ) -> ::std::os::raw::c_int;
1119}
1120extern "C" {
1121    pub fn faiss_IndexBinary_reconstruct(
1122        index: *const FaissIndexBinary,
1123        key: idx_t,
1124        recons: *mut u8,
1125    ) -> ::std::os::raw::c_int;
1126}
1127extern "C" {
1128    pub fn faiss_IndexBinary_reconstruct_n(
1129        index: *const FaissIndexBinary,
1130        i0: idx_t,
1131        ni: idx_t,
1132        recons: *mut u8,
1133    ) -> ::std::os::raw::c_int;
1134}
1135#[repr(u32)]
1136#[non_exhaustive]
1137#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1138pub enum FaissQuantizerType {
1139    QT_8bit = 0,
1140    QT_4bit = 1,
1141    QT_8bit_uniform = 2,
1142    QT_4bit_uniform = 3,
1143    QT_fp16 = 4,
1144    QT_8bit_direct = 5,
1145    QT_6bit = 6,
1146    QT_bf16 = 7,
1147    QT_8bit_direct_signed = 8,
1148}
1149pub type FaissIndexScalarQuantizer = FaissIndex_H;
1150extern "C" {
1151    pub fn faiss_IndexScalarQuantizer_new(
1152        p_index: *mut *mut FaissIndexScalarQuantizer,
1153    ) -> ::std::os::raw::c_int;
1154}
1155extern "C" {
1156    pub fn faiss_IndexScalarQuantizer_new_with(
1157        p_index: *mut *mut FaissIndexScalarQuantizer,
1158        d: idx_t,
1159        qt: FaissQuantizerType,
1160        metric: FaissMetricType,
1161    ) -> ::std::os::raw::c_int;
1162}
1163extern "C" {
1164    pub fn faiss_IndexScalarQuantizer_cast(arg1: *mut FaissIndex)
1165        -> *mut FaissIndexScalarQuantizer;
1166}
1167extern "C" {
1168    pub fn faiss_IndexScalarQuantizer_free(obj: *mut FaissIndexScalarQuantizer);
1169}
1170pub type FaissIndexIVFScalarQuantizer = FaissIndex_H;
1171extern "C" {
1172    pub fn faiss_IndexIVFScalarQuantizer_cast(
1173        arg1: *mut FaissIndex,
1174    ) -> *mut FaissIndexIVFScalarQuantizer;
1175}
1176extern "C" {
1177    pub fn faiss_IndexIVFScalarQuantizer_free(obj: *mut FaissIndexIVFScalarQuantizer);
1178}
1179extern "C" {
1180    pub fn faiss_IndexIVFScalarQuantizer_new(
1181        p_index: *mut *mut FaissIndexIVFScalarQuantizer,
1182    ) -> ::std::os::raw::c_int;
1183}
1184extern "C" {
1185    pub fn faiss_IndexIVFScalarQuantizer_new_with(
1186        p_index: *mut *mut FaissIndexIVFScalarQuantizer,
1187        quantizer: *mut FaissIndex,
1188        d: idx_t,
1189        nlist: usize,
1190        qt: FaissQuantizerType,
1191    ) -> ::std::os::raw::c_int;
1192}
1193extern "C" {
1194    pub fn faiss_IndexIVFScalarQuantizer_new_with_metric(
1195        p_index: *mut *mut FaissIndexIVFScalarQuantizer,
1196        quantizer: *mut FaissIndex,
1197        d: usize,
1198        nlist: usize,
1199        qt: FaissQuantizerType,
1200        metric: FaissMetricType,
1201        encode_residual: ::std::os::raw::c_int,
1202    ) -> ::std::os::raw::c_int;
1203}
1204extern "C" {
1205    pub fn faiss_IndexIVFScalarQuantizer_nlist(arg1: *const FaissIndexIVFScalarQuantizer) -> usize;
1206}
1207extern "C" {
1208    pub fn faiss_IndexIVFScalarQuantizer_nprobe(arg1: *const FaissIndexIVFScalarQuantizer)
1209        -> usize;
1210}
1211extern "C" {
1212    pub fn faiss_IndexIVFScalarQuantizer_set_nprobe(
1213        arg1: *mut FaissIndexIVFScalarQuantizer,
1214        arg2: usize,
1215    );
1216}
1217extern "C" {
1218    pub fn faiss_IndexIVFScalarQuantizer_quantizer(
1219        arg1: *const FaissIndexIVFScalarQuantizer,
1220    ) -> *mut FaissIndex;
1221}
1222extern "C" {
1223    pub fn faiss_IndexIVFScalarQuantizer_own_fields(
1224        arg1: *const FaissIndexIVFScalarQuantizer,
1225    ) -> ::std::os::raw::c_int;
1226}
1227extern "C" {
1228    pub fn faiss_IndexIVFScalarQuantizer_set_own_fields(
1229        arg1: *mut FaissIndexIVFScalarQuantizer,
1230        arg2: ::std::os::raw::c_int,
1231    );
1232}
1233extern "C" {
1234    pub fn faiss_IndexIVFScalarQuantizer_add_core(
1235        index: *mut FaissIndexIVFScalarQuantizer,
1236        n: idx_t,
1237        x: *const f32,
1238        xids: *const idx_t,
1239        precomputed_idx: *const idx_t,
1240    ) -> ::std::os::raw::c_int;
1241}
1242#[repr(C)]
1243#[derive(Debug, Copy, Clone)]
1244pub struct FaissVectorTransform_H {
1245    _unused: [u8; 0],
1246}
1247pub type FaissVectorTransform = FaissVectorTransform_H;
1248extern "C" {
1249    pub fn faiss_VectorTransform_free(obj: *mut FaissVectorTransform);
1250}
1251extern "C" {
1252    pub fn faiss_VectorTransform_is_trained(
1253        arg1: *const FaissVectorTransform,
1254    ) -> ::std::os::raw::c_int;
1255}
1256extern "C" {
1257    pub fn faiss_VectorTransform_d_in(arg1: *const FaissVectorTransform) -> ::std::os::raw::c_int;
1258}
1259extern "C" {
1260    pub fn faiss_VectorTransform_d_out(arg1: *const FaissVectorTransform) -> ::std::os::raw::c_int;
1261}
1262extern "C" {
1263    pub fn faiss_VectorTransform_train(
1264        vt: *mut FaissVectorTransform,
1265        n: idx_t,
1266        x: *const f32,
1267    ) -> ::std::os::raw::c_int;
1268}
1269extern "C" {
1270    pub fn faiss_VectorTransform_apply(
1271        vt: *const FaissVectorTransform,
1272        n: idx_t,
1273        x: *const f32,
1274    ) -> *mut f32;
1275}
1276extern "C" {
1277    pub fn faiss_VectorTransform_apply_noalloc(
1278        vt: *const FaissVectorTransform,
1279        n: idx_t,
1280        x: *const f32,
1281        xt: *mut f32,
1282    );
1283}
1284extern "C" {
1285    pub fn faiss_VectorTransform_reverse_transform(
1286        vt: *const FaissVectorTransform,
1287        n: idx_t,
1288        xt: *const f32,
1289        x: *mut f32,
1290    );
1291}
1292pub type FaissLinearTransform = FaissVectorTransform_H;
1293extern "C" {
1294    pub fn faiss_LinearTransform_free(obj: *mut FaissLinearTransform);
1295}
1296extern "C" {
1297    pub fn faiss_LinearTransform_transform_transpose(
1298        vt: *const FaissLinearTransform,
1299        n: idx_t,
1300        y: *const f32,
1301        x: *mut f32,
1302    );
1303}
1304extern "C" {
1305    pub fn faiss_LinearTransform_set_is_orthonormal(vt: *mut FaissLinearTransform);
1306}
1307extern "C" {
1308    pub fn faiss_LinearTransform_have_bias(
1309        arg1: *const FaissLinearTransform,
1310    ) -> ::std::os::raw::c_int;
1311}
1312extern "C" {
1313    pub fn faiss_LinearTransform_is_orthonormal(
1314        arg1: *const FaissLinearTransform,
1315    ) -> ::std::os::raw::c_int;
1316}
1317pub type FaissRandomRotationMatrix = FaissVectorTransform_H;
1318extern "C" {
1319    pub fn faiss_RandomRotationMatrix_free(obj: *mut FaissRandomRotationMatrix);
1320}
1321extern "C" {
1322    pub fn faiss_RandomRotationMatrix_new_with(
1323        p_vt: *mut *mut FaissRandomRotationMatrix,
1324        d_in: ::std::os::raw::c_int,
1325        d_out: ::std::os::raw::c_int,
1326    ) -> ::std::os::raw::c_int;
1327}
1328pub type FaissPCAMatrix = FaissVectorTransform_H;
1329extern "C" {
1330    pub fn faiss_PCAMatrix_free(obj: *mut FaissPCAMatrix);
1331}
1332extern "C" {
1333    pub fn faiss_PCAMatrix_new_with(
1334        p_vt: *mut *mut FaissPCAMatrix,
1335        d_in: ::std::os::raw::c_int,
1336        d_out: ::std::os::raw::c_int,
1337        eigen_power: f32,
1338        random_rotation: ::std::os::raw::c_int,
1339    ) -> ::std::os::raw::c_int;
1340}
1341extern "C" {
1342    pub fn faiss_PCAMatrix_eigen_power(arg1: *const FaissPCAMatrix) -> f32;
1343}
1344extern "C" {
1345    pub fn faiss_PCAMatrix_random_rotation(arg1: *const FaissPCAMatrix) -> ::std::os::raw::c_int;
1346}
1347extern "C" {
1348    pub fn faiss_PCAMatrix_balanced_bins(arg1: *const FaissPCAMatrix) -> ::std::os::raw::c_int;
1349}
1350extern "C" {
1351    pub fn faiss_PCAMatrix_set_balanced_bins(
1352        arg1: *mut FaissPCAMatrix,
1353        arg2: ::std::os::raw::c_int,
1354    );
1355}
1356pub type FaissITQMatrix = FaissVectorTransform_H;
1357extern "C" {
1358    pub fn faiss_ITQMatrix_free(obj: *mut FaissITQMatrix);
1359}
1360extern "C" {
1361    pub fn faiss_ITQMatrix_new_with(
1362        p_vt: *mut *mut FaissITQMatrix,
1363        d: ::std::os::raw::c_int,
1364    ) -> ::std::os::raw::c_int;
1365}
1366pub type FaissITQTransform = FaissVectorTransform_H;
1367extern "C" {
1368    pub fn faiss_ITQTransform_free(obj: *mut FaissITQTransform);
1369}
1370extern "C" {
1371    pub fn faiss_ITQTransform_new_with(
1372        p_vt: *mut *mut FaissITQTransform,
1373        d_in: ::std::os::raw::c_int,
1374        d_out: ::std::os::raw::c_int,
1375        do_pca: ::std::os::raw::c_int,
1376    ) -> ::std::os::raw::c_int;
1377}
1378extern "C" {
1379    pub fn faiss_ITQTransform_do_pca(arg1: *const FaissITQTransform) -> ::std::os::raw::c_int;
1380}
1381pub type FaissOPQMatrix = FaissVectorTransform_H;
1382extern "C" {
1383    pub fn faiss_OPQMatrix_free(obj: *mut FaissOPQMatrix);
1384}
1385extern "C" {
1386    pub fn faiss_OPQMatrix_new_with(
1387        p_vt: *mut *mut FaissOPQMatrix,
1388        d: ::std::os::raw::c_int,
1389        M: ::std::os::raw::c_int,
1390        d2: ::std::os::raw::c_int,
1391    ) -> ::std::os::raw::c_int;
1392}
1393extern "C" {
1394    pub fn faiss_OPQMatrix_verbose(arg1: *const FaissOPQMatrix) -> ::std::os::raw::c_int;
1395}
1396extern "C" {
1397    pub fn faiss_OPQMatrix_set_verbose(arg1: *mut FaissOPQMatrix, arg2: ::std::os::raw::c_int);
1398}
1399extern "C" {
1400    pub fn faiss_OPQMatrix_niter(arg1: *const FaissOPQMatrix) -> ::std::os::raw::c_int;
1401}
1402extern "C" {
1403    pub fn faiss_OPQMatrix_set_niter(arg1: *mut FaissOPQMatrix, arg2: ::std::os::raw::c_int);
1404}
1405extern "C" {
1406    pub fn faiss_OPQMatrix_niter_pq(arg1: *const FaissOPQMatrix) -> ::std::os::raw::c_int;
1407}
1408extern "C" {
1409    pub fn faiss_OPQMatrix_set_niter_pq(arg1: *mut FaissOPQMatrix, arg2: ::std::os::raw::c_int);
1410}
1411pub type FaissRemapDimensionsTransform = FaissVectorTransform_H;
1412extern "C" {
1413    pub fn faiss_RemapDimensionsTransform_free(obj: *mut FaissRemapDimensionsTransform);
1414}
1415extern "C" {
1416    pub fn faiss_RemapDimensionsTransform_new_with(
1417        p_vt: *mut *mut FaissRemapDimensionsTransform,
1418        d_in: ::std::os::raw::c_int,
1419        d_out: ::std::os::raw::c_int,
1420        uniform: ::std::os::raw::c_int,
1421    ) -> ::std::os::raw::c_int;
1422}
1423pub type FaissNormalizationTransform = FaissVectorTransform_H;
1424extern "C" {
1425    pub fn faiss_NormalizationTransform_free(obj: *mut FaissNormalizationTransform);
1426}
1427extern "C" {
1428    pub fn faiss_NormalizationTransform_new_with(
1429        p_vt: *mut *mut FaissNormalizationTransform,
1430        d: ::std::os::raw::c_int,
1431        norm: f32,
1432    ) -> ::std::os::raw::c_int;
1433}
1434extern "C" {
1435    pub fn faiss_NormalizationTransform_norm(arg1: *const FaissNormalizationTransform) -> f32;
1436}
1437pub type FaissCenteringTransform = FaissVectorTransform_H;
1438extern "C" {
1439    pub fn faiss_CenteringTransform_free(obj: *mut FaissCenteringTransform);
1440}
1441extern "C" {
1442    pub fn faiss_CenteringTransform_new_with(
1443        p_vt: *mut *mut FaissCenteringTransform,
1444        d: ::std::os::raw::c_int,
1445    ) -> ::std::os::raw::c_int;
1446}
1447pub type FaissIndexPreTransform = FaissIndex_H;
1448extern "C" {
1449    pub fn faiss_IndexPreTransform_free(obj: *mut FaissIndexPreTransform);
1450}
1451extern "C" {
1452    pub fn faiss_IndexPreTransform_cast(arg1: *mut FaissIndex) -> *mut FaissIndexPreTransform;
1453}
1454extern "C" {
1455    pub fn faiss_IndexPreTransform_index(arg1: *const FaissIndexPreTransform) -> *mut FaissIndex;
1456}
1457extern "C" {
1458    pub fn faiss_IndexPreTransform_own_fields(
1459        arg1: *const FaissIndexPreTransform,
1460    ) -> ::std::os::raw::c_int;
1461}
1462extern "C" {
1463    pub fn faiss_IndexPreTransform_set_own_fields(
1464        arg1: *mut FaissIndexPreTransform,
1465        arg2: ::std::os::raw::c_int,
1466    );
1467}
1468extern "C" {
1469    pub fn faiss_IndexPreTransform_new(
1470        p_index: *mut *mut FaissIndexPreTransform,
1471    ) -> ::std::os::raw::c_int;
1472}
1473extern "C" {
1474    pub fn faiss_IndexPreTransform_new_with(
1475        p_index: *mut *mut FaissIndexPreTransform,
1476        index: *mut FaissIndex,
1477    ) -> ::std::os::raw::c_int;
1478}
1479extern "C" {
1480    pub fn faiss_IndexPreTransform_new_with_transform(
1481        p_index: *mut *mut FaissIndexPreTransform,
1482        ltrans: *mut FaissVectorTransform,
1483        index: *mut FaissIndex,
1484    ) -> ::std::os::raw::c_int;
1485}
1486extern "C" {
1487    pub fn faiss_IndexPreTransform_prepend_transform(
1488        index: *mut FaissIndexPreTransform,
1489        ltrans: *mut FaissVectorTransform,
1490    ) -> ::std::os::raw::c_int;
1491}
1492pub type FaissIndexReplicas = FaissIndex_H;
1493extern "C" {
1494    pub fn faiss_IndexReplicas_free(obj: *mut FaissIndexReplicas);
1495}
1496extern "C" {
1497    pub fn faiss_IndexReplicas_own_fields(arg1: *const FaissIndexReplicas)
1498        -> ::std::os::raw::c_int;
1499}
1500extern "C" {
1501    pub fn faiss_IndexReplicas_set_own_fields(
1502        arg1: *mut FaissIndexReplicas,
1503        arg2: ::std::os::raw::c_int,
1504    );
1505}
1506extern "C" {
1507    pub fn faiss_IndexReplicas_new(
1508        p_index: *mut *mut FaissIndexReplicas,
1509        d: idx_t,
1510    ) -> ::std::os::raw::c_int;
1511}
1512extern "C" {
1513    pub fn faiss_IndexReplicas_new_with_options(
1514        p_index: *mut *mut FaissIndexReplicas,
1515        d: idx_t,
1516        threaded: ::std::os::raw::c_int,
1517    ) -> ::std::os::raw::c_int;
1518}
1519extern "C" {
1520    pub fn faiss_IndexReplicas_add_replica(
1521        index: *mut FaissIndexReplicas,
1522        replica: *mut FaissIndex,
1523    ) -> ::std::os::raw::c_int;
1524}
1525extern "C" {
1526    pub fn faiss_IndexReplicas_remove_replica(
1527        index: *mut FaissIndexReplicas,
1528        replica: *mut FaissIndex,
1529    ) -> ::std::os::raw::c_int;
1530}
1531extern "C" {
1532    pub fn faiss_IndexReplicas_at(
1533        index: *mut FaissIndexReplicas,
1534        i: ::std::os::raw::c_int,
1535    ) -> *mut FaissIndex;
1536}
1537pub type FaissIndexShards = FaissIndex_H;
1538extern "C" {
1539    pub fn faiss_IndexShards_free(obj: *mut FaissIndexShards);
1540}
1541extern "C" {
1542    pub fn faiss_IndexShards_own_fields(arg1: *const FaissIndexShards) -> ::std::os::raw::c_int;
1543}
1544extern "C" {
1545    pub fn faiss_IndexShards_set_own_fields(
1546        arg1: *mut FaissIndexShards,
1547        arg2: ::std::os::raw::c_int,
1548    );
1549}
1550extern "C" {
1551    pub fn faiss_IndexShards_successive_ids(arg1: *const FaissIndexShards)
1552        -> ::std::os::raw::c_int;
1553}
1554extern "C" {
1555    pub fn faiss_IndexShards_set_successive_ids(
1556        arg1: *mut FaissIndexShards,
1557        arg2: ::std::os::raw::c_int,
1558    );
1559}
1560extern "C" {
1561    pub fn faiss_IndexShards_new(
1562        p_index: *mut *mut FaissIndexShards,
1563        d: idx_t,
1564    ) -> ::std::os::raw::c_int;
1565}
1566extern "C" {
1567    pub fn faiss_IndexShards_new_with_options(
1568        p_index: *mut *mut FaissIndexShards,
1569        d: idx_t,
1570        threaded: ::std::os::raw::c_int,
1571        successive_ids: ::std::os::raw::c_int,
1572    ) -> ::std::os::raw::c_int;
1573}
1574extern "C" {
1575    pub fn faiss_IndexShards_add_shard(
1576        index: *mut FaissIndexShards,
1577        shard: *mut FaissIndex,
1578    ) -> ::std::os::raw::c_int;
1579}
1580extern "C" {
1581    pub fn faiss_IndexShards_remove_shard(
1582        index: *mut FaissIndexShards,
1583        shard: *mut FaissIndex,
1584    ) -> ::std::os::raw::c_int;
1585}
1586extern "C" {
1587    pub fn faiss_IndexShards_at(
1588        index: *mut FaissIndexShards,
1589        i: ::std::os::raw::c_int,
1590    ) -> *mut FaissIndex;
1591}
1592#[repr(C)]
1593#[derive(Debug, Copy, Clone)]
1594pub struct FaissParameterRange_H {
1595    _unused: [u8; 0],
1596}
1597pub type FaissParameterRange = FaissParameterRange_H;
1598extern "C" {
1599    pub fn faiss_ParameterRange_name(
1600        arg1: *const FaissParameterRange,
1601    ) -> *const ::std::os::raw::c_char;
1602}
1603extern "C" {
1604    pub fn faiss_ParameterRange_values(
1605        arg1: *mut FaissParameterRange,
1606        arg2: *mut *mut f64,
1607        arg3: *mut usize,
1608    );
1609}
1610#[repr(C)]
1611#[derive(Debug, Copy, Clone)]
1612pub struct FaissParameterSpace_H {
1613    _unused: [u8; 0],
1614}
1615pub type FaissParameterSpace = FaissParameterSpace_H;
1616extern "C" {
1617    pub fn faiss_ParameterSpace_free(obj: *mut FaissParameterSpace);
1618}
1619extern "C" {
1620    pub fn faiss_ParameterSpace_new(space: *mut *mut FaissParameterSpace) -> ::std::os::raw::c_int;
1621}
1622extern "C" {
1623    pub fn faiss_ParameterSpace_n_combinations(arg1: *const FaissParameterSpace) -> usize;
1624}
1625extern "C" {
1626    pub fn faiss_ParameterSpace_combination_name(
1627        arg1: *const FaissParameterSpace,
1628        arg2: usize,
1629        arg3: *mut ::std::os::raw::c_char,
1630        arg4: usize,
1631    ) -> ::std::os::raw::c_int;
1632}
1633extern "C" {
1634    pub fn faiss_ParameterSpace_set_index_parameters(
1635        arg1: *const FaissParameterSpace,
1636        arg2: *mut FaissIndex,
1637        arg3: *const ::std::os::raw::c_char,
1638    ) -> ::std::os::raw::c_int;
1639}
1640extern "C" {
1641    pub fn faiss_ParameterSpace_set_index_parameters_cno(
1642        arg1: *const FaissParameterSpace,
1643        arg2: *mut FaissIndex,
1644        arg3: usize,
1645    ) -> ::std::os::raw::c_int;
1646}
1647extern "C" {
1648    pub fn faiss_ParameterSpace_set_index_parameters_binary(
1649        arg1: *const FaissParameterSpace,
1650        arg2: *mut FaissIndexBinary,
1651        arg3: *const ::std::os::raw::c_char,
1652    ) -> ::std::os::raw::c_int;
1653}
1654extern "C" {
1655    pub fn faiss_ParameterSpace_set_index_parameters_cno_binary(
1656        arg1: *const FaissParameterSpace,
1657        arg2: *mut FaissIndexBinary,
1658        arg3: usize,
1659    ) -> ::std::os::raw::c_int;
1660}
1661extern "C" {
1662    pub fn faiss_ParameterSpace_set_index_parameter(
1663        arg1: *const FaissParameterSpace,
1664        arg2: *mut FaissIndex,
1665        arg3: *const ::std::os::raw::c_char,
1666        arg4: f64,
1667    ) -> ::std::os::raw::c_int;
1668}
1669extern "C" {
1670    pub fn faiss_ParameterSpace_set_index_parameter_binary(
1671        arg1: *const FaissParameterSpace,
1672        arg2: *mut FaissIndexBinary,
1673        arg3: *const ::std::os::raw::c_char,
1674        arg4: f64,
1675    ) -> ::std::os::raw::c_int;
1676}
1677extern "C" {
1678    pub fn faiss_ParameterSpace_display(arg1: *const FaissParameterSpace);
1679}
1680extern "C" {
1681    pub fn faiss_ParameterSpace_add_range(
1682        arg1: *mut FaissParameterSpace,
1683        arg2: *const ::std::os::raw::c_char,
1684        arg3: *mut *mut FaissParameterRange,
1685    ) -> ::std::os::raw::c_int;
1686}
1687pub type FILE = [u64; 27usize];
1688extern "C" {
1689    pub fn faiss_clone_index(
1690        arg1: *const FaissIndex,
1691        p_out: *mut *mut FaissIndex,
1692    ) -> ::std::os::raw::c_int;
1693}
1694extern "C" {
1695    pub fn faiss_clone_index_binary(
1696        arg1: *const FaissIndexBinary,
1697        p_out: *mut *mut FaissIndexBinary,
1698    ) -> ::std::os::raw::c_int;
1699}
1700extern "C" {
1701    pub fn faiss_index_factory(
1702        p_index: *mut *mut FaissIndex,
1703        d: ::std::os::raw::c_int,
1704        description: *const ::std::os::raw::c_char,
1705        metric: FaissMetricType,
1706    ) -> ::std::os::raw::c_int;
1707}
1708extern "C" {
1709    pub fn faiss_index_binary_factory(
1710        p_index: *mut *mut FaissIndexBinary,
1711        d: ::std::os::raw::c_int,
1712        description: *const ::std::os::raw::c_char,
1713    ) -> ::std::os::raw::c_int;
1714}
1715#[repr(C)]
1716#[derive(Debug, Copy, Clone)]
1717pub struct FaissIOReader_H {
1718    _unused: [u8; 0],
1719}
1720pub type FaissIOReader = FaissIOReader_H;
1721extern "C" {
1722    pub fn faiss_IOReader_free(obj: *mut FaissIOReader);
1723}
1724#[repr(C)]
1725#[derive(Debug, Copy, Clone)]
1726pub struct FaissIOWriter_H {
1727    _unused: [u8; 0],
1728}
1729pub type FaissIOWriter = FaissIOWriter_H;
1730extern "C" {
1731    pub fn faiss_IOWriter_free(obj: *mut FaissIOWriter);
1732}
1733#[repr(C)]
1734#[derive(Debug, Copy, Clone)]
1735pub struct FaissCustomIOReader_H {
1736    _unused: [u8; 0],
1737}
1738pub type FaissCustomIOReader = FaissCustomIOReader_H;
1739extern "C" {
1740    pub fn faiss_CustomIOReader_free(obj: *mut FaissCustomIOReader);
1741}
1742extern "C" {
1743    pub fn faiss_CustomIOReader_new(
1744        p_out: *mut *mut FaissCustomIOReader,
1745        func_in: ::std::option::Option<
1746            unsafe extern "C" fn(
1747                ptr: *mut ::std::os::raw::c_void,
1748                size: usize,
1749                nitems: usize,
1750            ) -> usize,
1751        >,
1752    ) -> ::std::os::raw::c_int;
1753}
1754#[repr(C)]
1755#[derive(Debug, Copy, Clone)]
1756pub struct FaissCustomIOWriter_H {
1757    _unused: [u8; 0],
1758}
1759pub type FaissCustomIOWriter = FaissCustomIOWriter_H;
1760extern "C" {
1761    pub fn faiss_CustomIOWriter_free(obj: *mut FaissCustomIOWriter);
1762}
1763extern "C" {
1764    pub fn faiss_CustomIOWriter_new(
1765        p_out: *mut *mut FaissCustomIOWriter,
1766        func_in: ::std::option::Option<
1767            unsafe extern "C" fn(
1768                ptr: *const ::std::os::raw::c_void,
1769                size: usize,
1770                nitems: usize,
1771            ) -> usize,
1772        >,
1773    ) -> ::std::os::raw::c_int;
1774}
1775extern "C" {
1776    pub fn faiss_write_index(idx: *const FaissIndex, f: *mut FILE) -> ::std::os::raw::c_int;
1777}
1778extern "C" {
1779    pub fn faiss_write_index_fname(
1780        idx: *const FaissIndex,
1781        fname: *const ::std::os::raw::c_char,
1782    ) -> ::std::os::raw::c_int;
1783}
1784extern "C" {
1785    pub fn faiss_write_index_custom(
1786        idx: *const FaissIndex,
1787        io_writer: *mut FaissIOWriter,
1788        io_flags: ::std::os::raw::c_int,
1789    ) -> ::std::os::raw::c_int;
1790}
1791extern "C" {
1792    pub fn faiss_read_index(
1793        f: *mut FILE,
1794        io_flags: ::std::os::raw::c_int,
1795        p_out: *mut *mut FaissIndex,
1796    ) -> ::std::os::raw::c_int;
1797}
1798extern "C" {
1799    pub fn faiss_read_index_fname(
1800        fname: *const ::std::os::raw::c_char,
1801        io_flags: ::std::os::raw::c_int,
1802        p_out: *mut *mut FaissIndex,
1803    ) -> ::std::os::raw::c_int;
1804}
1805extern "C" {
1806    pub fn faiss_read_index_custom(
1807        io_reader: *mut FaissIOReader,
1808        io_flags: ::std::os::raw::c_int,
1809        p_out: *mut *mut FaissIndex,
1810    ) -> ::std::os::raw::c_int;
1811}
1812extern "C" {
1813    pub fn faiss_write_index_binary(
1814        idx: *const FaissIndexBinary,
1815        f: *mut FILE,
1816    ) -> ::std::os::raw::c_int;
1817}
1818extern "C" {
1819    pub fn faiss_write_index_binary_fname(
1820        idx: *const FaissIndexBinary,
1821        fname: *const ::std::os::raw::c_char,
1822    ) -> ::std::os::raw::c_int;
1823}
1824extern "C" {
1825    pub fn faiss_write_index_binary_custom(
1826        idx: *const FaissIndexBinary,
1827        io_writer: *mut FaissIOWriter,
1828    ) -> ::std::os::raw::c_int;
1829}
1830extern "C" {
1831    pub fn faiss_read_index_binary(
1832        f: *mut FILE,
1833        io_flags: ::std::os::raw::c_int,
1834        p_out: *mut *mut FaissIndexBinary,
1835    ) -> ::std::os::raw::c_int;
1836}
1837extern "C" {
1838    pub fn faiss_read_index_binary_fname(
1839        fname: *const ::std::os::raw::c_char,
1840        io_flags: ::std::os::raw::c_int,
1841        p_out: *mut *mut FaissIndexBinary,
1842    ) -> ::std::os::raw::c_int;
1843}
1844extern "C" {
1845    pub fn faiss_read_index_binary_custom(
1846        io_reader: *mut FaissIOReader,
1847        io_flags: ::std::os::raw::c_int,
1848        p_out: *mut *mut FaissIndexBinary,
1849    ) -> ::std::os::raw::c_int;
1850}
1851extern "C" {
1852    pub fn faiss_read_VectorTransform_fname(
1853        fname: *const ::std::os::raw::c_char,
1854        p_out: *mut *mut FaissVectorTransform,
1855    ) -> ::std::os::raw::c_int;
1856}
1857pub type FaissIndexIDMap = FaissIndex_H;
1858extern "C" {
1859    pub fn faiss_IndexIDMap_own_fields(arg1: *const FaissIndexIDMap) -> ::std::os::raw::c_int;
1860}
1861extern "C" {
1862    pub fn faiss_IndexIDMap_set_own_fields(arg1: *mut FaissIndexIDMap, arg2: ::std::os::raw::c_int);
1863}
1864extern "C" {
1865    pub fn faiss_IndexIDMap_new(
1866        p_index: *mut *mut FaissIndexIDMap,
1867        index: *mut FaissIndex,
1868    ) -> ::std::os::raw::c_int;
1869}
1870extern "C" {
1871    pub fn faiss_IndexIDMap_cast(arg1: *mut FaissIndex) -> *mut FaissIndexIDMap;
1872}
1873extern "C" {
1874    pub fn faiss_IndexIDMap_id_map(
1875        index: *mut FaissIndexIDMap,
1876        p_id_map: *mut *mut idx_t,
1877        p_size: *mut usize,
1878    );
1879}
1880extern "C" {
1881    pub fn faiss_IndexIDMap_sub_index(index: *mut FaissIndexIDMap) -> *mut FaissIndex;
1882}
1883pub type FaissIndexIDMap2 = FaissIndex_H;
1884extern "C" {
1885    pub fn faiss_IndexIDMap2_own_fields(arg1: *const FaissIndexIDMap2) -> ::std::os::raw::c_int;
1886}
1887extern "C" {
1888    pub fn faiss_IndexIDMap2_set_own_fields(
1889        arg1: *mut FaissIndexIDMap2,
1890        arg2: ::std::os::raw::c_int,
1891    );
1892}
1893extern "C" {
1894    pub fn faiss_IndexIDMap2_new(
1895        p_index: *mut *mut FaissIndexIDMap2,
1896        index: *mut FaissIndex,
1897    ) -> ::std::os::raw::c_int;
1898}
1899extern "C" {
1900    pub fn faiss_IndexIDMap2_construct_rev_map(
1901        index: *mut FaissIndexIDMap2,
1902    ) -> ::std::os::raw::c_int;
1903}
1904extern "C" {
1905    pub fn faiss_IndexIDMap2_cast(arg1: *mut FaissIndex) -> *mut FaissIndexIDMap2;
1906}
1907extern "C" {
1908    pub fn faiss_IndexIDMap2_id_map(
1909        index: *mut FaissIndexIDMap2,
1910        p_id_map: *mut *mut idx_t,
1911        p_size: *mut usize,
1912    );
1913}
1914extern "C" {
1915    pub fn faiss_IndexIDMap2_sub_index(index: *mut FaissIndexIDMap2) -> *mut FaissIndex;
1916}
1917extern "C" {
1918    pub fn faiss_pairwise_L2sqr(
1919        d: i64,
1920        nq: i64,
1921        xq: *const f32,
1922        nb: i64,
1923        xb: *const f32,
1924        dis: *mut f32,
1925        ldq: i64,
1926        ldb: i64,
1927        ldd: i64,
1928    );
1929}
1930extern "C" {
1931    pub fn faiss_pairwise_L2sqr_with_defaults(
1932        d: i64,
1933        nq: i64,
1934        xq: *const f32,
1935        nb: i64,
1936        xb: *const f32,
1937        dis: *mut f32,
1938    );
1939}
1940extern "C" {
1941    pub fn faiss_fvec_inner_products_ny(
1942        ip: *mut f32,
1943        x: *const f32,
1944        y: *const f32,
1945        d: usize,
1946        ny: usize,
1947    );
1948}
1949extern "C" {
1950    pub fn faiss_fvec_L2sqr_ny(dis: *mut f32, x: *const f32, y: *const f32, d: usize, ny: usize);
1951}
1952extern "C" {
1953    pub fn faiss_fvec_norm_L2sqr(x: *const f32, d: usize) -> f32;
1954}
1955extern "C" {
1956    pub fn faiss_fvec_norms_L2(norms: *mut f32, x: *const f32, d: usize, nx: usize);
1957}
1958extern "C" {
1959    pub fn faiss_fvec_norms_L2sqr(norms: *mut f32, x: *const f32, d: usize, nx: usize);
1960}
1961extern "C" {
1962    pub fn faiss_fvec_renorm_L2(d: usize, nx: usize, x: *mut f32);
1963}
1964extern "C" {
1965    pub fn faiss_set_distance_compute_blas_threshold(value: ::std::os::raw::c_int);
1966}
1967extern "C" {
1968    pub fn faiss_get_distance_compute_blas_threshold() -> ::std::os::raw::c_int;
1969}
1970extern "C" {
1971    pub fn faiss_set_distance_compute_blas_query_bs(value: ::std::os::raw::c_int);
1972}
1973extern "C" {
1974    pub fn faiss_get_distance_compute_blas_query_bs() -> ::std::os::raw::c_int;
1975}
1976extern "C" {
1977    pub fn faiss_set_distance_compute_blas_database_bs(value: ::std::os::raw::c_int);
1978}
1979extern "C" {
1980    pub fn faiss_get_distance_compute_blas_database_bs() -> ::std::os::raw::c_int;
1981}
1982extern "C" {
1983    pub fn faiss_set_distance_compute_min_k_reservoir(value: ::std::os::raw::c_int);
1984}
1985extern "C" {
1986    pub fn faiss_get_distance_compute_min_k_reservoir() -> ::std::os::raw::c_int;
1987}